Bug 938340 - Don't run critic hook on merges by default
authorGregory Szorc <gps@mozilla.com>
Wed, 13 Nov 2013 14:06:28 -0800
changeset 358616 8b54641e97b38a4664934a1d8c0f8e4e2be286cf
parent 358615 fbe6ce52975c31086bf2a2e272ea8c1c0d12a922
child 358617 b83cd4f9a9a283a29d77779e2e8f9c89a32ec77e
push id16998
push userrwood@mozilla.com
push dateMon, 02 May 2016 19:42:03 +0000
bugs938340
Bug 938340 - Don't run critic hook on merges by default
hgext/mozext/__init__.py
--- a/hgext/mozext/__init__.py
+++ b/hgext/mozext/__init__.py
@@ -672,16 +672,17 @@ def buginfo(ui, repo, *bugs, **opts):
 
     for ctx in contexts:
         print_changeset_pushes(ui, repo, ctx.rev(), all=opts['all'])
         ui.write('\n')
 
 
 def critic_hook(ui, repo, node=None, **opts):
     # By default, don't run hook on merges.
+    ctx = repo[node]
     if len(ctx.parents()) > 1 and not ui.configbool('mozext', 'critic_merges'):
         return 0
 
     critique(ui, repo, node=node, **opts)
     return 0
 
 
 def reject_repo_names_hook(ui, repo, namespace=None, key=None, old=None,