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 81 6c1765567a66
parent 80 6cb7888ae4b0
child 82 e6ff03aa4f5f
push id58
push usergszorc@mozilla.com
push date2013-11-13 22:06 +0000
bugs938340
Bug 938340 - Don't run critic hook on merges by default
__init__.py
--- a/__init__.py
+++ b/__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,