How do I checkout different branches of the same element in the same view by modifying the config_spec accrodingly in Clearcase? Clearexplorer is giving message that already another version is checkedout in the same view, even though I have selected another branch in the config_spec rule correctly. Any clue will help me. Thank you.
问题:
回答1:
Hello, I added the VERSION TREE Picture where it shows that another CHECKEDOUT element is UNRESERVED mode. So, checkout on another branch of the same element in the same dynamic view fails with the message that another element version is already checkedout.
Error Message is also attached by creating another UNRESERVED CHECKOUT as shown.
回答2:
The view is set to select only one version at a time.
If you want to checkout in another branch using the same view, you would always get the error message stating that the file is already checked out in the current view.
You can try change the config spec in order to:
- select a non-checked out version of the file
- make sure the checkout will create a new branch
But even in that case, ClearCase might refuse to check out twice that file in the same view.
Don't forget the selection rules in the config spec are read from top to bottom: the first one which can be applied applies.
So when you say "I have selected another branch in the config_spec rule correct", make sure that rule is in the top.
But I don't believe the error message will be different.
That issue is different from "How to Checkout (reserved) an element that is already checked out (reserved) in another view", where the solution is simply to checkout unreserved.
As your screenshot shows (from the position of the "eye"), your config spec select:
- checked out version first
/main/LATEST
You would need to put a selection rule at the top of your config spec in order to:
- select LATEST of app_build_changes
That is:
element * .../app_build_changes/LATEST
element * /main/LATEST -mkbranch app_build_changes
element /main/0 -mkbranch app_build_changes
But since:
- the very first rule would still be element * CHECKEDOUT
- you already have a CHECKEDOUT version
Your other rules would still be ignored, and the eye would still select the version you show in the first screenshot.
In short: use another dynamic view.
回答3:
Instead of using element * CHECKEDOUT rule in the config_spec,
if I change it to
element * /main/CHECKEDOUT -- one time when I am in main trunk
element * /main/app_build_changes/CHECKEDOUT -- another time when I am in branch
Then also it doesn't check out and gives me the same error of duplicate checkout in the same view.