Problems converting svn repo to hg (hg convert with splicemap)

Bruce Frederiksen dangyogi at
Thu Jul 23 08:34:59 CDT 2009

I tried converting an svn repo to hg and am hitting problems.

What I want is to do a one time conversion from svn to hg and then abandon
the svn repo.  These repos live on sourceforge, so I have little control
over the hg server.

I have 3 branches under svn in addition to trunk.  I do regular merges
between these branches and trunk, which svn now tracks in the svn:mergeinfo

I tried running "hg convert" but it doesn't track the svn merge info.  So
every changeset only has one parent.  I'm new to hg, but I'm pretty sure
that taking this hg repo and trying to continue doing merges between the
branches won't work because hg doesn't know what the common parent is.  Is
this correct?

I tried extracting the merge info manually into a splicemap file to record
the 2 parents for the merges done on svn.  This requires that I use the
--datesort option, otherwise not all of the svn parents have been converted
when the child is converted.  (I've reported this as a bug).

I get an hg repo with somewhat fewer revisions.  A quick glance at the graph
looks OK now.

Next, I find that files are missing on one of my branches.  Looking at the
history in hg, the file is added and present under one rev (the rev where it
was added under svn), but then disappears in the next rev (which was an svn
merge rev, where I've recorded multiple parents in the splicemap).

I don't know with the splicemap, whether the order of the two parents is
important somehow?  (If so, this isn't documented).

So I'm at the point now where I'm running out of time.  Can this be made to
work, or should I stick with svn until hg matures a little more?  (I'm
running version 1.1.2 of hg).

And, while I'm at it, one more question.  What hg client versions are
supported by the various versions of hg running on the shared server that
this client needs to interoperate with?  Restated: if the hg server is
running version 1.1.2 (sourceforge), what local versions of the hg client
may I safely run against that server?

Thanks in advance!

-------------- next part --------------
An HTML attachment was scrubbed...

More information about the Mercurial mailing list