--- 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'))