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

Jun Wu quark at fb.com
Mon Feb 29 09:20:50 EST 2016


I have been getting "ERROR: test-check-commit.t output changed" for a
while and traced back to this.

--- test-hook.t
+++ test-hook.t.err
@@ -536,7 +536,7 @@
    exception from first failed import attempt:
    Traceback (most recent call last):

-      ^
+     ^
    SyntaxError: invalid syntax
    exception from second failed import attempt:
    Traceback (most recent call last):


It seems that the patch in the email is correct while the version in
clowncopter is wrong. Added '$' to the end of line to clarify:

Email:

+      $
+     ^$

hg export b892e424f88c

+      $
+      ^$

On 02/13/2016 03:54 PM, Pierre-Yves David wrote:
>
>
> On 02/12/2016 10:53 PM, Siddharth Agarwal wrote:
>> # HG changeset patch
>> # User Siddharth Agarwal <sid0 at fb.com>
>> # Date 1455317410 28800
>> #      Fri Feb 12 14:50:10 2016 -0800
>> # Node ID d046c71f86718d41b9c5e9f601ca0f0d87606239
>> # Parent  c9fcff42975be8331c4e10add62d3bca983d155e
>> # Available At
>> https://urldefense.proofpoint.com/v2/url?u=http-3A__42.netv6.net_sid0-2Dwip_hg_&d=CwIGaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=goC_KEU1hoLmVFdaD4QgHA&m=2roKYcRlftufTeEFQJ2pReGriNxoZamITzBBTUtsYy0&s=aXhfCjZ8MgH5H5LclBIo1bpX7xBJjVqx7LLHbVLumg0&e=
>> #              hg pull
>> https://urldefense.proofpoint.com/v2/url?u=http-3A__42.netv6.net_sid0-2Dwip_hg_&d=CwIGaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=goC_KEU1hoLmVFdaD4QgHA&m=2roKYcRlftufTeEFQJ2pReGriNxoZamITzBBTUtsYy0&s=aXhfCjZ8MgH5H5LclBIo1bpX7xBJjVqx7LLHbVLumg0&e=
>> -r d046c71f8671
>> hook: don't crash on syntax errors in python hooks
>
> Pushed to the clowncopter. Thanks.
>
> (thanks for the pull url)
>


More information about the Mercurial-devel mailing list