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:
- List the checkouts to identify the view and checkout information
- Create a new temporary view root directory
- 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>
- Cancel the checkout
cleartool unco -rm <tmp-dir>\<vob>\<path>\<checkedout-file>
- Remove the temporary directory
rmdir /S/Q <tmp-dir>
Example:
- 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")
- Create a temporary directory
C:\temp>mkdir temp-sn-view
C:\temp>cd temp*
- 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".
- 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".
- Remove the temporary directory
rmdir /S/Q C:\temp\temp-sn-view
Related Information
Was this topic helpful?
Document Information
Modified date:
16 June 2018
UID
swg21313652