Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to recover a file from "Checkout but removed" state?

Tags:

clearcase

I was trying to checkout a file and it went it to "Checkout but removed" state.

I am not able to undocheckout it and have no clue what needs to be done next.

When i surf through net for this I found an article IBM site Checkout But removed state

But i did not try to rename the file name as mentioned in the article still gets the error.

I am using Clearcase 7.0.1.0 version. Please help to solve this issue.

like image 733
Samselvaprabu Avatar asked Jul 31 '12 12:07

Samselvaprabu


2 Answers

You should be to undo checkout through the GUI:

  • find checkout
  • select the checkedout file and right-click: undo checkout

Even if that file is not visible on the disk, the "Find checkout" GUI will list it as checked out.

Find checkout


Another solution is to copy the file from another view, for instance a dynamic view with the same config spec (easy to create, and providing a quick access to the same file).

If you copy it on your snapshot view, the file will be listed as "checked out" (but with no modifications yet), and you can resume working on it.

like image 199
VonC Avatar answered Oct 21 '22 21:10

VonC


The simplest way to resolve this is to just create a new file with the same name. Then file is not missing any more and you can undo checkout and then check out again to start fresh. On the command line:

$ cleartool ls your_file.c
your_file.c: Checkout but removed
your_file.c@@
$ touch your_file.c
$ cleartool ls your_file.c
your_file.c@@/main/branch1/branch2/14   Rule: ...whatever...
$ cleartool unco -nc your_file.c
$ cleartool co -nc your_file.c
Checked out your_file.c
$

I do not have access to clearcase any longer, so the above is just by (old) memory, but you get the idea. If you are not using the command line, just copy any file to your_file.c, undo checkout and then check out.

like image 20
hlovdal Avatar answered Oct 21 '22 20:10

hlovdal