Prasad
Prasad

Reputation:

How to get file name and revision number as a list?

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

Upvotes: 2

Views: 397

Answers (2)

Alex B
Alex B

Reputation: 24936

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...

Upvotes: 2

Oliver Giesen
Oliver Giesen

Reputation: 9439

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.

Upvotes: 0

Related Questions