Thursday, October 27, 2016

Clearcase Commands


ClearCase is a Software Configuration Management tool (SCM), which is an IBM's rational product.

Clearcase is  version control , build and management, ClearCase manages files, directories and other software objects across Software Development lifecycle. ClearCase has both CLI and GUI based interfaces to work along with vob elements.
cleartool is the ClearCase Command Line Interface(CLI) tool -> "cleartool"

Always create an alias for the cleartool.

Create an alias for cleartool  as ct

Open .bashrc in vim or your favorite text editor.

vi ~/.bashrc   #append the below line and execute

     alias ct='cleartool'

Most used clearcase commands on linux below:
List checked out files in current and sub directories by all in a view.
     ct lsco –r

 List checked out files in current and sub directories by all in a view by you.
       $ ct lsco –r –me

Show all checked out files in current directory and subdirectory by user_name
       $ ct lsco -r -user user_name

List the views current directory
     $ ct lsview

List only file names of checked out files in the current directory
    $ ct lsco –short

Show detailed information of checked out files in the current directory
   $ ct lsco -long
 List all checked out files in the current view
   $ ct lso -cview


Show all the checked out files in the current vob

ct lsco  -avobs


Find out all the check out files by me and check in

This below command checks in all the files checked out by me in current directory and subdirectories recursively

ct ci -nc `ct lsco -me -short  -r`
2.Check out files

Check out single file with comment

ct co –c “user comment for check out” filename


check out multiple files with comment

ct co –c “user comment for check out” filename1 filename2 filename3 filename4    <-- notice space between filename1 filename2 etc..


Check out all files in the current directory

ct co –c “user comment for check out” *.*


Check out only .c files in current directory

ct co –c “user comment for check out” *.c
Check in files

Check in a file with comment

ct ci –c “user comment for check in” filename


Check in file without comment

ct ci –nc  filename
 Check in multiple files in current directory with comment

ct ci –c “user comment for check in” filename1 filename2 filename3
Note:

Use –nc argument for no comment or default comment as of check out.

Undo check out

Undo check out a single fine in current directory

ct unco filename
 Undo check out multiple files

ct unco filename1 filename2 filename3
Undo check out all the files in the current directory

ct unco *.*


Undo check out all the files in the current view

cleartool unco  `cleartool lsco -cview  -short`


To remove private files from view

Remove private files from view, the -rf option is to remove recursively and forcibly.

ct lsprivate | xargs rm –rf


List views

List all the views of current vob

ct lsview


List all the views of a single user

ct lsview |grep username


Directory and files

Check what is the current directory

ct pwv
Check history of a file which is in the vob

ct lshis[tory] filename   <--[tory] means optional lshis is enough
Check history of a file in particular branch

ct lshis[tory] filename | grep branch-name
Check history of a file for a particular user

ct lshis[tory] filename | grep username
Adding directory to VOB

Adding directory to a current view

Step 1:  Check out current directory

ct co –c “user comment for adding directory” . <--notice the .(dot)
Step 2:  Make a directory in current path

ct mkdir directory-name
 Step 3:  Check in directory

ct ci –nc directory-name
Step 4: Check in parent directory

ct ci –nc . <-- notice the .(dot)
Adding a file to vob

Step 1: Check out current directory

ct co –c “user comment for check out” . <--notice the .(dot)
Step 2: Add a file to vob in current directory

ct mkelem  -c “user comment for adding  element ” filename
 note:

multiple files can be added by specifying file names separated by a space

ct mkelem  -c “user comment for adding  element ” filename1 filename2 filename3
Step 3: Check in file

ct ci –nc filename
 Step 4:  Check in current directory

ct ci –nc .      <-- notice the .(dot)


make , set and remove views

Make a new view in current vob

ct mkview –tag view-name
Check the new view in the view list

ct lsview |grep view-name
Set newly created view for use

ct setview view-name
              

Remove particular view on cleasecase :

ct rmview unwanted_view
else
ct rmview –tag unwanted_view


Check config spec of current view
$ ct catcs

Modify or Change config specs of current view
  $  ct edcs

To set config spec to current view from a spec file. 

  $ ct setcs spec1_file.txt

No comments:

"NCBN Nara chandrababu naidu" CEO Deals to grow Andhra Pradesh

CISCO network and andhra pradesh CEO Chandra babu  Microsoft Kaizala for andhra pradesh  Google Wi-fi for andhra pradesh CEO Micro...