6

How can we find the branch name to which my ClearCase view is pointed to?

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
srinannapa
  • 3,085
  • 8
  • 49
  • 66
  • I took the liberty to remove your signature: see http://meta.stackexchange.com/questions/28416/what-is-the-policy-on-signatures-and-links-in-answers – VonC Sep 23 '10 at 10:40

2 Answers2

11

The thing is, a view doesn't point to one branch.
It only combines various element selection rules in the config spec, which makes it reflect a version on a branch at a given time, for a given tree/file.
See:

See also the debate on selection by composition vs. selection by revision to better understand why, by default, a ClearCase config spec doesn't necessary reference one branch.

The simpler way to check what is the current branch is:

  • cd /my/view/path/to/relevant/directory
  • cleartool ls

Example:

C:\views\myView\path\to\dir>cleartool ls
.checkstyle@@\main\MY_BRANCH_Dev\4                         Rule: ...\MY_BRANCH_Dev\LATEST
.classpath@@\main\MY_BRANCH_Int\ADV_ACC_Dev\1              Rule: ...\MY_BRANCH_Dev\LATEST
.classycle@@\main\MY_BRANCH_Int\ADV_ACC_Dev\0              Rule: ...\MY_BRANCH_Dev\LATEST

That view, for the path/to/relevant/directory path, point to branch MY_BRANCH_Dev


Note: With ClearCase UCM, this is simpler:

cleartool lsstream -cview

will give you the name of the name of the Stream (and by extension, the associated branch) on which the views points to.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Hi Von, say if I want to know the list of branches the clearcase view is pointed to? – srinannapa Sep 23 '10 at 10:41
  • 1
    @srinannapa Unless you are using UCM, the simplest way is to extract the branch names from the config spec (`cleartool catcs`) – VonC Sep 23 '10 at 11:37
0

Von is correct.

However, to understand the branching selection for base clearcase, it is better to learn how the Config Specs works.

cleartool man edcs, and read the config_specs documentation.

kolslorr
  • 956
  • 1
  • 8
  • 16