diff mercurial/hook.py @ 31748: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
line wrap: on
line diff
--- a/mercurial/hook.py	Fri Mar 31 10:59:37 2017 +0200
+++ b/mercurial/hook.py	Fri Mar 31 11:02:05 2017 +0200
@@ -223,9 +223,9 @@
             if cmd is _fromuntrusted:
                 if throw:
                     raise error.HookAbort(
-                        _('untrusted hook %s not executed') % name,
+                        _('untrusted hook %s not executed') % hname,
                         hint = _("see 'hg help config.trusted'"))
-                ui.warn(_('warning: untrusted hook %s not executed\n') % name)
+                ui.warn(_('warning: untrusted hook %s not executed\n') % hname)
                 r = 1
                 raised = False
             elif callable(cmd):