Convert SVN-Repo directly to git or hg (no dump-files needed)
Origo, where I'm hosting my open-source software up to now, is closing end of this month. So I need to move these projects somewhere else. I take the chance for migrating the subversion repositories to git. Here is how.
Here is an example of a simple conversion of a simple repository:
PROJECT=ssl-audit svnrepo=https://svn.origo.ethz.ch/$PROJECT gitrepo=/tmp/$PROJECT-git cd /tmp repopuller $svnrepo reposurgeon <<EOF read /tmp/$PROJECT-mirror prefer git edit references lift rebuild $gitrepo EOF
Recommended Cleanup Actions
I recommend doing at least these cleanup action (within reposurgeon) when converting a repo:
Add an authormap to get nice author names.
Clean up the most uggly commit messages. (Do not wast too much time for this. I did, when converting PyInstallers repo, and the results are nor worth the effort.)
Lift references (e.g. revision numbers to a time-stamp)
I recommend reading at least these sections in the man-page `reposurgeon.1`:
Working with Subversion
For more insights you may want to read Erics DVCS Migration Guide and have a look at my work done for the PyInstaller repo-conversion. You may also want to read my comments about why I'm now preferring git over mercurial.
[Edit 2014-03-31: Fix typo in script, use repopuller]