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 ??
The problem is:
What directories actually have:
- a version in the branch
BR_PHASE2
? - a version labeled
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
.
element * CHECKEDOUT
element * /main/BR_PHASE2/LATEST
You should always end your config spec with a "config stop-rule" like:
element * /main/LATEST
or at least:
element /myVob /main/LATEST
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:
You have mentioned to always end the cs with:
element * /main/LATEST
,
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:
element /myVob /main/LATEST
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.
but if I want to check out the files only from the branch
BR_PHASE2
, wont this create an error. I am saying that when I end it with /main/LATEST and checkout and check in files , it is updated in main branch. what do I do about it ?
It depends on the config spec you are using:
element * CHECKEDOUT
element * /main/BR_PHASE2/LATEST
element * /main/LATEST
would indeed create new version in the main branch
element * CHECKEDOUT
element * .../BR_PHASE2/LATEST
element * /main/LBL_MS_PHASE2_04-NOV-2010 -mkbranch BR_PHASE2
element * /main/LATEST
would not, because the third rule would apply first, if the element has been labeled LBL_MS_PHASE2_04-NOV-2010
.
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:
element * CHECKEDOUT
element * /main/LBL_MS_PHASE2_04-NOV-2010
element * /main/BR_PHASE2/LATEST
so that you have the directory structure by selecting the label and your files from branch.
精彩评论