How to undo checkout a file checked out from anoth

2020-07-27 04:17发布

问题:

In this example, the user5628 (which is actually sick) has a checked out file in its dynamic view. How can I cancel this checkout?

$ ct lsco -all | ag foo
2013-08-29     user52001    checkout version "L:\a\path\foo.c" from \main\branch_a\0 (reserved)
2014-04-10     user5030     checkout version "L:\a\path\foo.c" from \main\branch_b\0 (reserved)
--11-18T08:29  user52212    checkout version "L:\a\path\foo.c" from \main\branch_c\1 (reserved)
--04-15T14:24  user5628     checkout version "L:\a\path\foo.c" from \main\branch_d\11 (reserved)
--04-30T08:05  user5072     checkout version "L:\a\path\foo.c" from \main\branch_d\11 (unreserved)

回答1:

As I mentioned in "ClearCase: Is it possible to cancel checkouts not made from your own view?", the easiest way is to remove the "checkout" status for user5628 view.

cleartool descr -l vob:\avob
# get user5628 view uuid in the output
cleartool rmview -force -uuid (uuid_of_the_view) -vob \aVob

That will not modify any of user5628's checked out files (the modification are not lost), but user5628 will have to check them out again.

That same technique is useful when you have old checked out files in a view which has since then been deleted.



标签: clearcase