Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Journal of nicholas (3034)

Thursday April 01, 2010
09:14 AM

svn to mercurial?

[ #40285 ]

Dear lazyweb...

We're using Trac at work. It's made of software, but some software is more equal than others. In particular, we're planning to move from subversion to mercurial, because Trac seems to work nicely (enough)* with mercurial, unlike git.

So, what's the best way to convert a 20000 revision svn repository to mercurial? We have branches, which it would be nice to convert to real branches. I have some idea how to do this for svn to git, including branches and tags, but not for mercurial.

* svn vs. Trac - which sucks more? The ultimate cagematch.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • Have you tried []? It looks like the initial import will be slow, but it seems to be getting top billing from the Mercurial maintainers.
    • Admittedly this is only from reading its fine manual, but it looks more like git svn than a "proper" importer. i.e. it concentrates on bidirectional tracking of one remote branch in a subversion repository, not on untangling the "branches are branches and tags are branches too*" mess that a subversion repository can get into, not on converting them all to first class tags and first class branches.

      * but really they're all just copies within a directory tree.

      • That doesn't look like a proper importer because that's not the proper importer; this is: []

        You basically just do

        $ hg convert

        in whatever repository you are converting from, but there are lots of options including some svn-specific features. I think it also remembers what it's converted so a subsequent convert picks up where it left off. I've never used it with Subversion, but I once converted the Perl git repository this way and it worked fine.
  • I can't answer your question directly, but I know that my Snerp Vortex is designed to support more than just git.

    Someone with Mercurial chops could write SVN::Dump::Replayer::Mercural, and then snerp would support --replayer=mercurial