--- a/mercurial/hook.py Fri Mar 31 11:02:05 2017 +0200
+++ b/mercurial/hook.py Fri Mar 31 11:03:23 2017 +0200
@@ -201,7 +201,7 @@
r = res[hname][0] or r
return r
-def runhooks(ui, repo, name, hooks, throw=False, **args):
+def runhooks(ui, repo, htype, hooks, throw=False, **args):
res = {}
oldstdout = -1
@@ -229,7 +229,8 @@
r = 1
raised = False
elif callable(cmd):
- r, raised = _pythonhook(ui, repo, name, hname, cmd, args, throw)
+ r, raised = _pythonhook(ui, repo, htype, hname, cmd, args,
+ throw)
elif cmd.startswith('python:'):
if cmd.count(':') >= 2:
path, cmd = cmd[7:].rsplit(':', 1)
@@ -244,7 +245,7 @@
hookfn = getattr(mod, cmd)
else:
hookfn = cmd[7:].strip()
- r, raised = _pythonhook(ui, repo, name, hname, hookfn, args,
+ r, raised = _pythonhook(ui, repo, htype, hname, hookfn, args,
throw)
else:
r = _exthook(ui, repo, hname, cmd, args, throw)