hgext/logtoprocess.py
changeset 30638 1c5cbf28f007
parent 30332 318a24b52eeb
child 31601 8e7feaad2d8d
--- a/hgext/logtoprocess.py	Sun Dec 18 02:06:00 2016 +0530
+++ b/hgext/logtoprocess.py	Sun Dec 18 02:08:59 2016 +0530
@@ -40,6 +40,8 @@
 import subprocess
 import sys
 
+from mercurial import encoding
+
 # Note for extension authors: ONLY specify testedwith = 'ships-with-hg-core' for
 # extensions which SHIP WITH MERCURIAL. Non-mainline extensions should
 # be specifying the version(s) of Mercurial they are tested with, or
@@ -117,7 +119,7 @@
                 optpairs = (
                     ('OPT_{0}'.format(key.upper()), str(value))
                     for key, value in opts.iteritems())
-                env = dict(itertools.chain(os.environ.items(),
+                env = dict(itertools.chain(encoding.environ.items(),
                                            msgpairs, optpairs),
                            EVENT=event, HGPID=str(os.getpid()))
                 # Connect stdin to /dev/null to prevent child processes messing