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)

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM