IBM Support

Uncheckout an element from a snapshot view when the view root directory is not accessible

Question & Answer


Question

How can a checkout from a IBM Rational ClearCase snapshot view be cancelled without having access to the view root directory?

Cause

You can cancel a checkout of another dynamic view by using a view-extended pathname to the element with 'cleartool uncheckout'.

However, for a snapshot view a view-extended pathname does not work. Although deleting the view (cleartool rmview) works, it would cancel all checkouts for that view and delete any view private files which is not the desired results.

Answer

You can create a new directory to act as a temporary view root directory and cancel the checkout from that directory.

Perform the following steps:

  1. List the checkouts to identify the view and checkout information
  2. Create a new temporary view root directory
  3. Regenerate the view root to the new temporary directory

    ccperl "C:\Program Files\Rational\ClearCase\etc\utils\regen_view_dot_dat.pl\" -tag <view-tag> <tmp-dir>
  4. Cancel the checkout

    cleartool unco -rm <tmp-dir>\<vob>\<path>\<checkedout-file>
  5. Remove the temporary directory

    rmdir /S/Q <tmp-dir>

Example:

  1. List checkouts

    M:\SC-II-def\aug2007\dira>cleartool lsco -l
    2008-07-14T16:42:39-04:00 Denise Smith (user1.user@sc-II)
     checkout version "c.txt" from \main\1 (reserved)
     
    by view: SCII-snap
    "sc-II:C:\clearcase_storage\viewstore\SCII-snap.vws")
  2. Create a temporary directory

    C:\temp>mkdir temp-sn-view
    C:\temp>cd temp*

  3. Regenerate the view root using the view information from the output in step 1 above

    C:\temp\temp-sn-view>ccperl.exe "C:\Program Files\Rational\ClearCase\etc\utils\regen_view_dot_dat.pl" -tag SCII-snap .
    rgy_view_uuid: "2e449990f2b54255848188a658e497dc".
    creating ".\view.dat".

  4. Cancel the checkout

    C:\temp\temp-sn-view>cleartool unco -rm .\aug2007\dira\c.txt
    Loading "aug2007\dira\c.txt" (478 bytes).
    Checkout cancelled for ".\aug2007\dira\c.txt".
  5. Remove the temporary directory

    rmdir /S/Q C:\temp\temp-sn-view

[{"Product":{"code":"SSSH27","label":"Rational ClearCase"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"View: Snapshot","Platform":[{"code":"PF033","label":"Windows"}],"Version":"7.0","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
16 June 2018

UID

swg21313652