I have applied a label to directory in clear case recursively. How can I remove all those labels?
Review the IBM Rational ClearCase Command Reference manual on the topic of rmtype (cleartool man rmtype) for more information. To keep the label type but remove all instances, use the cleartool find command and execute the cleartool rmlabel command.
There is also a graphical way to find objects with a certain label called Report Builder (also known in ClearCase Explorer as Report Wizard). In Report Builder you can navigate to Elements/Labels which has the "Elements with Labels" and "Versions with Labels" reports.
If you are using Windows ClearCase 'Report Builder' can be used to find all elements with a given branch name, as well as the option to find the latest version number (explicit element).
The simplest approach would be in command line, using cleartool rmlabel
cleartool rmlabel -rec YOUR_LABEL yourDirectory
Note: this is for ClearCase V7.1+ only, not CC7.0.x or CCV6.x, and not for CCRC (ClearCase Remote Client)
With older ClearCase versions, you had to do (see technote swg21126736):
# Unix syntax
cleartool find yourDirectory -version "lbtype(YOUR_LABEL)" -exec 'cleartool rmlabel YOUR_LABEL"$CLEARCASE_XPN"'
# Windows syntax
cleartool find yourDirectory -version "lbtype(YOUR_LABEL)" -exec "cleartool rmlabel YOUR_LABEL\"%CLEARCASE_XPN%\""
Note: you could remove a label using a GUI, but as described in technote swg21146450, this is a file-by-file operation only!
(Not very practical if you have hundreds of elements -- files and directories -- to process...)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With