clearcase create a branch into another branch

768 views Asked by At

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?

1

There are 1 answers

6
VonC On BEST ANSWER

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