Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

ASPL ClearCase and SCM We do not backup view storage so make sure you Checkout

check in your changes frequently.


Toolkit Quick Reference To modify an element you need to check it out. Do
How to create a view this with the following command:
Reference Materials The newview command run on a UNIX system is cleartool co <element>
Command Line Help used to create views. For a development view: Checkin
Help for individual ClearCase commands can be newview –p <project> -r <release> -c
Once you are happy with the changes you have
obtained using the following syntax: <CR>
made to a checked-out element, you can check it in
# Display syntax summary for <command> For an integration view: with the following command:
cleartool help <command> newview –p <project> -r <release> -i cleartool ci <element>
# Display complete manual for <command>
For a baseline view: Uncheckout
cleartool man <command>
newview –p <project> -r <release> -b If you want to cancel a checkout, you can do so
Help for individual SCM Toolkit commands can be <label>
with the following command:
obtained using the following syntax: Accessing code through a view
cleartool unco <element>
<SCM_Toolkit_command> --help useview
Creating New Files
ClearCase Accessing code through a ClearCase view is done
Creation
http://dsg.britain.agilent.com/clearcase_manuals/7.0.0 with the useview command. Simply enter the
command and choose the required view from the To create a new file, you can use whatever editor
SCM Toolkit
list presented. On UNIX the view will then be set in or tool you would normally use to create the file.
http://dsg.britain.agilent.com/scmtoolkit
the current shell. On Windows it will be mapped as The file will be a view-private entity until you take
Inquest a sub-directory of the P: drive. the next step to put it under ClearCase control.
http://dsg.britain.agilent.com/inquest How to remove a view Putting a file under version control
Views The rmview command run on a UNIX system is To put a file under ClearCase control you must first
How many views do I need? used to remove views, either type rmview and check-out the directory that will contain the file,
select the view from the menu or: issue the command to put the file under version
One per discrete task associated with an Inquest
control, and check-in the directory containing the
change request and an integration view per release rmview –view <view-name>
new file. Here are the commands to perform these
stream. Views should be regarded as "inexpensive" Modifying Files steps from the directory to contain the file
entities which are easily created and destroyed.
In the follow examples, element is the name of cleartool co .
Create one for each task you need and delete
the file or directory you are working with. cleartool mkelem <the_file>
when that task is done.
cleartool ci .

ASPL ClearCase and SCM Toolkit Quick Reference Agilent Restricted Page 1 of 4
After these steps are performed, the_file is still however, still listed in previous versions of the element; only the name associated with the element
checked-out and can be modified before it is directory. If, at a later date, you want to re-add in the directory will have changed.
checked in. element to a new version of the directory (or any
More About Views
Putting a directory under version control other directory), this can be done and you retain all
the version history. Which view am I in?
To create a new version controlled directory in At any given time you can tell what view you are in
ClearCase, as with a new file, you must check-out Moving and Renaming Elements
by issuing the following command:
the directory which will contain it, issue the Moving an element follows a process similar to
cleartool pwv
command to create the new directory, and check- deleting it. First you check-out the old directory
in the parent directory. containing the element, and you also check-out the pwv means "print working view" similar to the

cleartool co . new directory to which the element is to be UNIX command pwd for "print working directory"
cleartool mkdir <the_directory> moved. Then you use the cleartool mv What is my "config-spec"?
cleartool ci . command to perform the move operation. Be sure
Recall that a configuration specification (config-
to check-in the old and new directories when you
After these steps are performed, the_directory spec) is the set of rules that tells ClearCase what
are done.
is still checked-out so new file and directory configuration of elements you want to work with.
cleartool co . You can see that set of rules by issuing the
elements can be added to it.
cleartool co <new_directory> following command:
Deleting Elements cleartool mv <element> <new_directory> cleartool catcs
To remove an element you should use the cleartool ci .
How do I change my config-spec?
cleartool rmname command. This command cleartool ci <new_directory>
removes the name of the specified element from You can edit your config-spec by issuing the
Renaming an element is also accomplished using following command. When using SCM toolkit there
the directory in which it is contained. Similar to
the cleartool mv command except the old and is almost no case where editing a config-spec will
placing an element under ClearCase control, you
new directories are the same. be required.
must first check-out the directory containing the
element to be removed, do the cleartool cleartool co .
cleartool edcs
rmname of the element, and then check-in the new cleartool mv <element> <new_name>
Your chosen editor as specified by the environment
version of the directory. Here is an example: cleartool ci .
variables WINEDITOR, VISUAL, or EDITOR will be
cleartool co . In subsequent versions of the directory, the name invoked for the editing operation. If none of these
cleartool rmname <element> element will not appear, having been replaced by environment variables is set then vi will be
cleartool ci . new_name but the name element will still appear invoked for the editing operation on UNIX systems
in prior versions of the directory. Both the names and Notepad will be invoked for the editing
After this sequence, element is no longer listed in
new_name and element will still refer to the same operation on Windows systems.
subsequent versions of the directory. It is,

ASPL ClearCase and SCM Toolkit Quick Reference Agilent Restricted Page 2 of 4
Information about Files/ Directories cleartool lsco -user fred To graphically view the differences between the
Please refer to the ClearCase Reference Manual for version of element selected by your view and
What is checked-out and to whom?
more detailed information about the cleartool version 5 on the main branch of element.
If you want to see who has what checked-out, you
lsco command. cleartool diff -g <element>
can use the cleartool lsco command. This <element>@@/main/5
command has a number of possible arguments to What is the change history of this
file/directory? You can also use this command without the -g
use depending on the specific information you
option to present the difference information to you
want. Here are some common ones: If you want to see the change history associated
textually rather than graphically.
Lists all checkouts of elements in the current with a particular element, you can use the
cleartool lshistory command. See the cleartool diff entry in the ClearCase
directory.
Reference Manual for more detailed information
cleartool lsco cleartool lshistory <element>
on these commands.
List checkout information about the element Where element is the element under ClearCase
What does the version tree look like for a
element. control.
file/directory?
cleartool lsco <element> What versions of what files/directories am I
To view a graphical representation of the version
looking at?
List all checkouts of elements in the current tree for an element, you can use the lsvtree
directory and below. To see exactly what versions of elements are being command.
projected to you by your view and why, you can
cleartool lsco -recurse cleartool lsvtree -g <element>
use the cleartool ls command.
List checkouts of elements in the current directory You can view a textual representation of the
cleartool ls
which are checked-out to the current view. version tree of an element with the cleartool
What are the differences between this lsvtree command.
cleartool lsco -cview
version of a file/ directory and a different
cleartool lsvtree <element>
List checkouts of elements in the current directory version?
and below which are checked-out to the current
To view the differences between the versions of an I want more information about this element?
view. element visible in your view and another version of You can get more detailed information about a
cleartool lsco -cview -recurse the element you can use the cleartool diff particular element with the cleartool
List checkouts of elements in the current directory command. describe command.

which the current user has checked-out. To graphically view the differences between the cleartool describe <element>

cleartool lsco -me version of element selected by your view and its Lists information about element such as the
immediate predecessor version. version selected by your view, who created it and
List checkouts of elements in the current directory
that the user with login id "fred" has checked-out. cleartool diff -g -pred <element> when, the comment associated with the version,
the element type and the predecessor version.
ASPL ClearCase and SCM Toolkit Quick Reference Agilent Restricted Page 3 of 4
SCM Toolkit lsbranch -since <label> -fixes reopen-branch –p <project> -r <release>
-c <CR>
Getting a list of my change requests Identifying code, baselines
Integrating code changes - rebase
buglist Baselines allow you to return to a previous state of
the code base at any future time. The mkbaseline Including changes made on an integration stream
You can get a list of the change requests assigned into your development branch is done using the
command is used to apply a ClearCase label across
to you and in the open state by typing the rebase command in your development view. By
all the VOBs in your development project and the
buglist command. This will list the Inquest CR ID, default, rebase will merge all VOBs associated
SCM Toolkit configuration files.
project and headline for each of your change with your project. To perform a partial rebase the
requests. To apply a simple sequential label in an integration
following options can be used:
view use:
What change request does my current view Rebase only files:
relate to? mkbaseline -sequence
rebase -files
buginfo SCM Toolkit automatically increments the
sequence number to create a label of the form: Rebase only directories:
When working in an SCM Toolkit development
<project>_<release>_<sequence> rebase –directories
view entering the buginfo command will display
the Inquest CR ID, project, state and headline e.g. TOOKIT_5.XX_00001 Rebase only a sub-directory:
information for the change. rebase <path>
To apply a specific baseline label in an integration
Finding out what has changed on a branch view use: The rebase operation will attempt to carry out
lsbranch mkbaseline –label <label> merges automatically. Where this is not possible
The lsbranch command will tell you all the the ClearCase graphical merge tool will be
Closing completed development branches
displayed allowing you to complete the merge.
elements modified on a development or and re-opening them later
integration branch when run in the context of a Please note that you will need to have an X
Developing with SCM Toolkit can result in a large windows tool running on your PC e.g. Reflection X
view.
number of branches. To keep the ClearCase version
In an integration view it can be used to see Integrating code changes –deliver
tree clean and for general project housekeeping,
elements changed, who changed them, when they development branches should be closed down Having completed a rebase and included all
were delivered and what change request they were when completed. This is done using the changes from the integration stream into your
working on. end-branch command. development branch you can build and test. To
lsbranch -fixes –who -time end-branch –p <project> -r <release> -c
introduce your completed development changes
<CR> into the integration stream use the deliver
Where you are applying baselines to your code
command in an integration view for your release.
lsbranch can be used to identify all the changes This will lock the branch in ClearCase and mark it as
obsolete. If the branch is subsequently required it deliver –c <CR>
on an integration stream since a particular label.
Again in an integration view: can be re-opened:
ASPL ClearCase and SCM Toolkit Quick Reference Agilent Restricted Page 4 of 4

You might also like