2012-05-18 36 views
2

我需要帮助了解如何获取特定贡献活动何时传递到集成流的详细信息。
我曾经在cleartool中使用diffbl -activity baseline1 baseline2来获得从一个基线到另一个基线的活动列表。如何获得集成流的贡献活动详细信息?

现在新的需求是,我需要获取日期时间的时间作为输出diffbl输出列出的一些活动。
我尝试使用lsactdescribe但我得到“Activity not found”错误。
可能是因为我在查询的活动是一项贡献活动。

有人可以知道如何获取何时发送参与活动的日期时间,或者如何自定义输出“diffbl -activity baseline1 baseline2”以获取活动日期时间的详细信息?

回答

0

当我看到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.

+0

感谢您的答复,我看了你的帮助,并试图出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

+0

第二步: - 然后我尝试以下,以得到 “修正错误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

+0

@ 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

相关问题