[RFC][merge] Patience Sorting Diffs

Aaron Bentley aaron.bentley at utoronto.ca
Wed Dec 14 01:47:38 GMT 2005


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

John Arbash Meinel wrote:
| Any chance you can come up with a test case. I'll try to visually
| inspect how a negative range could exist, but being able to trace
| something around would be nice.

Here's a non-minimal test case.  You can run merge3 directly on it by
changing the imports in merge3 to relative imports, then doing

python merge3.py builtins.py.THIS builtins.py.BASE builtins.py.OTHER

The problem appears to be that the merge regions are not all in the same
order for every file.  I am not certain whether the Python
SequenceMatcher can produce this kind of output.  If it can, the bug's
in Merge3.

I dumped the merge regions, and lookee here:

(223, 224, 223, 224, 237, 238)
(226, 227, 226, 227, 225, 226)

Depending on how you sort, either THIS or OTHER is out-of-order.

Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDn3m50F+nu1YWqI0RApuUAJ9CuoCDMkhB1T5OFGmPMotSQ45Y6wCeNEiJ
9281fmxm6szgTElw4xIclfI=
=q7Pk
-----END PGP SIGNATURE-----
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: builtins.py.BASE
Url: https://lists.ubuntu.com/archives/bazaar/attachments/20051213/6b0881f7/attachment.diff 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: builtins.py.OTHER
Url: https://lists.ubuntu.com/archives/bazaar/attachments/20051213/6b0881f7/attachment-0001.diff 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: builtins.py.THIS
Url: https://lists.ubuntu.com/archives/bazaar/attachments/20051213/6b0881f7/attachment-0002.diff 


More information about the bazaar mailing list