DekGenius.com
Previous Section Next Section

6.4 Checking Files In and Out

Dreamweaver's File Check In/Check Out feature prevents two people from changing the same file simultaneously. If this feature is enabled, you must check out a file before you can edit it. Checking out a file will Get the file and let other users know that you are responsible for it. Another user cannot edit or check out the file until you check it back in (although they can view read-only copies of the file). When you check in a file, you relinquish control of it. Dreamweaver will Put the revised file to the live site, and other users will again be allowed to check it out. Therefore, when File Check In/Check Out is enabled, you can edit only those files that you have checked out. Files that are not checked out, or have been checked out by other users, are locked (uneditable).

The reference copy of a file always resides on the server. Checking out a file with Check Out initiates a revision process that ends when the file is checked back in with Check In. In a multideveloper environment, all files should be checked out before editing and checked in when completed to prevent file version conflicts. The File Check In/Check Out feature won't work properly unless all collaborators enable the feature and use it as intended.

There is no way you can perform a file check out when creating a new file, so simply use File Check In when you are ready to upload the new file for the first time.

To enable File Check In/Check Out, enable the appropriate checkboxes in the Remote Info category of the Site Definition dialog box as described earlier in Section 6.2.2. To check out a file, use Site figs/U2192.gif Check Out, Ctrl+Alt+Shift+D (Windows), or Cmd+Opt+Shift+D (Macintosh). To Check In a file, use Site figs/U2192.gif Check In, Ctrl+Alt+Shift+U (Windows), or Cmd+Opt+Shift+U (Macintosh).

A green checkmark icon in the Site window, as shown in Figure 6-8, indicates a file that you have checked out. Red checkmarks indicate files checked out by other developers. A lock icon indicates a file that cannot be edited until it is checked out.

Checked-out files are not actually locked by the operating system; instead, Dreamweaver puts a lock file (with an .lck extension) on the server to identify the user who has checked out each file and prevent others from editing it.

Even though external editors ignore .lck files, you shouldn't edit a "locked" HTML file in an external editor. Doing so will create version control problems, causing your edits, or those of a co-worker, to be overwritten.

Use the Check Out button, shown in Figure 6-8, to download files from the server, check them out, and place .lck files on the server. If the Check Out Files when Opening option is enabled in the Remote Info category of the Site Definition dialog box, Dreamweaver checks out any locked file you open. If this option is disabled, Dreamweaver prompts you whether to View or Check Out the file when you attempt to open a locked file.

Use the Check In button, also shown in Figure 6-8, to upload your completed documents and remove the .lck files. The Check Out and Check In buttons aren't shown in the Site window toolbar if File Check In/Check Out is disabled (in which case you should use the Get and Put buttons, which download and upload files without checking them in or out, instead). Figure 6-11 shows the Get and Put buttons.

When using File Check In/Check Out, you can tell who has a file checked out by displaying the Checked Out By column in the Local Files and Remote Files panes as described under Section 6.2.5.

To email whoever has checked out a file, click on the user's name in the Checked Out By column, as seen in Figure 6-11, to open a blank message in your default email program. To override the checked-out status of a file—for example when the user is on vacation—right-click (Windows) or Ctrl-click (Macintosh) on the file in the Site window and choose Undo Check Out from the contextual menu.

For more information on uploading and downloading files, see Section 6.8 later in this chapter. To create a report that lists checked-out files, use the Site figs/U2192.gif Reports figs/U2192.gif Workflow figs/U2192.gif Checked Out By option.

    Previous Section Next Section