diff mercurial/help/config.txt @ 38484:e9e61fbac787

hooks: allow Unix style environment variables on external Windows hooks This will help making common hooks between Windows and non-Windows platforms. Having to build the shellenviron dict here and in procutil.system() is a bit unfortunate, but the only other option is to fix up the command inside procutil.system(). It seems more important that the note about the hook being run reflects what is actually run. The patch from last summer added the hooks on the command line, but it looks like HG_ARGS has since learned about --config args, and the output was just confusing. Therefore, it's now loaded from a file in the histedit test for clarity.
author Matt Harbison <matt_harbison@yahoo.com>
date Sun, 02 Jul 2017 00:32:09 -0400
parents 15a1e37f80bd
children be441eb65f09
line wrap: on
line diff
--- a/mercurial/help/config.txt	Sun Jun 24 01:13:09 2018 -0400
+++ b/mercurial/help/config.txt	Sun Jul 02 00:32:09 2017 -0400
@@ -886,6 +886,12 @@
 of the hook in the config, respectively. In the example above, this will
 be ``$HG_HOOKTYPE=incoming`` and ``$HG_HOOKNAME=incoming.email``.
 
+.. container:: windows
+
+  Some basic Unix syntax is supported for portability, including ``$VAR``
+  and ``${VAR}`` style variables.  To use a literal ``$``, it must be
+  escaped with a back slash or inside of a strong quote.
+
 ``changegroup``
   Run after a changegroup has been added via push, pull or unbundle.  The ID of
   the first new changeset is in ``$HG_NODE`` and last is in ``$HG_NODE_LAST``.