changeset 39885:566cc633e637

logtoprocess: define $HG for children processes So they can compute the hg version for instance. Differential Revision: https://phab.mercurial-scm.org/D4768
author Valentin Gatien-Baron <vgatien-baron@janestreet.com>
date Wed, 26 Sep 2018 18:30:19 -0400
parents 9c8eff5cfa1b
children debc4ee597e7
files hgext/logtoprocess.py
diffstat 1 files changed, 1 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/logtoprocess.py	Wed Sep 26 22:21:25 2018 -0400
+++ b/hgext/logtoprocess.py	Wed Sep 26 18:30:19 2018 -0400
@@ -40,7 +40,6 @@
 import sys
 
 from mercurial import (
-    encoding,
     pycompat,
 )
 
@@ -128,7 +127,7 @@
                 optpairs = (
                     ('OPT_{0}'.format(key.upper()), str(value))
                     for key, value in opts.iteritems())
-                env = dict(itertools.chain(encoding.environ.items(),
+                env = dict(itertools.chain(procutil.shellenviron().items(),
                                            msgpairs, optpairs),
                            EVENT=event, HGPID=str(os.getpid()))
                 runshellcommand(script, env)