diff -r a8b17859684a -r 20a42325fdef mercurial/ui.py --- a/mercurial/ui.py Wed Aug 17 20:57:15 2016 -0700 +++ b/mercurial/ui.py Wed Nov 23 00:03:11 2016 +0530 @@ -27,6 +27,7 @@ error, formatter, progress, + pycompat, scmutil, util, ) @@ -227,7 +228,7 @@ if section in (None, 'paths'): # expand vars and ~ # translate paths relative to root (or home) into absolute paths - root = root or os.getcwd() + root = root or pycompat.getcwd() for c in self._tcfg, self._ucfg, self._ocfg: for n, p in c.items('paths'): # Ignore sub-options.