问题
This config-spec show the files I need:
element -dir * '{version(/main/LATEST) && !version(SLT-T)}'
element -file * '{version(/main/LATEST) && !version(SLT)}'
Now I need to see how the source looked at some point in the future, so I do this:
time 01-Nov-2008
element -dir * '{version(/main/LATEST) && !version(SLT-T)}'
element -file * '{version(/main/LATEST) && !version(SLT)}'
Unfortunately this still shows me "the present". The manual says:
Time rules may be nested. They may not include any query language constructs.
Okay, but what do I do then?
How do I exclude files and directories with a certain label, without using query language? Or is there way to specify time in the query language?
(No files has a SLT-T label, and no directories has a SLT label.)
回答1:
Did you try adding some query-language directives like:
&& !ver{created_since(1-Nov-2008)}
&& ver{created_since(1-Nov-2008)}
(all the versions existing before/after 1 Nov. 2008)
That is part of the query language and may help you refining your selection rules.
I confirm for having tested it:
element /myPath/... /main/{!created_since(01-Sep-2008)}
element /myPath/... /main/LATEST
would give you all version created before September the first in this instance.
I am not sure it can be combined with your rules to successfully achieve what you are looking for, though.
My point was just to make sure you can include time-based selection rules in your config spec.
来源:https://stackoverflow.com/questions/368086/clearcase-time-and-query