pure python 3-way merge

Martin Pool mbp at sourcefrog.net
Wed Jul 6 01:49:15 BST 2005


On  5 Jul 2005, John A Meinel <john at arbash-meinel.com> wrote:
> Martin Pool wrote:
> 
> >My bzr tree now has some code in bzrlib.merge3 to do a 3-way text
> >merge in pure Python.  I think(?) this might remove the main external
> >dependency, aside from patch for importing changesets, which I hope we
> >can also fix.  I think it works.  Comments or bug reports are welcome.
> >
> >
> >
> BUG!! In python2.3 merge3.py currently does not write out lines if MINE
> has a tail.

Well done!  To be honest I hadn't tested at all under 2.3.  Truly is
it written that untested code is broken code.

The difference is in how StopIteration interacts with generators in
find_sync_regions.  A simple fix is to stop the loop when that happens
but there might be a better way.

-- 
Martin




More information about the bazaar mailing list