cleartool mklabel
is applied to each element returned by cleartool ls
, restricting the listing to objects in the VOB storage, and visible to the operating system listing command.
However, a cleartool mklabel -replace
(which moves an existing label if found) means you must have the right to modify that label, or be element owner.
Try first the mklabel
command in isolation on a single file before using it in an xargs pipe.
Try also an alternative syntax I proposed before:
# Windows syntax
cleartool find . -cview -exec "cleartool mklabel -replace TEST_LABEL \"%CLEARCASE_XPN%\""
# Unix syntax
cleartool find . -cview -exec 'cleartool mklabel -replace TEST_LABEL "$CLEARCASE_XPN"'
The OP adds:
The weird thing is that from the logs labeling seems successful for all the files. (Created label "label_name" on "filepath" version "/main/3"
.)
But when it exits it throws this error:
Process Create Label Lock for label_name in the VOB: vob_1
Label label_name has been locked
Process Create Label Lock for label_name in the VOB: vob_2
Label label_name has been locked
LABELING FAILED
Flag created: /user/msatcmsvn/build_artifacts/label_name_LABEL.FLAG
It depends if the label was applied to an element in vob1, 2 or another vob.
Generally, this message is linked to a global type locked or to the lbtype locked in vob1 and two.
A cleartool lslock lbtype:LABELNAME@\vob1
(or @/vobs/vob1
) on Unix, as well as a cleartool descr -l lbtype:LABELNAME@\vob1
can help see the issue.