如何以大写字母删除版本 [英] how to remove a version in clearcase

查看:84
本文介绍了如何以大写字母删除版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想签出一个目录,例如 / vobs / myvob / src / 在此目录中添加新文件。但是我误以为不是签出 / vobs / myvob / src ,而是签出 / vobs / myvob / scr / 更糟糕的是检查。然后目录 scr 有一个新版本: scr @ mybranch / 1 (假设我正在分支 mybranch

I want to check out a directory , let's say /vobs/myvob/src/ to add a new file in this directory. But by mistake rather than checked out /vobs/myvob/src I checked out /vobs/myvob/scr/ and even worse checked in it. Then directory scr has a new version : scr@mybranch/1 (let's say I'm working on branch mybranch)

在意识到我犯了一个错误之后,我通过以下方式删除了新创建的版本:

After realized that I've made a mistake, I remove the newly created version by:

ct rmver scr@myranch/1

然后使用 ct ls parent_dir_of_scr 进行仔细检查,我发现虽然 scr @ mybranch / 1 消失了, scr @ mybranch / 0 仍然存在。

不确定100%,但是我恐怕不应该尝试删除该版本同样,也可能使clearcase也删除main中的一个版本。

所以我的问题是在这种情况下我应该如何完全清理。

then use ct ls parent_dir_of_scr to do the double check and I found although scr@mybranch/1 disappeared, scr@mybranch/0 is still there .
Not 100% sure but I'm afraid I should not try to remove that version in the same way , cus it might let clearcase remove a version in main as well.
So my question is how should I do a totally "clean up" in this situation .

需要您的帮助。

推荐答案

首先,如如何将签入的文件回滚到Clearcase?,一个永远不会做的命令是 rmver

即使您认为合适,这也太危险了,因为它会删除版本及其所有相关的元数据(超链接,标签等)。

First, as mentioned in How do I roll back a file checked in to Clearcase?, the one command to never ever do is rmver.
Even if in your case it could be appropriate, this is simply too dangerous, for it removes the version and all its associated metadata (hyperlinks, labels and so on).

然后,您提到:


而不是签出 / vobs / myvob / src 我签出了 / vobs / myvob / scr / ...

...好吧 / vobs / myvob / src / vobs /非常相似myvob / src 在这里。我看不到两个目录之间的任何区别。

... well /vobs/myvob/src is quite similar to /vobs/myvob/src here. I do not see any differences between the "two" directories.

如果要通过CLI cleartool将文件添加到目录中,则需要:

If you want to add a file to a directory through the CLI cleartool, you will need to:


  • 结帐 / vobs / myvob / src (父目录)

  • mkelem 要添加的文件

  • 签入父目录

  • checkout /vobs/myvob/src (parent directory)
  • mkelem the file to add
  • checkin the parent directory

最后,您看到的版本0只是一个声明性版本,可以用作分支机构的起点。

这就是为什么其他答案都建议的原因您可以对该元素 rmbranch (删除分支)。它仅用于清理lsvtree(版本树)。

Finally, the "version 0" you see is only a "declarative" version to act as a starting point for branches.
That is why the other answers suggest you to rmbranch (remove the branch) for that element. It only serves the purpose of cleaning the lsvtree (version tree).

"cleartool rmbranch -force $element"

十个最佳脚本

这篇关于如何以大写字母删除版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆