[PATCH] changelog: only use filtering headrevs C extension when it is available
pierre-yves.david at ens-lyon.org
Sun Oct 26 05:58:32 CDT 2014
On 10/25/2014 01:23 AM, Siddharth Agarwal wrote:
> On 10/23/2014 05:39 PM, Mads Kiilerich wrote:
>> # HG changeset patch
>> # User Mads Kiilerich <madski at unity3d.com>
>> # Date 1414111164 -7200
>> # Fri Oct 24 02:39:24 2014 +0200
>> # Branch stable
>> # Node ID c631a5ff9815a692b8b816bdbb71cd7adb60ded4
>> # Parent eb763217152ab2b472416bcc57722451c317f282
>> changelog: only use filtering headrevs C extension when it is available
>> 2b5940f64750 promised backwards compatibility with old C extensions
>> that didn't
>> have the new filtering headrevs implementation. It did that by catching
>> TypeError to catch:
>> TypeError: headrevs() takes no arguments (1 given)
>> TypeError can however also be thrown for other reasons, and
>> 5715c93cb854 on
>> Python 2.4 showed that such Type errors shouldn't be ignored. They can
>> the system in an inconsistent state that cause wrong behaviour.
>> Instead, don't catch TypeErrors, but check that the C extension has the
>> asciilower function that was introduced after filtering headrevs was
> So as I said earlier, asciilower is scheduled to move out of parsers,
> therefore it isn't a reliable indicator of 'are these C bindings too old'.
> I'd rather rename the headrevs function.
Unfortunatly, I think Siddharth is right on this.
More information about the Mercurial-devel