2012-05-18 37 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

相關問題