CVS To SVN Migration

This page is a jotter for the process of migrating Audacity's source code from Sourceforge CVS and a few other places into a single Subversion repository on Google Code.


 * 1) Starting point. We have:
 * 2) * Sourceforge CVS
 * 3) * Sourceforge SVN (old Mezzo)
 * 4) * Google Code SVN (wiki)
 * 5) Download a backup of Sourceforge CVS using rsync: rsync -av --delete-delay rsync://audacity.cvs.sourceforge.net/cvsroot/audacity/* audacity-cvsbackup/
 * 6) Download a backup of Sourceforge SVN repo using rsync: rsync -av --delete-delay audacity.svn.sourceforge.net::svn/audacity/* audacity-svnbackup/
 * 7) Create an empty repository to put the Google Code contents in: svnadmin create oldrepo
 * 8) Ensure we can push changes into new repo: echo '#!/bin/sh' > oldrepo/hooks/pre-revprop-change; chmod u+x oldrepo/hooks/pre-revprop-change
 * 9) Prepare to download the contents of the Google Code SVN repo using svnsync: '''svnsync --no-auth-cache --username RichardAsh1981 init file://$(pwd)/oldrepo/ https://audacity.googlecode.com/svn/
 * 10) Do the download: svnsync --no-auth-cache --username RichardAsh1981 sync file://$(pwd)/oldrepo/
 * OK, so we now have two SVN repositories and a set of server-side CVS files. We need to convert them into SVN repository dump files in order to proceed.
 * 1) Dump Google Code to a file: svnadmin dump gc-svnsync-old/oldrepo/ > gc-old.svndump
 * 2) Dump Sourceforge SVN to a file: svnadmin dump sf-svn-backup/audacity-svnbackup/ > sf-svn.svndump
 * 3) Convert Sourceforge CVS into a SVN dump-format file with cvs2svn: cvs2svn --encoding=utf-8 --encoding=cp1252 --encoding=cp1140 --dumpfile=sf-cvs.svndump --cvs-revnums sf-cvs-backup/audacity-cvsbackup/ > cvs2svn.log
 * 4) Wait a while for that to complete
 * 5) Check the huge amount of output sent to file for errors and warnings: grep -i warning cvs2svn.log; grep -i error cvs2svn.log
 * 6) Assuming all that finds is file names, we are good to continue with creating a new subversion repository to contain these three dumps.
 * 7) Create a repository to load everything in to svnadmin create gc-newsvn
 * 8) Create top-level directories into which the dumps will go temporarily: svn mkdir -m "InitialSVN dump import roots" file://$(pwd)/gc-newsvn/gc-svn file://$(pwd)/gc-newsvn/sf-svn file://$(pwd)/gc-newsvn/sf-cvs 
 * 9) Load in Google Code SVN dump: svnadmin load gc-newsvn --parent-dir gc-svn < gc-old.svndump
 * 10) Load in Sourceforge SVN dump: svnadmin load gc-newsvn --parent-dir sf-svn < sf-svn.svndump
 * 11) This last one will take forever - it's got 10,000 revisions to load, and manages about 2 a second ...
 * 12) Load in Sourceforge CVS dump: svnadmin load gc-newsvn --parent-dir sf-cvs < sf-cvs.svndump
 * 13) In principle, we now have our new Subversion repository, however it's quite a mess inside, so we should do some tidying up before we make it public.
 * 14) Make a backup-of this loaded repository, it is precious!
 * 15) Create a local working copy from the repository (which needs an absolute path, so edit the commands): mkdir test-checkout; cd test-checkout; svn co file:///var/tmp/richard/audsvn/gc-newsvn/ .
 * 16) This will check out the complete repository to disk, which uses a lot of space (be warned!)
 * 17) The CVS repository unfortunately contained directories called .svn which means the repository can't be checked out because of a conflict with the .svn directories used by the client for metadata. The solution to this is to delete the .svn directories directly in the repository (not in a working copy): svn del -m "Delete .svn directory that should never have gone into CVS" file://$(pwd)/gc-newsvn/sf-cvs/branches/XIPHOPHORUS/lib-src/libogg/macos/compat/.svn/ svn del -m "Delete .svn directory that should never have gone into CVS" file://$(pwd)/gc-newsvn/sf-cvs/branches/XIPHOPHORUS/lib-src/libogg/macos/compat/sys/.svn/ svn del -m "Delete .svn directory that should never have gone into CVS" file://$(pwd)/gc-newsvn/sf-cvs/branches/XIPHOPHORUS/lib-src/libogg/macos/.svn/ svn del -m "Delete .svn directory that should never have gone into CVS" file://$(pwd)/gc-newsvn/sf-cvs/branches/XIPHOPHORUS/lib-src/libogg/macosx/.svn/ svn del -m "Delete .svn directory that should never have gone into CVS" file://$(pwd)/gc-newsvn/sf-cvs/branches/XIPHOPHORUS/lib-src/libogg/macosx/ogg.pbproj/.svn/ svn del -m "Delete .svn directory that should never have gone into CVS" file://$(pwd)/gc-newsvn/sf-cvs/branches/XIPHOPHORUS/lib-src/libogg/macosx/English.lproj/.svn/ svn del -m "Delete .svn directory that should never have gone into CVS" file://$(pwd)/gc-newsvn/sf-cvs/branches/allegro2-branch/lib-src/libogg/macos/.svn/ svn del -m "Delete .svn directory that should never have gone into CVS" file://$(pwd)/gc-newsvn/sf-cvs/branches/Audacity_UmixIt/lib-src/libogg/macos/compat/.svn/ svn del -m "Delete .svn directory that should never have gone into CVS" file://$(pwd)/gc-newsvn/sf-cvs/branches/Audacity_UmixIt/lib-src/libogg/macos/compat/sys/.svn/ svn del -m "Delete .svn directory that should never have gone into CVS" file://$(pwd)/gc-newsvn/sf-cvs/branches/Audacity_UmixIt/lib-src/libogg/macos/.svn/ svn del -m "Delete .svn directory that should never have gone into CVS" file://$(pwd)/gc-newsvn/sf-cvs/branches/Audacity_UmixIt/lib-src/libogg/macosx/.svn/ svn del -m "Delete .svn directory that should never have gone into CVS" file://$(pwd)/gc-newsvn/sf-cvs/branches/Audacity_UmixIt/lib-src/libogg/macosx/ogg.pbproj/.svn/ svn del -m "Delete .svn directory that should never have gone into CVS" file://$(pwd)/gc-newsvn/sf-cvs/branches/Audacity_UmixIt/lib-src/libogg/macosx/English.lproj/.svn/ svn del -m "Delete .svn directory that should never have gone into CVS" file://$(pwd)/gc-newsvn/sf-cvs/branches/audacity-1_3_0-branch/lib-src/libogg/macos/compat/.svn/ svn del -m "Delete .svn directory that should never have gone into CVS" file://$(pwd)/gc-newsvn/sf-cvs/branches/audacity-1_3_0-branch/lib-src/libogg/macos/compat/sys/.svn/ svn del -m "Delete .svn directory that should never have gone into CVS" file://$(pwd)/gc-newsvn/sf-cvs/branches/audacity-1_3_0-branch/lib-src/libogg/macos/.svn/ svn del -m "Delete .svn directory that should never have gone into CVS" file://$(pwd)/gc-newsvn/sf-cvs/branches/audacity-1_3_0-branch/lib-src/libogg/macosx/.svn/ svn del -m "Delete .svn directory that should never have gone into CVS" file://$(pwd)/gc-newsvn/sf-cvs/branches/audacity-1_3_0-branch/lib-src/libogg/macosx/ogg.pbproj/.svn/ svn del -m "Delete .svn directory that should never have gone into CVS" file://$(pwd)/gc-newsvn/sf-cvs/branches/audacity-1_3_0-branch/lib-src/libogg/macosx/English.lproj/.svn/
 * 1) Same in sf-cvs/branches/AUDACITY_1_2, sf-cvs/tags/Audacity_1_3_2/, sf-cvs/tags/audacity-1_3_0-release,  sf-cvs/tags/Before_Allegro2, sf-cvs/tags/Audacity_UmixIt_BNL, sf-cvs/tags/LIBOGG-1_1_2,  but by now I'm scripting the clean-up
 * 2) Start to locate the trees we want in the final repository and put them into place, using svn mv