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

Robert Bauck Hamar r.b.hamar at usit.uio.no
Fri Jul 24 09:32:00 CDT 2009


*Bruce Frederiksen:
>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.

The conversion would be done locally on your side anyways. I don't see how 
control over hg server should affect this.

>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
>property.

And before svn 1.5, one would use svnmerge.py, which stores this in 
svnmerge-integrated.

>I tried running "hg convert" but it doesn't track the svn merge info.

I know of no tool that can use the svn merge tracking into a DVCS. I 
believe the bazaar guys are working on this. Not sure about what the 
status of this is in any hg tool.

I anyone knows of a tool using svnmerge/svn:mergeinfo properties, please 
let me know.

>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?

You would probably have problems with merging, yes.

>I tried extracting the merge info manually into a splicemap file to record
>the 2 parents for the merges done on svn.
>
>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).
>
>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).

You should try the latest stable release of hg, and perhaps also the crew-tip.

Your options, as I can see:

* Convert first to hg, and then use hg to hg conversion to insert merge 
   csets. (See also hgsubversion for svn to hg)
* Assert all the branches has everything from trunk before convertion, 
   and then insert merges in hg with internal:local 
   (http://mercurial.selenic.com/wiki/TipsAndTricks#Keep_.22My.22_or_.22Their.22_files_when_doing_a_merge).
   This will loose earlier merge points for the branches, but that might 
   not be a problem.
* Work with the svn server and hgsubversion or hgsvn.
* Continue using subversion

>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?

AFAIK, any version. At least any recent version. Stability of the 
protocol is an important issue for Mercurial.

-- 
Robert Bauck Hamar
USIT/SAPP/GT - Cerebrum
http://www.uio.no/sok?person=hamar
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://selenic.com/pipermail/mercurial/attachments/20090724/d3973140/attachment.pgp 


More information about the Mercurial mailing list