Phil for Humanity Phil for Humanity
A Guide for the Survival of Humankind and Helping the World, Society, and Yourself.

ClearCase Support: How to Checkout, Edit, Checkin, and Uncheckout Files

The most basic and common activity in ClearCase is making a change to a file. In order to edit any file in a ClearCase VOB, you must first checkout the file. This basically means no one can checkout the file when the file is already checkedout by someone else. You can check out a file with this command.

cleartool co -nc FILENAME

ClearCase does allow multiple people to checkout a single file at a time. This can be done by creating branches or by using unreserved checkouts. To create an unreserved checkout, use this command.

cleartool co -unreserved -nc FILENAME

Remember, if you allow multiple checkouts at a time for a single file, then you probably will have to merge your file versions later. I advise that you seek expert help with merging files if you have never done it before.

After you have checkedout your file, then you should have edit access to the file, so go ahead and make your changes. Once you have completed all of your changes, save your file and preferrably exit out of the program that you were using to modify the file. I do not recommend that you leave a file checkedout for more than a month or so.

Now you are ready to checkin the file. This basically takes the saved file that you worked on and copies the file from your private work space, called your View, and copies the file to the VOB database so that everyone can access your new version of the file. Here is the command to checkin your file.

cleartool ci -nc FILENAME

Alternatively, if you do not want the changes to the file or you did not mean to checkout the file, you can uncheckout the file with this command.

cleartool unco FILENAME

Keep in mind, that this uncheckout command will DELETE any changes that you may have made. ClearCase may even ask you if you want to create a backup of the data that you are about to uncheckout. Answer accordingly to your wishes.

by Phil for Humanity
on 06/19/2009

Related Articles
 » ClearCase Support: Common ClearCase Checkin Error Message
 » ClearCase Support: How to See the Version Tree of an Element
 » ClearCase Support: Automate Checking of ClearCase Server Log Files