Thursday, 26 December 2013

IBM Version Control Tool - Clear Case

ClearCase(CC) is one of the widely used version control tools. CC is a distributed application. Many of its operations involve several host computers and several server processes on each host.It provides  all the features expected of a generic version control tool – tracking and providing control over changes to the source code. Virtually, any project  artifact  can be stored in ClearCase repository. It also supports
  • Baseline Management
  • Build Management
  • Release Management
  • Parallel Development Support
  • Offline usage
There are 3types of CC:
  1. ClearCase LT  (Base ClearCase)
  2. Full ClearCase  (UCM ClearCase )
  3. ClearCase Multisite
Basic Terminologies used in CC:

Element - Elements are control objects that include a version tree. There are two types of elements, File elements and Directory elements.
  • A file element is any file that can be stored in a file system, for example, software source code, design documents, HTML code etc.
  • A directory element contains file elements and other directory elements.
Version - A version is a specific revision of an element. By versioning, we make copies of the data at some meaningful point in order to be able to return to that point at a later stage, if necessary.

Versioned Object Base (VOB) - A versioned object base (VOB) is a repository that stores versions of file elements, directory elements, derived objects, and metadata associated with these objects. With ClearCase MultiSite, a VOB can have multiple replicas, at different sites.

A Project VOB (PVOB) is a special type of VOB that is used when UCM is implemented as the software configuration management process. Every UCM project belongs to a PVOB and multiple UCM projects can share a PVOB.

Component - A ClearCase entity that you use to group a set of related directory and file elements within an (UCM) project. Typically, you develop, integrate, and release the elements that make up a component together. A project must contain at least one component, and it can contain multiple components. Projects can share components.

View - A view provides access to a specific version of one or more elements in a VOB. With a simple rule-based approach, a view selects a set of versions of elements without having to specify the versions explicitly.
A view provides a workspace in which you can work on assignments in isolation from other developers. For example, as you work on a version of a Web page, no one can see the changes you make until you check in your work to the VOB

There are two types of views:
  • Snapshot View
  • Dynamic View

Snapshot View -  A snapshot view is a workspace created on your local computer. The snapshot view is created by copying versions of elements from VOBs to your computer. When working in snapshot views, you have to update your view periodically to be able to see the latest versions of elements. An update operation copies the latest versions of elements from the VOB to your local snapshot view.

Dynamic View -  A dynamic view provides immediate, transparent access to data stored in VOBs, based on configuration specification selection rules. When you work in a dynamic view, you do not have to copy data from VOBs to your view; you can see the latest versions of elements. This also means that you have to be aware of the impact that changes made to other elements might have on your work. Dynamic views are accessed using the multiversion file system (MVFS), a ClearCase provided file system driver.

Branch-  A branch is an object that specifies a sequence of versions of an element. Every element has one main branch, which represents the principal line of  development, and may have multiple sub branches, each of which represents a separate line of development


Version label -A version label can be attached to any version of an element to identify that version in an easy to remember way. A single version of an element can have several different labels. Labels are usually applied to a set of elements to mark important project milestones or the starting point of a branch.

Configuration specification -  A configuration specification, or config spec, contains the rules used by a view to select versions of elements. The rules are very flexible, and you can use various specifiers to indicate which versions to select. A view has exactly one config spec.

Project - A UCM project is a logical unit that is mapped to the development structure of an application or system. A project contains the configuration information (for example, components, activities, policies) needed to manage and track the work on a specific product of a development effort, such as an auction Web site. A basic UCM project in ClearCase consists of one shared work area and many private work areas. A project includes one integration stream, which configures views that select the latest versions of the project’s shared elements, and typically multiple development streams, which configure views that allow developers to work in isolation from the rest of the project team.

Check in/Check out:  ClearCase works with Check in/Check out concept. You check out a resource to work on it and check it in when the changes are complete.
  • Checking in a resource creates a new version of it in the VOB. In some version-control systems, only one person at a time can reserve the right to create a new version. In other systems, many users can compete to create the same new version.ClearCase supports both models by allowing two kinds of checkouts: reserved and unreserved.
  • Checkouts in server mode: When you check out a file in server mode, the checkout is reserved. A reserved checkout gives you the exclusive right to check in the file, which creates the next version. Only one checkout can be reserved.
  • Checkouts in local mode: When you check out a file in local mode, the checkout is unreserved. More than one person can check out the file at the same time, and no one is guaranteed the right to perform the next check in.
  • If several people checked out a page as unreserved in their local views, the first person to check in the page creates the new version. Everyone else must merge the latest version into their own work before they can check in their changes.In local mode, you can change a reserved checkout to unreserved and vice versa by using the ClearCase menu.
Rebase - A ClearCase (UCM) operation that makes your development work area current with the set of versions represented by a more recent baseline in the integration stream.


Build auditing - The networked filesystem provided by MVFS allows for build auditing. Builds in views which use the MVFS are able to monitor and record file I/O operations performed during the build process, and associate each such event with the command which triggered it. This allows ClearCase to produce a bill-of-materials which it calls a Configuration Record (CR) for all builds and enable traceability for either software configuration management purposes or as part of a larger Application Lifecycle Management process. Build auditing is performed with command-line tools such as a built-in make tool or by using the clearaudit command which can invoke a separate build tool.

UCM - Unified Change Management is a configuration management process, layered on ClearCase and ClearQuest functionality, for organizing software development teams and their products. Members of a project team use activities and componentsto organize their work.

No comments:

Post a Comment