I have very little knowledge about ClearCase and would like to learn more.
I have created a branch BR_PHASE2
under /main
.
I have used the following command to checkout the files into the branch:
element * CHECKEDOUT
element * .../BR_PHASE2/LATEST
element * /main/LBL_MS_PHASE2_04-NOV-2010 -mkbranch BR_PHASE2
The problem now is how do I access files from the branch ??
I am not able to even open the VOB if I switch to this config spec:
element * CHECKEDOUT
element * /main/BR_PHASE2/LATEST
Am I writing the config spec wrong ?? The error i am getting when I try to set the config spec as above:
Warning: New config spec makes current working dir invisible.
What are the steps to actually access the branch that I have created ??
Your first config spec seems to be ok. It sais that all the files you try to change from the label 'LBL_MS_PHASE2_04-NOV-2010' will be branched to BR_PHASE2. Just try to checkout something, and watch the version tree.
Also, the second config spec tells to see all the files, that belong ONLY to the branch, but if you haven't checkout to branch any, then you will see nothing.
Try the following:
so that you have the directory structure by selecting the label and your files from branch.
The problem is:
What directories actually have:
BR_PHASE2
?LBL_MS_PHASE2_04-NOV-2010
?If you only branch/labeled all files under
/myVob/myDirectory
, then the directory/myVob
itself won't never be branched/labeled.That means the following config spec won't be able to select any version for
/myVob
, making all the other rules for any file under/myVob
useless:Until ClearCase is able to select at leat one valid version of
/myVob
, it won't be able to select any version for any file under/myVob
.You should always end your config spec with a "config stop-rule" like:
or at least:
Add one of those at the end of your config spec, and the view should work as expected.
The ClearCase config spec mechanism is a composition-based one: to know more about it, see the SO answer "Flexible vs static branching (GIT vs Clearcase/Accurev)".
The OP adds:
Not necessarily:
If you want to be sure to only view the files under /myVob/myDir with the right branch/label, you could use as I mentioned above:
The rule applies only to
/myVob
(not to anything under/myVob
).That allows ClearCase to get past
/myVob
(because it can at least select a valid version for it) and start applying the other selection rules to the sub-directories.It depends on the config spec you are using:
would indeed create new version in the main branch
would not, because the third rule would apply first, if the element has been labeled
LBL_MS_PHASE2_04-NOV-2010
.