CVS list revisions

CVS
Linux

Most CVS gui's like Cervisia and Tortoise have this built in.
Doing this from a terminal is a little more difficult.
Unfortunately you have to check out the module before you can get information about it (really?)

I will use the drupal cvs repository and the cck module for example
First checkout the cck module

cvs -d :pserver:anonymous:anonymous@cvs.drupal.org:2401/cvs/drupal-contrib checkout contributions/modules/cck

if you use the -d option you will have to keep adding it to every command, so better to just do

export CVSROOT=:pserver:anonymous:anonymous@cvs.drupal.org:2401/cvs/drupal-contrib

now you can just checkout with

cvs checkout contributions/modules/cck

The following command works pretty well

cvs log -h  | grep ": [0-9]*\.[0-9]*\.0\." | sort --unique

For instance to list the revisions for cck in drupal cvs

cvs log -h contributions/modules/cck | grep ": [0-9]*\.[0-9]*\.0\." | sort --unique

This works pretty good to

list all the files and branches/tags

cvs  log -h contributions/modules/cck

list just the branches/tags for the content.module file

cvs  log -bSh contributions/modules/cck/content.module
update to a specifig branch / tag
cvs update -dP -r DRUPAL-5--1-6 contributions/modules/cck

If you have a better command or small script, please comment.


Reply

  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • Web page addresses and e-mail addresses turn into links automatically.
  • You may link to Gallery2 items on this site using a special syntax.

More information about formatting options

728x90 banner