Previous Section  < Day Day Up >  Next Section

16.3 Check In and Check Out

If you're the sole developer for a Web site, the Files panel's Get and Put buttons are fine for transferring your files. But if you're on a team of developers, these simple tools can get you in trouble.

For example, suppose your boss emails you an important announcement that she wants posted on the home page immediately. So you download the home page from the Web server and start to edit it. At the same time, your co-worker Bob notices a typo on the home page. He downloads it, too.

You're a much faster worker than Bob, so you've added the critical news to the home page and moved it back to the Web server. But now Bob transfers his corrected home page to the Web server, overwriting your edits and eliminating that urgent notice you just uploaded. (An hour later, your phone rings. It's the boss.)

Without some kind of system to monitor who has what file, and to prevent people from overwriting each other's work, collaborative Web development can be a chaotic mess. Fortunately, Dreamweaver's Check In and Check Out system provides a civilized answer to this problem. It works like your local public library: When you check a file out, no one else can have it. When you're finished, you check the file back in, releasing control of it, and allowing someone else on the team to check it out and work on it.

To use the Check In/Check Out feature effectively, it helps to keep a few things in mind:

  • When you're developing a Web site solo, your local site usually contains the most recent versions of your files. You make any modifications or additions to the pages on your computer first and then transfer them to the Web server.

    But in a collaborative environment where many people are working on the site at once, the files on your hard drive may not be the latest ones. After all, your co-workers, like you, have been updating pages and transferring them to the Web server. The home-page file sitting in the local site folder on your computer might be several days older than the file on the remote site. This is why checking out a file from the remote site, rather than editing from the copy on your computer, is so important. It guarantees that you have the latest version of the file.

  • In a collaborative environment, nobody should post files to the Web server using any method except Dreamweaver's Check In and Check Out system.

    The reason is technical, but worth slogging through: When Dreamweaver checks out a file, it doesn't actually lock the file. Instead, it places a small, invisible text file (with the three-letter suffix .lck) on both the remote server and in your local site folder. This text file indicates who has checked out the file. When Dreamweaver connects to a remote site, it uses these files to know which Web files are in use by others.

    But only Dreamweaver understands these .lck files. Other FTP programs, like WSFTP (Windows) or Fetch (Mac), gladly ignore them and can easily overwrite any checked-out files. This risk also applies when you simply copy files back and forth over the office network.


    Dreamweaver's word processor-like Web page editing program, Contribute, also takes advantage of this Check In/Check Out feature, so you can use the two programs on the same site.

  • All Dreamweaver users must configure their remote site to use Check In and Check Out (see Section 16.3). If just one person doesn't do it, you risk overwritten files.


Visual SourceSafe and WebDAV users are free of these last two constraints. As long as everyone working on the site uses programs that support the Visual SourceSafe client or the WebDAV protocol, they can work seamlessly with Dreamweaver users. And vice versa.

16.3.1 Checking Files Out

When you want to work on a file in a collaborative site, you check it out from the Web server. Doing so makes sure that you have the latest version of the file, and that nobody else can make changes to the file.

If you're used to creating sites by yourself, this business may feel a little strange; after all, your local site (the files on your computer) contains the latest versions of all files. When working with a group, however, you should consider the remote site梬here everyone can access, edit and add new Web pages梩o be the master copy of your site's files.


There's nothing to check out when you're creating a new page for the site. Since the only version of the file in the universe is on your computer, there's no fear that someone else might work on it at the same time as you. In this case, you only need to check the file into the site when you're done (see Section 16.3.2).

You check out a file using the Files panel; if it's not open, press F8 or use any of the methods described in Section 14.1.4. Then choose the remote site you wish to work on from the Site pop-up menu (shown at top Figure 16-11).

Now you're ready to begin. From the Local Folder file list in the Files panel, click to select the files you wish to check out from the Web server梠r, to check out an entire folder and every file inside it, just select the folder.

You may in some instances want to select a file from the Remote Site list as well. For example, maybe you need to modify a page that you didn't create, and which you've never before checked out. In this case, the file isn't in your local folder, so you must select it from the Remote Site list. First, connect to the Web server by clicking the Connect button (Section 16.2). After Dreamweaver connects to the server, the remote files appear in the Remote Site list. Select the ones you wish to check out.

If, when you define the remote site (Section 16.1), you select the Check Out File when Opening option, you can also check out (and open) a file by double-clicking it in the Files panel. This is a quick way to open a page for editing while still using Dreamweaver's Check Out feature.

In any case, now just click the Check Out files button on the Files panel (see Figure 16-11), or use the keyboard shortcut Ctrl+Alt+Shift+D (Shift-Option-figs/command.jpg-D). (Not enough fingers? See Section 20.1 to learn how to change Dreamweaver's shortcuts.)

Dreamweaver asks if you wish to also check out any dependent files (see Figure 16-8). Be careful checking out dependent files; clicking Yes here locks all of those files so that nobody else can modify them. If you check out both a page and its linked external style sheet, for example, whoever's responsible for maintaining your site's styles won't have access to the sheet. When she needs to add a new style, she'll be stuck until you check the style sheet back in.

Manual Checkout Override

Occasionally, you may wish to erase the checked-out status of a file. Suppose, for example, someone who's checked out a lot of files suddenly catches the plague and can't continue working on the site. In order to free those files so others can work on them, you should undo his checkout (and quarantine his cubicle).

To do this, make sure the Files panel is in Remote view (this trick won't work when looking at the Local Files). Then, rightclick (Control-click) the checked-out file in the Files panel and select Undo Checkout from the menu that appears.

You'll get two warnings. First, Dreamweaver informs you that whoever checked out the file won't be able to check it back in. (This is, in fact, false. That person can still check in the file, overwriting whatever's on the Web server. So you can see why you should override the checkout only when the person who checked it out is very unlikely to check it back in. Stranded on a deserted island, perhaps.)

Second, Dreamweaver warns you that overriding a check out will also copy the remote site version of the file to your local site. You can stop the process, if necessary, by clicking No in either of these warning boxes.

When complete, a padlock icon appears next to the file.

You can also use this technique if, after checking out a file, you've made a horrible mistake on the page and wish to revert to the copy on the Web server.

When you check files out, Dreamweaver copies them to your computer and marks them as checked out so others can't change them. As when uploading and downloading files, checking out files can take time, depending upon how fast your computer can communicate with the Internet.

After you've checked out a file, a green "checked-out" checkmark appears next to its name in the Files panel (see Figure 16-11). You can now open and edit it, and (when you're done) check the file back in.

If you attempt to check out a file someone else has already checked out, Dreamweaver tells you as much. It also gives you the option to override their checkout; but unless you're the boss, resist the temptation, for two reasons. First, your colleagues may have made some important changes to the page, which will be wiped out by your shenanigans. Second, because you so rudely stole the file, they may decide to stop talking to you.

A better way to work with someone who's checked out a file you need is to use Dreamweaver's email feature. You can see who checked out a file by consulting the Checked Out By column (only visible when you've expanded the Files panel as shown in Figure 16-11). Even better, if you click the name, Dreamweaver opens your email program and addresses an email to that person, so you can say: "Hey Bob, you've had the home page checked out for two days! I need to work on it, so check it back in!"

Get and Put, In and Out

I'm using Dreamweaver's Check In and Check Out buttons to transfer my files. What do the Get and Put buttons do when the Check In/Out feature is enabled?

If you're using Check In and Out, the Get and Put commands function slightly differently than described in Section 16.2. Get copies the selected file or files to your local site. However, Dreamweaver draws a small lock icon next to each of these "gotten" files in your Local Folder list. The files are locked, and you shouldn't edit them. Remember, checking out a file is the only way to prevent others from working on it. If you edit a locked file on your computer, nothing is stopping someone else from checking the page out from the Remote site, editing it, and checking it back in.

But using the Get command in such a situation can still be useful. For example, suppose someone just updated the site's external style sheet. Pages you're editing use this style sheet, so you'd like to get the latest version. You don't want to edit the style sheet itself, so you don't need to check it out. By using Get instead of checking out the pages, you can keep a reference copy on your computer without locking it for anyone else and without having to check it back in later.

Put, on the other hand, simply transfers the file on your local site to the remote site. This is usually a bad idea when you're also using the Check In/Check Out feature. The remote site should be your reference copy; several rounds of revisions may have been made to a file since you last checked it out. Your local copy will be hopelessly out of date, and moving it the server using Put will destroy the most recent version of the file.

The name and email address Dreamweaver uses depends on the information your co-workers provided, just as you did when you configured your computer for remote site use (see Section 16.1.2).

The Check In/Out buttons transfer files between the local site and the Web server. A padlock identifies files you've checked into the remote site. If a file is currently checked out, a checkmark appears next to its name. A green checkmark indicates you've checked out the file; a red checkmark means someone else has checked it out.

16.3.2 Checking Files In

When you're ready to move a page you've edited back onto the server, you check it in. (You also check in new files you've created.)

To check in files, open the Files panel (press F8), choose the site you're checking into from the Site pop-up menu, and (using the Local Folder file list in the Files panel) select the files you wish to check in to the Web server. As always, you can click a folder to check it in, along with every file inside it.

The files you select should be files you've checked out, or brand-new files that have never been on the Web server. If you attempt to check in a file that someone else has checked out, Dreamweaver warns you with a message box. Click Cancel to stop the check-in procedure, so that you won't overwrite the checked-out file on the server. Dreamweaver also warns you if you try to check in a file that's older than the server copy. Again, unless you're sure this is what you want to do, click Cancel.

If you want to check the page you're currently working on into the remote site, use the toolbar in the document window (see Figure 16-9).

You can check in the selected files in any of the usual ways:

  • Click the Check In files button (see Figure 16-11).

  • Use the keyboard shortcut Ctrl+Alt+Shift+U (Shift-Option-figs/command.jpg-U). (See Section 20.1 to learn how to change the Dreamweaver shortcut to something less cumbersome.)


The SiteCheck In menu option checks in only the document you're currently working on, not any files you've selected in the Files panel.

Dreamweaver asks if you wish to also check in any dependent files (see Figure 16- 8). You should transfer dependent files only if you first checked them out, or if the dependent files are new and have never been uploaded to the server. If you attempt to check in a dependent file that someone else has checked out, Dreamweaver warns you with a message box.

After you've clicked through all message boxes, Dreamweaver copies the files to the Remote site. Once you've checked in a file, a padlock icon appears next to its name in the Files panel (see Figure 16-11); checking in locks the file so that you don't accidentally change the local copy. If you wish to modify the file in some way, check it out again (see Section 16.3.1).

16.3.3 Generating a Report on Checked-Out Files

As described in Chapter 15, Dreamweaver can generate a series of reports on the files in your site. One of those reports lets you see which files a specific person has checked out. In this way, for instance, you can identify all the files you've checked out, or all the files that have been checked out by your co-worker Bob (who has since left the company).

To generate a report, follow the steps described in Section 15.6. Turn on the Checked Out By option when specifying the type of report to run. Then click Report Settings. In the dialog box that appears, type the person's name as it appears in the Checked Out By column (Figure 16-11). (To find all checked-out files, leave the box blank.) Click OK, and then click Run to generate the report.

Unfortunately, a couple of issues undermine the usefulness of the "Checked Out By" report. First, if you're connected to the Remote server using FTP, you'll wait a while; Dreamweaver needs to download a lot of information, which, even on a small site, can take several minutes.


If you find the report is taking too long, you can stop it in its tracks by clicking the Stop button (the red stop sign icon) in the Site Reports panel (see Figure 16-12).

Running a report to see who has checked out which file is a great idea. Unfortunately, this feature may not produce very useful results.

Second, the report you finally get isn't very useful (see Figure 16-12). The operations you're most likely to perform on checked-out files梒hecking them back in, undoing their checkout status, or contacting the person who checked them梤equire you to switch to the Files panel. Because there's no link between the report and the Files panel, you can't, for example, make Dreamweaver highlight the reported files in the Files panel.

    Previous Section  < Day Day Up >  Next Section