##### Search CVSGrab

## Command line usage

From the command line, use cvsgrab.bat or cvsgrab.sh to run it.
Type cvsgrab -help to get help

You may need to define the CVSGRAB_HOME environment property if you want to call cvsgrab.bat from any location.
It works like the ANT_HOME or JAVA_HOME property: put in CVSGRAB_HOME the location of your CVSGrab installation.

## Standard use

Open your browser, go the the page that contains the root of the directory you want to download.

For example, if you want to download the sources of Jakarta's Ant tool, open your browser with http://cvs.apache.org/viewcvs.cgi/ant/.
To get the sources from this repository, simply type on the command line:
cvsgrab -url http://cvs.apache.org/viewcvs.cgi/ant/

Now if you wanted the 1.6 branch of Ant, in 'Show files using tag' at the bottom of the web page, select ANT_16_BRANCH and press the Show button. Copy the new url to the clipboard, and type on the command line:
cvsgrab -url http://cvs.apache.org/viewcvs.cgi/ant/?only_with_tag=ANT_16_BRANCH -connections 3 -clean -prune

Note the -connections 3 option that speeds up downloads by allowing up to 3 concurrent downloads of files, -clean that forces cvsgrab to get the latest version of the file and override the local version (backup-ed if there were changes made to it), and -prune that removes empty directories.

## Advanced use

The following examples are provided for the few times the url autodetection feature of CVSGrab doesn't work, plus some advanced feature like compatibility with ViewCVS/TortoiseCVS/any thoer cvs client, speeding transfer with multiple concurrent downloads and more.
If you discover a site that doesn't work with the -url option, or if the version of the files returned is incorrect, please let me know and file a bug report

### CVSGrab itself on SourceForge (ViewCVS 0.8)

URL: http://cvs.sourceforge.net/viewcvs.py/cvsgrab/cvsgrab/

cvsgrab -url http://cvs.sourceforge.net/viewcvs.py/cvsgrab/cvsgrab/ -destDir c:/tmp -packageDir CVSGrab

Note the -packageDir option that is used to avoid getting a folder called cvsgrab containing another folder called cvsgrab also on the disk.

### Eclipse (ViewCVS 0.9.2) with explicit proxy settings

URL: http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.ant.core/

cvsgrab -rootUrl http://dev.eclipse.org/viewcvs/index.cgi/ -packagePath org.eclipse.ant.core -destDir c:/tmp -proxyHost cache.myorg.com -proxyPort 8080

### Eclipse (ViewCVS 0.9.2) with multiple roots

URL: http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.ecesis/?cvsroot=Technology_Project

cvsgrab -rootUrl http://dev.eclipse.org/viewcvs/index.cgi/ -packagePath org.eclipse.ecesis -destDir c:\tmp -projectRoot Technology_Project

Note the -projectRoot option used by ViewCVS 1.0 when it's configured to work with multiple repositories (you should see a dropdown box with the label 'Project Root' on the web page). It's value is also the same as the root parameter from the url.

### Maven on Apache Jakarta with tag MAVEN_1_0_RC1 (ViewCVS 1.0-dev)

URL: http://cvs.apache.org/viewcvs.cgi/maven/?only_with_tag=MAVEN_1_0_RC1

cvsgrab -rootUrl http://cvs.apache.org/viewcvs.cgi/ -packagePath maven -destDir c:\tmp -tag MAVEN_1_0_RC1 -cvsRoot :pserver:anoncvs@cvs.apache.org:/home/cvspublic

Note the -cvsRoot option. This option is useful as it helps CVSGrab to build the CVS admin files in the same format as other CVS tools, like CVSGui / WinCVS, so if you manage to get a direct connection to the internet without a firewall, you can use with no changes the repository checked out by CVSGrab with WinCVS for example.

### JavaCVS module on NetBeans.org (SourceCast 1.0)

URL: http://javacvs.netbeans.org/source/browse/javacvs/

cvsgrab -rootUrl http://javacvs.netbeans.org/source/browse/ -packagePath javacvs -destDir c:\tmp -connections 3

Note the -connections option that allows up to 3 simultaneous downloads, to get faster downloads.
Great when uploading sources from a cvs repository for the first time.

### WebWork on dev.java.net (SourceCast 2.0)

URL: https://webwork.dev.java.net/nonav/source/browse/webwork/src/

cvsgrab -rootUrl https://webwork.dev.java.net/source/browse/webwork/ -packagePath src -destDir c:\tmp -packageDir webwork-src