2

I have a branch created into the main with this config spec:

element * CHECKEDOUT
element * /main/teste_branch_nv0/LATEST
element * /main/LATEST -mkbranch teste_branch_nv0
element * /main/LATEST

Now, I want to create other branch into this branch. I am trying to use:

element * CHECKEDOUT
element * /main/teste_branch_nv0/teste_branch_nv1/LATEST
element * /main/teste_branch_nv0/LATEST -mkbranch teste_branch_nv1
element * /main/teste_branch_nv0/LATEST

but, I have a mistake:

Problems performing setcs.

ClearCase CM Server: Error: Unable to determine version for VOB root directory element.
ClearCase CM Server: Error: Unable to access "\PROJECT\IMPLEMENTATION\Fonts\ENVIRONMENT\workspace": No such file or directory.
ClearCase CM Server: Error: 1 config spec load rule problems encountered.

This is the same path that I use to create the branch teste_branch_nv0

How can I avoid this error?

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250

1 Answers1

1

You seem to have left out the rule

element * /main/LATEST -mkbranch teste_branch_nv0
element * /main/LATEST

The "stop rule" element * /main/LATEST is particularly important, because it is the one rule that will always apply.

If you have an element (like the root folder of your Vob) for which no rule apply, then you would get

Unable to determine version for VOB root directory element

That is why you should always keep as a last rule the element * /main/LATEST selection one.

See as an example "ClearCase Branching using configspec".

It will also show you that the LATEST selection rules should be written as:

element * .../teste_branch_nv1/LATEST

Because you don't know from which branch (main or teste_branch_nv0) the new teste_branch_nv1 branch will be created.

So the full config spec should be:

element * CHECKEDOUT
element * .../teste_branch_nv1/LATEST
element * .../teste_branch_nv0/LATEST -mkbranch teste_branch_nv1
element * /main/LATEST -mkbranch teste_branch_nv1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Actually, the last line is redundant. You will never select that line as the selection clause is identical to the previous line. – Brian Cowan May 27 '17 at 00:09
  • @BrianCowan True, I have edited the answer accordingly – VonC May 27 '17 at 00:14
  • But, I don't want that the branch teste_branch_nv1 be created linked with main. I want he linked with teste_branch_nv0. Can I use only: "element * /main/LATEST" in the end? – Rodrigo Richa May 29 '17 at 14:43
  • @RodrigoRicha yes. That will limit the `teste_branch_nv1` to be created only from `teste_branch_nv0`. – VonC May 29 '17 at 15:04
  • Thanks one more time – Rodrigo Richa May 29 '17 at 20:45
  • I think it depends on whether you want checkouts from /main to be on /main itself, /main/...nv1 or /main/...nv1/...nv2. If you want checkouts in main to stay in main, then no -mkbranch clause after element * /main/latest works. If not, then we are into "that depends on what you want to happen" territory. – Brian Cowan May 31 '17 at 17:21