ClearCase时间和查询 [英] ClearCase time and query
问题描述
此配置说明显示了我需要的文件:
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.
好的,那我该怎么办?
如何在不使用查询语言的情况下排除具有特定标签的文件和目录?还是可以使用查询语言指定时间?
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?
(没有文件带有SLT-T标签,没有目录带有SLT标签.)
(No files has a SLT-T label, and no directories has a SLT label.)
推荐答案
您尝试添加一些查询语言指令,例如:
Did you try adding some query-language directives like:
&& !ver{created_since(1-Nov-2008)}
&& ver{created_since(1-Nov-2008)}
(2008年11月1日之前/之后存在的所有版本)
(all the versions existing before/after 1 Nov. 2008)
这是查询语言的一部分,可以帮助您完善选择规则.
That is part of the query language and may help you refining your selection rules.
我确认已经测试过:
element /myPath/... /main/{!created_since(01-Sep-2008)}
element /myPath/... /main/LATEST
在这种情况下,将为您提供9月之前创建的所有版本.
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.
这篇关于ClearCase时间和查询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!