15 December 2011

srev-taming: Migrating Subversion to Git

After reading about Mediawiki's pending svn => git migration, it sounded very familiar to me, because I was proposing such a conversion at work about a year ago.

Mass svn => git migration tooling doesn't really exist in the way I wish.

The most popular tool is probably svn2git.  But even with all the conversion goodies baked into it, it's still based on git-svn.

Anything based on git-svn means that for an svn repo that has multiple projects in it, you have to take N passes over the repository, which is a huge hit for repos in the 20,000+ commit range.

The most performant conversion tool is svn-fe, but it doesn't do much more than just import at the repo boundary: 1 svn repo => 1 git repo.  And it doesn't even begin to deal with the situation of multiple svn histories as we have migrated from one repo to another.

The closest thing that exists is a set of scripts posted as part of this thread.

Here is a rough cut of a project I wish existed:

"srev-taming" ~~ "svn-migrate"
(anagram, in the spirit of "snerp-vortex" ~~ "svn-exporter")
  • scan of SVN dump for projects & codelines => annotated projects & branches list
  • easy invocation of svn-fe for mass-import => generate me a command-line
  • editable auto-detected project tags & codelines => language that easily expresses projects, codelines & grafts
  • easy clone/filter-branch invocation to extract & stitch codelines together (based on projects & branches list and configured grafts)
  • post-import filter for author fixup, SVN & migration artifact removal => generation of starting author list & svn URL minifier
Unless I get explicitly assigned to do the migration, I guess it's not going to prioritize high enough for me to do anything about it.  At least svn-fe is being maintained and enhanced.

But I'm posting it here to see if anything exists that I don't know about -- or in case it sparks some ideas for someone to create this thing.

No comments:

Post a Comment