简体   繁体   English

Clearcase 中经常修改的文件

[英]Frequently Modified Files in Clearcase

I am very new to Clearcase and one of the task that I have got on my hand is to find frequently modified files in ClearCase, Suppose we have an integration stream and there are numerous files in our stream, need to know of certain files which are modified frequently like a certain file is modified 5 times in last two months.我对 Clearcase 非常陌生,我手头的任务之一是在 ClearCase 中查找经常修改的文件,假设我们有一个集成 stream 并且我们的 stream 中有很多文件,需要知道某些文件是修改频繁,比如某个文件在最近两个月被修改了 5 次。

I have access to ClearCase commands as well as GUI我可以访问 ClearCase 命令以及 GUI

Is there a way we can have solution to this problem.有没有办法我们可以解决这个问题。

Thanks谢谢

You can do, following find examples , a search between two dates:您可以按照find examples ,在两个日期之间进行搜索:

cleartool find . -version "{created_since(date1) &&
                           !created_since(date2) &&
                           brtype(myIntStream)" -exec "cleartool descr -fmt "%En"\
|sort| uniq -c | sort -n

(This is the Windows syntax, which means you need GoW (Gnu On Windows) installed for the v and uniq commands. (这是 Windows 语法,这意味着您需要为vuniq命令安装GoW(Windows 上的 Gnu)

As Brian Cowan adds in the comments , the command would be:正如Brian Cowan 在评论中添加的那样,命令将是:

cleartool find -all -version "{created_since(date1) &&
                           !created_since(date2) &&
                           brtype(myIntStream)" -exec "cleartool desc -fmt \"%En\n\" \"%CLEARCASE_XPN\"" \
|sort| uniq -c | sort -n

On Unix:在 Unix 上:

cleartool find -all -version "{created_since(date1) &&
                           !created_since(date2) &&
                           brtype(myIntStream)" -exec  'cleartool desc -fmt "%En\n" "$CLEARCASE_XPN"' \
|sort| uniq -c | sort -n

-all instead of the current directory format, to avoid issues if the command isn't run at the VOB root. -all而不是当前目录格式,以避免命令不在 VOB 根目录下运行时出现问题。

If you don't care about the interval, but only want the last 2 months, drop the !created_since line.如果您不关心间隔,而只想要最后 2 个月,请删除!created_since行。
Alternatively, use " today " as the second date, though that would everything modified since midnight your local on the day you run the command.或者,使用“ today ”作为第二个日期,尽管这将在您运行该命令当天的本地午夜之后修改所有内容。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM