mercurial/hook.py
branchstable
changeset 17048 15d4d475de9e
parent 15896 30c34fde40cc
child 17217 1b2b727a885f
--- a/mercurial/hook.py	Thu Jun 28 18:39:16 2012 +0200
+++ b/mercurial/hook.py	Sat Jun 23 19:57:07 2012 +0300
@@ -138,6 +138,9 @@
     _redirect = state
 
 def hook(ui, repo, name, throw=False, **args):
+    if not ui.callhooks:
+        return False
+
     r = False
 
     oldstdout = -1