info-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Is there any way to tell CVS update to show file revisions


From: Todd Denniston
Subject: Re: Is there any way to tell CVS update to show file revisions
Date: Tue, 26 Aug 2008 13:55:00 -0400
User-agent: Thunderbird 2.0.0.16 (X11/20080707)

Res Pons wrote, On 08/25/2008 08:45 PM:
Hi
I would like to be able to create a list of all the files in my project with their revision numbers to the right of them.
 cvs status just throws up too much information,
 all I would like is as follows:
fileone 1.4
filetwo 1.70
Thanks Rez

And of course the first question is... Why would you want to record that information? because revision numbers are for CVS's use, tags are for human and build system use.

but to answer the question as asked...



Use the Unix[1].

cvs status | \
 grep "Repository revision:" | \
 awk '{print $4 " " $3}' > /tmp/working


cat /tmp/working | \
while read -t 1 input; \
do \
  VERSION=`echo $input|awk '{print $2'}` ;  \
  FNAME=`echo $input|awk '{print $1'} | \
        xargs -iXXX basename XXX ,v`; \
  echo "$FNAME $VERSION"; \
done > /tmp/ResPons.txt

[1] http://en.wikipedia.org/wiki/Unix_philosophy#McIlroy:_A_Quarter_Century_of_Unix
http://en.wikipedia.org/wiki/Unix_philosophy#Raymond:_The_Art_of_Unix_Programming

--
Todd Denniston
Crane Division, Naval Surface Warfare Center (NSWC Crane)
Harnessing the Power of Technology for the Warfighter




reply via email to

[Prev in Thread] Current Thread [Next in Thread]