Reputation: 163
I have been working on a branch B1. There are several elements checked in on this branch. Now I want to put, or move if already labelled, label L1 on all latest versions on this branch.
How can I achieve this?
Upvotes: 1
Views: 1324
Reputation: 1323653
Basically, you need all elements (files or folders)
LB1
,LB1
,LB1
to that visible version.For that:
cleartool find -cview -element "{lbtype_sub(LB1)}" \
-version "{!lbtype(LB1)}
-exec "cleartool mklabel –replace REL3 \"%CLEARCASE_XPN%\""
Note the difference between:
lbtype (label-type-name)
In all cases, TRUE if the object itself is labeled label-type-name. (Because elements and branches cannot have labels, this primitive can be true only for versions.)
lbtype_sub (label-type-name):
With elements, TRUE if the element has a version that is labeled label-type-name.
The OP Paul confirms in the comments the following command is working:
cleartool find . -cview -elem "lbtype_sub(L1)" -exec "cmd /c cleartool mklabel -rep L1 %CLEARCASE_XPN%"
My config spec must be set to view the latest version in branch
B1
Upvotes: 1