Attaches version labels to versions of elements
Product | Command Type |
---|---|
ClearCase | cleartool subcommand |
ClearCase LT | cleartool subcommand |
Attache | command |
Platform |
---|
UNIX |
Windows |
Attach label to specified versions:
Attach label to versions listed in configuration record:
The mklabel command attaches a version label to one or more versions. You can attach a label to only one version of a particular element. You can specify the versions themselves on the command line, or you can specify a particular derived object. In the latter case, mklabel labels some or all the versions that were used to build that derived object.
Identities: You must have one of the following identities:
Element owner
Element group member
VOB owner
root (UNIX)
Member of the ClearCase group (ClearCase on Windows)
Local administrator of the ClearCase LT server host (ClearCase LT on Windows)
Locks: If it encounters a VOB lock while trying to write data during an import operation, mklabel pauses and retries the operation every 60 seconds until it succeeds. Because labels are applied in batches, some labeling in a batch may still fail due to a lock being placed on the VOB while a batch transaction is in progress; however, the next batch is not applied until the lock is released.
Mastership: (Replicated VOBs only) If the label's type is unshared, your current replica must master the label type. If the label's type is shared, the following restrictions apply:
If the label type is one per branch, your current replica must master the branch of the version.
If the label type is one per element, your current replica must master the element of the version.
MOVING A VERSION LABEL. Default: An error occurs if a version label of this type is already attached to some other version of the same element.
|
|
EVENT RECORDS AND COMMENTS. Default: Creates one or more event records, with commenting controlled by your .clearcase_profile file (default: -nc). See the comments reference page. Comments can be edited with chevent.
SPECIFYING THE LABEL TYPE. Default: None.
type-name | Name of the label type | |
vob-selector | VOB specifier Specify vob-selector in the form [vob:]pname-in-vob | |
pname-in-vob | Pathname of the VOB-tag (whether or not the VOB is mounted) or of any file-system object within the VOB (if the VOB is mounted) |
NOTE: The mklabel command is disallowed on label types for UCM baselines.
DIRECTLY SPECIFYING THE VERSIONS TO BE LABELED. The options and arguments in this section specify elements and their versions directly on the command line. Do not use these options and arguments when using a derived object to provide a list of versions.
|
|
USING A DERIVED OBJECT TO SPECIFY THE VERSIONS TO BE LABELED. The options and arguments in this section specify versions by selecting them from the configuration records associated with a particular derived object. Do not use these options when specifying elements and versions directly on the command line.
NOTE: Derived objects are created only in dynamic views.
|
|
Use the following options to modify the list of versions to be labeled.
The UNIX examples in this section are written for use in csh. If you use another shell, you may need to use different quoting and escaping conventions.
The Windows examples that include wildcards or quoting are written for use in cleartool interactive mode. If you use cleartool single-command mode, you may need to change the wildcards and quoting to make your command interpreter process the command appropriately.
In cleartool single-command mode, cmd-context represents the UNIX shell or Windows command interpreter prompt, followed by the cleartool command. In cleartool interactive mode, cmd-context represents the interactive cleartool prompt. In Attache, cmd-context represents the workspace prompt.
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
Created label type "REL6".
cmd-context mklabel -recurse REL6 .
Created label "REL6" on "." version "/main/4".
Created label "REL6" on "./bin" version "/main/1".
Created label "REL6" on "./include" version "/main/1".
Created label "REL6" on "./libs" version "/main/2".
Created label "REL6" on "./lost+found" version "/main/0".
Created label "REL6" on "./release" version "/main/1".
Created label "REL6" on "./src" version "/main/6".
Created label "REL6" on "./src/Makefile" version "/main/2".
Created label "REL6" on "./src/cm_add.c" version "/main/1".
Created label "REL6" on "./src/convolution.c" version "/main/4".
Created label "REL6" on "./src/edge.sh" version "/main/1".
.
.
.
Attach label REL1 to the version of msg.c in the view.
cmd-context mklabel REL1 msg.c
Created label "REL1" on "msg.c" version "\main\1".
Attach label REL2 to version 3 on the rel2_bugfix branch of file util.c.
cmd-context mklabel -version /main/rel2_bugfix/3 REL2 util.c
Created label "REL2" on "util.c" version "/main/rel2_bugfix/3".
Move label REL2 to a different version of element hello.c, using a version-extended pathname to indicate that version.
cmd-context mklabel -replace REL2 hello.c@@\main\4
Moved label "REL2" on "hello.c" from version "\main\3" to "\main\4".
Attach label REL3 to each version that was used to build derived object hello.o. Note that both directories and files are labeled.
cmd-context mklabel -config hello.o REL3
Created label "REL3" on "/usr/hw/" version "/main/1".
Created label "REL3" on "/usr/hw/src" version "/main/2".
Created label "REL3" on "/usr/hw/src/hello.c" version "/main/3".
Created label "REL3" on "/usr/hw/src/hello.h" version "/main/1".
Attach label REL5 to each C-language source file version that was used to build derived object hello.exe.
cmd-context mklabel -config hello.exe -name '*.c' REL5
Created label "REL5" on "\users_hw\src\hello.c" version "\main\3".
Created label "REL5" on "\users_hw\src\util.c" version "\main\1".
Attach label REL5 to all versions in the VOB mounted at /usr/hw that were used to build derived object hello. Use interactive mode to enable use of the ClearCase and ClearCase LT "..." wildcard.
cmd-context mklabel -config hello -name ' /usr/hw/...' REL5
Created label "REL5" on "/usr/hw/" version "/main/1".
Created label "REL5" on "/usr/hw/src" version "/main/2".
Created label "REL5" on "/usr/hw/src/hello.c" version "/main/3".
Created label "REL5" on "/usr/hw/src/hello.h" version "/main/1".
Created label "REL5" on "/usr/hw/src/util.c" version "/main/1".
Feedback on the documentation in this site? We welcome any comments!
Copyright © 2001 by Rational Software Corporation. All rights reserved. |