How to find the username who created latest version of element in clearcase?

橙三吉。 提交于 2019-12-06 05:08:40

You should be able to add to your find query a created_by member.
See the query language man page.

created_by (login-name)

In all cases, TRUE if the object was created by the user login-name (as shown by the describe command).

So your query would look like:

cleartool find <Vobtag> -version "{brtype(IntegrationStream) && created_since(13-Jan.8:30) && created_by(aUser)}" -print

The OP comments:

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

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%\"

The second part of the command is:

-exec "cleartool describe -fmt \"%Xn : %u\n\" \"%CLEARCASE_XPN%\"

The important parameters are:

%u

User/group information associated with the object's creation event (modifiers: F, G, L); see also %[owner]p and %[group]p.

\"%CLEARCASE_XPN%\"

It represents the extended pathname of a version found by the find query.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!