I want to checkout some developer branch. How can i change the config spec in view properties? It shows default as element* main/LATEST.
You need to add a selection rule before the main/LATEST one:
element * .../devBranch/LATEST
element * main/LATEST
You can do that with:
cd /path/to/myview
cleartool edcs
The best practice is to create a separate view for that, preferably a dynamic view (that way you can fiddle with the config spec and see quickly if the selected content matches your need).
Once the config spec is valid, you can apply it to a new snapshot view.
One way of changing config specs is mentioned below:-
$ ct edcs
//Mention all your config specs here
//Save and exit(:wq)
Note: edcs(edit config specs)
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 am using ClearCase for the first time, and am having a little trouble understanding snapshot views. I have a view with the config spec
element * CHECKEDOUT
element * /main/dev/LATEST
load "\project\dir1"
load "\project\dir2"
load "\project\dir3"
I am using the same config spec with a dynamic view without the load rules. I have checked in a file called "configSpecTest.txt" into "\project\dir1\subdir", and this shows up in my dynamic view.
However, after calling
cleartool update
and being told it successfully updated, the file is not there in my snapshot view. I feel like I have a fundamental misunderstanding as to how snapshot views work. Could anyone please explain to me where I'm going wrong?
Try with a config spec like:
element * CHECKEDOUT
element * .../dev/LATEST
element * /main/LATEST -mkbranch dev
load "\project\dir1"
load "\project\dir2"
load "\project\dir3"
You should always need the last selection rule element * /main/LATEST because to load/access an element, you need to load/access its parent element, and it is possible that /project does not have any version in the dev branch.
While your element is visible in your dynamic view, try and see if it is visible in another dynamic view with your original config spec mentioned in your question.
Try and create again your element with your dynamic view and the config spec mentioned above: that is how you create new branches for element.
See more at "ClearCase Branching using configspec"
I have complicated Config Spec, which changes quite often.
Is it possible to version control the config spec itself?
e.g.,
suppose the current config spec is:
element * CHECKEDOUT
element /vobs/a/b/c.v /main/34
element /vobs/a/d/e.v /main/20
element /vobs/f/g.f LABEL_0.592
element /vobs/... LABEL_0.596
While the previous config spec was:
element * CHECKEDOUT
element /vobs/h/i/j.v /main/31
element /vobs/... LABEL_0.595
I'd like to be able to "go back" to my previous config spec, without having to keep it in comments inside the config spec, or copy-paste it every time to seperate file, and have that file version controlled.
Is it possible? How?
You could version the config spec itself (obtained with cleartool catcs -tag YourViewTag > aConfigSpecFile) in its own branch (in order to not interfere with the regular versioning of the other files)
The idea is that you can set a config spec from a file at any time, with cleartool setcs:
cleartool setcs -tag yourViewTag yourConfigSpecFile
To get a specific version of that config spec (since it is stored in its own branch), you can use cleartool get
cleartool get –to yourConfigSpec yourConfigSpec##\main\aBranch\x
I wanted to create a dynamic view with the following config spec:
element * CHECKEDOUT
element * .../view_1_1/LATEST
element * LABEL_1 -mkbranch view_1_1
element * /main/LATEST -mkbranch view_1_1
Unfortunately I have written the config spec wrong; I didn't write the "..." in the second line (element * /view_1_1/LATEST). After this, I have given the 'mkbrtype -global -c "some comment" view_1_1' command and make it visible in Windows (ClearCase Explorer) using Region Synchronizer.
And I realized that I have forgotten '...', so I corrected the config spec. I corrected this before any checkouts, checkins or something.
Does this edit cause any problems, or any differences than other views created with the correct config specs?
Does this edit cause any problems, or any differences than other views created with the correct config specs?
No, this edit is in the config spec of your view, and remains local to this view.
It has nothing to do with the fact the view tag was made visible through the Region Synchronizer.
The OP groove asks in the comments:
Is this true for editing config spec after "mkbrtype" too?
Yes: the brtype can change, the config spec will use that modified brtype at the next refresh.
The '...' is a simple selection rule modification, which means it will select different elements based on the new rule (.../view_1_1/LATEST instead of /view_1_1/LATEST or /main/view_1_1/LATEST).
If the brtype doesn't exist yet, or if its comment changes, that selection rule would simply be ignored.
config spec is read from the top to bottom by actived view. If the view finds one version of file/folder's tree, stop reading the next config spec.
In your case, when the view read second line element * /view_1_1/LATEST, since there is no branch /view_1_1, just ignore it, nothing happens, and continuously read the rest.
mkbrtype is used to define the properties and create branch type view_1_1 (not create the branch on that element). You need know command mkbrtype and mkbranch are different.
mkbranch
Creates a new branch in the version tree of an element
http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m0/index.jsp?topic=/com.ibm.rational.clearcase.cc_ref.doc/topics/ct_mkbranch.htm
mkbrtype
Creates/updates a branch type object
http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m0/index.jsp?topic=/com.ibm.rational.clearcase.cc_ref.doc/topics/ct_mkbrtype.htm
We usually use snapshot views and they work just fine.
However, I tried to use a dynamic view recently and doesn't show empty files in the working directory. We use Python so namely, it doesn't show empty __init__.py files, which breaks most of our code. All other files in the same directory, and non-empty __init__.py files exist.
Is this a known issue? What can I do?
Running cleartool ls says about the __init__py file: "no version selected".
My config spec looks something like this:
element * CHECKEDOUT
element * SubComponenet1_VersionX
element * SubComponenet2_VersionY
element * SubComponenet3_VersionZ
element /src_base /main/LATEST
Assuming the empty files are inside src_base and considering the last rule, how can a file not have a selected version?
First, try a cleartool ls in the parent directory of those file, in a shell or a DOS windows.
You can see there status, and see if they are selected by your config spec.
Check also that the config spec of your dynamic view is similar to your snapshot view:
cleartool catcs within your snapshot view
cleartool edcs from your dynamic view
For a non-UCM dynamic view to reflect an UCM snapshot view, it can be pretty complex.
It is best to create a dynamic UCM view on the same Stream.
At the very least, your config spec should end with a stop-rule:
element * /main/LATEST
# or
element /src_base/... /main/LATEST
Your last rule is only for /src_base directory, and not for the sub-elements.