[RFC][merge] Patience Sorting Diffs

John Arbash Meinel john at arbash-meinel.com
Thu Dec 15 16:26:12 GMT 2005


Aaron Bentley wrote:
> John Arbash Meinel wrote:
> =
> | Try it again, I think I fixed the problem, and I added some asserts to
> | make sure things aren't broken.
> 
> I've got good news and bad news.  The good news is, on that test it no
> longer performs worse than the standard SequenceMatcher for that case.
> The bad news is, it performs exactly the same.  The conflicted files are
> ~ *exactly* the same.
> 
> So, I went and reproduced one of the worst conflicts I've had, the first
> merge of bzr.dev into bzr.repository, and there I did see a difference.
> ~ Not a huge one; it looks like patience is selecting slightly different,
> but equally valid conflict regions.

One other thing that you might try. In bzrlib/cdv/cdvdifflib.py change
_check_with_diff() so that it returns immediately (insert 'return' at
line 49).

That will turn off difflib interpolation in the middle. It means that:

A
foo
B
foo
C

Will never match

D
foo
E
foo
F

But that *might* be desirable, (Robert had a use case for it)
John
=:->

> 
> I'll email you some tarballs of all the relevent files, but this is the
> case where I thought patience would do better, and it's different, at
> least.
> 
> Aaron
> 
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 256 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20051215/cc228b55/attachment.pgp 


More information about the bazaar mailing list