ClearCase‎ > ‎UCM FAQ‎ > ‎

How can I change a reserved checkout in a snapshot view to unreserved?

ClearCase allows you to change a reserved checkout to an unreserved one and vice versa. There are no permission constraints to this action anyone can do it. Problem is that changing the setting is a property of the checked-out view-private version - so if you colleague went on holiday with his laptop it's a bit of a challenge.

Here's how you concur it:

Question

How can I change a reserved checkout in a snapshot view to unreserved?

Answer

A user reports that a file (or folder) is checked out reserved in a certain snapshot view and it's blocking for
further development, the reserved checkout must be changed to unreserved. In the example we use:

File: \ETools\Web\reserved.txt
View: sgyl_view_etools2

1: Create a 'phantom working tree' of the snapshot view in question

To create a another working tree of another's view you must follow these steps:

  • Create a folder that can hold the view
  • Re-generatethe view.dat file

The easiest way to re-generate the view.dat file is to use the perl script provided by Rational:

"c:\Program Files\Rational\ClearCase\etc\utils\regen_view_dot_dat.pl"
>mkdir C:\data\etools-admin\ccviews\sgyl_view_etools2
>cd /d C:\data\etools-admin\ccviews\sgyl_view_etools2
>ratlperl "c:\Program Files\Rational\ClearCase\etc\utils\regen_view_dot_dat.pl" -tag sgyl_view_etools2 .
rgy_view_uuid: "427d85d48c774b8dafbf495506069a30".
creating ".\view.dat".


2: Update the snapshot view
HEY!!! Don't update the entire snapshot view as you actually dont need it.

The file or element you are interested in will not be loaded because it's checked out, therefore you need
to load the folder holding the element. in our example that is:

C:\data\etools-admin\ccviews\sgyl_view_etools2\ETools\Web
cleartool update C:\data\etools-admin\ccviews\sgyl_view_etools2\ETools\Web

3: Get a handle for the checked out file 
The file that really interests us isn't loaded. It will show up with status
[not loaded, checkedout but removed]

So we'll make a dummy file for it just to get a handle for the the cleartool unreserve command:

>echo dummy > C:\data\etools-admin\ccviews\sgyl_view_etools2\ETools\Web\reserved.txt
>cleartool unreserve C:\data\etools-admin\ccviews\sgyl_view_etools\ETools\Web\reserved.txt

4: Clean up
Don't remove the view using cleartool commands, the user still needs it just remove the phantom working tree:

[curernt directory] C:\data\etools-admin\ccviews\sgyl_view_etools2

>cd ..
>rd /s /q sgyl_view_etools2

...Thats it, you are done!
Comments