mklabel

Attaches version labels to versions of elements

APPLICABILITY


Product

Command Type

ClearCase


cleartool subcommand


ClearCase LT


cleartool subcommand


Attache


command


Platform

UNIX


Windows

SYNOPSIS

mklabel [ -rep·lace ] [ -r·ecurse ] [ -fol·low ] [ -ver·sion version-selector ]

[ -c·omment comment | -cfi·le comment-file-pname |-cq·uery | -cqe·ach | -nc·omment ]
label-type-selector pname ...
mklabel [ -rep·lace ] [ -c·omment comment | -cfi·le comment-file-pname |-cq·uery

| -cqe·ach | -nc·omment ]
[ -sel·ect do-leaf-pattern ] [ -ci ] [ -typ·e { f | d } ... ]
[ -nam·e tail-pattern ] -con·fig do-pname label-type-selector

DESCRIPTION

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.

RESTRICTIONS

Identities: You must have one of the following identities:

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:

OPTIONS AND ARGUMENTS

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.

-rep·lace

Removes an existing label of the same type from another version of the element:

  • From another version on the same branch, if label-type-name was created with mklbtype -pbranch
  • From another version anywhere in the element's version tree, if label-type-name was not created with mklbtype -pbranch
No error occurs if there is no such label to remove, but the label is attached to all versions specified in the command.

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.

-c·omment comment | -cfi·le comment-file-pname |-cq·uery | -cqe·ach | -nc·omment

Overrides the default with the option you specify. See the comments reference page.

SPECIFYING THE LABEL TYPE.  Default: None.

label-type-selector

A label type, previously created with mklbtype. The label type must exist in each VOB containing a version to be labeled, or (if label-type-selector is a global type) in the Admin VOB hierarchy associated with each VOB. Specify label-type-selector in the form [lbtype:]type-name[@vob-selector]

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.

pname ...

(Required) One or more pathnames, indicating versions to be labeled:

  • A standard or view-extended pathname to an element specifies the version selected in the view.
  • A version-extended pathname specifies a version, independent of view.
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).
-ver·sion version-selector

For each pname, attaches the label to the version specified by version-selector. This option overrides both version-selection and version-extended naming. See the version_selector reference page for syntax details.
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.
-r·ecurse

Processes the entire subtree of each pname that is a directory element (including pname itself). VOB symbolic links are not traversed during the recursive descent into the subtree.
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.
-fol·low

For any VOB symbolic link encountered, labels the corresponding target.

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.

-con·fig do-pname

Specifies one derived object. A standard pathname or view-extended pathname specifies the DO that currently appears in a view. To specify a DO independent of view, use an extended name that includes a DO-ID (for example, hello.obj@@24-Mar.11:32.412) or a version-extended pathname to a DO version.
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:

  • Any DO created by the build and subsequently checked in as a DO version.
  • Any file in the CR that was view-private at the time of the build, was converted to an element after the creation of the CR, and has at least one checked-in version.
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.

-sel·ect do-leaf-pattern
-ci
-typ·e { f | d } ...
-nam·e tail-pattern

Modify the set of versions to be labeled in the same way that these options modify a catcr listing. See the catcr reference page for details, and also the EXAMPLES section.

EXAMPLES

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.

SEE ALSO

mklbtype, rmlabel