我需要标记在特定日期看到的视图内容,而我知道的唯一方法是使用配置规范中的时间版本选择器。我将时间设置为所需的日期,然后将标签应用到视图上。简单的。
但是,我希望是否有一种方法可以在不更改配置规范的情况下以编程方式完成此操作。我希望能够将 cleartool find
与 -exec
和 mklabel
结合使用。但是,如果我这样做:
cleartool find . -cview -version "! created_since(some-date)"
它只会提取在该日期之前创建的内容在视图上,如果我们使用-time<,则不一定会在视图中看到什么/code> 选择器
。
如果我将 cleartool find
与 -branch
选择器一起使用,
cleartool find . -cview -version "! created_since(some-branch)"
它只会选择该日期之前在该分支上创建的内容。它不会显示通过配置规范规则在其他分支的视图中看到的内容。
那么,我使用 cleartool find
是否错误?或者这根本就是不可能的?
有没有办法从命令行直接 cleartool find
准确地查找
- 活动配置规则将看到的
- 给定目录中的
- 元素,无论涉及哪个分支,
- < em>AS IF 其中有一个 -time 指令?
谢谢。
I need to label the contents of a view as seen at specific dates, and the only way I know of doing it is by using the -time version selector in the config specs. I set the time to the date I want, and then I apply the label on the view. Simple.
However, I was hoping if there is a way to do it pro-grammatically without changing the config specs. I was hoping that I could use the cleartool find
in combination with -exec
and mklabel
. However, if I do this:
cleartool find . -cview -version "! created_since(some-date)"
It only pulls what was created before that date on the view, not necessarily what should be seen in the view if we were using the -time
selector.
And if I use cleartool find
with a -branch
selector
cleartool find . -cview -version "! created_since(some-branch)"
it only selects that which was created before that date, on that branch only. It will not show what is also seen in the view on other branches via the config specs rules.
So, am I using cleartool find
wrong? Or is it just impossible?
Is there a way, from the command line, to direct cleartool find
to find exactly and precisely the elements that
- would be seen by the active config rules
- in a given directory
- regardless of the branch or branches involved,
- AS IF there was a -time directive in them?
Thanks.
发布评论
评论(1)
据我所知, 查询语言不够丰富,无法包含配置规范时间规则确实如此。
基于时间的选择规则是最好的选择。
为了以编程方式使用
-time
(因为查找不起作用),我通常做的是:cleartool setcs -tag myView myFile # 更新动态视图的配置规范
(请参阅
setcs
手册页)To my knowledge, the query language isn't rich enough to include what the config spec time rule does.
A time-based selection rule is the best option.
What I generally do, in order to use the
-time
programmatically (since the find wouldn't work) is to:cleartool setcs -tag myView myFile # update the config spec of the dynamic view
(See
setcs
man page)