Troubleshooting
Problem
This technote details the available functionality that allows the target of a symbolic link (symlink) to be checked-out when using IBM® Rational® ClearCase® from the GUI or CLI in a dynamic view.
Resolving The Problem
ClearCase Explorer from a dynamic view
Command Line (CLI) from a Dynamic view
Overview
A ClearCase VOB symlink is a hyperlink that acts as a pointer to data that is actually stored in another location of the same VOB or a different VOB.
Symbolic links cannot be checked-out. Checkouts (and other related operations) are performed on the ClearCase object that the symlink is attached. Features available in ClearCase Explorer make symlink usage much easier to manage, however, this technote also touches on the command line functionality.
The Checkout option for a symlink from ClearCase Explorer executes against the actual symlink target, but from command line, attempts to check out the symlink will result in an error similar to the following:
- cleartool: Error: Not an element: "name".
Review technote 1220890 for more information on why symlinks cannot be checked out.
Notes:
- The Symlink option (Symlink Target Operations) only appears in the context menu from ClearCase Explorer after right-clicking on an actual symbolic link. If the symlink target is in another VOB, then that VOB must also be mounted on the local system.
- The Symlink Target Operations are not available from Microsoft® Windows® Explorer, and the option cannot be added to the Windows Explorer context menu. There are limited features for working with symlinks; right-click the symbolic link > click ClearCase > Explore Link Target | Properties of Symlink.
- In a snapshot view, the symbolic link target must be loaded in your view also, in order for the Symlink Target Operations to appear. However, these options are limited, such as the checkout does not work, and the alternatives are to either Warp To Symlink Target or use a dynamic view.
ClearCase Explorer from a Dynamic view
The available Symlink Target Operations from ClearCase Explorer:
EXAMPLE:
1. Start ClearCase Explorer, set into a view and locate the symlink in the VOB:
2. Right-click the symlink and click Symlinks:
3. Select Symlink Target Operations > select Checkout:
4. The checkout is of the actual target object and not the symlink; hence, the symlink will not appear checked out:
5. If you access the target object, it will appear as checked out:
For more information on symlinks, select Help --> Help Topics -> select Search -> enter symbolic links > click Go!.
Command line (CLI) from a Dynamic view
This functionality is very basic, in that you can access a directory that is a symlink. However, when you change into that directory, you are actually set into the directory object. Any operations performed in this context are done against the elements in their physical location, and the symlink is only serving as an access point.
Note: This example is from Windows, but the functionality is the same on Linux® and UNIX®.
EXAMPLE:
- List out the contents to verify the symlink exist in this directory:
M:\admin_vu\vob1\Folder1\sub_dir2>cleartool ls
Folder3 --> ../../Folder3
- Change directory (cd) into the symlink, which puts you into the actual directory object:
M:\admin_vu\vob1\Folder1\sub_dir2>cd Folder3
- Perform a checkout while set in the directory object:
M:\admin_vu\vob1\Folder1\sub_dir2\Folder3>cleartool co -nc .
Checked out "." from version "\main\4".
- The symlink will not appear in a checked out state:
M:\admin_vu\vob1\Folder1\sub_dir2\Folder3>cleartool ls ..\
..\Folder3 --> ../../Folder3
- The directory object will appear as checked out in the describe output:
M:\admin_vu\vob1\Folder1\sub_dir2\Folder3>cleartool describe .
directory version ".@@\main\CHECKEDOUT" from \main\4 (reserved)
checked out 11-May-06.18:06:15 by jdoe.ccgrp@HOST1
by view: admin_vu ("HOST1:C:\Rational\Storage\views\admin_vu.vws")
Element Protection:
User : DOM\jdoe : rwx
Group: DOM\ccgrp : rwx
Other: : rwx
element type: directory
predecessor version: \main\4
- Listing the parent directory of the symlink target will also show it as checked out:
M:\admin_vu\vob1\Folder1\sub_dir2\Folder3>cleartool ls -l ..\..\..
version ..\..\..\bar.txt@@\main\0 Rule: element * \main\LATEST
version ..\..\..\doc3.txt@@\main\0 Rule: element * \main\LATEST
version ..\..\..\doc4.txt@@\main\0 Rule: element * \main\LATEST
directory version ..\..\..\Folder1@@\main\5 Rule: element * \main\LATEST
directory version ..\..\..\Folder3@@\main\CHECKEDOUT from \main\4 Rule: element * CHECKEDOUT
Documentation
For more information on cleartool ln -s, review the IBM Rational ClearCase Command Reference, or run cleartool man ln.
Equivalent functionality is available in Snapshot Views, see technote 1258100 for more details .
Related Information
Was this topic helpful?
Document Information
Modified date:
16 June 2018
UID
swg21146295