version-controlclearcaseclearcase-ucm

How to rebase in ClearCase on latest baselines?


From the cleartool rebase command I am able to rebase my stream on recommended baselines with the command:

cleartool rebase -rec -view ViewTag -stream stream:Stream@/PVOB

All the components in the stream are rebased to recommended baselines after running that command.

Is there any option for the cleartool rebase command to rebase on the latest baselines instead of recommended baselines? I tried cleartool rebase help, but I didn't find any option for this.


Solution

  • You would need to use the option

    -bas/eline baseline-selector[,...]
    

    And list the latest baselines yourself (as opposed to the -recommended option, which will take automatically the recommended baselines from the parent stream)

    See "Rules for rebasing a stream" to select the latest baselines: said baselines must have been produced in the parent stream of the one you are rebasing.

    See "List the latest baseline of a component in a UCM stream one by one" to get those latest baselines.

    The OP bhardwajme confirms in the comments:

    it worked: I had written a script to do all the stuff:

    • first I got the latest baselines from cleartool lsbl -s -comp C -stream S | tail -1 for all the components and moved them into a text file then
    • passed the baseline names to command cleartool rebase -baseline baseline-selector command.