1. ClearCase Overview
• Software Configuration Management
• CM is a systems engineering process, and a term of PM. SCM is CM used in Software industry.
• is a software engineering discipline consisting of standard processes and techniques often used by organizations to manage the changes introduced to its software products. SCM helps in identifying individual elements and configurations, tracking changes, and version selection, control, and baselining
• Unified Change Management /Unified Configuration Management
• Is IBM Rational’s solution for SCM
• A set of software tools supporting software development ClearCase, ClearQuest
• Record and manage any activity(change) at any time during the development process
1.3 UCM workflow and the team members’role
1.4 A glance of ClearCase
- A IBM Rational’s tool of SCM, it covers all domains of SCM.
- Four functions:
- version control; CC’s basic functions like branching, check out/in..
- workspace management; CC’s control for developer’ view..
- build management ; such as ‘clearmke’, CC’s own build program..
- process control; CC provides mechanisms for monitoring and controlling the development process
ClearCase is a comprehensive software configuration management system. It manages multiple variants of evolving software systems, tracks which versions were used in software builds, performs builds of individual programs or entire releases according to user-defined version specifications, and enforces site-specific development policies.
ClearCase’s two kind of use modules: UCM and Base
which one do we use? Maybe base clearcase.
The difference between UCM workflow and Base workflow:
A ClearCase env example:
vob server / view server / registry server / client
2. ClearCase Concepts
All ClearCase data is stored in VOBs (versioned object bases, the “public”storage areas) and views (the “private” storage areas). Accessing a VOB using a view. VOB presenting the version database via a file system interface, you can see the files like they are in your local disk. But they are not in you local disk, it’s just a dynamic view.
Snapshot view is a local mirror
- Version Object dataBase: central database of clearcase.
- Code Repository
- Multi-Version File System(MVFS), all versions of all elements.
- Virtual file system( the dir /vobs)
- A project can contains one or more VOBs
- Project Administrator is the VOB owner
%cdvob #open the vob root dir of the current project
%cleartool lsvob/ct lsvob #show the names of all your network vobs, vob-tag is the full path
name of the mount point on your host and the storage directory is the actual location, ‘*’ at the beginning of the line indicates that the vob is active on your host
%ct lock vob:vob-path #the adminstrator lock the VOB
%ct unlock vob:vob-path #the adminstrator unlock the VOB
Is anything that is checked in to ClearCase. For examples:
source files,directories,makefiles,bin files…
contains version info—version tree
with branchs and subbranches, integer ID numbers, version lables
% ct lsvtree filename #show version tree
% ct lsh filename #show history
A view provides an isolated workspace with private storage, enabling individual users or small groups to work independently of each other.A VOB is intended to be seen by (some or) all users. By contrast, a view is not principally a repository; rather, it is a tool for seeing the repository.
- Independent, user-configurable workspace
- for version selection and private storage
- The dir ‘/view’
- Using ‘config spec’ as a filter on the vob, select certain version of each element.
- snapshot view (on local) and dynamic view(on net)
%ct lsview # show all views,including view-tag and the storage dir
%ct setview view-tag #into the colleagues’ view using a new shell, or you can’t read his files in the view; set current view to view-tag view; cmd ‘exit’ to return your view
%ct pwv #Print current working view
%ct startview view-tag #Set current view to view-tag view without starting a Clearcase shell environent. It allows one to view (only) the file
%ct rmview –tag view-tag # Remove the view
2.4 FilePath in system:
exp.v #standard name
exp.v@@main #extended pathname to the element’s main branch
exp.v@@main/alpha #extended pathname to a subbranch of the main branch
exp.v@@main/alpha/3 #extended pathname to a version to the subbranch
/vobs/design/src/msg.c #specifies the version of an element selected by your view
/view/bill/vobs/design/src/msg.c #specifies the version of the same element selected by view
VOB as seen through view:
2.5 config spec
Is Rules for selecting versions of elements to appear in a view
Default config spec:
element * CHECKEDOUT (For any element, select the checked out version, if any)
element * \main\LATEST (otherwise, select most recent version on the main branch)
Commands for manipulating config spec:
%ct catcs # Lists a view’s config spec.
%ct setcs #Makes a specified file a view’s config spec.
%ct edcs #Revises the current config spec of a view.
%ct update -add_loadrules #Adds load rules to the config spec of a snapshot view while updating the
How does the view-server decide which version for each element to show in the view?
1.The view’s associated view_server process tries to find a version of the element that matches the first
rule in the config spec:
• If such a version exists, that version is in the view.
• If multiple versions match the rule, an error occurs, and no version of the element is in the view.
• If no version matches the first rule, the search continues
2.If no matching version was found for the first rule, the view_server tries to find a version that matches
the second rule.
3.The view_server continues in this way until it finds a match or until it reaches the last rule.
So, Order Is Important!
element * \main\LATEST must in last line
CS SYNOPSIS(For details: %ct man config_spec)
• Standard Rule:
scope pattern version-selector [ optional-clause ]
• File-Inclusion Rule:
• Load Rule (for snapshot views):
load pname …
• Time Rule:
[ end time [ date-time ] ]
• Create branch rule:
mkbranch branch-type-name [ -override ]
[ end mkbranch [ branch-type-name ] ]
element \proj1\include\utility.h \main\3
#select ver 3 on the main branch
element * …\bugfix\LATEST
#select the mose recent version on the bugfix branch
element \atria\lib\* …\new\LATEST
element * \main\LATEST
#modify the meaning of “most recent” to mean “as of 7 P.M. of July 10.”
2.6 Label and branch
• Version label Is a mnemonic identifier can be attached to any version of an element
• The same label can be used in many elements.
• Can set label for the set of source versions used in the build of a particular release
• Most used by release engineer?
Commands for label
%ct mklbtype –nc TEST_LABEL #Creat a label
%ct mklabel –r TEST_LABEL elename #Attaches version labels to versions of elements
A baseline is a version of a component; it includes one version of selected elements of a component.
• Parallel development
How to Mark Your Branch
%ct mkbrtype -nc barton #Make a Branch Type called “barton”
%ct mkattype BRANCH_TYPE #Make an attribute called BRANCH_TYPE
%ct mkattr \ > BRANCH_TYPE \”DEVELOPER\” brtype:barton #The attribute BRANCH_TYPE is attached to a branch
Why using branch?
3. Useful Operations
- Basic Version Control and Configuration Management.pdf
- CASEVision/ClearCase User’s Guide.pdf
- CASEVision™/ClearCase Concepts Guide