cvs history,CVS中查询目录下所有文件的提交记录

我们习惯用eclipse svn中查看一个目录下,甚至整个工程下,所有的文件的变更列表;操作为:右键工程 -> Team -> Show History。

最近在使用CVS,eclipse对应的cvs插件(Eclipse CVS Client 1.2.1)却不支持此运用,找了下其他一些cvs的客户端(如WinCvs 2.0.2.4),也没有找到相似的功能。(如果有知道的同学,望告知,感谢感谢!)

 

只能从命令行入手,遂记录如下。

 

Kick start

 

先查询一个文件的提交记录(这个功能我们可以通过CVS的大部分可视化客户端实现):

查询a.file的历史提交记录:

cvs history -ca a.file

 

查询一个目录下所有文件的提交记录:

查询2014年6月1日(含)所有用户在xxx/xxx/xxx目录下的提交记录

cvs history -ca -D 2014-06-01 xxx/xxx/xxx

 

如果不知道xxx/xxx/xxx路径的组成规则,可执行一条全局的查询语句,然后从中获知路径的组成规则。如查询所有用户在2014年6月1日(含)于整个Module下的提交记录:

cvs history -ca -D 2014-06-01

 

Okay!

 

附:CVS history命令的帮助文档:

history: invalid option -- s
Usage: cvs history [-report] [-flags] [-options args] [files...]

Reports:
  -T Produce report on all TAGs
  -c Committed (Modified) files
  -o Checked out modules
  -m <module> Look for specified module (repeatable)
  -x [TOEFWUCGMAR] Extract by record type
  -e Everything (same as -x, but all record types)
Flags:
  -a All users (Default is self)
  -l Last modified (committed or modified report)
  -w Working directory must match
Options:
  -D <date> Since date (Many formats)
  -b <str> Back to record with str in module/file/repos field
  -f <file> Specified file (same as command line) (repeatable)
  -n <modulename> In module (repeatable)
  -p <repos> In repository (repeatable)
  -r <rev/tag> Since rev or tag (looks inside RCS files!)
  -t <tag> Since tag record placed in history file (by anyone).
  -u <user> For user name (repeatable)
  -z <tz> Output for time zone <tz> (e.g. -z -0700)

 

posted @ 2014-07-21 17:09  nick_huang  阅读(10796)  评论(3编辑  收藏  举报