IBM Support

About cleartool rmname and checkouts

Troubleshooting


Problem

This technote explains the behavior of cleartool rmname when trying to remove the name of an element that has checkouts from a directory within an IBM Rational ClearCase VOB.

Symptom

Attempts to run the cleartool rmname command results in the following error:

Note: The Delete operation from within ClearCase Explorer on Microsoft® Windows® executes a cleartool rmname, not a cleartool rmelem or cleartool rmver.

Command Line:

M:\admin_vu\vob1>cleartool rmname -nc myfile.txt


cleartool: Error: Element "myfile.txt" has checkouts.

GUI:

Cause


Any checkouts for the element will prevent the cleartool rmname from succeeding.

Resolving The Problem

There is a -force option available for cleartool rmname from command line that will allow the command execution to work even while there are checkouts.

This option forces the removal of the name from the directory when there is at least one checkout of the element, but it does not actually cancel any checkouts of the element.

Note: All checkouts of the element must be canceled manually.

The parent directory where the checkout exist must also be checked out for the command to work successfully since removing of the element name constitutes a directory change.



For more information on cleartool rmname, refer to IBM Rational ClearCase Command Reference, or run cleartool man rmname from command line.
Example:
  1. Checkout an element version:

    M:\admin_vu\vob1>cleartool co -nc myfile.txt
    Checked out "myfile.txt" from version "\main\3".


  2. Attempt to remove the name of the element from the checked in parent directory:

    M:\admin_vu\vob1>cleartool rmname -nc -force myfile.txt
    cleartool: Error: Can't modify directory because it is not checked out.
    cleartool: Error: Unable to remove "myfile.txt".


  3. Checkout the parent directory:

    M:\admin_vu\vob1>cleartool co -nc .
    Checked out "." from version "\main\2".


  4. Remove the element name from the directory:

    M:\admin_vu\vob1>cleartool rmname -nc -force myfile.txt
    Removed "myfile.txt".

    Note: A view-private copy of the file element will be left in the view.

  5. Checkin the parent directory:

    M:\admin_vu\vob1>cleartool ci -nc .
    Checked in "." version "\main\3".

  6. The version of the parent directory that the checkout existed in continues to list the element version as checked out:

    M:\admin_vu\vob1>cleartool lsco -l .@@\main\2
    2006-06-22T21:16:15-04 admin.user@IBM-D15F3483123
     checkout version "myfile.txt" from \main\3 (reserved)
     by view: admin_vu
    ("host1:C:\ClearCase_Storage\views\admin_vu.vws")


  7. The checkout of the element version will need to be canceled in the view, either by using:
    • cleartool unco:

      M:\admin_vu\vob1>cleartool unco -rm .@@\main\1\myfile.txt
      Checkout cancelled for ".@@\main\1\myfile.txt".



    • If the view is not accessible, then use cleartool rmview -uuid as detailed in technote 1122515.

  8. A view private copy of the file remain in the view:

    M:\admin_vu\vob1>cleartool ls -l
    directory version     lost+found@@\main\0   Rule: element * \main\LATEST
    view private object   myfile.txt


Using rmname -force from the GUI

The -force switch is currently not available from the graphical interface, ClearCase Explorer, on Windows.


Change request (RFE) RATLC00725589 has been submitted make the -force option available when executing Delete (cleartool rmname) from the ClearCase Explorer.

[{"Product":{"code":"SSSH27","label":"Rational ClearCase"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Cleartool","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":"2003.06.00;2003.06.16;7.0;7.0.0.1;7.0.0.2;7.0.0.3;7.0.0.4;7.0.0.5;7.0.0.6;7.0.0.7;7.0.0.8;7.0.1;7.0.1.1;7.0.1.2;7.0.1.3;7.0.1.4;7.0.1.5;7.0.1.6;7.0.1.7;7.1;7.1.0.1;7.1.0.2;7.1.1","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

swg21232758