One case where patience diff does much better
John Arbash Meinel
john at arbash-meinel.com
Fri Dec 16 22:18:32 GMT 2005
Well, I have found a case where Patience diff does what I consider to be
much better, and why I wanted to use it in the first place.
Attached is 2 versions of the same diff. It is my changes for
permissions to transport/__init__.py which changes some function signatures.
You an see that difflib seems to get confused about what is actually
changing. While patience diff recognizes that the function signature
changes, and some of the documentation.
If you look at the 'put()' changes, you can see that difflib gets
overzealous and chops off the bottom of put(), along with the start of
put_multi(), and then adds the end of put back in.
It might just be that difflib doesn't like 1 line changes, and is trying
to merge neighboring diffs together into larger diffs.
Patience diff, on the other hand, probably grabs onto the documentation
lines, since they didn't change, and are likely to be completely unique
inside the file.
It is possible to reweave a particular branch, just by doing "bzr push
../new-branch"
Just because the push code doesn't copy anything, but regenerates each
revision (it is expecting to only have a few revisions to push).
Now, if I just had a more complete set of possible diff cases, so that I
could see where patience diff is worse than difflib.
I did do a complete upgrade of an old bzr (format4) branch. Which is a
pretty big conversion test.
John
=:->
-------------- next part --------------
A non-text attachment was scrubbed...
Name: difflib.diff
Type: text/x-patch
Size: 2928 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20051216/03aaea3d/attachment.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patience.diff
Type: text/x-patch
Size: 2876 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20051216/03aaea3d/attachment-0001.bin
-------------- 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/20051216/03aaea3d/attachment.pgp
More information about the bazaar
mailing list