ClearCase Support: Finding Branches on Version Trees
I am often asked how to find a certain branch from the command line. The command is something like this:
This command will display each version that has this branch and start recursively searching in the current directory or ".", or you can specify only one element like this example:
$ cleartool find /vob/test/a/ -all -ver 'brtype(TEST_BRANCH)' -print /vob/test/a/b.txt@@/main/TEST_BRANCH/0 /vob/test/a/b.txt@@/main/TEST_BRANCH/1 /vob/test/a/b.txt@@/main/TEST_BRANCH/2 /vob/test/a/cc.pdf@@/main/TEST_BRANCH/0 /vob/test/a/cc.pdf@@/main/TEST_BRANCH/1 |
---|
If you only want to see the latest versions on the branch, then use this command instead:
$ cleartool find /vob/test/a/ -all -ver 'version(.../TEST_BRANCH/LATEST)' -print /vob/test/a/b.txt@@/main/TEST_BRANCH/2 /vob/test/a/cc.pdf@@/main/TEST_BRANCH/1 |
---|
However, if you only wanted to find elements with a branch without listing each version on the branch, then you can run:
$ cleartool find /vob/test/a/ -all -element 'brtype(TEST_BRANCH)' -print /vob/test/a/b.txt@@ /vob/test/a/cc.pdf@@ |
---|
by Phil for Humanity
on 07/16/2007