In a ClearCase config spec, is it possible to select versions based on element attributres (not version attributes)? For instance:
element * ...{SOME_ELEM_ATTR==SOME_VALUE&&lbtype(MY_LABEL1)}
This doesn't work because the last part of the "element" spec is a version-selector, which only looks at version attributes.
What I'm trying to do is partition my files into two or more classes, and have different "element" lines apply to different classes of files. I tried tagging all the elements in one class with an attribute, but hit a dead end with trying to base the selection on that in the config spec. The only way I can see to do this sort of thing is to put all the files of one class in one place and use the second construct (the "pattern") to differentiate:
element .../all_class1_files/... MY_LABEL1
but this is really ugly because you have to move all the files of one class into one place, or have a giantic config spec listing all the individual directories and/or files.
Thanks in advance...
Ray
One first solution would be to replace the attribute criteria by a branch.
That way, you would more easily be able to label all files from one branch or another, instead of "all files with a given attribute".
Other than this workaround, you will find some
findcommand based on attribute here (or in the man page).You could then combine a
findquery with an "-exec" directive to put the label that you want.That way, you don't have to mess with the config spec syntax (which may not support the exact selection criteria you are after).
I didn't test it, but you could try
, because
lbtype_subis an element, branch and version selector (whereaslbtypeis just a version selector).However, since
lbtypedoesn't seem to be part of the config spec criteria, I doubt it can work in said config spec.