cleartool lsco -cview -all -short | xargs -I {} cp {} /dest/path/
its very useful in case of transfer files from local vob to Remote vob
CO all files in a file
cat ~/newfile.txt | xargs cleartool co -nc
To populate file list which need to be co from remote view :
cleartool lsco -cview -all -short >>newfile.txt
---------------------------------------------------------------------------------------------------
Command to change name of a Vob element .
As expected Co dir first which contains that elemet
ct move src dest
Showing posts with label ClearCase. Show all posts
Showing posts with label ClearCase. Show all posts
Tuesday, November 2, 2010
Wednesday, August 12, 2009
Useful Clearcase Commands
ct lsco ---- shows all checked out files in current directory
ct lsco -cview --- shows all checked out of current set view files in Current Directory
ct lsco -cview –all -- To list all the files that are already checked out in this view
ct lsco -cview -avobs -short Lists all co files from all mounted vobs. short (just file names )
ct \ls ---- shows fiellist with labels
ct lsco -cview -avobs -fmt "%d\t%[version_predecessor]p\t%En\n" shows date predecessor and file name from all monunted views.
alias lc="cleartool lsco -cview -avobs"
alias lcs="cleartool lsco -cview -avobs -short"
alias lcf="cleartool lsco -cview -avobs -fmt \"%d\t%[version_predecessor]p\t%En\n\""
Checkouts
ct co -nc filename ---- checkout without comment
ct co -c "checkout" filename ---- checkout with comment -c
ct co -c "checkout" *.c ----- all .c files in current Directory
Check in
ct ci -nc * ----- checkin all files in dir without comments
Check in all co
cleartool ci -nc `cleartool lsco -cview -all -short`
Uncheckout
ct unco filename
Uncheckout all files in current Dir
cleartool unco `cleartool lsco -cview -short`
Uncheckout all files in View
cleartool unco `cleartool lsco -cview -all -short`
To remove private files from view
ct lsprivate | xargs rm -rf
Make label
ct mklbtype -nc LABEL_NAME
ct mklabel AMIT_04_24 `ct find /vob/wibb_capc/ -ver 'version(.../branch_name/LATEST)' -print `
Find commands
ct find dir_path -version 'version(.../branch_name/LATEST)' -print to see all versions of file in view
find all files of paticular label
ct find dir_path -ver 'lbtype( TA_LI_REBASE_24)' -print
findmerge
cleartool findmerge dir_path -fversion WMX-CAPC_R2.5_REL-1.44.00 -merge –gmerge ----gmerge is for graphical must to solve conflicts
ct findmerge dir_path -fversion .../branch_name/LATEST -print
find files that are changed between labels
cleartool find dir_path -version 'lbtype(lable_name_1) && ! lbtype(lable_name_2)' -print
To Search a Label
ct lstype -kind lbtype | grep name_to_search
List all branches in VOB
ct lstype -kind brtype | grep name_to_search
------------------------------------------------------------------------------
I was trying to co in a temp View and got ERROR
cleartool: Error: branch type "tmp-abc" not found in VOB "/vob/myvob" and no global type definition can be found.
How to resolve???
cleartool describe /vob/my_vob | more
Hyperlinks:
Merge <- /vob/my_vob/.@@/main/ttt-main/rrr_r1.0_bld-2.00/1 Not able to resolve it ---------------Config spec ------------------ Note: 1
Copy config spec from other view
ct catcs -tag view_name > ~/new_spec
ct setcs new_spec
Note: 2
After creating view we have to create Branch because in config spec we keep on rule pertaining to Check outs .
mkbranch dev-111
we need to create branch dev-111
ct mkbrtype -nc dev-111
if it gives error
Brtype must be made in admin vob
means we are not in admin vob
ct mkbrtype -nc dev-111@/vob/mainvob
Note: 3
As we know it executes top to bottom
Never include any branch before mkbranch RULE
other wise it will get check out form there and not from our branch .
CR view config_spec -
element * .../dev-1111/LATEST # CR branch
element .../lost+found -none
mkbranch dev-111
element * .../dev-222/LATEST # Always add Branch here <------- element * SOMELABEL1.0 # Baseline element * .../some_ver_of_loadline/0 element * RELEASE1.0 element * /main/0 end mkbranch dev-1111 -------------------- TO freeze included branche changes time can be used Example: element * .../dev-2222/LATEST -time 23-Apr.11:00 TO make Sharable branch
mkview -share_br -cr crno -b LABEL
to create a view based on an existing shared branch -
mkview -clone_br branch_name -mknt -b LABEL -tag view_name
Ref: http://www.yolinux.com/TUTORIALS/ClearcaseCommands.html
ct lsco -cview --- shows all checked out of current set view files in Current Directory
ct lsco -cview –all -- To list all the files that are already checked out in this view
ct lsco -cview -avobs -short Lists all co files from all mounted vobs. short (just file names )
ct \ls ---- shows fiellist with labels
ct lsco -cview -avobs -fmt "%d\t%[version_predecessor]p\t%En\n" shows date predecessor and file name from all monunted views.
alias lc="cleartool lsco -cview -avobs"
alias lcs="cleartool lsco -cview -avobs -short"
alias lcf="cleartool lsco -cview -avobs -fmt \"%d\t%[version_predecessor]p\t%En\n\""
Checkouts
ct co -nc filename ---- checkout without comment
ct co -c "checkout" filename ---- checkout with comment -c
ct co -c "checkout" *.c ----- all .c files in current Directory
Check in
ct ci -nc * ----- checkin all files in dir without comments
Check in all co
cleartool ci -nc `cleartool lsco -cview -all -short`
Uncheckout
ct unco filename
Uncheckout all files in current Dir
cleartool unco `cleartool lsco -cview -short`
Uncheckout all files in View
cleartool unco `cleartool lsco -cview -all -short`
To remove private files from view
ct lsprivate | xargs rm -rf
Make label
ct mklbtype -nc LABEL_NAME
ct mklabel AMIT_04_24 `ct find /vob/wibb_capc/ -ver 'version(.../branch_name/LATEST)' -print `
Find commands
ct find dir_path -version 'version(.../branch_name/LATEST)' -print to see all versions of file in view
find all files of paticular label
ct find dir_path -ver 'lbtype( TA_LI_REBASE_24)' -print
findmerge
cleartool findmerge dir_path -fversion WMX-CAPC_R2.5_REL-1.44.00 -merge –gmerge ----gmerge is for graphical must to solve conflicts
ct findmerge dir_path -fversion .../branch_name/LATEST -print
find files that are changed between labels
cleartool find dir_path -version 'lbtype(lable_name_1) && ! lbtype(lable_name_2)' -print
To Search a Label
ct lstype -kind lbtype | grep name_to_search
List all branches in VOB
ct lstype -kind brtype | grep name_to_search
------------------------------------------------------------------------------
I was trying to co in a temp View and got ERROR
cleartool: Error: branch type "tmp-abc" not found in VOB "/vob/myvob" and no global type definition can be found.
How to resolve???
cleartool describe /vob/my_vob | more
Hyperlinks:
Merge <- /vob/my_vob/.@@/main/ttt-main/rrr_r1.0_bld-2.00/1 Not able to resolve it ---------------Config spec ------------------ Note: 1
Copy config spec from other view
ct catcs -tag view_name > ~/new_spec
ct setcs new_spec
Note: 2
After creating view we have to create Branch because in config spec we keep on rule pertaining to Check outs .
mkbranch dev-111
we need to create branch dev-111
ct mkbrtype -nc dev-111
if it gives error
Brtype must be made in admin vob
means we are not in admin vob
ct mkbrtype -nc dev-111@/vob/mainvob
Note: 3
As we know it executes top to bottom
Never include any branch before mkbranch RULE
other wise it will get check out form there and not from our branch .
CR view config_spec -
element * .../dev-1111/LATEST # CR branch
element .../lost+found -none
mkbranch dev-111
element * .../dev-222/LATEST # Always add Branch here <------- element * SOMELABEL1.0 # Baseline element * .../some_ver_of_loadline/0 element * RELEASE1.0 element * /main/0 end mkbranch dev-1111 -------------------- TO freeze included branche changes time can be used Example: element * .../dev-2222/LATEST -time 23-Apr.11:00 TO make Sharable branch
mkview -share_br -cr crno -b LABEL
to create a view based on an existing shared branch -
mkview -clone_br branch_name -mknt -b LABEL -tag view_name
Ref: http://www.yolinux.com/TUTORIALS/ClearcaseCommands.html
Subscribe to:
Posts (Atom)