1.創(chuàng)建項(xiàng)目
1.1創(chuàng)建Project VOB
在開(kāi)始菜單中選擇Rational Software->Rational
ClearCase->Adminstration->Create VOB
選擇Create as a UCM project VOB,不選This VOB will contain UCM components,下一步
接著指定VOB storage location,下一步
在Administrative VOB的選項(xiàng)中選擇none,結(jié)束
1.2創(chuàng)建Component VOB
在開(kāi)始菜單中選擇Rational Software->Rational
ClearCase->Adminstration->Create VOB
選This VOB will contain UCM components,不選擇Create as a UCM project VOB,下一步
選擇Create VOB as a single VOB-level component,下一步
在What is the project VOB where information about this component will
be stored中選擇剛才創(chuàng)建的Project
VOB,結(jié)束
1.3創(chuàng)建UCM Project
右鍵選擇剛才創(chuàng)建的Project VOB,選擇new->Project
輸入Project Name, Integration Stream Name, Project Type choose
'Traditional paralletl development', 下一步
一直選Next直到完成
1.4創(chuàng)建Subsystem Integration Stream
在ClearCase Explorer中點(diǎn)擊 Join Project按鈕
選擇剛才創(chuàng)建的UCM Project
Development View選擇Snapshot, Integration View選擇Dynamic
后面的步驟就一直選next到結(jié)束
2.刪除項(xiàng)目
項(xiàng)目刪除必須從最底層的substream開(kāi)始,一層層向上刪除。
刪除stream的時(shí)候,必須先刪除其所有的
2.1刪除Activity
命令: cleartool rmactivity
或者在ClearCase Explorer中選中Activity,直接按Delete鍵
如果該activity的change set不為空是無(wú)法刪除的,提示為:
Cannot remove activity with versions in its
change set.
在ClearCase explorer中右鍵點(diǎn)擊該activity,選擇Change Set標(biāo)簽,可以看到其中的成員。
刪除這些成員有兩種辦法:
方法一:右鍵選擇其中的成員,選擇Version Tree,在Version Tree中刪除其所有版本。這個(gè)做法適合于Change Set 中成員較少的情況。
方法二:如果Change Set中成員成百上千,這個(gè)辦法就行不通了,我的辦法是寫(xiě)一個(gè)批處理命令來(lái)清除。
首先,確保本機(jī)有該Stream的View,否則,執(zhí)行以下命令的時(shí)候會(huì)遇到Content找不到的錯(cuò)誤。
@echo off
SET VIEW_HOME = D:\views\d_GMS_R1_DEV
CD %VIEW_HOME%
cleartool lsactivity -l -in
stream:d_GMS_R1_DEV@\EMMS1b1c_pvob
> changeset.txt
rem 使用findstr找到該activity下的chang set成員
for /f "delims=" %%i in ('findstr
^".*java.*^" %VIEW_HOME%\changeset.txt') do (
rem y.txt中只有一個(gè)y字,用以在刪除確認(rèn)時(shí)輸入Yes
cleartool
rmver -xhlink %%i < c:\temp\y.txt
)
很大機(jī)會(huì),該Activity中的Change Set并不能一次刪除,而是在lost+found里面生成了新的文件。重復(fù)執(zhí)行上面的批處理命令,最終可以將Change Set清空。
2.2刪除Baseline
命令:clearcase rmbl
在刪除已經(jīng)Deliver的baseline時(shí),會(huì)遇到以下錯(cuò)誤而無(wú)法刪除:
Cannot remove baseline that has been
delivered.
驗(yàn)證可行的辦法是刪除該baseline的Hyperlink后再?gòu)?qiáng)行刪除:
cleartool des -l
baseline:GMS_R1_09_02_2009_1647_ini@\EMMS1b1c_pvob
baseline
"GMS_R1_09_02_2009_1647_ini"
created 09-Feb-09.16:47:35 by XYZ.CcEMMS_AASGrp@DPTA00398
owner: HOUSING\XYZ
group: HOUSING\CcEMMS_AASGrp
component: GMS_cvob@\EMMS1b1c_pvob
label status: Incrementally Labeled
change sets:
promotion level: INITIAL
depends on:
Attributes:
PromotionLevel = "INITIAL"
Hyperlinks:
BaselineLbtype@633542@\EMMS1b1c_pvob
-> lbtype:GMS_R1_09_02_2009_1647_ini@\G
MS_cvob
Integrate@633545@\EMMS1b1c_pvob
-> anyactivity:timeline090209.160724@\EMMS1b
1c_pvob
cleartool rmhlink BaselineLbtype@633542@\EMMS1b1c_pvob
cleartool rmhlink Integrate@633545@\EMMS1b1c_pvob
cleartool rmbl -force
baseline:GMS_R1_09_02_2009_1647_ini@\EMMS1b1c_pvob
2.3刪除View
命令:cleartool rmview
或者在ClearCase Explorer中右鍵選中Stream,選擇Properties->Views->Remove View
在以上操作過(guò)程中,在http://www.scmlife.net搜索到很多有用的信息,推薦大家有相關(guān)問(wèn)題的時(shí)候去那里找找。
參考資料:
http://bbs.pmlife.net/thread-15835-1-1.html
http://bbs.scmlife.com/viewthread.php?tid=2232&extra=&page=2
http://www.cmdos.net/article/sort03/info-1967.html
http://www.sec520.com/Article/2009/200901/2177.html