Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to remove label of a directory and all its contents in clear case?

I have applied a label to directory in clear case recursively. How can I remove all those labels?

like image 341
ajay bidari Avatar asked Aug 31 '12 15:08

ajay bidari


People also ask

How do I delete a ClearCase label?

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.

How do I search for a file with label in ClearCase?

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.

How do I find my branch in ClearCase?

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).


1 Answers

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!

version tree with labelRemove label

(Not very practical if you have hundreds of elements -- files and directories -- to process...)

like image 170
VonC Avatar answered Sep 23 '22 14:09

VonC