Soft - is your software and documentation
A. The links created with the ln command (VOB symbolic links or VOB hard links) are cataloged in directory versions, in the same way as elements. By default, a link can be created in a directory only if that directory is checked out. A VOB link becomes visible to those using other views only after you have checked in the directory in which you created the link. (ln appends an appropriate default checkin comment to the directory version.) In a snapshot view, this command executes the update command for elements affected by the link operation.
VOB symbolic links
A VOB symbolic link (created when you use the –slink option) is a separate, unversioned object. It contains a character string, the link text, in the form of a path name. You can attach attributes and hyperlinks, but not version labels, to a VOB symbolic link.
You cannot check out a VOB symbolic link. To revise a VOB symbolic link, check out its directory, remove the link with rmname, create a new link, and check in the directory. (If you use the –nco option, the checkout and checkin steps are not required.)
VOB symbolic links in UNIX
Use relative VOB symbolic links instead of absolute VOB symbolic links. Absolute VOB symbolic links require you to use absolute pathnames from the VOB tag level; if the VOB mount point should change, the link becomes invalid.
VOB symbolic links in Windows
VOB symbolic links that point to files outside the ClearCase MVFS are not supported by the Windows operating system. Although the ln command creates the link, the link is not displayed in a standard directory listing; it is displayed only by the cleartool ls command. (This is true for all symbolic links that do not point to a valid MVFS pathname.)
Use relative VOB symbolic links instead of absolute VOB symbolic links. Absolute VOB symbolic links require you to use absolute pathnames from the view tag level and are therefore valid only in the view in which they were created.
Note: Although an absolute VOB symbolic link that includes the view tag at the beginning works when you are in the view, an absolute VOB symbolic link pointing to a pathname that begins with a VOB tag (for example, cleartool ln \my_vob\file my_link) does not work.
VOB hard links
A VOB hard link (created if you omit the –slink option) is an additional name for an existing element. Use VOB symbolic links instead of VOB hard links whenever possible.
VOB hard links in UNIX
In UNIX, you cannot make a VOB hard link to a derived object, but you can make additional UNIX system hard links (created with ln(1)) to a derived object. The links are visible in your view, but are not part of the VOB. For more information, see the IBM Rational ClearCase Guide to Building Software.
VOB hard links in Windows
When you check out a VOB hard link (that is, check out the element it names), all the other names for the element are listed by (cleartool) ls as checkedout but removed and are not displayed in Windows Explorer. The element is checked out, but there are no view-private files having the other names. The command lscheckout –all lists the checked-out element only once.
After you check in the element or cancel the checkout (using uncheckout), the other names for the element are listed by (cleartool) ls as disputed checkout, checkedout but removed and do not appear in Windows Explorer. To update the state of the other names, use the setcs –current command.
VOB hard links and directory merges
The merge and findmerge commands can merge both file elements and directory elements. Merging versions of a directory element can involve creating a VOB hard link to a directory or removing a VOB hard link from a directory:
Working on a subbranch, a user checks out the directory /src, and then either uses mkdir to create directory element /testing within /src or uses rmname to remove /testing from /src.
When the subbranch is merged back into the main branch, a hard link named testing is made in (or removed from) a main-branch version of src, referencing the directory element already cataloged in the subbranch version.
ClearCase and ClearCase LT allow creation of hard links to directories only in this directory-merge context: the two links (both named testing in the example above) must occur in versions of the same directory element (/src in the example above).
VOB hard links in snapshot views
In a snapshot view, a VOB hard link is a copy of the element to which it points.
Recovering a removed element
You can use ln to recover an element that you mistakenly removed from a VOB directory with rmname. For details, see the rmname reference page. You cannot use ln to link elements that are in the lost+found directory.
No special identity is required if you checked out the directory. To use the –nco option, you must have one of the following identities:
Member of the ClearCase administrators group (ClearCase on Windows)
Local administrator of the ClearCase LT server host (ClearCase LT on Windows)
An error occurs if one or more of these objects are locked: VOB.
(Replicated VOBs only) No mastership restrictions.
If you have multiple components in a UCM VOB, ln cannot be used to create hard links between these components
C. Creates one or more event records, with commenting controlled by your .clearcase_profile file (default: –cqe). See the comments reference page.
D. Prompts for confirmation, then creates the link in the checked-in directory version that you specify.Note: You cannot use –nco in a replicated VOB.
E. Specifies an element to which a link is to be created. Each pname must be a standard or view-extended path name. Use slashes (/) as path name separators if you need to load the symlinks from both UNIX and Windows. For VOB hard links, each pname must specify an existing element that is not a VOB symbolic link and that resides in the same VOB as the link being created. For VOB symbolic links, pname need not reside in the same VOB as the link to it, nor be an existing element.
Scenario a number of directories were been deleted from the current view using “cleartool rmname” several versions earlier. Work has taken place on the intervening versions and you now realise one of the directories was deleted by mistake. One solution is to use “cleartool ln” to create a hard link to the deleted directory, which was last present in version 15 below:
1. Checkout the currently directory (\main\28):
cleartool co –nc .
2. Create a hard link to
cleartool ln .@@\main\15\<directory name> <directory name>
3. Checkin the currently directory at \main\29:
cleartool ci –nc .
cleartool ln samecs.c
Link created: "build.c".
cleartool ln -slink samecs.c build.c
Link created: "messages.c".
cleartool ln *.h samecs
Link created: "build/hello.h".
Link created: "build/msg.h".
Link created: "build/util.h".
On a Windows system, as a member of the ClearCase administrators group (ClearCase) or logged in at the ClearCase LT server host as the local administrator (ClearCase LT), create a VOB symbolic link in the checked-in directory version \vobs_hw@@\main\3 that points to hello.c in the current working directory.
cleartool ln -slink -nco hello.c
Modify checked-in directory version “\vobs_hw@@\main\3”? [no]
yes Link created: “..\vobs_hw@@\main\3\hello.c”.