IBM Support

About checking out Symbolic Link (symlink) Targets in dynamic views

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




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:

  1. 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.

  2. 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.

  3. 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:

  1. List out the contents to verify the symlink exist in this directory:
    M:\admin_vu\vob1\Folder1\sub_dir2>cleartool ls
    Folder3 --> ../../Folder3


  2. Change directory (cd) into the symlink, which puts you into the actual directory object:
    M:\admin_vu\vob1\Folder1\sub_dir2>cd Folder3

  3. 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".


  4. The symlink will not appear in a checked out state:
    M:\admin_vu\vob1\Folder1\sub_dir2\Folder3>cleartool ls ..\
    ..\Folder3 --> ../../Folder3


  5. 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


  6. 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 .


[{"Product":{"code":"SSSH27","label":"Rational ClearCase"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"GUI: ClearCase Explorer","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF015","label":"IRIX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"9.0;8.0.1;8.0;7.1.2;7.1.1;7.1;7.0.1;7.0","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}},{"Product":{"code":"SSSH27","label":"Rational ClearCase"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"View: Dynamic","Platform":[{"code":"","label":""}],"Version":"","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}},{"Product":{"code":"SSSH27","label":"Rational ClearCase"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Cleartool","Platform":[{"code":"","label":""}],"Version":"","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
16 June 2018

UID

swg21146295