User talk:Parajaganesh

Configuration Specification (Config Spec) in ClearCase
The Configuration Specification (config spec) is playing vital role to select the version of the element from the view in ClearCase for Check out, Check in, finding, etc. It works based on the top down algorithm ie. the first rule is taken first and check with the version of the element, if it is matched, it will be taken for the process. Otherwise, it goes to the second rule of the config spec and check with the version of the element. If they are matched, it continues the process with this version. This process continues until any one of the rule is matched with version of the element. If none of rule is matched with the version of the element, it cannot be taken for process in ClearCase.

Here I have listed some of the important config spec rules set which is very useful for me at working place to play the role as ‘ClearCase Administrator’. It is also very useful for the developers who are using ClearCase for their development.

Default Config Spec

element * CHECKEDOUT

element * /main/LATEST

It is the default config spec for the view. A user creates a view at the first time. He/She supplied with this config spec.

Rule 1: To select the CHECKEDOUT versions of the elements in the view.

Rule 2: To select the recent version of the elements from the main branch.

Using Label in Config Spec

element * CHECKEDOUT

element * MOD001

element * /main/LATEST

We can also use LABELs for selecting (naming) the version in config spec. Here the second rule is ‘element * MOD001’. It means, if the element is not checked out, it will be checked with the label. In case that element contains the label MOD001, it will be taken for the process. Otherwise, ClearCase proceeds with the next rule.

Creating a branch in /main using Config Spec (Simple way)

element * CHECKEDOUT

element * /main/ganesh/LATEST

element * /main/LATEST –mkbranch ganesh

This config spec will be useful to create a separate branch for the developer. It will be very useful when I want to maintain my code changes in my own branch (without mingle with main).

In this case, we create a branch ‘ganesh’ using the config spec. If an element is not matched with the first two and matched with third rule (recent version of the main), branch is created from the latest version of the /main (it is called as base version of the /ganesh branch).

Creating Multiple Branches

element * CHECKEDOUT

element * /main/ganesh/kumar/LATEST

element * /main/ganesh/LATEST –mkbranch kumar

element * /main/LATEST –mkbranch ganesh

Creating same branch for more one rule (for /main)

element * CHECKEDOUT

element * /main/ganesh/LATEST

mkbranch ganesh

element * MOD001

element * /main/LATEST

endbranch ganesh

it is similar to…

element * CHECKEDOUT

element * /main/ganesh/LATEST

element * MOD001 - mkbranch ganesh

element * /main/LATEST - mkbranch ganesh

It first checks the version of the element is CHECKEDOUT. If it is not check the version is in /main/ganesh/LATEST, this version of the element is selected. Otherwise, it checks the element contains ‘MOD001’ label, if it is labeled as ‘MOD001’ in /main branch, config spec creates /ganesh branch from /main. In case, the label is not applied, it select the LATEST version of the /main and creates /ganesh branch.

View only a specific directory

For Windows

element * CHECKEDOUT

element –dir / …//LATEST

element –dir …/ …//LATEST

element –dir …//…/* …//LATEST

element –file …//…/*.* …//LATEST

element –file …//…/* …//LATEST

element –file …//*/…/*.* …//LATEST

For Linux (or any Unix Platform)

element * CHECKEDOUT

element –dir /vobs// …//LATEST

element –dir …/ …//LATEST

element –dir …//…/* …//LATEST

element –file …/<directory_name>/…/*.* …/<branch_name>/LATEST

element –file …/<directory_name>/…/* …/<branch_name>/LATEST

element –file …/<directory_name>/*/…/*.* …/<branch_name>/LATEST

For Any OS (OS Independent)

element * CHECKEDOUT

element –dir [vob_family_uuid] …/<branch_name>/LATEST

element –dir …/<directory_name> …/<branch_name>/LATEST

element –dir …/<directory_name>/…/* …/<branch_name>/LATEST

element –file …/<directory_name>/…/*.* …/<branch_name>/LATEST

element –file …/<directory_name>/…/* …/<branch_name>/LATEST

element –file …/<directory_name>/*/…/*.* …/<branch_name>/LATEST

Select a particular version of a specific file

Syntax

element <file_path> <Version>

Example

element /vob1/dir1/file1.c /main/4

View only the Specific VOB

element [family uuid of VOB without “:” and “.”]/... version_selector

Example:

element [a91273922c9211da8b360001832cbe76]/... CHECKEDOUT

element [a91273922c9211da8b360001832cbe76]/... /main/v3/ganesh/LATEST

element [a91273922c9211da8b360001832cbe76]/... /main/v3/MOD039 -mkbranch ganesh

element [a91273922c9211da8b360001832cbe76]/... /main/LATEST -mkbranch ganesh