DevC
DevC

Reputation: 7423

what is the difference between branch and branch type in rational 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?

Upvotes: 5

Views: 5160

Answers (2)

VonC
VonC

Reputation: 1324447

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"

Upvotes: 2

aschepler
aschepler

Reputation: 72346

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.

Upvotes: 5

Related Questions