Problems converting svn repo to hg (hg convert with splicemap)
dangyogi at gmail.com
Sat Jul 25 11:17:59 CDT 2009
On Thu, Jul 23, 2009 at 9:34 AM, Bruce Frederiksen <dangyogi at gmail.com>wrote:
> 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.
> 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).
Well, I tried reversing the order of the two parents for each merge in the
splicemap, and this seems to fix the problem of the missing file!
So the correct order is to put the parent from the same branch first, and
the parent that was merged in from the other branch second. For example:
svn:[...]/trunk at 200 svn:[...]/trunk at 196,svn:[...]/branches/release_1.0 at 199
to show that rev 199 from the release_1.0 branch was merged into trunk rev
196, producing trunk rev 200.
This should be documented somewhere! The most obvious place would be in 'hg
BTW, --datesort is still required.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Mercurial