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.
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 because a lock is placed on the VOB while a batch transaction is in progress; however, the next batch is not applied until the lock is released.
(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's type is global and shared, your current replica must master the branch or element; also, your current replica must contain a local copy of the type, or the administrative VOB at the current site must master the type.
No error occurs if there is no such label to remove, but the label is attached to all versions specified in the command.
Note: The mklabel command is disallowed on label types for UCM baselines.
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.
Use –version to override these interpretations of pname.
Note: mklabel differs from some other commands in its default handling of directory element pname arguments: it labels the directory element itself; it does not label the elements cataloged in the directory (unless you specify –recurse).
When you specify this option with –recurse, mklabel recursively descends directories even if there is no version match for a specified directory—the directory version selected by the view's config spec is used for the recursion.
When you specify this option with –version, mklabel recursively descends directories even if there is no version match for a specified directory—the directory version selected by the view's config spec is used for the recursion.
When you specify this option, a summary is printed at the completion of this command that lists the number of labeling successes, labeling failures, moved labels, and unchanged labels.
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.
With the exception of checked-out versions, mklabel labels all the versions that would be included in a catcr –long –flat –element_only listing of that derived object. Note that this includes the following objects:
If the DO's configuration includes multiple versions of the same element, only the most recent version is labeled.
When you specify this option, a summary is printed at the completion of this command that lists the number of labeling successes, labeling failures, moved labels, and unchanged labels.
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.
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".
.
.
.
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".
Copyright© 2003 Rational Software. All Rights Reserved.