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

Pierre-Yves David pierre-yves.david at ens-lyon.org
Tue Mar 8 07:13:02 EST 2016



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.

-- 
Pierre-Yves David


More information about the Mercurial-devel mailing list