如何找到使用Clearcase创建了最新版本的element的用户名? [英] How to find the username who created latest version of element in clearcase?
问题描述
我经常收到这样的请求。 查找从特定日期更改的文件列表。
I am often getting a request like this. " Find the list of files changed from particular day".
我得到了以下示例的答案
I got answer to this as example given below
"cleartool find <Vobtag> -version "{brtype(IntegrationStream) && created_since(13-Jan.8:30)}" -print"
但是很少有人问查找更改的文件列表以及由谁更改。这样他们就可以确定开发人员的姓名并为他分配解决问题的任务。
But few people are asking "Find the list of files changed and by whom". So that they can pin down the developer name and assign him the task to resolve issues.
是否可以通过管道传递上述命令并找到创建该版本的用户?
Is it possible to pipeline the above command and find the user who made that version also?
推荐答案
您应该能够在查找查询中添加 created_by
成员。
请参见 查询语言
手册页。
You should be able to add to your find query a created_by
member.
See the query language
man page.
created_by (login-name)
在所有情况下,如果对象是由用户登录名创建的,则为TRUE(如describe命令所示)。
In all cases, TRUE if the object was created by the user login-name (as shown by the describe command).
所以您的查询如下:
cleartool find <Vobtag> -version "{brtype(IntegrationStream) && created_since(13-Jan.8:30) && created_by(aUser)}" -print
OP注释:
您给出的命令将找到文件列表
但是我想查找所有文件created_since以及创建它的人
The command you have given will find the list of files created by particular person.
But I would like to find all the files created_since and also by whom it was created
是的,为此,您需要在 fmt_ccase
手册页。
自 cleartool find
没有 -fmt
参数,您要做的是将find查询的结果传递给 cleartool describe
comm和(可以使用 -fmt
指令)。
True, for that you need to add a format parameter to your query, following the fmt_ccase
man page.
Since cleartool find
has no -fmt
parameter, what you do is to pipe the result of the find query to a cleartool describe
command (which can use a -fmt
directive).
cleartool find <Vobtag> -version "{brtype(IntegrationStream) && created_since(13-Jan.8:30)}" -exec "cleartool describe -fmt \"%Xn : %u\n\" \"%CLEARCASE_XPN%\"
命令的第二部分是:
-exec "cleartool describe -fmt \"%Xn : %u\n\" \"%CLEARCASE_XPN%\"
重要参数是:
%u
与对象创建相关的用户/组信息事件(修饰符:
F
,G
,L
);另请参见%[owner] p
和%[group] p
。
User/group information associated with the object's creation event (modifiers:
F
,G
,L
); see also%[owner]p
and%[group]p
.
\"%CLEARCASE_XPN%\"
它表示通过 find
查询找到的版本的扩展路径名。
It represents the extended pathname of a version found by the find
query.
这篇关于如何找到使用Clearcase创建了最新版本的element的用户名?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!