[MERGE] (0.17) reworked LogFormatter API

John Arbash Meinel john at arbash-meinel.com
Thu May 24 13:36:31 BST 2007


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

Andrew Bennetts wrote:
> Kent Gibson wrote:
> [...]
>>> -    if show_merge is not None and show_merge_revno is None:
>>> +    legacy_lf = not getattr(lf, 'log_revision', None)
>>>
>>> I would also probably do this as:
>>>
>>> legacy_lf = getattr(...) is not None
>>>
>> I hope you mean:
>>
>> legacy_lf = getattr() is None
>>
>> And I prefer my way anyway - I think it reads better.
> 
> The fact that John misread it your way suggests it doesn't read very well ;)
> 
> FWIW, I also find "getattr(lf, 'log_revision', None) is None" over "not ..." to
> be slightly clearer.  Negations tend to be confusing for humans.
> 
> -Andrew.

By the way, there are some "pull --verbose" tests which now fail,
because they are using the old api. I'll try to go through and clean
them up.

This probably only failed on the PQM because we run with -Werror to make
sure we don't have any commands using deprecated apis.

You can do the same check by running 'make check'. Though it means
running the whole test suite 3 times. (once normal, once with
LANG=ASCII, and once with python -O)

John
=:->

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGVYbPJdeBCYSNAAMRAskgAJ0T5tBgWcOLfglFAi7sbbSe5SsgEgCfXgvm
tlwdBn5DRFZiIqItmsPuRAw=
=ix0X
-----END PGP SIGNATURE-----



More information about the bazaar mailing list