vspacer
 
vspacer
 

ClearCase Commands : Labels

 

 
13. To list existing labels.

cl lstype -lbtype




14. To observe the naming conventions for branches and labels.

branch names: all lower case eg: forwarding, ip, gap

LABELS : ALL UPPER CASE eg: BETA_2.5, PRE_GAP_MERGE




15. To Make a label.

cl mklbtype BETA_1.1B

Note: The convention for labels is as above: all caps.




16. To label a version of a file.

cl mklabel -c "comment" -rec x.

Warning! Do not confuse these foolishly named operations:
mklbtype makes (creates) a new label.
whereas
mklabel ATTACHES the label made by mklbtype to a specific file.




17. To apply a label to the entire source tree.

This is typically done for alpha, beta, final releases so that the entire set of files with the label can be built.

#1 Use 'catcs/edcs' (Tip 43) to set up your configspec with
element * MyLabel
element * /main/LATEST

#2 mklbtype MyLabel and enter appropriate comments.

#3 Be in the top level (/src) directory.
To apply the label throughout the tree:
mklabel -recurse -c "X Release" MyLabel .
Wait a long time.




18. To move an existing label down to the latest elements.

mklabel -recurse -replace MY_LABEL

will move existing label MY_LABEL down to the latest revision of each file in the directory, and below, from which you invoke this command.

'replace' is a poorly named option: it really means 'move-down'.




19. To see if a label is on the latest version of a file or on a branch.

cl find -version 'lbtype(LABELNAME) && version(/main/LATEST)' -print
or
cl find . -version 'version(/main/LATEST) && ! version(/main/GAP)' -print

You can do lots of mix and match to find what you want.

Download

ClearCase Commands (116KB)

   


Back to top | ZDS Home | This article updated January 14, 2004.