Checking Out Files and Directories


Files and directories can be checked out from any of the following places:

The tutorial focuses on checkouts made from the ClearCase Explorer on Windows and the command line on UNIX.

Follow the instructions for the platform of interest to you:

Checking Out Files on Windows

You learned how to check in a file from the Windows Explorer. In this section, you will learn how to check out a file from the ClearCase Explorer.

  1. Select the files you want to check out.
  2. Right-click and select Check Out from the shortcut menu. You can check out multiple files at the same time.
  3. Enter a comment.
  4. If you searched for checkouts and know that the file is already checked out reserved, select Unreserved if already reserved, and click OK.

A white check mark in a green circle to the left of the filename indicates the file is checked out.

Try It!

This exercise requires that you performed the exercise in section Adding Files to Source Control earlier in this module.

  1. Make the view current by clicking its icon in the shortcut pane on the Views tab:
    • ClearCase users: your-username_denali_release_development
    • ClearCase LT users: your-username_snapview
  2. Right-click the file author.txt and select Check Out from the shortcut menu.
  3. ClearCase users only: Add a new activity by clicking New and typing: adding address, and click OK.
  4. Add an optional comment.
  5. Verify that the Reserved option is selected, and then click OK.

ClearCase checks out the file; a white check mark in a green circle appears to the left of the checked-out file.

Checking Out Files on UNIX

From a command or terminal window, enter this command:

cleartool checkout -reserved -c “comment” filename

For example, you need to fix a typo in a text string that appears in a dialog box. A Quality Assurance engineer reported the problem in a defect report, number DEF0012345. The typo is in the file foo.c.

To check out the file foo.c from a command or terminal window, you would enter this command:

cleartool checkout -reserved -comment “Fix DEF0012345 - typo in text string” foo.c

Try It!

Check out the author.txt file, specifying an activity and adding a comment, by typing the following commands at the system prompt of a terminal window:

  1. Navigate to /var/tmp/your-username_tut_elements_vob.
  2. Type this command:
  3. cleartool checkout -reserved -comment “Adding address” -activity “add_address” author.txt

ClearCase checks out the author.txt file.