ClearCase Command | Description |
Cleartool -ver | Display Clearcase, cleartool, db_server and VOB database schema version. |
Cleartool lsvob | List vob mount table: * /vob/VOB-NAME.vbt /hosts/host-name/r1vob/vobs/vobstore/VOB-NAME.vbs public
* /vob/practice_vob.vbt /hosts/host-name/view-name/Vobs/vobstore/practice_vob.vbs public |
Cleartool dump element-or-DO | Print internal Clearcase info. |
Cleartool lsview | List all views: millesc_view /hosts/host-name/view-name/Views/millesc_view.vws
* user-name /hosts/host-name/view-name/Views/reg_view.vws |
Cleartool lsview view-tag | List view path. |
cleartool mktag -view -tag dynamic-view-name -nstart /hosts/node-name/home/cleardata/views/dynamic-view-name or cleartool mktag -vob vob-tag ... | Create a view-tag or VOB-tag. |
cleartool mkview -tag user1_view -stgloc viewstore | |
cleartool mkview -tag tmpA_view /hosts/node-name/home/cleardata/views/tmpA_view | Create a new view. |
cleartool setview user-name_view | Set current view to user-name_view. |
cleartool startview common_view | Set current view to common_view without starting a Clearcase shell environent. It allows one to view (only) the files. Path: /view/common_view/vob/vob-name/... |
cleartool endview common_view cleartool endview -server user-name_view | Deactivate a Clearcase view. (First exit view) Useful if you get stale NFS handles. |
cleartool rmview -tag temp_view or cleartool rmview temp_view | Remove view temp_view. |
cleartool setview username_view sv user-name_view | Set Clearcase view. See alias defined above. |
cleartool pwv | Print working view/current view: Working directory view: username_view
Set view: username_view |
echo $CLEARCASE_ROOT | Print current view path. |
cleartool ls -l cleartool ls -vob_only | Using current view, show files, private files, file version and rule. -vob_only: List elements and not derived objects Format: ...
version file.ext@@/main/2 Rule: element */main/LATEST
directory version Directoy-name@@/main/2 Rule: element * /main/LATEST
view private object file2.c
... |
cleartool lstype -kind lbtype -list labels | List labels |
cleartool lsvtree -all file-name.ext | List file version label and build label: (version tree) file-name.ext@@/main file-name.ext@@/main/0
file-name.ext@@/main/1 (BUILD_1_0)
file-name.ext@@/main/2 (BUILD_1_1) |
cleartool lsvtree -all pref* | List file version label and build label for files beginning with "pref" |
cleartool lshistory [all] file-or-directory cleartool lshistory file-name | List file or directory version history. List event rocords for a given file. |
cleartool chevent -c 'new-comment-goes-here' -replace -event event-id cleartool chevent -c 'new-comment-goes-here' -replace -lbtype label | Change the comment on a version of an element. Lookup event id: ct lsh -event file-or-element Change the comment on a label. |
cleartool lsco cleartool lsco -r cleartool lsco -avobs -me cleartool lsco -avobs -cview | List all checked out files in current directory. Flag "-r" recusivly looks in sub directories. List all files checked out to all views. List checkouts in view. |
cleartool lscheckout -l cleartool lsco -l cleartool lsco -recursive -me -cview | List checked out files. (same) List files in current directory and subdirectories checked out to you in current view. Omit -cview tag to get all. |
cleartool catcr file-name | List configuration record for a file. |
cleartool find ./ -branch 'brtype(branch-name)' -print cleartool find ./ -version(main/LATEST) && \! version(LABEL_X)' -print cleartool find -avobs -nxname -element 'brtype(view_name)' -print | List files in branch with search name or attribute. List files with label "LATEST" but not LABEL_X. |
cleartool lsprivate cleartool lsp -co | List all private files in current view. View private files are files residing in the Clearcase filesystem but not under the control of Clearcase. i.e. object files as a result of a compile. May not be viewable by others. List files checked out to current view. |
cleartool mklbtype -nc LABEL_NAME cleartool mklbtype -c "comment" LABEL_NAME | Create a label to be used later. |
cleartool lstype -kind lbtype -short | sort | List labels. |
Cleartool describe -l file.ext | Describe object in VOB. Lists branch and version of file and configspec used in view. |
Cleartool describe file-or-directory | List file or directory information. |
cleartool describe -long element:file-or-directory | List file or directory information. |
Cleartool describe -long vob:/vob | List vob information. |
cleartool mklabel LABEL_NAME file-name.ext cleartool mklabel -r LABEL_NAME | Apply label to a file. Label elements in directory tree. |
cleartool mklabel -replace NEW_LABEL_NAME file-name.ext@@/main/4 | Apply label to a newer version of the file. |
cleartool rmtype -rmall -force lbtype:LABEL_NAME cleartool rmtype -lbtype -rmall LABEL_NAME | Remove a label of the name given. The option "-rmall" causes the removal of all instances of the label on all files / directories.Remove label type and all occurrences of the label. |
Cleartool rmtype lbtype:LABEL_NAME | Remove label from Clearcase. It will not be removed if label has been applied. Use option "-rmall" to remove label and all instances of its application. |
Cleartool rmtype -rmall -brtype branch-type | Remove branch and all files / directories in branch from Clearcase. Data disposed in "lost-found". |
cleartool find -avobs -version "lbtype (Build-Label)" -print cleartool find . -name '*.[hc]' -element 'lbtype_sub(LABEL_NAME)' -print | Print all files and file versions going into build specified. list all .h and .c files whith the given label. |
Cleartool co -nc file-name | Check-Out file (RCS command) -No Comment |
Cleartool mkdir directory-name | Create a directory. Checkout parent directory first. |
cleartool ln -s source-directory-name local-directory-name | Create a symbolic link to a directory. Checkout parent directory first. |
Cleartool mkelem -ci -nc filename | Add file to Clearcase control. |
Cleartool rmelem filename | Remove file from Clearcase control. All history and knowledge of the element is completely removed. By contrast, the "ct rm" command will remove the file and not the history and the directory must be checked out in order to make this change. |
cleartool rmelem -rm filename | Remove file from Clearcase control and remove private view file. |
cleartool rmelem directory-name/* | Remove directory, revision history and its contents from Clearcase control. |
cleartool rmver filename@@/main/LATEST or cleartool rmver filename or cleartool rmver filename@@/main/22 or remove specifed version on main branch: cleartool rmver -force -xlabel -ver /main/22 file-or-element-name | Remove latest version checked in of the file from Clearcase. Second example removes version 22 from the Clearcase change management system. Previous versions will be available from the archive. |
cleartool rm filename | Remove file from Clearcase view. First perform a checkout ("ct co") of the file and directory. Past versions will be available from the archive although not visible in current view. Safer than "ct rmelem" which removes all knowledge of the file old and new. |
cleartool reserve file-name | Lock file. Convert unreserved checkout to reserved. |
cleartool unco file-name cleartool unco -rm file-name cleartool uncheckout file-name | UN-Check-Out file. Cancel a checkout of a file. Cancel a checkout of a file and remove file which was checked out. Not removed from Clearcase, just view private the checked out file is deleted/cleaned up. |
cleartool co -unr -nc file-name | Checkout file even though file is checked out by another. Checkout "unreserved", must be merged at a later time. |
Cleartool checkout -unreserved file-name | Not locked. Checkout to read, print, etc. Same as above command. |
Cleartool ci file-name | Check-In file. (also ct checkin file-name) Enter comment,enter "." as sole character on line and enter. |
cleartool diff -gra -pre file-name & cleartool diff -pred file-name cleartool xdiff -pred file-name | Graphical Diff/Merge tool. Clearcase diff between current file and predecessor. X-windows diff with predecessor. |
cleartool mv file-name_A file-name_B | Rename a file. Be sure to checkout the parent directory first. If moving file to a new directory, check out the target directory as well. |
cleartool protect -r -chmod 775 directory-or-file-name | Set directory/file/element protection. |
Configspec commands | |
cleartool catcs cleartool catcs -tag view_tag | Print rules of current view (configspec): element * CHECKEDOUT
element * /main/LATEST Look at the configspec associated with another view. |
cleartool edcs | Edit current rules of view (config spec): Change from: element * CHECKEDOUT
element * /main/LATEST To: element * Build-Label
element -directory * /main/Latest Close vi: wq Set config spec for view "username_view"? [yes] |
cleartool setcs -default cleartool setcs -cur | Reset to default view rules. Re-evaluate current configspec. |
cleartool update -add_loadrules | Updates elemets in snapshot view. GUI tool. Reevaluates config spec and reselects VOB elements to show. The option "-add_loadrules" allows you to load rules to your config spec and load elements which satisfy the rules. |
Help and Information commands | |
cleartool man clearcase-command cleartool man env_ccase | Man page for Clearcase command. List Clearcase environment variables. |
Cleartool apropos search-word | List commands and man page summaries for related Clearcase command. |
cleartool help cleartool help clearcase-command | Help facility (simple). Lists possible command arguments. |
Tree/Branch commands | |
cleartool lstype -kind brtype cleartool lstype -kind brtype -invob /vob/vob-name | List all branches. List all branches in the vob specified. |
cleartool find -avobs -version 'brtype(branch-type)' -print | Find all files of the specified branch name in all mounted VOB's. Find branch name with the ct lstype command.. |
cleartool lsvtree -all * cleartool lsvtree file-name cleartool lsvtree -g file-name | List version trees (labels and branches) of files (even those without labels or branches). List all branches of specified file. Launch GUI display and show version tree (labels and branches) for a given file. ([Potential Pitfall]: You may have to issue the command export LANG=C prior to launching GUI.) |
cleartool chtype | Change element type or rename branch. |
cleartool mkbranch cleartool mkbranch -nc branch-name file-to-branch.cpp | Create a new branch in version tree. Use the command mkbrtype to create the branch type (name) first. This command also checks out the file. The config spec needs to include this branch so file can be viewed. |
cleartool rmbranch | Remove a branch in version tree. |
cleartool mkbrtype mkbrtype -c "Comment goes here" branch_name | Create a new branch type object. |
Cleartool merge | Merge changes/differences of a file from another branch. |
cleartool findmerge cleartool findmerge ./ -flag VIEW-TAG -print | Determines whether a merge is required for a file in your view. Find files in current directory tree which need to be merged. Use the describe command to see if branch has been merged. If so it wil be stated as such. |
Thursday, March 11, 2010
IBM ClearCase Commands
Labels:
ClearCase
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.