[PATCH] py3: use encoding.environ instead of os.environ

Pulkit Goyal 7895pulkit at gmail.com
Sun Oct 9 11:20:09 UTC 2016


# HG changeset patch
# User Pulkit Goyal <7895pulkit at gmail.com>
# Date 1476009430 -7200
#      Sun Oct 09 12:37:10 2016 +0200
# Node ID 3ce847adae982625abac548017e43da189eb5e71
# Parent  74cd33c9be76c11ba42ba5f2448dcf90419866ba
py3: use encoding.environ instead of os.environ

This complains while running hg version on Python 3.5

diff -r 74cd33c9be76 -r 3ce847adae98 mercurial/scmutil.py
--- a/mercurial/scmutil.py	Sat Oct 08 22:44:02 2016 +0200
+++ b/mercurial/scmutil.py	Sun Oct 09 12:37:10 2016 +0200
@@ -753,7 +753,7 @@
     if no HGRCPATH, use default os-specific path.'''
     global _rcpath
     if _rcpath is None:
-        if 'HGRCPATH' in os.environ:
+        if 'HGRCPATH' in encoding.environ:
             _rcpath = []
             for p in os.environ['HGRCPATH'].split(os.pathsep):
                 if not p:


More information about the Mercurial-devel mailing list