We are trying to have only few folders in our dynamic view.
For that we have written clearcase config spec like below.
element * CHECKEDOUT
element /Process/Projects/OurProject\... /main/LATEST
element "/Process/Projects/OurProject 100/..." /main/LATEST
element * /main/LATEST
But it displays all the other folder also , only thing is we are not able to open those folders. Is it possible to hide the all other folders which are not mentioned in config spec ( I know that in snapshot view we can do this by adding load rule, but we wanted it to be done in dynamic view)
Add
element /Process/Projects/* -none
You must add that rule after the ones selecting the directories that you want:
element * CHECKEDOUT
element /Process/Projects/OurProject\... /main/LATEST
element "/Process/Projects/OurProject 100/..." /main/LATEST
element /Process/Projects/* -none
element * /main/LATEST
Note the '*': all the element within Projects will be ignored, but Project itself must be selected by a selection rule.
If you used:
element /Process/Projects/... -none
You wouldn't see anything in Project, because Project itself would be ignored, making its content non-visible (and not eligible to the other selection rules of your config spec).
Related
The team would like to perform their work with one webview (instead of a view for each vob). vob1 work should be done on main, whereas vob2 work should be done on a different branch (branch1 below). I am not sure what the conceptual problem is with my rules below. I expected that since clearcase will match rules from top to bottom it would apply the selections for vob1 I have specified.
The config Spec I tried will checkout files for vob1 on branch1 instead of main.
element * CHECKEDOUT
element /vobs/vob1/* .../main/LATEST
element /vobs/vob1/* /main/LATEST
element * .../branch1/LATEST
element * /main/LATEST -mkbranch branch1
element * /main/0 -mkbranch branch1
load /vobs/vob1
load /vobs/vob2
Is my desired goal possible? What is the error above?
First, don't hesitate to make a dynamic view in order to test your selection rules: you will see immediately if said selection matches what you need, without having to re-update your snapshot view.
Second, try element /vobs/vob1/... instead of /vobs/vob1/*: that will include the vob root folder itself.
See "Pattern" in the page "config_spec".
I relocated certain elements from one VOB to another VOB.
During the relocation my view was set to default config spec.
element * CHECKEDOUT
element * main\LATEST
some of the elements were branched under another branch. Below is the config spec we use for the other branch.
element * CHECKEDOUT
element * .../rel_euchanges_ban_dev/LATEST
element * WPX0445_ANL_EXIT_EUCHGS_1.0_BL.ANL_28012014 -mkbranch
rel_euchanges_ban_dev
element * /main/LATEST -mkbranch rel_euchanges_ban_dev
After relocation when we set the config spec for rel_euchanges_ban_dev branch, we are not able to properly see the elements under this branch.
Example: This is how it looks in the source VOB, for two folders which are under the branch rel_euchanges_ban_dev. There seems to be a symbolic link to the destination VOB.
But at the destination VOB. This is how it looks.
When the config spec is set to default, AnalysisAndDesign and Requirements folder are present only in destination VOB as expected after relocation.
Why could it be that when config spec is set for rel_euchanges_ban_dev branch, we are seeing symbolic links? Wherein ideally the folders should be available at the source VOB but not symbolic links to destination VOB.
Why could this be happening? I tried labeling corresponding folders at the destination VOB with baseline label of the sub branch. But nothing seems to work :-/
Further, the version tree at the destination VOB looks like this.
View is set to rel_euchanges_ban_dev branch.
What could happen is the new config spec isn't configured to show new elements (those in /main/0 or .../branch rel_euchanges_ban_dev/0
element * CHECKEDOUT
element * .../rel_euchanges_ban_dev/LATEST
element * WPX0445_ANL_EXIT_EUCHGS_1.0_BL.ANL_28012014 -mkbranch
rel_euchanges_ban_dev
element * /main/0 -mkbranch rel_euchanges_ban_dev <===
element * /main/LATEST -mkbranch rel_euchanges_ban_dev
The additional line makes sure a new element added to source control immediately in the new branch.
The relocate man page mentions:
Use a view whose config spec selects the branch (typically main) on which the move is to occur.
The view in which you run relocate must be able to check out elements in both the source and target VOBs, so its config spec must include a CHECKEDOUT rule.
After you run relocate, you may need to use this view (or a view with the same config spec) to clean up, as described in Problems with existing views after relocating elements.
So the config spec above might have been better suited for the "working view" used by the relocate.
Are you aware of any issues with delays in changes to view configuration specifications being reflected in ClearCase explorer etc?
Added following line in a text file and included in the config spec.
element * CHECKEDOUT
element * /main/LATEST
In ClearCacse explorer view showed elements in main/LATEST.
Later changed the text file to
element * CHECKEDOUT
element * /main/branch_name/LATEST
element * /main/LATEST
saved it and closed.
Refreshed the view and view was pointing to main/LATEST even after stop and starting the view.
confused with the result, side tracked to another task and after 15 mins when I refreshed I saw latest from branch.
Any reason ?
Your branch might now always originate from main.
Try rather the following config spec:
element * CHECKEDOUT
element * .../branch_name/LATEST
element * /main/LATEST
I'm trying to create a snapshot view via perl script which is working fine. Currently trying to write a config spec that loads based on label for that view. Problem I'm facing is root directory doesnot have this label. so below config spec is falling. I can't add main/latest because I need files only with this label.
element * CHECKEDOUT
load \vobname
element * labelname-nocheckout
element * -none
Try adding a rule just for the root directory /vobname:
element * CHECKEDOUT
element /vobname /main/LATEST
element * labelname-nocheckout
element * -none
load /vobname
A few comments:
the load rule (load /vobname) can be set at the end of the config spec
you don't need to use \, even on Windows. '/' is fine
the order of the selection rule is important, which is why the element /vobname /main/LATEST is placed first.
The selection rule element /vobname /main/LATEST is only for the folder /vobname (not for any of its sub-folder elements)
this assumes that any element under /vobname has a label set on one of its versions.
How to apply a label To the latest version of a branch Using config Spec?
Can we apply a label using the Config spec.
Well I have created branches using the Config spec but I applied labels using the apply label option.
But i want to apply it by giving it in the config spec.
Can we do it if so how?
I tried it but Its not working.Thank you in advance
element * CHECKEDOUT
element /test_ari/karthik/omna.txt .../karthik_9/LATEST/karthik_66
element * /main/LATEST
I want to create a label karthik_66 on karthik_9/LATEST using config spec rules but how do i make it?
According to the config spec rules man page, you can use labels within a config spec to select a version, not to label one.
So "no".
When you create/manage a branch, you need 3 rules, not 1 like yo currently have:
element * CHECKEDOUT
# 3 rules here:
element /test_ari/karthik/* .../karthik_9/LATEST
element /test_ari/karthik/* /main/LATEST -mkbranch karthik_9
element /main/0 .../karthik_9/LATEST
element * /main/LATEST
That would create a branch for any file (not just omna.txt) inside /test_ari/karthik, as well for any new file (the /main/0 selection rule).
Since you view would always refers to .../karthik_9/LATEST, you can then apply your label at any time, setting it on the LATEST of karthik_9.