Base clearcase has a large number of commands and each command has a large number of options. To help administrators I have listed some clearcase commands that I found useful.
Q: How do I remove checkouts in a view that no longer exists?
A: Run "rmview" with the "-force" option on the view uuid.
E.g.:
cleartool rmview -force -avobs -uuid 83fe197b.de3f4801.bec2.11:b8:99:5c:33
Q: How do I find view id of a view?
A: One way of finding the view uuid is to run "describe" with the "-long" option.
E.g.:
cleartool desc -long vob:Tools
Q: How do I merge the latest changes from other developers on the same branch?
A: See Answer below...
Q: How can I use unreserved checkouts?
A: See Answer below...
Q: How do I implement the "Copy-Modify-Merge" versioning model in Clearcase?
A: Clearcase provides both a "reserved" and an "unreserved" checkout model to implement either the "Lock-Modify-Unlock" model or the "Copy-Modify-Merge" model.
The "Lock-Modify-Unlock" is implemented by using a "reserved" checkout.
The "Copy-Modify-Merge" model uses the "un-reserved" checkout model. Developers are expected to update their code frequently to merge the latest changes on the branch. The -flatest option of findmerge must be used for this.
E.g.:
cleartool findmerge -a -nc -flatest -merge -gm -log Nul
Q: How do I merge the latest changes from another branch?
A: Use the findmerge command with the -fversion option. You can speed up the command using the element filter also where applicable.
E.g.:
cleartool findmerge -a -fversion mainotherbranchLATEST -element brtype(otherbranch) -nc -unr -merge -gm -log Nul
Q: How do I remove changes made in a certain version?
A: Use the merge with -delete option.
E.g.:
cleartool merge -g -to %(element)s -delete -version %(versionpath)s
Q: How can I list all branches on a VOB?
A:
cleartool lstype -s -kind brtype
Q: How can I find all elements on a branch?
A:
cleartool find -a -branch brtype(build1.3) -print
Q: How can I find all versions by a user on a branch at a date?
A:
cleartool find -a -version "brtype(shopping_cart) && created_since(yesterday) && created_by(charles)" -print
Q: How can I find latest version of elements on a branch?
A:
cleartool find -a -branch brtype(enhancements) -version version(main/enhacements/LATEST) -print
Q: How can I find the creator of a version?
A:
cleartool desc -fmt "%%u,%%Enn" main.cpp@@mainenhancements_dev1
Q: How can I find all versions on specified label?
A:
cleartool find -a -version lbtype(SECURITY_TRICKS_DEL2) -print