Recursive checkin using Clearcase

I would recommend this question: Now the problem is to checkin everything that has changed. It is problematic since often not everything has changed, and ClearCase will trigger an error message when trying to check in an identical file. Meaning you will need 2 commands: ct lsco -r -cvi -fmt “ci -nc \”%n\”\n” | ct … Read more

How do I create a snapshot view of some project or stream in ClearCase?

2… 1 cleartool descr -l project:myProject@\myPVob with some grep, you have the list of components (writable or not) and policies. If you want only the Streams: cleartool lsproj -tree myProject@\myPVob You can repeat that for a Stream (to get the sub-streams) cleartool lsstream -tree myStream@\myPVob For the foundation baselines of a Stream: cleartool descr -fmt … Read more

List the latest baseline of a component in a UCM stream one by one

If you consider the fmt_ccase options, %[latest_bls]CXp will always list the latest baseline for all components of a given Stream. So it is best to parse the result, and for each baseline name, to display its component name: cleartool describe -fmt “%[component]Xp” aBaselineName@/aPVob Also: %[latest_bls]CXp seems to be the only way to get directly the … Read more

How to obtain UCM stream and baseline with cleartool?

If you are in a view, you can: get the current stream cleartool lsstream -cview get all baselines for a component in that stream cleartool lsbl -comp myComp@\myPVob -stream myStream@\myPVob get all foundation baselines for that stream cleartool descr -fmt “%[found_bls]CXp” stream:myStream@\myPVob Don’t forget that in a view on a stream with a modifiable component, … Read more

How do I roll back a file checked in to Clearcase?

What is described by skwllsp can be be done in a dynamic view through the use of extended pathnames cd m:/myDynamicView/MyVob/path/to/file cleartool lsvtree myFile cleartool checkout -c “cancel co” myFile copy myFile@@/main/xx myFile cleartool checkin -nc myFile with xx being the version number you want to restore. But should you have made multiple checkins, including … Read more

Creating a new subdirectory structure in ClearCase?

As explained in How can I use ClearCase to “add to source control …” recursively?, you have to use clearfsimport which does what you are saying (checkout the parent directories, mkelem for the elements) clearfsimport -preview -rec -nset c:\sourceDir\ChildDirectory5 m:\MyView\MyVob\ParentDirectory Note the : -preview option: it will allow to check what would happen without actually … Read more