2.查看本身總共co了多少文件
cleartool lscheckout -cview -me -avobshtml
3.最有用的命令
cleartool man xxx
cleartool help xxxweb
4.新增目錄和文件
cleartool mkdir -c comment new_dir
cleartool mkelem -c comment new_file.cppvim
5.放棄co某個文件
cleartool unco -keep file.cpp //保留當前所改動的文件
cleartool unco -rm file.cppasp.net
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/LATESTide
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)' -printui
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)
以上來自:__________________________________________________________this
clearcase經常使用命令集錦
1.將整個目錄導入clearcase
clearfsimport -r‘源路徑’ ‘目標路徑’url
2.加鎖.net
find . -name '*.*' -exec 'cleartool lock nuser userame1,username2 "%CLEARCASE_PN%"'code
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’
經常使用命令:
建立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 \\192.168.1.5\cc_trigger\false.bat NO_RM_MK
trigger不存在
mktrtype mktrtype -element -all -preop mkelem -nusers shiquan -exec \\192.168.1.5\cc_trigger\false.bat NO_RM_MK
平常開發人員經常使用命令
開發人員經常使用命令1. 創建vobmkvob –tag /vobtags/vob1 –c 「 VOB for project1」 /vobstore/vob1.vbs2. Mount vobCleartool mount /vobtags/vob13. 建立視圖cleartool mkview –tag test1 /ccvob/views/test1.vws4. 設置當前視圖cleartool setview test15. 在VOB的根目錄下到入數據:clearfsimport –recurse –c 「 comments 「 /home/setup/* . ,注意命令的最後爲圓點,表示當前目錄。6. 改變VOB的Owner: cleartool protectvob –chown root /vobstore/vob1.vbs7. 改變VOB的Group:cleartool protectvob –chgrp alluser /vobstore/vob1.vbs8. 增長Additional Group:cleartool protectvob –add_group group1 /vobstore/vob1.vbs9. 刪除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 vobCleartool mount /vobtags/vob113. 建立視圖cleartool mkview –tag test1 /ccvob/views/test1.vws14. 設置當前視圖cleartool setview test115. 在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 inCleartool 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 viewcleartool mkview –tag pat_2_snapshot_view –snapshot /viewstore/pat/myviews.vws19. 編輯config speCleartool edcs20. 更新snapshot viewcleartool update pat_2_snapshot_view21.設置當前的activitycleartool 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