CVS Tip 1: Checking out an Entire Sourceforge Project

The usual SourceForge CVS instructions ask you to check out modules like so:


cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/jedit login

 
cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/jedit co -P modulename

Of course many projects are divided into multiple modules, all of which are required. You can check out the entire project, including all of its modules like this:


cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/project login

 
cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/project co .

That is, replace “-P modulename” with a period. This does check everything out into the current working directory, so you’ll probably want to match CVS’s project directory first. For example, when checking out jEdit,

~/projects$ mkdir jedit 
~/projects$ cd jedit
~/projects/jedit$ cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/jedit login 
Logging in to :pserver:anonymous@cvs.sourceforge.net:2401/cvsroot/jedit
CVS password: 
~/projects/jedit$ cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/jedit co .
cvs checkout: Updating .
U build.xml
cvs checkout: Updating CVSROOT
U CVSROOT/checkoutlist
U CVSROOT/commitinfo
U CVSROOT/config
U CVSROOT/cvsignore
...

This checks out the entire project. The downside to this is that it may check out some vestigial empty directories as well that are no longer used. (CVS is very bad at pruning old directories from the tree when a project is reorganized.) You may want to identify and delete these directories on your local system. They can be identified because they only contain other empty directroies and a CVS directory. When checking out jEdit there is one of these, com.

~/projects/jedit$ \rm -r com

5 Responses to “CVS Tip 1: Checking out an Entire Sourceforge Project”

  1. Bill Krueger Says:

    I believe there is an option on checkout that prunes empty directories (-P I think).

  2. Brett Neumeier Says:

    Mr. Krueger is correct — the -P option in the cvs command recommended by sourceforge is the option that causes empty directories to be omitted. (Actually the empty directories are checked out along with everything else, but after the checkout is complete the CVS client will delete them.) That also means that the original tip, to replace “-P modulename” with “.”, could be amended to just replace the “modulename” with a period.

    Usually when I’m checking out an entire repository like this, I also specify a “-d projectname” option. This causes the CVS repository to be checked out into a directory “projectname” instead of into the current working directory.

  3. pslog » Blog Archive » checkout files from sourceforge cvs Says:

    […] more info and original instructions here: http://cafe.elharo.com/tools/cvs-tip-1-checking-out-an-entire-sourceforge-project/ […]

  4. Andrew Says:

    Thanks This was exactly what I needed to know !

  5. aquarium cephalexin Says:

    aquarium cephalexin

    news