[MERGE] Patience diff
Aaron Bentley
aaron.bentley at utoronto.ca
Tue May 23 15:13:10 BST 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
John A Meinel wrote:
> PEP8. Also, Bram seemed to like running self tests every time the module
> was imported. Which are what all these asserts are for.
> They should be fast, so I'm okay with keeping them, but I did add them
> to selftest, so it would be safe to get rid of them.
I think we should take them out, to be consistent with bzr style. We're
pretty clearly taking ownership of this code.
> Did you re-run the tests with the new patience-test.py? I'm guessing it
> still worked, but just thought I would check.
Yes, I did.
> + chk_blocks('abcdefghijklmnop'
> + , 'abcXghiYZQRSTUVWXYZijklmnop'
> + , [(0, 0, 3), (6, 4, 3), (9, 20, 7)])
> +
> + chk_blocks('ABCd efghIjk L'
> + , 'AxyzBCn mo pqrstuvwI1 2 L'
> + , [(0,0,1), (1, 4, 2), (4, 7, 1), (9, 19, 1), (12, 23,
> 3)])
> +
>
> Is this the best way to write it? Basically, I needed a multi-line code
> snippet, that I could do diff with, and make sure it gave a reasonable
> answer. (It also highlights the difference between difflib and
> patiencediff).
It looks okay, except that there shouldn't be leading commas; those
should be on the previous line.
> I suppose we could move the static text out of the function and into the
> module scope, it may make it look a little cleaner. I don't really know
> what the 'best' thing here is.
I might do that for the bigger chunks. Actually, I might rot13 the
example taken from bzr source code, because it's hella confusing to see
python function definitions as strings.
> Other than the few things, I think its just about ready to be merged. So
> +1 from me after they are handled.
Thanks. Submitted.
Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFEcxh10F+nu1YWqI0RAhgFAJ9NhWnoyRTJwUBbnBC5VKaGBQEQKgCggHNn
54jG3q6XrPK2SEs3QrbLrF4=
=/ozt
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list