Problem Converting from Subversion to Mercurial
Greg Ward
greg at gerg.ca
Sat Sep 1 21:20:51 UTC 2012
On 22 August 2012, Todd Greer said:
> I'm having a bit of difficulty with a conversion from a particular
> Subversion repository, and I would be very grateful if anyone could
> offer some useful advice.
>
> The svn repo in question has several different projects, and used a
> somewhat nonstandard layout. Each project had it's own "trunk" and
> "branches" (though the latter mostly stores what the team considers
> tags). Every time they started development towards a new release, they
> copied the trunk of every relevant project to a new directory, and
> created a new "branches" directory next to it. I'll illustrate:
Mercurial's svn conversion assumes the standard /trunk, /branches,
/tags layout. Diverge from that and results are ... ummm ...
undefined.
As a quick hack, you could just modify hgext/convert/subversion.py and
change it to have a hardcoded assumption of *your* svn repository's
layout. If you get ambitious, refactor it so other users can specify
source svn layouts more flexibly ("project trunk is here, branches are
there") and send in a patch!
Greg
More information about the Mercurial
mailing list