This page will capture the details of what it takes to convert the SQuirreL SQL Client's CVS repository to SVN. It's not a hard process thanks to the work of Tigris.org and SourceForge?. Here are the steps:
- Get a copy of the current repo using rsync.
mkdir squirrel_cvs_rsync cd squirrel_cvs_rsync rsync -av rsync://squirrel-sql.cvs.sourceforge.net/cvsroot/squirrel-sql/* .
- Convert the copy from CVS to SVN using cvs2svn (which creates an svn dump file)
cvs2svn --encoding=utf_8 --dumpfile=svndump .
- On our CVS repository, we apparently have some corruption with regard to the file RefreshObjectTreeAction?. It seems that this file is represented in both the folder where it resides and also in that folder's Attic directory. I get the following error when I attempt to convert using cvs2svn:
Pass 1 complete. =========================================================================== Error summary: ERROR: A CVS repository cannot contain both ./sql12/app/src/net/sourceforge/squirrel_sql/client/session/action/RefreshObjectTreeAction.java,v and ./sql12/app/src/net/sourceforge/squirrel_sql/client/session/action/Attic/RefreshObjectTreeAction.java,v Exited due to fatal error(s).
- I compared the two different versions of this file (they are attached to this page) and concluded that the one in the folder is a superset of the one in the Attic except that the one in the Attic includes the "dead" revision where it was removed. So it seemed harmless to remove the Attic version and keep the trunk version since it was obviously re-added somehow, since we still use it today. Once I removed the Attic version of this file, then the conversion process proceeded successfully:
cvs2svn Statistics: ------------------ Total CVS Files: 5926 Total CVS Revisions: 22470 Total CVS Branches: 17994 Total CVS Tags: 40874 Total Unique Tags: 78 Total Unique Branches: 9 CVS Repos Size in KB: 147840 Total SVN Commits: 5351 First Revision Date: Fri Jun 1 11:10:46 2001 Last Revision Date: Wed Sep 9 16:46:53 2009 ------------------ Timings (seconds): ------------------ 49.3 pass1 CollectRevsPass 0.6 pass2 CleanMetadataPass 0.0 pass3 CollateSymbolsPass 8.8 pass4 FilterSymbolsPass 0.1 pass5 SortRevisionSummaryPass 0.1 pass6 SortSymbolSummaryPass 5.9 pass7 InitializeChangesetsPass 4.0 pass8 BreakRevisionChangesetCyclesPass 4.0 pass9 RevisionTopologicalSortPass 3.2 pass10 BreakSymbolChangesetCyclesPass 5.2 pass11 BreakAllChangesetCyclesPass 4.8 pass12 TopologicalSortPass 8.2 pass13 CreateRevsPass 0.2 pass14 SortSymbolsPass 0.1 pass15 IndexSymbolsPass 53.7 pass16 OutputPass 148.3 total
- scp the svn dump file to shell.sf.net:
ssh -t manningr,email@example.com create <exit from the shell> scp svndump.gz manningr,firstname.lastname@example.org:/home/users/m/ma/manningr
- Checkout the svn repo for admin; blow away the existing repo and create a fresh new one.
ssh manningr,email@example.com [manningr@shell-24006 ~]$ adminrepo --checkout svn [manningr@shell-24006 ~]$ rm -rf /svnroot/squirrel-sql/* [manningr@shell-24006 ~]$ svnadmin create /svnroot/squirrel-sql [manningr@shell-24006 ~]$ rm -f svndump [manningr@shell-24006 ~]$ gzip -d svndump.gz
- Import the svn dump file into new svn repo.
[manningr@shell-24006 ~]$ svnadmin load /svnroot/squirrel-sql < svndump [manningr@shell-24006 ~]$ adminrepo --save svn
And that is all there is to it (wasn't that easy!)