About the Check In/Check Out system
If you’re working in a collaborative environment, you can check files in and out from local and remote servers. If you’re the only person working on the remote server, you can use the Put and Get commands without checking files in or out.
Checking out a file is the equivalent of declaring “I’m working on this file now—don’t touch it!” When a file is checked out, the name of the person who checked out the file is displayed in the Files panel, along with a red check mark (if a team member checked out the file) or green check mark (if you checked out the file) next to the file’s icon.
Checking in a file makes the file available for other team members to check out and edit. When you check in a file after editing it, your local version becomes read-only and a lock symbol appears beside the file in the Files panel to prevent you from making changes to the file.
Dreamweaver does not make checked-out files read-only on the remote server. If you transfer files with an application other than Dreamweaver, you can overwrite checked-out files. However, in applications other than Dreamweaver, the LCK file is visible next to the checked-out file in the file hierarchy to help prevent such accidents.
Set up the Check In/Check Out system
Before you can use the Check In/Check Out system, you must associate your local site with a remote server.
Check files into and out of a remote folder
After you set up the Check In/Check Out system, you can check in and check out files on a remote server using the Files panel or from the Document window.
Undo a file check-out
If you check out a file, then decide not to edit it (or decide to discard the changes you made), you can undo the check-out operation and the file returns to its original state.
To undo a file check-out, do one of the following:
Open the file in the Document window, then select Site > Undo Check Out.
In the Files panel (Window > Files), right-click (Windows) or Control‑click (Macintosh), then select Undo Check Out.
The local copy of the file becomes read-only, and any changes you’ve made to it are lost.
Use WebDAV to check in and check out files
Dreamweaver can connect to a server that uses WebDAV (Web-based Distributed Authoring and Versioning), which is a set of extensions to the HTTP protocol that allow users to collaboratively edit and manage files on remote web servers. For more information, see www.webdav.org.
Use Subversion (SVN) to get and check in files
Dreamweaver can connect to a server that uses Subversion (SVN), a versioning control system that lets users collaboratively edit and manage files on remote web servers. Dreamweaver is not a full SVN client, but does let users get the latest versions of files, make changes, and commit the files.
Adobe recommends that you use a third-party file comparison tool as you work with SVN version-controlled files. When you compare files for differences, you can learn exactly what kinds of changes other users made to the files. For more information on file comparison tools, use a web search engine such as Google Search to search for “file comparison” or “diff” tools. Dreamweaver works with most third-party tools.
For a video overview of working with SVN and Dreamweaver, see www.adobe.com/go/lrvid4049_dw.
Set up an SVN connection
Before you use Subversion (SVN) as a version control system with Dreamweaver, you must set up a connection to an SVN server. You set up a connection to an SVN server in the Version Control category of the Site Definition dialog box.
The SVN server is a repository of files from which you and other users can get and commit files. It is different from the remote server you typically use with Dreamweaver. When using SVN, the remote server remains the “live” server for your web pages, and the SVN server exists to hold the repository of files over which you want to maintain version control. The typical workflow is to get and commit files back and forth between the SVN server, and then publish them to your remote server from Dreamweaver. The remote server setup is completely separate from the SVN set up.
You must have access to an SVN server and an SVN repository before you begin this set up. For more information about SVN, see the Subversion website at http://subversion.apache.org/.
To set up the SVN connection, follow these steps:
- Choose Sites > Manage Sites, select the site you want to set up version control for, and click the Edit button.Note: If you haven’t already set up local and remote folders for a Dreamweaver site, you’ll at least need to set up a local site before proceeding. (The remote site is not required at this stage, but you will eventually need to set it up before publishing your files to the Web.) For more information, see Working with Dreamweaver sites.
In the Site Setup dialog box, select the Version Control category.
Select Subversion from the Access pop-up menu.
Set access options as follows:
Select a protocol from the Protocol pop-up menu. The available protocols are HTTP, HTTPS, SVN, and SVN+SSH.
Note: Using the SVN+SSH protocol requires special configuration. For more information, see www.adobe.com/go/learn_dw_svn_ssh_en.Enter the address for the SVN server in the Server address text box (typically in the form of servername.domain.com).
Enter the path to your repository on the SVN server in the Repository path text box (typically something like /svn/your_root_directory. It is up to the server administrator to name the root folder for the SVN repository.)
(Optional) If you want to use a server port other than the default server port, select Non Default and enter the port number in the text box.
Enter your SVN server user name and password.
Click Test to test your connection, or click OK to close the dialog box. Then click Done to close the Manage Sites dialog box.
Once the connection with the server established, your SVN repository
is available for viewing in the Files panel. To view it, you can
select Repository View from the View pop-up menu, or click the Repository
Files button
in
the expanded Files panel.
Get the latest versions of files
When you get the latest version of a file from the SVN repository, Dreamweaver merges the contents of that file with the contents of its corresponding local copy. (In other words, if someone else has updated the file since you last committed it, those updates are merged into the local version of the file on your computer.) If the file does not yet exist on the local hard drive, Dreamweaver simply gets the file.
Make sure that you’ve successfully set up an SVN connection.
Do one of the following:
Display the local version of your SVN files in the Files panel by selecting Local view from the View pop-up menu. (If you are working in the expanded Files panel, the Local view is automatically displayed.) Then right-click (Windows) or Control-click (Macintosh) the file or folder you’re interested in and select Version Control > Get Latest Versions.
Display the SVN repository files by selecting Repository View from the View pop-up menu in the Files panel, or by clicking the Repository Files button in the expanded Files panel. Then right-click (Windows) or Control-click (Macintosh) the file or folder you’re interested in and select Get Latest Versions.
Commit files
Make sure that you’ve successfully set up an SVN connection.
Do one of the following:
Display the local version of your SVN files in the Files panel by selecting Local view from the View pop-up menu. (If you are working in the expanded Files panel, the Local view is automatically displayed.) Then select the file you want to commit and click the Check In button.
Display the SVN repository files by selecting Repository View from the View pop-up menu in the Files panel, or by clicking the Repository Files button in the expanded Files panel. Then right-click (Windows) or Control-click (Macintosh) the file you want to commit and select Check In.
Review the actions in the Commit dialog box, make changes if necessary, and click OK.
You can change actions by selecting the file whose action you want to change, and clicking the buttons at the bottom of the Commit dialog box. Two choices are available: commit and ignore.
Update status of files or folders in the repository
You can update the SVN status of a single file or folder. The update does not refresh the entire display.
Make sure that you’ve successfully set up an SVN connection.
Display the SVN repository files by selecting Repository View from the View pop-up menu in the Files panel, or by clicking the Repository Files button in the expanded Files panel.
Right-click (Windows) or Control-click (Macintosh) any folder or file in the repository and select Update Status.
Update status of local file or folders
You can update the SVN status of a single file or folder. The update does not refresh the entire display.
Make sure that you’ve successfully set up an SVN connection.
Display the local version of your SVN files in the Files panel by selecting Local view from the View pop-up menu. (If you are working in the expanded Files panel, the Local view is automatically displayed.)
Right-click (Windows) or Control-click (Macintosh) any folder or file in the Files panel and select Update Status.
View revisions for a file
Make sure that you’ve successfully set up an SVN connection.
- Do one of the following:
Display the local version of your SVN files in the Files panel by selecting Local view from the View pop-up menu. (If you are working in the expanded Files panel, the Local view is automatically displayed.) Then right-click (Windows) or Control-click (Macintosh) the file you want to see revisions for and select Version Control > Show Revisions.
Display the SVN repository files by selecting Repository View from the View pop-up menu in the Files panel, or by clicking the Repository Files button in the expanded Files panel. Then right-click (Windows) or Control-click (Macintosh) the file you want to see revisions for and select Show Revisions.
In the Revision History dialog box, select the revision or revisions you’re interested in and do one of the following:
Click Compare to Local to compare the selected revision with the local version of the file.
Note: You must install a third-party file comparison tool before you can compare files. For more information on file comparison tools, use a web search engine such as Google Search to search for “file comparison” or “diff” tools. Dreamweaver works with most third-party tools.Click Compare to compare two selected revisions. Control-click to select two revisions simultaneously.
Click View to view the selected revision. This action does not overwrite the current local copy of the same file. You can save the selected revision to your hard drive just as you would save any other file.
Click Promote to make the selected revision the most current revision in the repository.
Lock and unlock files
Locking a file in the SVN repository lets other users know that you are working on a file. Other users can still edit the file locally, but will not be able to commit the file until you’ve unlocked it. When you lock a file in the repository, you’ll see an open-lock icon on the file. Other users see a completely locked icon.
Make sure that you’ve successfully set up an SVN connection.
Do one of the following:
Display the SVN repository files by selecting Repository View from the View pop-up menu in the Files panel, or by clicking the Repository Files button in the expanded Files panel. Then right-click (Windows) or Control-click (Macintosh) the file you’re interested in and select Lock or Unlock.
Display the local version of your SVN files in the Files panel by selecting Local view from the View pop-up menu. (If you are working in the expanded Files panel, the Local view is automatically displayed.) Then right-click (Windows) or Control-click (Macintosh) the file you’re interested in and select Lock or Unlock.
Add a new file to the repository
A blue plus sign on a file in the Files panel denotes a file that does not yet exist in the SVN repository.
Make sure that you’ve successfully set up an SVN connection.
In the Files panel, select the file you want to add to the repository and click the Check In button.
Make sure that the file is selected for Commit in the Commit dialog box and click OK.
Move, copy, delete, or revert files
To move a file, drag the file to the destination folder in your local site.
When you move a file, Dreamweaver marks the file in the new location with an Add With History sign, and marks the file in the old location with a Delete sign. When you Commit these files, the file in the old location disappears.
To copy a file, select the file, copy it (Edit > Copy), and paste (Edit > Paste) the file in the new location.
When you copy and paste a file, Dreamweaver marks the file in the new location with an Add With History sign.
To delete a file, select the file and press delete.
Dreamweaver gives you the option of whether you want to delete the local version of the file only, or both the local version and the version on the SVN server. If you select to delete the local version only, the file on the SVN server is not affected. If you select to delete the version on the SVN server as well, the local version is marked with a Delete sign, and you must commit the file for the deletion to take place.
To revert a copied or moved file to its original location, right-click the file and select Version Control > Revert.
Resolve conflicting files
If your file conflicts with another file on the server, you can edit it and then mark it as resolved. For example, if you try to check in a file that conflicts with another user’s changes, SVN will not let you commit the file. You can get the latest version of the file from the repository, manually make changes to your working copy, and then mark your file as resolved so that you can commit it.
Make sure that you’ve successfully set up an SVN connection.
Display the local version of your SVN files in the Files panel by selecting Local view from the View pop-up menu. (If you are working in the expanded Files panel, the Local view is automatically displayed.)
Right-click (Windows) or Control-click (Macintosh) the file you want to resolve and select Version Control > Mark as Resolved.
Go offline
You might find it useful to avoid repository access during other file-transfer activities by going off-line. Dreamweaver will reconnect to the SVN repository as soon as you invoke an activity that requires a connection (Get Latest Versions, Commit, and so on).
Make sure that you’ve successfully set up an SVN connection.
Display the local version of your SVN files in the Files panel by selecting Local view from the View pop-up menu. (If you are working in the expanded Files panel, the Local view is automatically displayed.)
Right-click (Windows) or Control-click (Macintosh) any file or folder in the Files panel and select Version Control > Go Offline.
Clean up a local SVN site
This command lets you remove locks on files so that you can resume unfinished operations. You should use this command to remove old locks if you receive “working copy locked” errors.
Make sure that you’ve successfully set up an SVN connection.
Display the local version of your SVN files in the Files panel by selecting Local view from the View pop-up menu. (If you are working in the expanded Files panel, the Local view is automatically displayed.)
Right-click (Windows) or Control-click (Macintosh) the file you want to clean up and select Version Control > Clean Up.
About moving files and folders in Subversion-controlled sites
When you move the local versions of files or folders in a Subversion-controlled site, you run the risk of creating problems for other users who might be synching to the SVN repository. For example, if you move a file locally, and don't commit that file to the repository for a few hours, another user might try to get the latest version of the file from the file’s old location. For this reason, you should always commit files back to the SVN server immediately after you've moved them locally.
Files and folders remain on the SVN server until you've manually deleted them. So even if you move a file to a different local folder and commit it, the old version of the file remains in the previous location on the server. To avoid confusion, delete the old copies of files and folders that you've moved.
When you move a file locally and commit it back to the SVN server, the file’s version history is lost.
