diff mercurial/hook.py @ 17052:15d4d475de9e stable

ui: add a variable to control whether hooks should be called So hooks can be temporarily disabled.
author Idan Kamara <idankk86@gmail.com>
date Sat, 23 Jun 2012 19:57:07 +0300
parents 30c34fde40cc
children 1b2b727a885f
line wrap: on
line diff
--- a/mercurial/hook.py
+++ b/mercurial/hook.py
@@ -138,6 +138,9 @@
     _redirect = state
 
 def hook(ui, repo, name, throw=False, **args):
+    if not ui.callhooks:
+        return False
+
     r = False
 
     oldstdout = -1