ClearCase delay in showing latest config spec - clearcase

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

Related

Clearcase config spec for different selection rules per vob in view

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".

ClearCase Snapshot View Not Updating

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"

How to checkout multiple times using different branches for the same element inside same view of Clearcase

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.
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.
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.
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.

Snapshot view config spec load rules based on labels

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 hide folders except mentioned in config spec?

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).

Resources