Wednesday, September 10, 2008

Baseline vs. Label

When comparing elements or versions in UCM, many people use baseline the same way as label in Base ClearCase. For example, to find out all elements changed between two version, use the command:

cleartool find -all -element '{lbtype_sub($LABEL1) && lbtype_sub($LABEL2)}' -version '{(lbtype($LABEL1) && ! lbtype($LABEL2)) || (lbtype($LABEL2) && !lbtype($LABEL1))}' -print

Full baseline name can be used to substitute the LABEL1 and LABEL2 variable in the command in UCM.


However, baselines are different from labels. A full baseline labels every elements in the stream, no matter they are visible or not; while label only applies to visible elements selected by the view. This implies that you cannot use two baseline names to find out which elements have been deleted (renamed) between two baselines. The following command will fail to give out the removed files.

cleartool find . -element 'lbtype_sub($BASELINE1) && !lbtype_sub($BASELINE2)' -print

If you have labeled every elements selected by the two baselines respectively, you can get deleted files by command:

cleartool find . -element 'lbtype_sub($LABEL1) && !lbtype_sub($LABEL2)' -print

8 comments:

Anonymous said...

nice blog , i work on clearcase ucm too and came across the blog by chance

Li Qin said...

Thanks!

Anonymous said...

A way of comparing baselines in clearcase is to use either the GUI of the ClearCase Project Explorer on the component (Select a component > Browse Baseline to get the baseline tree, then right click on a baseline to compare it with another one - you can access the difference in file versions if you have a view on the integration stream) or to use the cleartool diffbl command.

One thing to know:

The CLI "default" for getting the differences in term of file versions is:

diffbl –versions baseline-selector1 baseline-selector2

But the GUI "default" is the equivalent of

diffbl –versions -nmerge baseline-selector1 baseline-selector2

To get the equivalent of the CLI default behaviour in the GUI, you should tick the "Show All versions" option.

Anonymous said...

Hi , I have tried using diffbl command to find out list of files modified between two baselines as follows:

cleartool diffbl -ver baseline1 baseline2

But it didnt work. Please advise.

Unknown said...

www1126



canada goose jackets
adidas superstar
moncler jackets
christian louboutin
canada goose outlet
true religion jeans
coach outlet factory
true religion jeans outlet
kate spade outlet
salomon shoes

Unknown said...

click to find out more Dolabuy Celine Learn More Here Balenciaga Dolabuy Visit Website Chrome-Hearts Dolabuy

reetouta said...

c0g08t9b50 y8f64e8i69 w6o70s1n64 u5j89z5x05 i1a11w6n13 h4j11p5t26

stesle said...

u6p53a3o44 b7e27z1d99 x2n28h5i81 j5l30e3p94 b7q62s7m72 r3s58l2f07