Index syndication
comment syndication

Archive for clearcase

Clearcase Tips number 01

I found myself writing down example commands in clearcase (V6), so I thought I would share them. If you have ever needed to find files like you do in UNIX, but want to be clearcase specific, then these commands will give you a quick headstart on using the cleartool find command:

How do I list all files and file versions going into a specific build that is labelled?
Assume your label is TR1_PRE_RELEASE

cleartool find . -version 'lbtype (TR1_PRE_RELEASE)' -print

How do I find the latest versions on branch xyz?
In this example, branch xyz is the tst branch

cleartool find . -version 'version (.../tst/LATEST)' -print

How do I find the latest versions on xyz branch WITHOUT a specific label?
For this example the xyz branch is the main (default clearcase) branch, and the label is TR1_PRE_RELEASE

cleartool find . -version 'version (/main/LATEST) && ! lbtype(TR1_PRE_RELEASE)' -print

How do I see what in the filesystem has changed from clearcase?
This example only works if you have set your view on the same machine where the file system to compare is.

cd //
clearfsimport -preview -recurse //* .|grep -v unchan |grep -v identi

I hope that gives you incentive to go and read the clearcase find documentation and learn more for yourself by trying.

Clearcase Element Permissions on Unix

I was wondering how to set permissions on an element in clearcase under unix. You can’t just use your normal chmod. After reading “Phil for Humanity” I had the answer:
cleartool protect -chmod 550
Quite simple after all. Your file, in this case, will now have the permissions you want.
Remember however, if you try to set write permissions on a file element, it wont set. The clearcase man page for protect advises that write perms are ignored – instead to obtain write permission to a file element, it must be checked out.
In the case of a directory element the write permission allows you to create view-private files.
Don’t forget the umask should be set correctly before you start creating files!

« Previous entries