I am attempting to write a configspec which will only branch on certain file types (I.E. Docs can be painful so we wish to avoid those).
Right now I have the following extensions: *.txt and *.pl (for example)
I have tried:
element * CHECKEDOUT
element -directory * \main\LATEST
element '{*.txt||*.pl}' \main\BLARG\LATEST
element '{*.txt||*.pl}' \main\LATEST -mkbranch BLARG
And some variations using parentheses, and whatnot.
I am just perplexed, I did find that in certain contexts you can use the comparison operators similar to c++ but can't get this to work.
(looking at the query language section from here: http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m0/index.jsp?topic=/com.ibm.rational.clearcase.cc_ref.doc/topics/config_spec.htm
I should be able to use: query && query
Is it possible to only allow branching on specific filetypes by use of a configspec, and if so, any hints/tips/something to get me headed in the right direction?
EDIT: Reading from the link I sent (one of the pages on that site anyways), you can set it up using something to the effect of
element * CHECKEDOUT
element -directory * \main\LATEST
element *.[hc] \main\BLARG\LATEST
element *.[hc] \main\LATEST -mkbranch BLARG
This should match any h and c files that you are looking at and allow to branch based on those.
element * CHECKEDOUT
element -directory * \main\LATEST
element *.txt \main\BLARG\LATEST
element *.txt \main\LATEST -mkbranch BLARG
That will work and only matches .txt files, which is great, I was just hoping that it would match for additional sets, maybe I could add an additional line or two and maybe that would accomplish what I'm attempting to do.
element * CHECKEDOUT
element -directory * \main\LATEST
element *.txt \main\BLARG\LATEST
element *.pl \main\BLARG\LATEST
element *.txt \main\LATEST -mkbranch BLARG
element *.pl \main\LATEST -mkbranch BLARG
Our team only branches on certain sets of files for a variety of reasons, one being that in some cases it's difficult to merge (Note .doc files). I was going to write up a configspec that would automatically branch what our team designates as "branchable", but otherwise just checkout main.
I hope my issue is clearer, and I think that it's not quite what you're talking about in your initial answer VonC (I think), please let me know if your answer still holds.
No, it doesn't seem to be easily possible (unless you list each type you want to branch), and for a reason.
The idea behind branching is to isolate the history for a group of files (not for some specific parts of said group).
That idea has been reinforced with UCM and its notion of UCM component (a coherent set of files, which branches as a all, and which is labelled as a all unit).
See more on "component" in the article "Best practices for using composite baselines in UCM".
So trying very hard to bend the tool in order to achieve that one selective versionning organization might not be the right thing to do.
Isolating those file in their own "component", and then using them through symlinks back into your original tree structure is one possible solution (there might be other) which is at least better (and which is reminiscent of the notion of submodules or sub-forests used by other (D)VCS)
Plus, if you branch for the reason it is "difficult" to merge:
ms_word
type manager..ppt
for instance, activate for that type a copy-merge policy, as illustrated in "Clearcase UCM is trying to merge pdf files".I realize you are branching for other reasons that might be valid, but again, I like my branching policy simple, manageable and scalable.