##// END OF EJS Templates
ui: add a variable to control whether hooks should be called...
Idan Kamara -
r17048:15d4d475 stable
parent child Browse files
Show More
@@ -138,6 +138,9 b' def redirect(state):'
138 _redirect = state
138 _redirect = state
139
139
140 def hook(ui, repo, name, throw=False, **args):
140 def hook(ui, repo, name, throw=False, **args):
141 if not ui.callhooks:
142 return False
143
141 r = False
144 r = False
142
145
143 oldstdout = -1
146 oldstdout = -1
@@ -19,6 +19,7 b' class ui(object):'
19 self._ucfg = config.config() # untrusted
19 self._ucfg = config.config() # untrusted
20 self._trustusers = set()
20 self._trustusers = set()
21 self._trustgroups = set()
21 self._trustgroups = set()
22 self.callhooks = True
22
23
23 if src:
24 if src:
24 self.fout = src.fout
25 self.fout = src.fout
@@ -31,6 +32,7 b' class ui(object):'
31 self._trustusers = src._trustusers.copy()
32 self._trustusers = src._trustusers.copy()
32 self._trustgroups = src._trustgroups.copy()
33 self._trustgroups = src._trustgroups.copy()
33 self.environ = src.environ
34 self.environ = src.environ
35 self.callhooks = src.callhooks
34 self.fixconfig()
36 self.fixconfig()
35 else:
37 else:
36 self.fout = sys.stdout
38 self.fout = sys.stdout
General Comments 0
You need to be logged in to leave comments. Login now