如何撤消从其他用户签出的文件的签出?

How to undo checkout a file checked out from another user?

在此示例中,user5628(实际上生病了)在其动态视图中有一个已签出的文件。我怎样才能取消这次结账?

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

正如我在“ClearCase: Is it possible to cancel checkouts not made from your own view?”中提到的,最简单的方法是删除 user5628 视图的 "checkout" 状态。

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

这不会修改 user5628 签出的任何文件(修改不会丢失),但 user5628 必须再次签出它们。

当您有 old checked out files in a view which has since then been deleted 时,同样的技术很有用。