因此,我正在編寫一個腳本,我必須通過ClearCase vob中的所有項目,查找文件並從該文件解析某些信息。
當然,我不想加載每一個項目,所以我使用cleartool來檢索卸載的文件。
首先,我正在使用find命令來查找這些文件。這是我第一次嘗試:用cleartool獲取卸載文件的特定版本
root>cleartool find C:/viewpath -name file.txt -version "lbtype(Version-label)" -print -nr
Viewpath是我正在查找文件的項目的路徑。我正在尋找的文件是版本標籤指定的版本上的file.txt
。
儘管我知道該版本中存在file.txt
,但這並沒有給我帶來任何結果。
我想通過老版本的目錄來查看最新的主分支,這是在file.txt
被添加到目錄之前。我嘗試這樣做,而不是:
root>cleartool find C:/[email protected]@/Version-label -name file.txt -version "lbtype(Version-label)" -print -nr
,得到了這樣的結果,這是我一直在尋找
C:/viewpath\[email protected]@\main\branch\41
所以,現在,我知道我能找到我試圖得到它的文件。
root>cleartool get -to savepath C:/viewpath\[email protected]@\main\branch\41
這給了我這樣的結果
cleartool: Error: "C:/viewpath\[email protected]@\main\branch\41" does not exist, or is not a ClearCase version, or is a checked out version which was removed.
也試過
root>cleartool get -to savepath C:/viewpath\[email protected]@/Version-label
具有相同的結果,我可以被添加到目錄
文件時,它仍然在主分支,所以它仍然在通過主分支上的目錄進行搜索,其中file.txt
現在是可以找到。
如何告訴它在從main分支後查看目錄的版本?
有關動態視圖,請參閱http://stackoverflow.com/questions/2923328/what-are-the-differences-between-a-snapshot-view-and-a-dynamic-view/2925378#2925378。 – VonC
我在這裏只是一名夏季工作者,不幸的是,在動態或靜態視圖應該被使用時,他們沒有發言權。有沒有辦法用靜態視圖來實現這一點? – Nait
@Nait:是的,通過比較差異,因爲我的最後一個鏈接說明(http://stackoverflow.com/questions/176858/in-clearcase-how-can-i-- view-old-version-of-a-file-在-A-靜態 - 視圖 - 從最COM/177350#177350)。但動態視圖正好可以訪問和explorer * all *版本(並且你完全可以使用相同配置的快照和動態視圖)。 – VonC