I’m going to assume that you have already created a new SVN repository for your project in preparation for the import. As a headsup, I came into problems when I created a SVN repository with default folder structure (branches/tags/trunk) so if you encounter issues trying to import the dump file (step 6) you may need to remove your default folder structure from the SVN repository and try again.

Note. I would not attempt to import the CVS Repository from a production environment, work from a copy.

  1. Download cvs2svn (http://cvs2svn.tigris.org/) and untar the tarball cvs2svn-2.3.0.tar.gz.
  2. If you are on a Windows box, download and install Cygwin (http://Cygwin.com/setup.exe). Choose the following options during installation:
    - Install from the Internet
    - Choose install location E.g. C:\cygwin (all users)
    - Use IE5 Settings
    - Select Download Site: E.g. ftp://mirror.internode.on.net
    - Select the following packages: cvs, svn, cvs2svn, python, gnutls and rxvt (and any others you would like)
  3. Copy the extracted cvs2svn contents into your Cygwin user directory E.g. C:\cygwin\home\user\cvs2svn-2.3.0.
  4. Copy the “CVSROOT” folder and the module folder “yourProject” for your project from your CVS repository into a new folder “cvs” in your Cygwin user directory (C:\cygwin\home\user\cvs\).
  5. Run Cygwin and enter the following command *:
    $./cvs2svn-2.3.0/cvs2svn --dump-only --dumpfile ./cvs2svn.dump --fallback-encoding utf_8 ./cvs/
  6. Locate the svnadmin tool on the server hosting the SVN repository. It is now time to import the cvs2svn dump file into the SVN repository (where pathToDumpFile is the location of cvs2svn.dump generated in step 5).
    C:\Program Files\visualSVN Server\bin>svnadmin --parent-dir yourProject load pathToSVNRepository < pathToDumpFile
  7. Now is a good time to checkout the contents of the SVN repository (command line/TortoiseSVN) and check that everything is there as expected and the full history for your project is available.

* If the repository you are converting is huge and/or contains large binary files you may see “Memory Error” in the cvs2svn output which means it has fallen over. To easily fix this I suggest trimming the offending files out of the repository and repeating step 5. Note. the fallback encoding is optional, I found it was required when I converted my project due to the encoding of some commit comments.