diff mercurial/hook.py @ 31752:aff7b32b3c05

hook: add hook name information to external hook While we are here, we can also add the hook name information to external hook.
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
date Fri, 31 Mar 2017 11:53:56 +0200
parents 0fa30fbccc34
children 4b426ae96ff2
line wrap: on
line diff
--- a/mercurial/hook.py	Fri Mar 31 11:08:11 2017 +0200
+++ b/mercurial/hook.py	Fri Mar 31 11:53:56 2017 +0200
@@ -127,6 +127,7 @@
         if tr and tr.writepending():
             env['HG_PENDING'] = repo.root
     env['HG_HOOKTYPE'] = htype
+    env['HG_HOOKNAME'] = name
 
     for k, v in args.iteritems():
         if callable(v):