Adobe
Products
Acrobat
Creative Cloud
Creative Suite
Digital Marketing Suite
Digital Publishing Suite
Elements
Photoshop
Touch Apps
Student and Teacher Editions
More products
Solutions
Creative tools for business
Digital marketing
Digital media
Education
Financial services
Government
Web Experience Management
More solutions
Learning Help Downloads Company
Buy
Home use for personal and home office
Education for students, educators, and staff
Business for small and medium businesses
Licensing programs for businesses, schools, and government
Special offers
Search
 
Info Sign in
Welcome,
My cart
My orders My Adobe
My Adobe
My orders
My information
My preferences
My products and services
Sign out
Why sign in? Sign in to manage your account and access trial downloads, product extensions, community areas, and more.
Adobe
Products Sections Buy   Search  
Solutions Company
Help Learning
Sign in Sign out My orders My Adobe
Preorder Estimated Availability Date. Your credit card will not be charged until the product is shipped. Estimated availability date is subject to change. Preorder Estimated Availability Date. Your credit card will not be charged until the product is ready to download. Estimated availability date is subject to change.
Qty:
Purchase requires verification of academic eligibility
Subtotal
Review and Checkout
Adobe Developer Connection / Dreamweaver Developer Center /

Using Subversion with Adobe Dreamweaver CS5 – Part 2: Configuring Dreamweaver to use Subversion

by Andrew Voltmer

Andrew Voltmer
  • ninevolt

Content

  • Configuring a new site for the Subversion repository
  • Checking out and editing content
  • Using diff and revert

Modified

30 April 2010

Page tools

Share on Facebook
Share on Twitter
Share on LinkedIn
Bookmark
Print
collaboration content management Dreamweaver CS5 workflow

Requirements

Prerequisite knowledge

Knowledge of Adobe Dreamweaver and basic web design/development knowledge.

User level

All

Required products

  • Dreamweaver (Download trial)

This is Part 2 in a three-part series on using Subversion with Dreamweaver CS5. Part 1 provides a general introduction to Subversion and the concept of version control systems. This part shows you how to configure Dreamweaver CS5 to use a Subversion repository. Part 3, explains how to create your own repository.

When you are working on a project as part of a large team, there is typically a member of the team who has already set up a Subversion server and repository and can provide you with the connection method and credentials to the remote repository. Dreamweaver CS5 supports four major Subversion connection protocols: HTTP, HTTPS, SVN, and SVN+SSH.

In my experience most environments have Subversion set up in conjunction with Apache and will be supporting the HTTP or HTTPS protocol methods for connecting to the Subversion server. There are other methods for connecting to a Subversion server so be sure to check with your Subversion administrator for connection details. In the examples in this article, I use the HTTP method to connect to the repository.

Unlike a designer/developer working with a large team, individual developers will likely already be using Dreamweaver to manage their websites and will have much of the site definition already set up, but they will need to set up a Subversion repository. This may also apply to the senior developer at a firm who is responsible for the initial creation of the Subversion repository.

It is important to understand the creation of both a repository and the initial check-in of some web content. This process, however, is somewhat more advanced so it is included as the final part of this article series. For this initial check-in of content I already have a website set up in Dreamweaver and will enable Subversion support to start using the Subversion client in Dreamweaver CS5.

 

Configuring a new site for the Subversion repository

In Adobe Dreamweaver CS5 the configuration settings for the version control system are managed as part of the site definition. Each website under management can use different Subversion settings.

Assuming that some content is already checked into the repository, as a new member of the design/development team you will want access to this existing web content and code.

In Dreamweaver, choose Site > Manage Sites to open the Site Definition dialog box (see Figure 1).

Choose Site > Manage Sites to access an existing site.
Figure 1. Choose Site > Manage Sites to access an existing site.

To create the new site definition for the site on which you will work, click New and then Site (see Figure 2). If you are presented with the Basic view, click Advanced (near the top of the dialog box) to switch views and access the settings for version control.

Click New and then Site.
Figure 2. Click New and then Site.

Under the Category section on the left, select Local Info (see Figure 3). Next, enter the local information for your site, including the name, the local root folder, and the HTTP address. In this example I use voltmer.com, and the settings are as follows:

  • Site name: voltmer.com
  • Local root folder: /Users/Voltmer/Web Sites/voltmer.com
  • Default images folder
  • HTTP address: http://www.voltmer.com
Enter the local information for the new site.
Figure 3. Enter the local information for the new site.

Note: I create a new empty directory for voltmer.com in my Web Sites folder. This is empty because I have yet to check out my web content from the Subversion server. Also, I leave the Default images folder field blank because there is no folder there yet. It will come from the repository, and I will come back to edit the value later.

After setting the local information, click Remote Info on the left, and set Access to None (see Figure 4). This may seem odd to some experienced Dreamweaver users who are used to pushing data directly from Dreamweaver to their production website. For a larger organization, however, it is common to have a subteam or an automated script that performs an update from the Subversion server and then pushes a tagged set of files to the product server.

Under Remote Info, set Access to None.
Figure 4. Under Remote Info, set Access to None.

If you do want to use a remote site for testing or staging you can configure these settings as you have done in the past.

If you are the person (or one of the people) who is responsible for pushing updates to production, you may also want to configure the production server in this interface; however, I recommend that you consider using an automatic build system for deployment of your content to your production site.

Next, choose Version Control and select Subversion as your access method (see Figure 5). You only have one option, because as of the writing of this article Dreamweaver CS5 supports only one VCS.

Specify the various connection settings required to connect to the Subversion repository including protocol, server address, and so on. Your Subversion administrator should be able to provide you with these values. My settings are as follows:

  • Access: Subversion
  • Protocol: HTTP
  • Server address: localhost
  • Repository path: /repo/voltmer.com/
  • Server port: Default
  • Username: voltmer
  • Password: <secretpassword>
Specify the version control settings for your Subversion repository.
Figure 5. Specify the version control settings for your Subversion repository.

Note: The server in this example is running on the same machine as the client, so I use localhost as the server name. Localhost is an alias that refers to the local machine.

To verify the settings work, click Test. If everything is configured properly, Dreamweaver will display a dialog box that reads "Server and project are accessible!" (see Figure 6). If you do not see this message, refer to the Dreamweaver CS5 documentation or ask your Subversion repository administrator to confirm configuration settings.

If everything is configured properly, you will see this dialog box.
Figure 6. If everything is configured properly, you will see this dialog box.

To finish click OK in the Site Definition dialog box.

Note: You may need to modify settings for your site definition in other categories, but that configuration is beyond the scope of this article.

Checking out and editing content

At this point you will not have any content in the Local Files area of your Dreamweaver CS4 interface because the content has not yet been checked out from the repository. To check out content make sure you are in the Local Files area of your website, right-click or Ctrl-click the Site folder at the top of your directory structure, and choose Version Control > Get Latest Versions (see Figure 7). This will synchronize your local directory structure with the content from the Subversion repository on the server. Now you have checked out the code and are ready to start making edits.

Choose Version Control > Get Latest Versions to retrieve content from Subversion.
Figure 7. Choose Version Control > Get Latest Versions to retrieve content from Subversion.

Figure 8 shows the results of my check-out for voltmer.com. I am now ready to make a change to some of my content.

The updated local view.
Figure 8. The updated local view.

Specifically, I have decided to update part of the index.html file on voltmer.com. I forgot to change the title of my main page from the defaults, and because I don't like what is there now I am going to make a change from:

<title>Title</title>

to:

<title>Voltmer's Website</title>

To make this change, I double-click the index.html file in the Local Files area to open it for editing. By default I see the Design view. At the top of the page I change the Title to "Voltmer's Website". Alternatively, I could have switched to Code view or Split view and made the edit directly in the HTML. Any of these actions will result in a change to the underlying file. After the change is made, I close the file and save the changes.

At this point my Local Files area changes slightly. Dreamweaver CS4 puts a check mark next to index.html indicating that I have made a change to the file (see Figure 9). This is a local change only; the files kept in the repository are unchanged. As far as the Subversion server is concerned the file has not yet been changed. Other users can check out their own copies of the site and make changes, but they won't see my modification to index.html.

I want to submit my changes back to the repository for eventual publication to the production website, so I need to check in (commit) my changes back to the repository.

The check mark next to index.html indicates a local change to the file.
Figure 9. The check mark next to index.html indicates a local change to the file.

To do this, I right-click on the changed file and choose Check In (see Figure 10). I am then prompted to provide a Commit Message. This message is stored along with the changes to the file in the repository as a record of the changes made to the file between check-out and check-in.

Choose Check In to commit a changed file to the repository.
Figure 10. Choose Check In to commit a changed file to the repository.

Professional designers and developers know that clear, concise change descriptions are critical because they help everyone on the team understand what changes were made and why. You can even use the comments yourself to recall the details of one of your own past edits. For this change I type, "Changed the title of index.html" (see Figure 11).

Enter a meaningful description of the change for the Commit Message.
Figure 11. Enter a meaningful description of the change for the Commit Message.

When I type in the dialog box I can click Commit and my changes are submitted (committed) to the repository. When you do this yourself, you will notice that Dreamweaver CS4 removes the check mark next to the file in the Local Files list to indicate that the file is no longer out of sync with the repository.

Using diff and revert

Two of the most powerful features of Subversion are diff and revert. The diff feature allows the designer/developer to compare two different versions of the same file to identify the differences between the two versions. If you've ever wondered what changed between a broken version of your website and the version that used to work, you know why this is extremely useful. With the ability to diff a file, you can see what changed easily.

With the revert feature you can go back to an earlier version. For example, if you have made a change that a client does not like, you can simply restore the old version of the page. Instead of keeping multiple older versions, I can find the old copy in the repository, compare the old copy to the current copy with diff, and then revert to the older version.

Continuing with my example scenario, I have received a call from my customer who wants the title of the home page like it used to be. I am working on a number of sites and I can't remember exactly what I changed, so I do a diff.

I right-click the file index.html and choose Version Control > Show Revisions (see Figure 12).

Choose Version Control > Show Revisions to compare versions.
Figure 12. Choose Version Control > Show Revisions to compare versions.

In the Revision History dialog box, I select the two revisions to compare and click Compare (see Figure 13).

Select the revisions to compare and click Compare.
Figure 13. Select the revisions to compare and click Compare.

Since I have not yet defined an application for file comparison, Dreamweaver asks if I want to choose an application (see Figure 14). I do want to use one that I have installed. I am using TextWrangler from Bare Bones Software, but you can choose the tool that best meets your needs.

Click OK to select an application to compare files.
Figure 14. Click OK to select an application to compare files.

For details on how to install various diff tools, click Help in the File Compare category of the Dreamweaver Preferences dialog box (see Figure 15).

Specify your preferred compare application in the File Compare category of Preferences.
Figure 15. Specify your preferred compare application in the File Compare category of Preferences.

After I have configured my diff application, any time I choose Version Control > Show Revisions Dreamweaver will launch the application, enabling me to compare the different revisions of the file (see Figure 16).

My diff applications enables me to compare different versions of a file. click to enlarge

After reviewing the differences, I have decided that I need to revert to the previous version. In the same Revision History dialog box I select the older version of the file that I prefer to the current version and click Promote to Current. Dreamweaver prompts me to confirm that I want to revert to the selected version (see Figure 17).

Click Yes to confirm that you want to revert to the selected revision.
Figure 17. Click Yes to confirm that you want to revert to the selected revision.

When I click Yes, the revision history is automatically updated to show the change of the file to a new revision number (see Figure 18), but with the same contents as the older file.

Revision 2, the initial check-in, is now the most recent revision.
Figure 18. Revision 2, the initial check-in, is now the most recent revision.

Now, if I edit the file I can see the original <title> tag instead of the change I made earlier.

You can also revert a local file that has been changed by right-clicking on it and selecting Undo Check Out.

Where to go from here

To learn how to set up your own repository, go to Part 3 of this article series, Configuring Apache for Subversion support.

For more information on Subversion and version control, check out the following resources:

  • The Subversion site
  • The Subversion book
  • Version Control with Subversion
  • Subversion Version Control
  • Practical Subversion

More Like This

  • Turning a design into HTML and CSS using the Fireworks to Dreamweaver workflow – Part 2: Modifying the HTML and CSS
  • Editing a WordPress theme with Dreamweaver CS5 – Part 3: Adding a logo, header styles, and menu
  • Working with Drupal in Dreamweaver CS5
  • Building a Drupal site in 10 steps
  • Turning a design into HTML and CSS using the Fireworks to Dreamweaver workflow – Part 1: Exporting the design
  • Editing a WordPress theme with Dreamweaver CS5 – Part 1: Learning the basics
  • Editing a WordPress theme with Dreamweaver CS5 – Part 2: Setting up your site
  • Editing a WordPress theme with Dreamweaver CS5 – Part 4: Building a custom home page
  • SQL primer for Dreamweaver users
  • Using Subversion with Dreamweaver CS5 – Part 1: Introducing Subversion

Tutorials and samples

Tutorials

  • Understanding HTML5 semantics: Changed and absent elements
  • Mobile app with PhoneGap: Submitting to the Apple App Store
  • PhoneGap and Dreamweaver: Releasing on iOS
  • Mobile app with PhoneGap: Submitting to Android Market

Samples

  • Responsive design with jQuery marquee
  • Customizable starter design for jQuery Mobile
  • Customizable starter design for HTML5 video
  • Customizable starter design for multiscreen development

Dreamweaver user forum

More
04/23/2012 Resolution/Compatibility/liquid layout
04/20/2012 using local/testing server with cs5 inserting images look fine in the split screen but do not show
04/18/2012 Ap Div help
04/23/2012 Updating

Dreamweaver Cookbook

More
11/07/2011 Simple social networking share buttons
09/20/2011 Registration form that will generate email for registrant to validate
08/21/2011 Spry Accordion - Vertical Text - Auto Start on Page Load - Mouse Over Pause
08/17/2011 Using cfdump anywhere you like

Products

  • Acrobat
  • Creative Cloud
  • Creative Suite
  • Digital Marketing Suite
  • Digital Publishing Suite
  • Elements
  • Mobile Apps
  • Photoshop
  • Touch Apps
  • Student and Teacher Editions

Solutions

  • Digital marketing
  • Digital media
  • Web Experience Management

Industries

  • Education
  • Financial services
  • Government

Help

  • Product help centers
  • Orders and returns
  • Downloading and installing
  • My Adobe

Learning

  • Adobe Developer Connection
  • Adobe TV
  • Training and certification
  • Forums
  • Design Center

Ways to buy

  • For personal and home office
  • For students, educators, and staff
  • For small and medium businesses
  • For businesses, schools, and government
  • Special offers

Downloads

  • Adobe Reader
  • Adobe Flash Player
  • Adobe AIR
  • Adobe Shockwave Player

Company

  • News room
  • Partner programs
  • Corporate social responsibility
  • Career opportunities
  • Investor Relations
  • Events
  • Legal
  • Security
  • Contact Adobe
Choose your region United States (Change)
Choose your region Close

North America

Europe, Middle East and Africa

Asia Pacific

  • Canada - English
  • Canada - Français
  • Latinoamérica
  • México
  • United States

South America

  • Brasil
  • Africa - English
  • Österreich - Deutsch
  • Belgium - English
  • Belgique - Français
  • België - Nederlands
  • България
  • Hrvatska
  • Česká republika
  • Danmark
  • Eastern Europe - English
  • Eesti
  • Suomi
  • France
  • Deutschland
  • Magyarország
  • Ireland
  • Israel - English
  • ישראל - עברית
  • Italia
  • Latvija
  • Lietuva
  • Luxembourg - Deutsch
  • Luxembourg - English
  • Luxembourg - Français
  • الشرق الأوسط وشمال أفريقيا - اللغة العربية
  • Middle East and North Africa - English
  • Moyen-Orient et Afrique du Nord - Français
  • Nederland
  • Norge
  • Polska
  • Portugal
  • România
  • Россия
  • Srbija
  • Slovensko
  • Slovenija
  • España
  • Sverige
  • Schweiz - Deutsch
  • Suisse - Français
  • Svizzera - Italiano
  • Türkiye
  • Україна
  • United Kingdom
  • Australia
  • 中国
  • 中國香港特別行政區
  • Hong Kong S.A.R. of China
  • India - English
  • 日本
  • 한국
  • New Zealand
  • 台灣

Southeast Asia

  • Includes Indonesia, Malaysia, Philippines, Singapore, Thailand, and Vietnam - English

Copyright © 2012 Adobe Systems Incorporated. All rights reserved.

Terms of Use | Privacy Policy and Cookies (Updated)

Ad Choices

Reviewed by TRUSTe: site privacy statement