# HG changeset patch # User Pierre-Yves David # Date 1490951202 -7200 # Node ID 33504b54863e0d1f2cf444ec2e3c24289ab9aa15 # Parent 5678496659e9885b726a83f3bcf05de09d653779 hook: use 'htype' in 'hook' Same rational as for 'runhooks', we fix the naming in another function. diff -r 5678496659e9 -r 33504b54863e mercurial/hook.py --- a/mercurial/hook.py Fri Mar 31 11:03:23 2017 +0200 +++ b/mercurial/hook.py Fri Mar 31 11:06:42 2017 +0200 @@ -186,16 +186,16 @@ global _redirect _redirect = state -def hook(ui, repo, name, throw=False, **args): +def hook(ui, repo, htype, throw=False, **args): if not ui.callhooks: return False hooks = [] for hname, cmd in _allhooks(ui): - if hname.split('.')[0] == name and cmd: + if hname.split('.')[0] == htype and cmd: hooks.append((hname, cmd)) - res = runhooks(ui, repo, name, hooks, throw=throw, **args) + res = runhooks(ui, repo, htype, hooks, throw=throw, **args) r = False for hname, cmd in hooks: r = res[hname][0] or r