當我看到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