I could not find the proper command to apply a label to files which are in my current view. I have tried the following command:
cleartool mklabel -r TEST_LABEL /vob/test/a
However, the problem is that this command will apply the "Test_Label
" label to every files in the "vob/test/a
" directories regardless of whether the files are in my current view.
Is there any command to apply label only to the files listed in my current view?
This command will apply LABEL_NAME to all files in folder and below of your view, you can just go to that directory,then type following command to create and apply label
The
mklabel
documentation state states, as to what version is labeled:One example mentions:
Now, if you want to be really sure of the versions actually labelled, one solution is to use a
find
command, combined with yourmklabel
:If you had already that label applied to incorrect version and want to move it:
That way, you can first list the versions involved:
And then, if you agree with the output, apply the
mklabel
through the-exec
directive.The OP user1096966 reports making it work with a
cleartool ls
, to be sure to select only element visible in the current view:The is no '-exec' directive, so a pipe might be involved, as in (not tested, but you get the idea):
The doco is really clear about what is being labelled, in fact the first example shown in doco states that exactly...current view objects are labelled by default & currently selected versions (i.e. if in your view then label it, else not.)
....extract below from doco below (note: context and command and that label-type-selector pname is the last parameter...left blank below because resident in working dir)...
Example: •Create a label type named REL6. Attach that label to the version of the current directory selected by your view, and to the currently selected version of each element in and below the current directory. cmd-context> mklbtype –nc REL6
Regards
Jim2