查找版本并使用Cleartool删除 [英] Find version and delete it with Cleartool

查看:79
本文介绍了查找版本并使用Cleartool删除的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正尝试从特定分支递归删除某些版本/文件。

I'm trying to recursively delete some versions/files from a specific branch.

查找会提供正确的文件。现在最多可以删除 rmver 版本,但这给了我一个错误。我在语法上苦苦挣扎。

find delivers the right files. Now it would be up to rmver to remove the version but this gives me an error. I'm struggling with the syntax.

cleartool> find Component\Test -element "brtype(P_Testing_device)" -exec "rmver -f \"%CLEARCASE_PN%@@\main\G_Testing_device\P_Testing_device\LATEST\""
cleartool: Error: Extra arguments: "%CLEARCASE_PN%@@\main\G_Testing_device\P_Testing_device\LATEST\"

这是怎么了?
如何从分支中递归删除版本?

What's wrong with that? How would you recursively delete versions from a Branch?

推荐答案

如果可以避免,首先不要这样做。 rmver ,正如我在 我要在ClearCase远程客户端中撤消签入操作,这非常危险。

如果您要删除的版本(明确地是从ClearCase)附加有超链接,例如合并链接(交付或变基)您正在使用UCM的链接),最终可能会冒很多悬挂的超链接的危险,这是不好的。

First don't if you can avoid it. rmver, as I explain in "How do I undo a checkin in ClearCase remote client", is very dangerous.
If you have hyperlinks attached to the versions you are removing (definitively from ClearCase), like merge links (deliver or rebase links of your are using UCM), you risk ending up with many "dangling hyperlinks", which is not good.

第二,我会首先尝试:

find Component\Test -element "brtype(P_Testing_device)" -exec 'rmver -f "%CLEARCASE_PN%@@\main\G_Testing_device\P_Testing_device\LATEST"'

要排除引号弱对强引号的任何问题,如 CLEARCASE_XPN 一样,在明文案例中未解析为变量命令

To rule yout any issue with weak vs. strong quoting (as in "CLEARCASE_XPN not parsed as variable in clearcase command")

如果这行不通,我建议找到所有正确的版本并将其放入文件中,然后通过管道传递该内容文件到 cleartool rmver

If that doesn't work, I would recommend finding all the right versions and putting them into a file, then piping the content of that file to a cleartool rmver.

更安全的方法是到 cleartool lock -obs 分支,使其在以后的版本树中不可修改且不可见。

A much safer route is to cleartool lock -obs the branch, making it non-modifiable and invisible for the future version trees.

这篇关于查找版本并使用Cleartool删除的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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