When I want to use a branch in CC, I usually put something like this in the config spec:
element * .../first_branch/LATEST
element * .../Main/LATEST -mkbranch first_branch
element * ../Main/LATEST
Now, I want to create a branch that is a sub-branch of the first one. Let's say it's called second_branch
(I'm creative today). How would that config spec look like?
To add to Kim's answer, I much prefer starting a branch from a label than the LATEST
versions selected by a branch.
That way, I know what 'second_branch
' stands from and where it comes from.
(coming from the LATEST
of another branch means it comes from a moving point which represents something different as time goes by)
element * .../second_branch/LATEST
element * A_LABEL -mkbranch second_branch
element * .../first_branch/LATEST
element * .../Main/LATEST -mkbranch first_branch
element * ../Main/LATEST
If you set A_LABEL
on a view configured to be:
LATEST
of 'first_branch
',then you can branch from a known point.
Like this:
element * .../second_branch/LATEST
element * .../first_branch/LATEST -mkbranch second_branch
element * .../Main/LATEST -mkbranch first_branch
element * ../Main/LATEST
Your view will now look at the latest version on second_branch, or, if it doesn't exist, the latest version on first_branch, or, if it doesn't exist there, the latest version on the main branch. Upon checking out a file, a new version element will be created on respectively second_branch and first_branch as necessarily.
I don't have access to a ClearCase instance right now, so I can't double check your last two lines, but I think that perhaps you meant this instead?
element * .../second_branch/LATEST
element * .../first_branch/LATEST -mkbranch second_branch
element * /Main/LATEST -mkbranch first_branch
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With