clearcase-将标签应用于多个标签 [英] clearcase - apply label over multiple labels

查看:73
本文介绍了clearcase-将标签应用于多个标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在已经使用cleartool创建的两个或多个标签上应用标签.我知道如何使用cleartool创建和应用标签,并且已经研究了mklabel命令.但是找不到任何将标签应用于多个标签的规定. 任何人都可以提供相同的解决方案吗?

I need to apply a label on a set of two or more labels that are already created using cleartool. I know how to create and apply a label using cleartool and have studied mklabel command. But couldn't find any provision to apply a label over multiple labels. Can anyone please provide solution for the same??

推荐答案

您可以尝试找到所有相关版本(带有正确标签的版本)并执行mklabel.

You could try and find all the relevant versions (the ones with the right labels) and perform a mklabel.

cleartool find可以与包含mklabel的exec指令组合.

cleartool find can be combined with an exec directive including a mklabel.

cleartool find . -ver "lbtype(LBL1) || lbtype(LBL2)" \
   -exec "cleartool mklabel -replace NEW_LBL \"%CLEARCASE_XPN%\"

不过,这些技巧是:

  • 您需要从最旧到最新列出标签(此处创建的LBL2必须比LBL1更新),因为您每个文件只能mklabel个版本:如果文件有两个不同版本,每个版本都标有您的标签之一,则您希望在最新的标签上添加新标签.因此,查找查询中的顺序.

  • you need to list your labels from the oldest to the newest (here LBL2 must be created more recently than LBL1) because you can mklabel only one version per file: if a file has two different versions each labeled with one of your label, you want to end up with your new label on the most recent one. Hence the order in the find query.

您需要mklabel的'-replace'选项,因为同样,如果找到两个版本,则第一个mklabel将起作用,第二个将不起作用,除非-replace指示移动 NEW_LBL到第二个版本.

you need the '-replace' option of the mklabel, because again, if two versions are found, the first mklabel will work, the second won't unless the -replace instructs it to move NEW_LBL to the second version.

这篇关于clearcase-将标签应用于多个标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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