[PATCH 4 of 4] hook: don't crash on syntax errors in python hooks

Siddharth Agarwal sid at less-broken.com
Wed Mar 9 19:18:09 EST 2016


On 3/8/16 04:13, Pierre-Yves David wrote:
>
>
> On 03/04/2016 04:04 PM, Martijn Pieters wrote:
>> On 29 February 2016 at 16:19, Yuya Nishihara <yuya at tcha.org> wrote:
>>> Perhaps it depends on Python versions where the syntax error is 
>>> detected.
>>
>> Looks like it. I get the test failure when using Python 2.6, not with
>> Python 2.7.
>>
>> And that's surprising, because a plain test file with `(foo` on a line
>> gives the exact same syntax error output in 2.6 or 2.7. So this is may
>> be an issue with the `traceback` module in 2.6.
>>
>> Perhaps a different syntax error can be devised that doesn't exhibit 
>> this issue.
>
> We should probably just (glob) it.
>

Just sent a patch filtering this out.



More information about the Mercurial-devel mailing list