annotate
apropos
catcr
catcs
cc.icon
cc.magic
cd
chactivity
chbl
checkin
checkout
checkvob
chevent
chflevel
chfolder
chmaster
chpool
chproject
chstream
chtype
chview
clearaudit
clearbug
cleardescribe
cleardiffbl
cleardiff
clearexport_ccase
clearexport_cvs
clearexport_pvcs
clearexport_rcs
clearexport_sccs
clearexport_ssafe
clearfsimport
cleargetlog
clearhistory
clearimport
clearjoinproj
clearlicense
clearmake
clearmake.options
clearmrgman
clearprojexp
clearprompt
cleartool
clearviewupdate
clearvobadmin
comments
config_ccase
config_spec
cptype
credmap
creds
deliver
describe
diffbl
diffcr
diff
dospace
edcs
endview
env_ccase
events_ccase
export_mvfs
exports_ccase
file
find
findmerge
fmt_ccase
getcache
get
getlog
help
hostinfo
init_ccase
ln
lock
lsactivity
lsbl
lscheckout
lsclients
lscomp
lsdo
lsfolder
lshistory
ls
lslock
lsmaster
lspool
lsprivate
lsproject
lsregion
lsreplica
lssite
lsstgloc
lsstream
lstype
lsview
lsvob
lsvtree
makefile_aix
makefile_ccase
makefile_gnu
makefile_pmake
makefile_smake
makefile_sun
man
merge
mkactivity
mkattr
mkattype
mkbl
mkbranch
mkbrtype
mkcomp
mkdir
mkelem
mkeltype
mkfolder
mkhlink
mkhltype
mklabel
mklbtype
mkpool
mkproject
mkregion
mkstgloc
mkstream
mktag
mktrigger
mktrtype
mkview
mkvob
mount_ccase
mount
msdostext_mode
mvfslog
mvfsstorage
mvfstime
mvfsversion
mv
omake
pathnames_ccase
permissions
profile_ccase
promote_server
protect
protectvob
pwd
pwv
query_language
quit
rebase
recoverview
reformatview
reformatvob
register
relocate
rename
reqmaster
reserve
rgy_backup
rgy_check
rgy_passwd
rgy_switchover
rmactivity
rmattr
rmbl
rmbranch
rmcomp
rmdo
rmelem
rmfolder
rmhlink
rmlabel
rmmerge
rmname
rmpool
rmproject
rmregion
rmstgloc
rmstream
rmtag
rmtrigger
rmtype
rmver
rmview
rmvob
schedule
schemes
scrubber
setactivity
setcache
setcs
setplevel
setsite
setview
shell
snapshot.conf
softbench_ccase
space
startview
type_manager
umount
uncheckout
unlock
unregister
unreserve
update
version_selector
view_scrubber
vob_restore
vob_scrubber
vob_sidwalk
vob_snapshot
vob_snapshot_setup
wildcards_ccase
winkin
xclearcase
xcleardiff
xmldiffmrg
DESCRIPTION
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:
- A bidirectional hyperlink connects two objects, in the same VOB or in different VOBs, with optional text annotations at either end. It can be navigated in either direction: from-object → to-object or to-object → from-object.
- A unidirectional hyperlink connects two objects in different VOBs, with optional text annotations at either end. It can be navigated only in the from-object → to-object direction.
- A text-only hyperlink associates one object with a user-defined text string (for example, an element that implements a particular algorithm with the name of a document that describes it).
- A null-ended hyperlink has only a from-object. Use this kind of hyperlink to suppress hyperlink inheritance (see “Hyperlink Inheritance”).
Contrast with Other Kinds of Metadata
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:
- The hyperlink created by mkhlink is also an object in itself. Each hyperlink object has a unique ID (see “Hyperlink IDs”) and can itself be annotated with attributes. By contrast, a mklabel, mkattr, or mktrigger command does not create a new object; it simply annotates an existing object.
- You can attach several hyperlinks of the same type to one object, but only one instance of a particular label, attribute, or trigger type. (For example, you can attach two different DesignFor hyperlinks to the same object, but not two different ECOnum attributes.)
Hyperlink IDs
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.
- When
specifying a hyperlink in UNIX, you can use any pathname within the VOB in
place of the VOB tag pathname:
You can omit the pathname if the current working directory is in that VOB:
- When specifying a hyperlink in Windows, 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.
Hyperlink Inheritance
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.
RESTRICTIONS
Locks
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).
Mastership
(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.
OPTIONS AND ARGUMENTS
Unidirectional/Bidirectional
- Default
- Creates a bidirectional hyperlink. If the
objects being linked are in different VOBs, a notation is made in the VOB
database of the to-object, making it possible to see the hyperlink from either
VOB.
- –uni·dir
- Creates a unidirectional hyperlink; no notation
is made in the VOB database of the to-object (if that object is in a different
VOB).
Note: In all cases, a single hyperlink object is created, in the VOB of the from-object.
Text Annotations
- Default
- The hyperlink has no text annotations.
- –tte·xt to-text
- Text associated with the to-end of a hyperlink.
If you also specify to-obj-pname, the text is associated
with that object. If you do not specify to-obj-pname, cleartool creates a text-only hyperlink, originating
from from-obj-pname. If you omit both –ttext and to-obj-pname, cleartool creates a null-ended hyperlink.
- –fte·xt from-text
- Text associated with the from-end of a hyperlink.
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 Hyperlink Type
- Default
- None.
- hlink-type-selector
- An existing hyperlink type. The hyperlink type must exist in each VOB containing an object to be hyperlinked, or (if hlink-type-selector is a global type) in the administrative VOB hierarchy associated with each VOB. Specify hlink-type-selector in the form [hltype:]type-name[@vob-selector]
Objects to Be Hyperlinked
- Default
- None. You must specify at least one object.
- [ –fpn·ame ] from-obj-selector , [ –tpn·ame ] to-obj-selector
- from-obj-selector specifies
the from-object, and to-obj-selector specifies
the to-object. to-obj-selector is optional; omitting
it creates a text-only hyperlink (if you use –ttext)
or a null-ended hyperlink (if you don't).
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:
- pname
- A
standard or view-extended pathname to an element specifies the version in
the view.
- A version-extended pathname
specifies an element, branch, or version, independent of view.
- The
pathname of a VOB symbolic link.
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:
- A
standard or view-extended pathname to an element specifies the version in
the view.
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.
- Create a hyperlink type. Then create a unidirectional, element-to-element hyperlink between an executable and its GUI counterpart in another VOB.
- Create a hyperlink of type design_spec connecting the versions of a source file and design document labeled REL2.
- Create
three hyperlinks of the same type from the same version of a design document;
each hyperlink points to a different source file element.
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". - Create an element-to-element hyperlink between a source file and a script that tests it. Specify both from-text and to-text for further annotation.
- Create a hyperlink of type fixes between the version of util.c in your view and the element bug.report.21. Use to-text to indicate the bug number (“fixes bug 21”).
- Create a text only hyperlink of type design_spec to associate the algorithm convolution.c with the third-party document describing that algorithm. Make the hyperlink between the element convolution.c and the to-text that describes it.