ajay bidari
ajay bidari

Reputation: 723

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?

Upvotes: 5

Views: 16385

Answers (1)

VonC
VonC

Reputation: 1323593

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 label Remove label

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

Upvotes: 11

Related Questions