Nowadays most of the CVS repositories are equipped with ViewCVS or CVSWeb, a web interface that lets you browse the history and etc. But the problem is, when you want to read about a certain file, you have to click a bunch of links to get there.
This script helps you get to the right place in just one step.
Shell script. I hereby place the code in the public domain.
You first write ~/.cvsweb and listing URLs for CVSROOTs. For example, the following entry is for Apache CVS:
:pserver:anoncvs@cvs.apache.org:/home/cvspublic http://cvs.apache.org/viewcvs.cgi/%%P
%%P is expanded to the file/directory name. Then run
$ cvsweb <file/dir>
to print out the URL for the specified file/directory in CVSWeb. If no argument is given, '.' is assumed.
You can then use this output to launch your browser. Like:
$ lynx `cvsweb Foo.java`
I'm using cygwin, so I have a batch file called "run.bat" that does @start %*. Then I have a shell function:
cvsweb () {
run.bat $(~/bin/cvsweb "$@")
}
In this way, I just need to type in "cvsweb file" followed by ENTER, and a new browser launches automatically.