Clearcase command)

Source: Internet
Author: User
1. Basic operations
Cleartool co-nc xxx. cpp
Cleartool ci-nc xxx. cpp

2. Check the total number of co files.
Cleartool lscheckout-cview-me-avobs

3. The most useful commands
Cleartool man xxx
Cleartool help xxx

4. Add directories and files
Cleartool mkdir-c comment new_dir
Cleartool mkelem-c comment new_file.cpp

5. discard a co File
Cleartool unco-keep file. cpp // retain the file currently modified
Cleartool unco-rm file. cpp

6. Merge the main line and Branch files
// Find the file to be merged
Cleartool findmerge.-fversion/main/xxxx_path-print
// Compare different files
Cleartool diff file. cpp file. cpp/main/xxxx_path/LATEST
// View the latest version
Cleartool lsvtree file. cpp
// Merge
Cleartool merge-to file. cpp file. cpp/main/xxxx_path/LATEST file. cpp/main/LATEST

7. Tag-related
// Create a tag
Cleartool mklbtype-nc TEST_LABEL
// Tag the file
Cleartool mklabel-r TEST_LABEL file. cpp
// Delete a tag
Cleartool rmtype lbtype: TEST_LABEL
// Add the TEST_LABEL2 label to all files labeled with the TEST_LABEL label.
Cleartool mklabel-replace-version/main/TEST_LABEL TEST_LABEL2 *
// Search for all objects labeled TEST_LABEL
Cleartool find.-version "lbtype (TEST_LABEL)"-print
// Search for files labeled TEST_LABEL and TEST_LABEL2
Cleartool find.-element 'lbtype _ sub (TEST_LABEL) & lbtype_sub (TEST_LABEL2) '-print

8. Import the entire directory to clearcase
Clearfsimport-recurse/xxx/src/view/zhuj/home/vobs/cc_account
/Xxx/src directory (including all directories and files under this directory) imported/view/zhuj/home/vobs/cc_account (/view/zhuj/home/vobs/cc_account/src)

 

 

Common clearcase commands

1. Import the entire directory to clearcase
Clearfsimport-r 'source path' 'destination Path'

 

2. Lock

Find.-name '*. *'-exec 'cleartool lock nuser userame1, username2 "% CLEARCASE_PN % "'

3. Unlock

Find.-name '*. *'-exec 'cleartool unlock "% CLEARCASE_PN % "'

4. Conversion format

Chtype-f compressed_file "fileName"

5. view basic VOB information and UUID

Des-l vob :.

6. delete a view

Rmview-uuid "UUID"

7. Delete lost + found

Find.-name '*. *'-exec 'cleartool rmelem-f "% CLEARCASE_PN % "'

8. query the modification records of a day

Cleartool lshis-r-since 07-dec

9. Basic operations
Cleartool co-nc filename
Cleartool ci-nc filename

10. Check the total number of co files.
Cleartool lscheckout-cview-me-vobs

11. make directory and file
Cleartool mkdir-c comment newdirectory

Cleartool mkelem-c comment newfilename

12. Merge the main line and Branch files
// Find the file to be merged
Cleartool findmerge.-fversion/main/TEST_Path-print
// Compare different files
Cleartool diff filename [url = mailto: file. cpp/main/xxxx_path/LATEST] filename/main/TEST_Path/LATEST
// View the latest version
Cleartool lsvtree filename

// Merge
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. Tag-related
Cleartool mklbtype-nc TEST_LABEL
Cleartool mklabel-r TEST_LABEL filename
Cleartool rmtype lbtype: TEST_LABEL
// Add the TEST_LABEL label to all files marked with the TEST_LABEL label
Cleartool mklabel-replace-version/main/TEST_LABEL *
// Search for all objects labeled TEST_LABEL
Cleartool find.-version "lbtype (TEST_LABEL)"-print
// Search for files labeled TEST_LABEL and TEST_LABEL1
Cleartool find.-element 'lbtype _ sub (TEST_LABEL) & lbtype_sub (TEST_LABEL1) '-print

14. view files in a directory

Ls

15. man/help Command
Cleartool man xxx
Cleartool help xxx

16. discard a co File
Cleartool unco-keep filename
Cleartool unco-rm filename

17. Change the Owner of VOB:

Cleartool protectvob-chown root/vob. vbs

18. Change the VOB Group:

Cleartool protectvob-chgrp alluser/vob. vbs

19. Add Additional Group:

Cleartool protectvob-add_group group1/vob. vbs

20. Delete Additional Group:

Cleartool protectvob-delete_group group1/vob. vbs

21. Change group, owner, and mod

Protect-r-chgrp groupname-chown username-chmod 770.

22. Create VOB

Cleartool mkvob-tag/vobtags/test_code-c "Test" "D: \ Data \ Tets. vbs"

23. Mount vob
Cleartool mount/vobtags/vob
24. Create a view
Cleartool mkview-tag test/ccvob/views/test. vws
25. Set the current view
Cleartool setview test

26. Set the current activity
Cleartool setactivity activityname

27. Check out
Check out a file

Cleartool checkout [-reserve] [-unreserve] filename


Check out directory

Cleartool checkout.


Check out all files in the current directory

Cleartool Checkout-nc *.*

Check out all files in the current directory and files in the directory

Cleartool find. $ file-exec 'cleartool checkout-nc $ CLEARCASE_PN'
28. Check in
Check in a file

Cleartool checkin filename

Check in current directory
Cleartool checkin.

Check in all files in the current directory.

Cleartool Checkin-nc *.*

Check in all files in the current directory and files in the directory

Cleartool find. $ file-exec 'cleartool checkin-nc-ide $ CLEARCASE_PN'

The above content from: http://hi.baidu.com/is%CC%EC%B2%C5/blog/item/36bfbfc83cced1117f3e6fa0.html

 

Common commands:
Create view: clt mkview-tag view_abcd/view_store/view_abcd.vws
Set view: clt setview view_abcd
Edit config specification: clt edcs

Create branch type: clt mkbrtype dbg_branch1_comments
On the Current branch of a file, pull a branch:
Clt mkbranch dbg_branchcomment 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 supported 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.

The above content from: http://www.diybl.com/course/4_webprogram/asp.net/netjs/20071020/78573.html

 

 

Clearcase practical commands

Search for files on the branch
Find.-branch brtype (branchname)-print
Create Branch
Mkbrtype-c "comment" branchname
Create a Label
Mklbtype-c "comment" labelname
Used for cleartool find query:
Cleartool find-all-version "lbtype (REL1)"-print
Find.-version 'lbtype (LABEL) '-print
Lock branch command
Lock brtype: branchname
Create a trigger
Trigger already exists
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 does not exist
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
Common commands for daily developers

Common commands of developers
1. Create vob
Mkvob-tag/vobtags/vob1-c "VOB for project1"/vobstore/vob1.vbs
2. Mount vob
Cleartool mount/vobtags/vob1
3. Create a view
Cleartool mkview-tag test1/ccvob/views/test1.vws
4. Set the current view
Cleartool setview test1
5. input data in the root directory of VOB:
Clearfsimport-recurse-c "comments"/home/setup/*. Note that the last command is a dot, indicating the current directory.
6. Change the Owner of VOB:
Cleartool protectvob-chown root/vobstore/vob1.vbs
7. Change the VOB Group:
Cleartool protectvob-chgrp alluser/vobstore/vob1.vbs
8. Add Additional Group:
Cleartool protectvob-add_group group1/vobstore/vob1.vbs
9. Delete Additional Group:
Cleartool protectvob-delete_group group1/vobstore/vob1.vbs
Modify permissions of data in vob
10. Change the Owner of all elements in jmccboss VOB to ccadmin and the Group to jmccboss:
Cleartool protect-chown ccadmin-chgrp jmccboss.
. Is the vob root directory
11. Change all element permissions in jmccboss VOB to ccadmin (rwx), jmccboss (rwx), and other VOB affiliated members (r-x ):
Example: Cleartool protect-recurse-chmod 775 .,
12. Mount vob
Cleartool mount/vobtags/vob1
13. Create a view
Cleartool mkview-tag test1/ccvob/views/test1.vws
14. Set the current view
Cleartool setview test1
15. input data in the root directory of VOB:
Clearfsimport-recurse-c "comments"/home/setup/*. Note that the last command is a dot, indicating the current directory.
16. Check out
Cleartool checkout [-reserve] [-unreserve] B. c Check out a file
Cleartool checkout. Check out current directory
Cleartool Checkout-nc *. * Check all files in the current directory
Cleartool find. $ file-exec 'cleartool checkout-nc $ CLEARCASE_PN'
Check out all files in the current directory and files in the directory
17. Check in
Cleartool checkin B. c Check in a file
Cleartool checkin. Check in current directory
Cleartool Checkin-nc *. * Check all files in the current directory.
Cleartool find. $ file-exec 'cleartool checkin-nc-ide $ CLEARCASE_PN'
Check in all files in the current directory and files in the directory
18. Create a snapshot view
Cleartool mkview-tag pat_2_snapshot_view-snapshot/viewstore/pat/myviews. vws
19. Edit config spe
Cleartool edcs
20. Update the snapshot view
Cleartool update pat_2_snapshot_view
21. Set the current activity
Cleartool setactivity activityname
Gaibian leixing: chtype binary_delta_file Estonian. r
Error: 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

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.