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

Martijn Pieters mj at zopatista.com
Fri Mar 4 15:04:14 UTC 2016


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.

-- 
Martijn Pieters


More information about the Mercurial-devel mailing list