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.
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 path name: the VOB tag of the VOB in which the hyperlink is created.
cd /vobs
cmd-context describe hlink:DesignFor@52179@doctn
You can omit the path name 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.
The UNIX system and Linux 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 system and Linux shells or Windows command interpreter prompt, followed by the cleartool command. In cleartool interactive mode, cmd-context represents the interactive cleartool prompt.
cmd-context mkhltype -nc gui_tool
Created hyperlink type "gui_tool".
cmd-context mkhlink -unidir gui_tool monet@@ /vobs/gui/bin/xmonet@@
Created hyperlink "gui_tool@1239@/usr/hw".
cmd-context mkhlink design_spec util.c@@\REL2 \users_hw\doc\util.doc@@\REL2 Created hyperlink "design_spec@685@\users_hw".
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".
cmd-context mkhlink -ttext "regression A" -ftext "edge effects" ^
tested_by cm_add.c@@ edge.sh@@
Created hyperlink "tested_by@714@\users_hw".
cmd-context mkhlink -ttext "fixes bug 21" fixes util.c /usr/hw/bugs/bug.report.21@@ Created hyperlink "fixes@746@/usr/hw".
cmd-context mkhlink -ttext "Wilson: Digital Filtering, p42-50" ^
design_spec convolution.c@@
Created hyperlink "design_spec@753@\users_hw".