Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what is the difference between branch and branch type in rational clearcase

Tags:

clearcase

I am new to clearcase and it looks so confusing about branch and branch type and label and label type etc...

If i use this command:

cleartool mklbtype

What it will create, a label or a label type?

IBM Rational clearcase http://www.ibm.com/software/awdtools/clearcase/

We recently moved from subversion to clearcase for version control and when I relate the both terms it is quite confusing?

like image 580
DevC Avatar asked Nov 14 '11 15:11

DevC


People also ask

What is a branch in ClearCase?

Branches are used in base ClearCase® to enable parallel development. A branch is an object that specifies a linear sequence of versions of an element.

How do I find my branch in ClearCase?

Branch, version, and label information for resources under ClearCase source control is available through the ClearTeam Navigator View. and ClearCase properties view. You can also use the ClearCase Version Tree view to find branch, version, and label information for ClearCase resources.


2 Answers

A branch belongs to an element (a file or directory). A brtype or branch type is a name for some branches, which can be applied to any number of elements.

For example, file.c@@/main/int is a branch of the element file.c. Its brtype is int. And file.c@@/main/int/2 is a version which belongs to that branch.

Similarly, a label belongs to a version of an element. An lbtype or label type is the name for some labels, and can be applied to any number of versions of different elements. A common use is to create labels with the same type for each element in your repository, to stamp a certain release.

cleartool mklbtype -global TEST

makes a label type.

cleartool mklabel TEST file.c

creates a label on the version of element file.c which is currently selected in your view. Now file.c@@TEST is a permanent synonym for that version.

cleartool mklabel -rec TEST .

does the same for the current directory and all its contents, recursively.

like image 66
aschepler Avatar answered Sep 23 '22 03:09

aschepler


Addition for those using ClearCase UCM:

One other difference between branch and branch type is the kind of metadata you can find associated with a branch type.

An UCM stream will be "guarded" a branch type, meaning it will be associated with a branch pattern, and if you change the name of the UCM Stream, you will also change the name of the underlying brtype.

Similarly, an UCM baseline will guard the lbtype corresponding to the physical label of the baseline applied to each versions included in said baseline.
You cannot use mklabel with an lbtype guarded by a baseline, because baselines are supposed to be immutable.


You can see an application of creating lbtype when adding said labels after an svn import to ClearCase: see "Moving from SVN to ClearCase"

like image 43
VonC Avatar answered Sep 25 '22 03:09

VonC