2

Four months ago a colleague had a shapshot view that he deleted from the file system while there were still directory checkouts on a certain branch, say branch 'A'. Now some of directories are obsolete and need to be rmname'd from other views, but this cannot happen apparently while they are still checked out on branch A.

What is the most direct way to unco these directories on branch a?

ThomasMcLeod
  • 7,603
  • 4
  • 42
  • 80

1 Answers1

3

You can unregister completely this view (even if the actual view is gone from the filesystem).

See "ClearCase: Is it possible to cancel checkouts not made from your own view?":

cleartool rmview -force -uuid (uuid_of_the_view) -vob \aVob

That will trigger, as a side-effect, the removal of the checkout status of any file checked out by this view (referenced by its uuid) in this vob (the -vob option).

See more at "How to delete clearcase views created by other users?":

cleartool lsview -l theViewToRemove # get its uuid
cleartool rmtag -view theViewToRemove
cleartool unregister -view -uuid uuid_of_viewToRemove

You even can use the nuke_view.pl script.


Now some of directories are obsolete and need to be rmname'd from other views, but this cannot happen apparently while they are still checked out on branch A.

As I mention in "How do delete a file in ClearCase?", even if you don't unregister the view, you can still remove a file from a branch, even if it is checked out in another branch.
You simply need to do it from the command-line:

cleartool rmname -force /path/to/file

Eric Schnipke proposes in the comments:

  • (1) cleartool lsview -l theViewToRemove to get the view's UUID and then
  • (2) cleartool rmview -force -uuid (uuid_of_the_view) -vob \aVob to remove the view and offending file version.
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • I ran `rmview` and it responded "Removed references to view ..." but the checkouts are still there. Unfortunately our CC admin left the company and the replacement won't touch the vobs. – ThomasMcLeod Nov 20 '13 at 17:58
  • @ThomasMcLeod that won't touch the vob. Only metadata associated with the vob (ie the list of views with checkouts for that vob). But you have to be admin to complete that command (which the admin can re-try even if you already executed it). – VonC Nov 20 '13 at 20:48
  • @ThomasMcLeod I guarantee you, this is the way to remove those checkouts, I have done it countless time. But, if this is not possible, the command-line alternative I have mentioned works too: you can rmname a file even if it is already checked out in an other branch. – VonC Nov 20 '13 at 20:49
  • The following worked like a charm for me: (1) `cleartool lsview -l theViewToRemove` to get the view's UUID and then (2) `cleartool rmview -force -uuid (uuid_of_the_view) -vob \aVob` to remove the view and offending file version. – Eric Schnipke Oct 16 '17 at 19:07
  • 1
    @EricSchnipke Thank you. I have included your comment in the answer for more visibility. – VonC Oct 16 '17 at 19:58