vspacer
 
vspacer
 
Valid XHTML 1.0!
 
Valid CSS 1.0

ClearCase Commands : File Checkin Checkout

 

ZDS ClearCase Commands
 
06. To check out a file.

cleartool checkout file.ext
or
cl co file.ext
cl co -c "comment" file.ext

End comment with: <ret>.<ret>or <ctrl><d>

Cleartool will prompt for a comment if you do not use the third format to supply one.

Although you may not be used to providing a description of the changes at checkout time ot is good practice to enter the reason you are checking out the file.

Other team members can then see who has the file out and why.

When you check the file back in this text will be presented as the default ci change description, which you can override. If you are forethoughtful about the comment most often it will not need to be re-typed when you do the checkin.

The file checked out stays in the same directory but the permission changes from read only to read/write.




07. To cancel a checkout.

cl unco file.ext




08. To check out a previous version of a file.

This should be:
cl co file.ext@@/main/version#>
and it is a defect in the tool that this command is not implemented.

Instead, you will have to do a tap dance to get the version you want in your view:

#1. cl co file.ext

#2. cl exit to return to the shell

#3. pwd to make sure you are in the right directory at the shell level. If not, navigate to the right directory.

#4. cp file.ext/main/version# tmpfile.ext

You can then change tmpfile as required, cp/copy it to the atria directory with the correct name, enter cleartool again and check the file in. Exit cleartool to the shell to rm/delete the temporary file. Using a tmp_name will help ensure that you don't screw up and delete the atria archive file by mistake!




09. To find what you have checked out.

cl lsco -me -all

Remember to do this at the end of your session to make sure you have not forgotten to check back in files and directories.

Other team members cannot access the files for update until you have checked them back in, and will have to waste time diffing and merging your changes with theirs if they are forced to use private copies.




10. To find out what other files are checked out.

cl lsco -all




11. To check in a file.

cleartool checkin file.ext
or
cl ci -c "comment" file.ext

Cleartool will display the comment you entered at co time as the default. You may override this if you want to.

End comment with <ret>.<ret> or <ctrl>-d

Do NOT use -nc which means no comment.
Comment your versions!!!!




12. To checkin or checkout multiple files.

To check in, or check out multiple files at once with the same comment: cl ci -c "comment" *
cl co -c "comment" *

Download

ClearCase Commands (116KB)

   


Back to top | ZDS Home | This article updated January 14, 2004.