Tip:
Highlight text to annotate it
X
David Gassner: In this video I'm going to describe a new feature
of Dreamweaver CS4 that allows you
to manage your website development operations using Subversion.
Subversion is a free, open-source source code control application.
It's installed on a server and can now communicate
with Subversion directly from within Dreamweaver.
You can check files in, check them out again and revert back
to old files or restore files that you've accidentally deleted.
In order to use this feature,
you configure your website in Dreamweaver CS4.
I will go to the Site Management dialog
and select the new Version Control category.
In this category you set your access.
The only option right now is Subversion.
The protocol can be set to anyone of these four supported protocols.
I have selected HTTP.
If you are setting up your first Subversion repository,
check with the repository administrator to find
out what protocol you should use.
Set the server address, that's just like a website address
but without the HTTP prefix, and the repository path.
This will be the name of your repository; again,
provided by the administrator.
The server port is set to Default in my system,
and once again is a configurable value.
And then I've supplied a username and password.
From this screen I can click the Test button to test my access
to the repository and Dreamweaver shows me that the Subversion server
and project are accessible.
So I'll click OK a few times, then click Done
and return back to my web page.
Once you've turned on Subversion,
each file in your file list will have icons
to tell you what its status is.
Any file with a plus icon is a file
that can be checked in for the first time.
That is it's not yet stored in the repository.
I'm going to select the file index.html and open it and scroll
down to show the current content.
Notice that there are some photos and some placeholder text.
Now I'll right-click on the file and select Check In.
This is the first time I'm adding the file.
So I'm going to add a commit message
of 'Adding file for first time.'
Then I'll click the Commit button.
Dreamweaver puts the file into my source code control repository
and then I'll hide the dialog.
Now I'm going to check out the file from the repository.
That will mark the file so that other developers know it's being
worked on.
I'll right-click on the file and select Check Out.
Once I have checked out the file, I can now make some changes.
I'll click into this text and replace it with,
'This is a very yellow car.'
And I'll save my changes by selecting File > Save.
Once any changes have been made after checking out,
a checkmark appears next to the file name,
indicating the changes have been made
and the file should be checked in again.
Now I'll right-click on the file and select Check In,
and in the commit message I'll add some text,
'Change yellow car message.'
And I'll click Commit again.
The new version of the file is now checked in.
Now let's say that I needed
to restore the old version of the file.
I will go back to the file again, right-click on it
and select the new menu choice Version Control,
and then Show Revisions.
Dreamweaver interrogates the repository
and shows me the various revisions.
Now I'm going to select the file that I want to restore
and click Promote To Current, meaning that I want repository
to see this version as the current version.
I'll confirm the change and after a moment Subversion indicates
that there is yet another version but with its own comment,
'Promoted from version 7,' and I'll close the dialog.
Now to restore that version of the file I will right-click
on the file again, go to Version Control
and select Get Latest Versions.
That means that I want to go get the version
that I indicated was the current version.
Once that operation is complete I'll scroll down and show
that the original text has been restored.
So that's Subversion, a free,
open-source source code control system now fully integrated
into Dreamweaver CS4.
You can get your own free copy of Subversion
from the Subversion open source project
or you can rent a Subversion repository from one of many ISPs
that provide that service.