This past weekend, I converted our legacy CVS repository over to Subversion maintaining the last 5 years worth of history. Overall, I am very pleased with the process and the end result. Over the past few weeks, I had done portions of the conversion into a test repository and worked out most of the kinks.

Here is the process we used:

  • Set the CVS repositories to read only (using the readers / writers configuration files)
  • Export each CVS module using the script provided by Subversion
  • Create any directories in Subversion needed to receive the exported CVS data
  • Import in the files created by

Most of these steps were scripted and ran unattended with me checking on them occasionally.

As with all plans, a couple of minor issues crept up. The export using went smoothly (it started at 7:30 pm Friday and ended sometime around 2:00 am on Saturday). When I examined the output of the scripts, I discovered 3 exports failed. One because I misspelled the name of the CVS module directory. The other 2 because of an error of the form “A CVS repository cannot contain both repo/path/file.txt,v and repo/path/Attic/file.txt,v”. The cvs2svn FAQ discusses this error. After looking at the files in question, I chose option 4 – rename the attic version and was able to re-export.

I also noticed that some of the exports did not result in a file being created. Looking at these, I discovered that while the module directories I was exporting from CVS existed, they were empty. I could safely ignore these.

All of my imports failed due to the directory specified not existing in the repository. I thought I had accounted for this by including the appropriate svn mkdir command before the import. Looking through the logs I discovered that all of the mkdir commands failed due to not having the proper authorization credentials. I was running my scripts in an account where I did not have credentials cached. I added the appropriate --username and --password items and let the script run.

All in all, most of the imports ran successfully and we have had no issues since starting to use the repository. Most of the team is pleased with the results of the conversion and the new tools. All in all, a good experience.