当我看到cleartool diffbl
手册页时,我看不到任何格式选项。
这意味着您需要解析该命令的结果,将每个活动提供给cleartool describe -fmt
,使用fmt_ccase option之一来显示您想要的内容。
This thread为您提供过程中遵循的一个想法,但它是在bash(UNIX),待适应窗口,如果你需要它:
for act in $(ct diffbl -act [email protected]/vobs/apvob [email protected]/vobs/apvob | grep ">>" | grep -v "deliver." | cut -f2 -d " "); do echo "Activity: $act"; cleartool desc -fmt "%d\n" activity:$act; echo; done
在多线可读性:
for act in $(ct diffbl -act [email protected]/vobs/apvob [email protected]/vobs/apvob
| grep ">>"
| grep -v "deliver."
| cut -f2 -d " ");
do
echo "Activity: $act"; cleartool desc -fmt "%d\n" activity:$act; echo;
done
请注意,通过排除“deliver.
”活动,我们只关注促成活动,如“How to find files asssociated with a ClearCase UCM activity?”中所述。在成功管理
的OP Lax报告提取活动的名称,具有:
desc -fmt "%Nd\n" "activity:myActivityId"
(@\pvob
是已经diffbl
命令的结果的一部分松懈只是解析activityid
。从diffbl
的结果,并把它的desc
命令)
他补充说:
个
I am needing this in the context of C#, so parsing is just like parsing any other string: I am using a regex to seperate the output to my interested activities. ex:
Regex.Matches(diffBlOutput, "myInterestedPattern");
And for each match in regex result, I get the activity with
RegexMatch.Groups["activity"].ToString()
activityid
is actually a substring of this string as the result is always " activtyid activityName
" so, substring(0,result.indexOf(' '));
gets me the activity id.
感谢您的答复,我看了你的帮助,并试图出cleartool下面的选项,没有工作。 如果我犯了任何错误,你能否让我知道。 第一步: - 命令: - cleartool> diffbl - 活动33.2.534.8111 @ \ MYProject_PVOB 33.2.754.7570 @ \ MYPROJECT _PVOB 输出:_ 比较如下: 33.2.534.8111 @ \ MYProject_PVOB 33.2.754。7570 @ \ MYProject _PVOB Difference: >> deliver.abcde_MYPACKAGE.20111116.152232 @ \ cde_Components“deliver abc de_MYPACKAGE on 16.11.2011 15:22:32。” >> Bugfix_ABCDClient @ \ CDE_Components “修正错误的ABCD 客户端” {继续接下来的评论} – Lax
第二步: - 然后我尝试以下,以得到 “修正错误ABCDClient” 尝试1的活动的详细信息: - cleartool>递减-fmt“%d \ n”“Bugfix_ABCDClient @ \ CDE_Components @ \ MYProject _PVOB” cleartool:错误:无法访问“Bugfix_ABCDClient @ \ CDE_Components @ \ MYProject _PVOB”:没有这样的文件或目录。 Try2: - cleartool>递减-fmt “%d \ n”, “Bugfix_ABCDClient @ \ CDE_Components” cleartool:错误:无法访问 “Bugfix_ABCDClient @ \ CDE_Components” :没有这样的文件或目录。 如果我犯了什么错误,你能让我知道吗? – Lax
@ user1402644两条评论:1 /一个特定对象(如活动)的描述需要**完全限定的名称**:'activity:anActivity @ \ apvob'。 2 /如果“MyProject_PVob”是包含组件,流,项目和活动的pvob,则描述应参考'activity:deliver.abcde_MYPACKAGE.20111116.152232 @ \ MyProject_PVob'。但是,如果'CDE_Components'也是* pvob,那么是的,完全限定的名称将是'activity:deliver.abcde_MYPACKAGE.20111116.152232 @ \ CDE_Components' – VonC