Show More
@@ -201,7 +201,7 b' def hook(ui, repo, name, throw=False, **' | |||||
201 | r = res[hname][0] or r |
|
201 | r = res[hname][0] or r | |
202 | return r |
|
202 | return r | |
203 |
|
203 | |||
204 |
def runhooks(ui, repo, |
|
204 | def runhooks(ui, repo, htype, hooks, throw=False, **args): | |
205 | res = {} |
|
205 | res = {} | |
206 | oldstdout = -1 |
|
206 | oldstdout = -1 | |
207 |
|
207 | |||
@@ -229,7 +229,8 b' def runhooks(ui, repo, name, hooks, thro' | |||||
229 | r = 1 |
|
229 | r = 1 | |
230 | raised = False |
|
230 | raised = False | |
231 | elif callable(cmd): |
|
231 | elif callable(cmd): | |
232 |
r, raised = _pythonhook(ui, repo, |
|
232 | r, raised = _pythonhook(ui, repo, htype, hname, cmd, args, | |
|
233 | throw) | |||
233 | elif cmd.startswith('python:'): |
|
234 | elif cmd.startswith('python:'): | |
234 | if cmd.count(':') >= 2: |
|
235 | if cmd.count(':') >= 2: | |
235 | path, cmd = cmd[7:].rsplit(':', 1) |
|
236 | path, cmd = cmd[7:].rsplit(':', 1) | |
@@ -244,7 +245,7 b' def runhooks(ui, repo, name, hooks, thro' | |||||
244 | hookfn = getattr(mod, cmd) |
|
245 | hookfn = getattr(mod, cmd) | |
245 | else: |
|
246 | else: | |
246 | hookfn = cmd[7:].strip() |
|
247 | hookfn = cmd[7:].strip() | |
247 |
r, raised = _pythonhook(ui, repo, |
|
248 | r, raised = _pythonhook(ui, repo, htype, hname, hookfn, args, | |
248 | throw) |
|
249 | throw) | |
249 | else: |
|
250 | else: | |
250 | r = _exthook(ui, repo, hname, cmd, args, throw) |
|
251 | r = _exthook(ui, repo, hname, cmd, args, throw) |
General Comments 0
You need to be logged in to leave comments.
Login now