cvs revisions – not the right way I think, but it works

I needed all revisions of a file stored in CVS. In bazaar and other newer VCS this is a non issue since all the revisions (history) can be found in your local checkout/branch.

Anyhow, I needed all revisions of a file, let’s call it Y. This is how I did it.

FILE=Y

for i in $(cvs log $FILE | grep revision | awk ‘ { print $2 } ‘ | grep -v revisions) ; do  cvs update -r $i  $FILE ; cp $FILE ${FILE}.$i ; done

Again, perhaps not the right way. But it works.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s