views:

263

answers:

2

How to get file name and revision number as a list starting from a designated folder?

A: 

cvs status will give you that information in the following form per file:

===================================================================
File: test.pas      Status: Up-to-date

   Working revision:    1.4
   Repository revision: 1.4     /cvsroot/MyModule/test.pas,v
   Expansion option:    kv
   Commit Identifier:   86c473d9b385950
   Sticky Tag:          (none)
   Sticky Date:         (none)
   Sticky Options:      (none)
   Merge From:          (none)

(output is from CVSNT; Commit ID and Mergepoint will not be shown by vanilla CVS)

You can write a script to extract and reformat that information.

Oliver Giesen
+2  A: 

You can use cvs status at the base folder of your project and grep for the appropriate line:

> cvs status | grep Repository\ revision\:
Repository revision: 1.16    /cvsroot/module/.cvsignore,v
Repository revision: 1.1.1.1 /cvsroot/module/build.sh,v
Repository revision: 1.251   /cvsroot/module/build.xml,v
Repository revision: 1.36    /cvsroot/module/manifest.xml,v
... and on, and on...
Alex B