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

11 comments:

jude dilip said...

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

Li Qin said...

Thanks!

Thomas Corriol 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.

Coach Factory said...

tory burch outlet, air max, michael kors outlet online, nike free, kate spade outlet, louis vuitton outlet, jordan shoes, nike shoes, polo ralph lauren, longchamp handbags, chanel handbags, prada handbags, burberry outlet online, louis vuitton, louis vuitton outlet, ray ban sunglasses, kate spade handbags, ray ban outlet, michael kors outlet, louis vuitton handbags, coach outlet store online, oakley sunglasses cheap, polo ralph lauren outlet, michael kors outlet online, tiffany and co, louboutin shoes, prada outlet, louboutin, longchamp handbags, burberry outlet online, coach outlet, longchamp outlet, michael kors outlet store, louis vuitton outlet online, nike air max, coach purses, christian louboutin shoes, oakley sunglasses, coach outlet, michael kors outlet, oakley vault, michael kors outlet online, louboutin outlet, coach factory outlet, gucci outlet

Coach Factory said...

nike huarache, longchamp soldes, longchamp, karen millen, abercrombie and fitch, air force, nike free pas cher, air jordan, louis vuitton, hollister, barbour, hogan sito ufficiale, lululemon, lacoste, ralph lauren, nike air max, sac guess, tn pas cher, new balance pas cher, nike trainers, nike blazer, vans outlet, michael kors, timberland, ralph lauren pas cher, oakley pas cher, louboutin, burberry, north face, north face pas cher, hollister, vans pas cher, longchamp, sac louis vuitton, air max, montre femme, hollister, nike roshe, vanessa bruno, mulberry, louis vuitton uk, nike free, nike roshe run, ray ban pas cher, sac louis vuitton, converse pas cher, michael kors, ray ban uk, michael kors, hermes pas cher

Coach Factory said...

nike huarache, longchamp soldes, longchamp, karen millen, abercrombie and fitch, air force, nike free pas cher, air jordan, louis vuitton, hollister, barbour, hogan sito ufficiale, lululemon, lacoste, ralph lauren, nike air max, sac guess, tn pas cher, new balance pas cher, nike trainers, nike blazer, vans outlet, michael kors, timberland, ralph lauren pas cher, oakley pas cher, louboutin, burberry, north face, north face pas cher, hollister, vans pas cher, longchamp, sac louis vuitton, air max, montre femme, hollister, nike roshe, vanessa bruno, mulberry, louis vuitton uk, nike free, nike roshe run, ray ban pas cher, sac louis vuitton, converse pas cher, michael kors, ray ban uk, michael kors, hermes pas cher

Coach Factory said...

canada goose outlet, moncler, juicy couture outlet, ugg boots, p90x3, babyliss pro, lululemon outlet, bottega veneta, herve leger, ugg, asics shoes, giuseppe zanotti, beats by dre, canada goose outlet, ugg outlet, insanity, nfl jerseys, valentino shoes, birkin bag, new balance shoes, reebok outlet, canada goose uk, ferragamo shoes, soccer shoes, mcm handbags, supra shoes, ugg boots, uggs on sale, north face jackets, chi flat iron, ghd, juicy couture outlet, moncler, canada goose pas cher, soccer jerseys, abercrombie and fitch, jimmy choo shoes, canada goose, marc jacobs, moncler outlet, north face outlet, canada goose outlet, celine handbags, moncler, wedding dresses, roshe run, instyler ionic styler, mont blanc, rolex watches, mac cosmetics

ninest123 said...

true religion jeans, hollister pas cher, vans pas cher, tn pas cher, michael kors, true religion outlet, sac guess, nike free run uk, michael kors outlet, oakley pas cher, true religion jeans, replica handbags, ugg boots, burberry outlet online, mulberry, converse pas cher, michael kors outlet, ugg boots, true religion jeans, michael kors outlet, michael kors, nike air max, air force, hogan, new balance pas cher, vanessa bruno, ray ban uk, hollister, kate spade handbags, north face, nike air max, lululemon, coach outlet, burberry, michael kors, timberland, ray ban pas cher, michael kors outlet, coach purses, lacoste pas cher, hermes, nike air max, nike blazer, north face, ralph lauren uk, abercrombie and fitch, michael kors outlet, michael kors, nike roshe, coach outlet

ninest123 said...

converse outlet, giuseppe zanotti, hollister, insanity workout, herve leger, north face outlet, asics running shoes, nike air max, louboutin, converse, instyler, vans shoes, reebok shoes, iphone cases, abercrombie and fitch, mac cosmetics, wedding dresses, nike huarache, baseball bats, p90x workout, valentino shoes, chi flat iron, nike trainers, ghd, babyliss, oakley, soccer shoes, vans, timberland boots, gucci, celine handbags, nike air max, north face outlet, new balance, ralph lauren, hollister, jimmy choo shoes, mcm handbags, birkin bag, soccer jerseys, longchamp, beats by dre, bottega veneta, ferragamo shoes, nfl jerseys, lululemon, nike roshe, hollister, mont blanc, ray ban

ninest123 said...

moncler, lancel, canada goose, moncler outlet, canada goose, louis vuitton, juicy couture outlet, swarovski crystal, sac louis vuitton pas cher, louis vuitton, canada goose outlet, moncler, moncler, moncler, pandora charms, montre pas cher, canada goose uk, ugg,ugg australia,ugg italia, hollister, canada goose, ugg,uggs,uggs canada, bottes ugg, marc jacobs, doudoune canada goose, ugg boots uk, moncler, louis vuitton, moncler, pandora jewelry, thomas sabo, pandora charms, toms shoes, barbour, coach outlet, supra shoes, replica watches, links of london, barbour jackets, canada goose, juicy couture outlet, swarovski, pandora jewelry, canada goose outlet, louis vuitton, moncler, karen millen, wedding dresses, ugg pas cher