ClearCase Overview

1. ClearCase Overview

1.1 SCM

• 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

 

1.2 UCM

• 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:
  1.  version control; CC's basic functions like branching, check out/in..
  2.  workspace management; CC's control for developer’ view..   
  3.  build management ; such as  'clearmke', CC's own build program..
  4. 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

 

2.1 VOB 

 

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

Some commands:

%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

2.2 elements

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

some commands:
% ct lsvtree filename   #show version tree
% ct lsh filename    #show history

2.3 view

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)

Some commands;

%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:

VOB-Extended Pathnames
     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

View-Extended Pathnames
     /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:
              include config-spec-pname
    • Load Rule (for snapshot views):
              load pname ...
    • Time Rule:
               time date-time
              ...
       [ end time [ date-time ] ]
    • Create branch rule:
              mkbranch branch-type-name [ -override ]
         ...
       [ end mkbranch [ branch-type-name ] ]

 

Example:

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



time 10-Jul.19:00
element \atria\lib\* ...\new\LATEST
element * \main\LATEST
end time
#modify the meaning of “most recent” to mean “as of 7 P.M. of July 10.”

2.6 Label and branch

 

 Label  

      • 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

 

Baseline

A baseline is a version of a component; it includes one version of  selected elements of a component.

branch

• isolation
• 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
typ

 

Why using branch?

3. Useful Operations

    refer to :  http://www.yolinux.com/TUTORIALS/ClearcaseCommands.html

 

本博客所有文章均同步发表于www.mx1980.cn/blog

Reference:

  1. Basic Version Control and Configuration Management.pdf
  2. CASEVision/ClearCase User's Guide.pdf
  3. IBM.Rational.ClearCase.7.0.pdf
  4. http://www.yolinux.com/TUTORIALS/ClearcaseCommands.html
  5. CASEVision™/ClearCase Concepts Guide
  6. blog:ClearCase完全攻略

 

 

 

 

 

 

 

 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值