Can some one please help me with ClearCase command to deliver baselines from one stream to another stream.
I have a project stream xyz_1.1.0
: we have created a new stream by using release id 1.1.0 to provide a fix. The new stream can 1.1.0.17001
.
Now when the stream is generated, it contains the foundation baseline from 1.1.0 but I want baselines the latest fix which is went over 1.1.0 for example it can be 1.1.0.17000... in which case I want to apply baselines of 1.1.0.17000.
We use common stream to do our checkins, hence I can get the latest baselines from common stream which can be found under recommended baselines.
A deliver (intra or inter-project, which might need the right policy to be enabled first) needs to use the cleartool deliver
command.
You need an UCM view on the destination stream (the stream to which you are delivering)
And you need the latest foundation baseline produced on the source stream (otherwise, it would deliver by default all activities in the stream that have changed since the last deliver operation from the stream).
That also means you know which UCM component you want to deliver.
See "List the latest baseline of a component in a UCM stream one by one".
For a given component:
bl=cleartool lsbl -comp C -stream stream:aSourceStream@/aPVob|tail -1
cleartool deliver -baseline ${bl}@/apvob -to aViewOnDestinationStream@/apvob
Or, as commented by the OP A.Learn, you can use for delivery the recommended baseline of the source stream:
$baselines = "cleartool desc -fmt \"%[rec_bls]CXp\" stream:".$productStream."\@\\".$pvob
//Below command applies the baseline
cleartool rebase -f -baseline ".$baselines." -complete
//Finally recommend the new baselines
cleartool chstream -recommended -default stream:".$StreamName."\@\\".$pvob
This is using the fmt_ccase
format applied to cleartool describe
.