Mercurial > public > mercurial-scm > hg-stable
diff mercurial/help/config.txt @ 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 | 806f9a883b4f |
line wrap: on
line diff
--- a/mercurial/help/config.txt Fri Mar 31 11:08:11 2017 +0200 +++ b/mercurial/help/config.txt Fri Mar 31 11:53:56 2017 +0200 @@ -844,9 +844,10 @@ Most hooks are run with environment variables set that give useful additional information. For each hook below, the environment variables it is passed are listed with names of the form ``$HG_foo``. The -``$HG_HOOKTYPE`` variable is set for all hooks. It contains the type of -hook which triggered the run. In the example about this will be -``$HG_HOOKTYPE=incoming``. +``$HG_HOOKTYPE`` and ``$HG_HOOKNAME`` variables are set for all hooks. +their respectively contains the type of hook which triggered the run and +the full name of the hooks in the config. In the example about this will +be ``$HG_HOOKTYPE=incoming`` and ``$HG_HOOKNAME=incoming.email``. ``changegroup`` Run after a changegroup has been added via push, pull or unbundle. ID of the