[PATCH] changelog: only use filtering headrevs C extension when it is available

Siddharth Agarwal sid at less-broken.com
Thu Oct 23 20:59:33 CDT 2014


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 leave
> 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
> introduced.

For layering reasons, the plan post 3.2 is to move asciilower out of 
parsers.so and into base85.so.


More information about the Mercurial-devel mailing list