Mercurial > public > mercurial-scm > hg
comparison mercurial/hook.py @ 31743:f610c3220eec
hook: fix name used in untrusted message
The name used in the message we issue when a hook is untrusted was using "name"
which is actually the hook type and not the name of the hook.
author | Pierre-Yves David <pierre-yves.david@ens-lyon.org> |
---|---|
date | Fri, 31 Mar 2017 11:02:05 +0200 |
parents | f243b7fbeba5 |
children | 5678496659e9 |
comparison
equal
deleted
inserted
replaced
31742:f243b7fbeba5 | 31743:f610c3220eec |
---|---|
221 pass | 221 pass |
222 | 222 |
223 if cmd is _fromuntrusted: | 223 if cmd is _fromuntrusted: |
224 if throw: | 224 if throw: |
225 raise error.HookAbort( | 225 raise error.HookAbort( |
226 _('untrusted hook %s not executed') % name, | 226 _('untrusted hook %s not executed') % hname, |
227 hint = _("see 'hg help config.trusted'")) | 227 hint = _("see 'hg help config.trusted'")) |
228 ui.warn(_('warning: untrusted hook %s not executed\n') % name) | 228 ui.warn(_('warning: untrusted hook %s not executed\n') % hname) |
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, name, hname, cmd, args, throw) | 232 r, raised = _pythonhook(ui, repo, name, hname, cmd, args, throw) |
233 elif cmd.startswith('python:'): | 233 elif cmd.startswith('python:'): |