About cleartool rmname and checkouts

Technote (troubleshooting)


Problem(Abstract)

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.

Related information

Directory merges will not undo rmnamed elements

Cross reference information
Segment Product Component Platform Version Edition
Software Development Rational ClearCase Cleartool

Rate this page:

(0 users)Average rating

Add comments

Document information


More support for:

Rational ClearCase
Cleartool

Software version:

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, 2003.06.00, 2003.06.16

Operating system(s):

AIX, HP-UX, IRIX, Linux, Solaris, Windows

Reference #:

1232758

Modified date:

2009-12-29

Translate my page

Machine Translation

Content navigation