diff mercurial/subrepo.py @ 30640:a150173da1c1

py3: replace os.environ with encoding.environ (part 2 of 5)
author Pulkit Goyal <7895pulkit@gmail.com>
date Sun, 18 Dec 2016 01:46:39 +0530
parents bb77654dc7ae
children d524c88511a7
line wrap: on
line diff
--- a/mercurial/subrepo.py	Sun Dec 18 01:34:41 2016 +0530
+++ b/mercurial/subrepo.py	Sun Dec 18 01:46:39 2016 +0530
@@ -24,6 +24,7 @@
 from . import (
     cmdutil,
     config,
+    encoding,
     error,
     exchange,
     filemerge,
@@ -1102,7 +1103,7 @@
             path = self.wvfs.reljoin(self._ctx.repo().origroot,
                                      self._path, filename)
             cmd.append(path)
-        env = dict(os.environ)
+        env = dict(encoding.environ)
         # Avoid localized output, preserve current locale for everything else.
         lc_all = env.get('LC_ALL')
         if lc_all:
@@ -1398,7 +1399,7 @@
         """
         self.ui.debug('%s: git %s\n' % (self._relpath, ' '.join(commands)))
         if env is None:
-            env = os.environ.copy()
+            env = encoding.environ.copy()
         # disable localization for Git output (issue5176)
         env['LC_ALL'] = 'C'
         # fix for Git CVE-2015-7545
@@ -1633,7 +1634,7 @@
         if self._gitmissing():
             raise error.Abort(_("subrepo %s is missing") % self._relpath)
         cmd = ['commit', '-a', '-m', text]
-        env = os.environ.copy()
+        env = encoding.environ.copy()
         if user:
             cmd += ['--author', user]
         if date: