Converting dropbear to mercurial.

Matt Johnston matt at ucc.asn.au
Mon Nov 28 21:20:11 WST 2011


Hi,

In your converted repository did it end up with a "demos"
directory and "changes" file in the top level of the tip of
au.asn.ucc.matt.dropbear branch? That indicates that the
conversion didn't work correctly.

I ended up converting my repository with the attached patch
- there isn't too much rename history that I care about, so
it purely looks at manifests revision-by-revision.

The converted repository now lives at
https://secure.ucc.asn.au/hg/dropbear/

Thanks,
Matt

On Mon, Nov 21, 2011 at 09:01:03AM -0600, Augie Fackler wrote:
> I just got a chance to take a look at this, and the cut down repo you provided converted without a hitch. Should I try it on the full-size repository? I don't see any obviously related changesets in hgext.convert's recent history.
> 
> 
> On Sep 11, 2011, at 8:48 AM, Matt Johnston wrote:
> 
> > On Sat, Sep 10, 2011 at 10:07:49PM -0500, Augie Fackler wrote:
> >>> Have you tried http://mercurial.selenic.com/wiki/ConvertExtension ?
> >>> 
> >>> I don't know the state of monotone support in mercurial, but I've never
> >>> used monotone, so...
> >> 
> >> Convert should work. If not, feel encouraged to give me the right mtn spell to get a clone of your mtn and I'll gladly poke it to see what's wrong.
> > 
> > The monotone converter gets confused by me doing 
> > rename "" -> "libtomcrypt" on one side of the merge in
> > revision fdf4a7a3b97ae5046139915de7e40399cceb2c01. That
> > happens via monotone's "merge_into_dir" command - I moved
> > the root directory of the ...ltc.dropbear  branch into a
> > subdirectory of the main dropbear branch.
> > 
> > The end result is that an old version of "changes" appears
> > in the toplevel directory of au.asn.ucc.matt.dropbear
> > branch, as well as the correct version at
> > "libtomcrypt/changes". (The same happens for various other
> > files there too).
> > 
> > Looking at the code in montone.py's getchanges() I can't see
> > how it would work correctly. It's iterating over all
> > renames/adds/deletes, but in a merge each operation will be
> > relative a particular parent revision denoted by the
> > "old_revision" lines.  See
> > http://matt.ucc.asn.au/dropbear/test/fdf4a7a-merge_into_dir.txt
> > for the Monotone revision (from "mtn automate
> > get_revision").
> > 
> > I've tried a few different tweaks but none seemed to 
> > improve things. Unfortunately a simple synthetic testcase
> > doesn't hit the same problem either :(
> > I might try making a simpler getchanges() version that
> > ignores renames and just uses mtn automate's get_manifest_of
> > to figure out the files - my repository I can live without
> > rename/copy tracking.
> > 
> > If you want to look at it I also needed the following for
> > the empty fromdir case to avoid paths with a leading slash.
> > 
> > if fromdir == "":
> >    renamed[tofile] = fromdir + tofile[len(todir)+1:]
> > else:
> >    renamed[tofile] = fromdir + tofile[len(todir):]
> > 
> > I also had to comment out the mercurial_source in convcmd.py
> > - otherwise it would abort before the monotone source was
> > tried. I'll report that one as a separate bug, I assume it
> > would affect any converter below mercurial_source.
> > 
> > I've put a cut down repository at
> > http://matt.ucc.asn.au/dropbear/test/small-dropbear.mtn
> > 
> > Cheers,
> > Matt
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hg-monotone.py.diff
Type: text/x-diff
Size: 3285 bytes
Desc: not available
Url : http://lists.ucc.gu.uwa.edu.au/pipermail/dropbear/attachments/20111128/250ad382/attachment.diff 


More information about the Dropbear mailing list