The mkhlink command creates a hyperlink between two objects, each of which may be an element, branch, version, VOB symbolic link, or non-file-system VOB object (except another hyperlink).
Logically, a hyperlink is an “arrow” attached to one or two VOB-database objects:
Like other kinds of metadata annotations—version labels, attributes, and triggers—a hyperlink is an instance of a type object: the mkhlink command creates an instance of an existing hyperlink type object. However, hyperlinks differ from other kinds of metadata annotations:
Each new hyperlink object gets a unique identifier, its hyperlink ID. You can specify any hyperlink by appending its hyperlink ID to the name of the hyperlink type. Following are some examples.
Note: In the UNIX examples that follow, arguments and output that show multicomponent VOB tags are not applicable to ClearCase LT, which recognizes only single-component VOB tags. In this manual, a multicomponent VOB tag is by convention a two-component VOB tag of the form /vobs/vob-tag-leaf—for example, /vobs/src. A single-component VOB tag consists of a leaf only—for example, /src. In all other respects, the examples are valid for ClearCase LT.
In this example, DesignFor is the name of a hyperlink type, and @52179@/vobs/doctn is the hyperlink ID. Note that the hyperlink ID includes a pathname: the VOB tag of the VOB in which the hyperlink is created.
You can omit the pathname if the current working directory is in that VOB:
A hyperlink ID is unique in that it is guaranteed to differ from the hyperlink ID of all other hyperlinks. But it can change over time; when a VOB's database is processed with reformatvob, the numeric suffixes of all hyperlink IDs change:
Similarly, the VOB tag part of a hyperlink ID can change over time and can vary from host to host.
By default, a version implicitly inherits a hyperlink attached to any of its ancestor versions, on the same branch or on a parent branch. Inherited hyperlinks are listed by the describe command only if you use the –ihlink option.
A hyperlink stops being passed down to its descendents if it is superseded by another hyperlink of the same type, explicitly attached to some descendent version. You can use a null-ended hyperlink (from-object, but no to-object) as the superseding hyperlink to effectively cancel hyperlink inheritance.
An error occurs if one or more of these objects are locked: VOB, element type, element, branch type, branch, hyperlink type, object or object type (for non-file-system objects).
(Replicated VOBs only) If the hyperlink's type is unshared, your current replica must master the type. If the hyperlink's type is shared, there are no mastership restrictions. If the hyperlink's type is global and shared, your current replica must contain a local copy of the type, or the administrative VOB at the current site must master the type.
Note: In all cases, a single hyperlink object is created, in the VOB of the from-object.
Note: An error occurs if you try to make a unidirectional hyperlink whose to-obj-selector is a checked-out version in another VOB.
Specify from-obj-selector and to-obj-selector in one of the following forms:
Note: If pname has the form of an object selector, you must include the –fpname or –tpname option to indicate that pname is a pathname.
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.
Note: In the UNIX examples that follow, arguments and output that show multicomponent VOB tags are not applicable to ClearCase LT, which recognizes only single-component VOB tags. In this manual, a multicomponent VOB tag is by convention a two-component VOB tag of the form /vobs/vob-tag-leaf—for example, /vobs/src. A single-component VOB tag consists of a leaf only—for example, /src. In all other respects, the examples are valid for ClearCase LT.
cmd-context mkhlink design_for sortmerge.doc ../src/sort.c
Created hyperlink "design_for@4249@/vobs/proj".
cmd-context mkhlink design_for sortmerge.doc ../src/merge.c
Created hyperlink "design_for@4254@/vobs/proj".
cmd-context mkhlink design_for sortmerge.doc ../src/sortmerge.h
Created hyperlink "design_for@4261@/vobs/proj".
Copyright© 2003 Rational Software. All Rights Reserved.