Mercurial > public > mercurial-scm > hg-stable
diff mercurial/ui.py @ 30528:20a42325fdef
py3: use pycompat.getcwd() instead of os.getcwd()
We have pycompat.getcwd() which returns bytes path on Python 3. This patch
changes most of the occurences of the os.getcwd() with pycompat one.
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Wed, 23 Nov 2016 00:03:11 +0530 |
parents | b0a8337ba9af |
children | 4b0e6677eed1 |
line wrap: on
line diff
--- 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.