mercurial/scmwindows.py
changeset 30642 344e68882cd3
parent 30617 d623cc6b3742
child 32078 bf5e13e38390
--- a/mercurial/scmwindows.py	Sun Dec 18 01:54:36 2016 +0530
+++ b/mercurial/scmwindows.py	Sun Dec 18 02:06:00 2016 +0530
@@ -3,6 +3,7 @@
 import os
 
 from . import (
+    encoding,
     osutil,
     pycompat,
     util,
@@ -48,7 +49,7 @@
     home = os.path.expanduser('~')
     path = [os.path.join(home, 'mercurial.ini'),
             os.path.join(home, '.hgrc')]
-    userprofile = os.environ.get('USERPROFILE')
+    userprofile = encoding.environ.get('USERPROFILE')
     if userprofile and userprofile != home:
         path.append(os.path.join(userprofile, 'mercurial.ini'))
         path.append(os.path.join(userprofile, '.hgrc'))