尝试撤消cleartool rm [英] Trying to undo a cleartool rm
问题描述
我试图将文件从目录A迁移到分支中的目录B,将其称为file.txt。我所做的是:
cd A
cp file.txt ../B/
ct rm A
cd ../B
ct mkelem -ci -nc file.txt
<从而失去了所有的历史。我正在尝试从中恢复过来,做我应该做的,只是 ct mv file.txt ../ B
我读到我应该做这样的事情:
cd A
ct ln。@ @ / main /?/ file.txt ./file.txt
幸运的是,从另一个角度来看,我知道?
应该是27。不幸的是,当我尝试执行上述操作时,我得到了:
cleartool:错误:名为 file.txt的条目已存在。
cleartool:错误:无法创建链接: ./ file.txt。
而我尝试这样做:
ct rmelem file.txt
但得到了:
cleartool:错误:元素 file.txt具有用户
$未创建的分支p $ p>
尽管大概这不是我应该做的。我如何取回该文件?简直就是
ct rm
。如果对添加到目录B的新副本文件执行ct rm
,我什至收到条目已存在的错误。解决方案您步入正轨,但我建议您使用简单的
rmname
,而不是rmelem
(删除具有所有版本,分支等的元素)。
这将从最新版本的父目录中删除
file.txt
,并允许您进行符号链接。
下次,
cleartool mv
可能会更容易,并保留文件移动的历史记录。I was trying to migrate a file from directory A to directory B in a branch, call it file.txt. What I did was:
cd A cp file.txt ../B/ ct rm A cd ../B ct mkelem -ci -nc file.txt
Thereby losing all the history. I am trying to recover from this to do what I should have done which is simply
ct mv file.txt ../B
I read that for this I should do something like this:
cd A ct ln .@@/main/?/file.txt ./file.txt
where luckily, from another view, I've figured out
?
should be 27. Unfortunately when I try to do the above I get:cleartool: Error: Entry named "file.txt" already exists. cleartool: Error: Unable to create link: "./file.txt".
and I try to do:
ct rmelem file.txt
but got:
cleartool: Error: Element "file.txt" has branches not created by user
though presumably that's not what I should be doing anyway. How do I get back that file? It was simply a
ct rm
. I even get the entry already exists error if I doct rm
on the new copy file I added to directory B..解决方案You are on the right track, but I would recommend a simple
rmname
, instead of armelem
(which deletes the element with all its versions, branches and such).That would remove
file.txt
from the latest version of the parent directory, and allows you to proceed with the symlink.Next time, a
cleartool mv
might be easier, and keep the history of the file being moved.这篇关于尝试撤消cleartool rm的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!