1.最基本的操作
cleartool co -nc xxx.cpp
cleartool ci -nc xxx.cpp
2.查看自己總共co了多少檔案
cleartool lscheckout -cview -me -avobs
3.最有用的命令
cleartool man xxx
cleartool help xxx
4.新增目錄和檔案
cleartool mkdir -c comment new_dir
cleartool mkelem -c comment new_file.cpp
5.放棄co某個檔案
cleartool unco -keep file.cpp //保留當前所改動的檔案
cleartool unco -rm file.cpp
6.主線、分支檔案合并
//尋找需要合并的檔案
cleartool findmerge . -fversion /main/xxxx_path -print
//比較檔案不同
cleartool diff file.cpp file.cpp@@/main/xxxx_path/LATEST
//查看最新版本
cleartool lsvtree file.cpp
//合并
cleartool merge -to file.cpp file.cpp@@/main/xxxx_path/LATEST file.cpp@@/main/LATEST
7.標籤相關
//建立標籤
cleartool mklbtype -nc TEST_LABEL
//給檔案打標籤
cleartool mklabel -r TEST_LABEL file.cpp
//刪除標籤
cleartool rmtype lbtype:TEST_LABEL
//給所有打上TEST_LABEL標籤的檔案打上TEST_LABEL2標籤
cleartool mklabel -replace -version /main/TEST_LABEL TEST_LABEL2 *
//尋找打上TEST_LABEL標籤的所有檔案
cleartool find . -version "lbtype(TEST_LABEL)" -print
//尋找打上TEST_LABEL和TEST_LABEL2標籤的檔案
cleartool find . -element 'lbtype_sub(TEST_LABEL) && lbtype_sub(TEST_LABEL2)' -print
8.將整個目錄匯入clearcase
clearfsimport -recurse /xxx/xxx/xxx/src /view/zhuj/home/vobs/cc_account
/xxx/xxx/xxx/src目錄(包括此目錄下的所有目錄和檔案)被匯入/view/zhuj/home/vobs/cc_account中(/view/zhuj/home/vobs/cc_account/src)
clearcase常用命令集錦
1.將整個目錄匯入clearcase
clearfsimport -r‘源路徑’ ‘目標路徑’
2.加鎖
find . -name '*.*' -exec 'cleartool lock nuser userame1,username2 "%CLEARCASE_PN%"'
3.解鎖
find . -name '*.*' -exec 'cleartool unlock "%CLEARCASE_PN%"'
4.轉換格式
chtype -f compressed_file “fileName”
5.查看VOB的基本資料和UUID
des -l vob:.
6.刪除視圖
rmview -uuid "UUID"
7.刪除lost+found
find . -name '*.*' -exec 'cleartool rmelem -f "%CLEARCASE_PN%"'
8.查詢某一天的修改記錄
cleartool lshis -r -since 07-dec
9.最基本的操作
cleartool co -nc filename
cleartool ci -nc filename
10.查看自己總共co了多少檔案
cleartool lscheckout -cview –me -vobs
11.make目錄和檔案
cleartool mkdir -c comment newdirectory
cleartool mkelem -c comment newfilename
12.主線、分支檔案合并
//尋找需要合并的檔案
cleartool findmerge . -fversion /main/TEST_Path -print
//比較檔案不同
cleartool diff filename [url=mailto:file.cpp@@/main/xxxx_path/LATEST]filename@@/main/TEST_Path/LATEST
//查看最新版本
cleartool lsvtree filename
//合并
cleartool merge -to filename [url=mailto:file.cpp@@/main/xxxx_path/LATEST]filename @@/main/TEST_path/LATEST [url=mailto:file.cpp@@/main/LATEST]filename @@/main/LATEST
13.標籤相關
cleartool mklbtype -nc TEST_LABEL
cleartool mklabel -r TEST_LABEL filename
cleartool rmtype lbtype:TEST_LABEL
//給所有打上TEST_LABEL標籤的檔案打上TEST_LABEL標籤
cleartool mklabel -replace -version /main/TEST_LABEL TEST_LABEL *
//尋找打上TEST_LABEL標籤的所有檔案
cleartool find . -version "lbtype(TEST_LABEL)" -print
//尋找打上TEST_LABEL和TEST_LABEL1標籤的檔案
cleartool find . -element 'lbtype_sub(TEST_LABEL) && lbtype_sub(TEST_LABEL1)' -print
14.察看某目錄下的檔案
ls
15.man/help命令
cleartool man xxx
cleartool help xxx
16.放棄co某個檔案
cleartool unco -keep filename
cleartool unco -rm filename
17.更改VOB的Owner:
cleartool protectvob –chown root /vob/vob.vbs
18. 更改VOB的Group:
cleartool protectvob –chgrp alluser /vob/vob.vbs
19.增加Additional Group:
cleartool protectvob –add_group group1 /vob/vob.vbs
20.刪除Additional Group:
cleartool protectvob –delete_group group1 /vob/vob.vbs
21. 更改group、owner、mod
protect -r -chgrp groupname–chown username -chmod 770 .
22.建立VOB
cleartool mkvob -tag /vobtags/test_code -c "Test" "D:\Data\Tets.vbs"
23. Mount vob
Cleartool mount /vobtags/vob
24. 建立視圖
cleartool mkview –tag test /ccvob/views/test.vws
25. 設定當前視圖
cleartool setview test
26.設定當前的activity
cleartool setactivity activityname
27. Check out
Check out一個檔案
Cleartool checkout [-reserve][-unreserve] filename
Check out前目錄
Cleartool checkout .
Check out目前的目錄下所有檔案
Cleartool Checkout –nc *.*
Check out目前的目錄下所有的檔案和目錄中的檔案
cleartool find . $file -exec ‘cleartool checkout -nc $CLEARCASE_PN’
28. Check in
Check in 一個檔案
Cleartool checkin filename
Check in 目前的目錄
Cleartool checkin .
Check in 目前的目錄下所有檔案.
Cleartool Checkin –nc *.*
Check in目前的目錄下所有的檔案和目錄中的檔案
cleartool find . $file -exec ‘cleartool checkin -nc –ide $CLEARCASE_PN’
以上內容來自:http://hi.baidu.com/is%CC%EC%B2%C5/blog/item/36bfbfc83cced1117f3e6fa0.html
常用命令:
建立view:clt mkview -tag view_abcd /view_store/view_abcd.vws
設定view: clt setview view_abcd
編輯config specification: clt edcs
建立branch type:clt mkbrtype dbg_branch1_comments
在某個檔案的當前branch上, 拉出一個branch:
clt mkbranch dbg_branch1_comments filename.c
now you have make branch on the file, and checked it out.
you can edit it with gvim.
After changed codes, you can complie it successfully, and test the result, you can check it in.
clt ci filename.c
If you want to check out it again:
clt co filename.c
To change the branch name to a formula name you can use the command:
clt rename brtype:dbg_branch1_comments brtype:crnumber_branch1_comments
To see the version tree of a file:
clt lsvtree -g filename.c
To see which files is included in a branch, you can edit a script like this find_branch.sh:
echo "$1"
cleartool find -avobs -element "brtype("$1")" -nxn -print | xargs cleart
ool ls -s|grep "$1"
To compare files, I write a useful script file mydiff.
You can use xcc& to open graphic clearcase. So you can do most thing through the menu.
以上內容來自:http://www.diybl.com/course/4_webprogram/asp.net/netjs/20071020/78573.html
clearcase實用命令
尋找分支上的檔案
find . -branch brtype(branchname) -print
建立分支
mkbrtype -c "comment" branchname
建立Label
mklbtype -c "comment" labelname
用於 cleartool find 查詢:
cleartool find -all -version “lbtype(REL1)” -print
find . -version 'lbtype(LABEL)' -print
鎖分支命令
lock brtype:branchname
建立trigger
trigger已存在
mktrtype mktrtype -replace -element -all -preop mkelem -nusers shiquan -exec http://www.cnblogs.com/samcn/admin/file://192.168.1.5/cc_trigger/false.bat NO_RM_MK
trigger不存在
mktrtype mktrtype -element -all -preop mkelem -nusers shiquan -exec http://www.cnblogs.com/samcn/admin/file://192.168.1.5/cc_trigger/false.bat NO_RM_MK
日常開發人員常用命令
開發人員常用命令
1. 建立vob
mkvob –tag /vobtags/vob1 –c “ VOB for project1” /vobstore/vob1.vbs
2. Mount vob
Cleartool mount /vobtags/vob1
3. 建立視圖
cleartool mkview –tag test1 /ccvob/views/test1.vws
4. 設定當前視圖
cleartool setview test1
5. 在VOB的根目錄下到入資料:
clearfsimport –recurse –c “ comments “ /home/setup/* . ,注意命令的最後為圓點,表示目前的目錄。
6. 改變VOB的Owner:
cleartool protectvob –chown root /vobstore/vob1.vbs
7. 改變VOB的Group:
cleartool protectvob –chgrp alluser /vobstore/vob1.vbs
8. 增加Additional Group:
cleartool protectvob –add_group group1 /vobstore/vob1.vbs
9. 刪除Additional Group:
cleartool protectvob –delete_group group1 /vobstore/vob1.vbs
修改vob中資料的許可權資訊
10. 將jmccboss VOB 中所有元素Owner 改成ccadmin,Group改成jmccboss:
Cleartool protect –chown ccadmin –chgrp jmccboss .
.為vob根目錄
11. 將jmccboss VOB 中所有元素許可權 改成對ccadmin(rwx),jmccboss(rwx),其他VOB附屬群組成員(r-x):
例: Cleartool protect –recurse –chmod 775 . ,
12. Mount vob
Cleartool mount /vobtags/vob1
13. 建立視圖
cleartool mkview –tag test1 /ccvob/views/test1.vws
14. 設定當前視圖
cleartool setview test1
15. 在VOB的根目錄下到入資料:
clearfsimport –recurse –c “ comments “ /home/setup/* . ,注意命令的最後為圓點,表示目前的目錄。
16. Check out
Cleartool checkout [-reserve][-unreserve] b.c Check out一個檔案
Cleartool checkout . Check out目前的目錄
Cleartool Checkout –nc *.* Check out目前的目錄下所有檔案
cleartool find . $file -exec ‘cleartool checkout -nc $CLEARCASE_PN’
Check out目前的目錄下所有的檔案和目錄中的檔案
17. Check in
Cleartool checkin b.c Check in 一個檔案
Cleartool checkin . Check in 目前的目錄
Cleartool Checkin –nc *.* Check in 目前的目錄下所有檔案.
cleartool find . $file -exec ‘cleartool checkin -nc –ide $CLEARCASE_PN’
Check in目前的目錄下所有的檔案和目錄中的檔案
18. 建立一個snapshot view
cleartool mkview –tag pat_2_snapshot_view –snapshot /viewstore/pat/myviews.vws
19. 編輯config spe
Cleartool edcs
20. 更新snapshot view
cleartool update pat_2_snapshot_view
21.設定當前的activity
cleartool setactivity activityname
gaibian leixing: chtype binary_delta_file Estonian.r
錯誤 :clearfsimport: Error: Trouble was encountered importing the following elements:
D:\work\shiquan_study\Broadcom070122\BCM_R2.10_A1\mmi\design\gui\res\ffs_preload\CD_5_2_6.dm