Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/ui.py @ 39823:24e493ec2229
py3: rename pycompat.getcwd() to encoding.getcwd() (API)
We need to avoid os.getcwdb() on Windows to avoid DeprecationWarnings, and we
need encoding.strtolocal() to encode the result of os.getcwd().
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Fri, 21 Sep 2018 19:48:23 -0400 |
parents | 50f46b771921 |
children | a9f56e4501c1 |
comparison
equal
deleted
inserted
replaced
39822:94c25f694ec3 | 39823:24e493ec2229 |
---|---|
445 | 445 |
446 def fixconfig(self, root=None, section=None): | 446 def fixconfig(self, root=None, section=None): |
447 if section in (None, 'paths'): | 447 if section in (None, 'paths'): |
448 # expand vars and ~ | 448 # expand vars and ~ |
449 # translate paths relative to root (or home) into absolute paths | 449 # translate paths relative to root (or home) into absolute paths |
450 root = root or pycompat.getcwd() | 450 root = root or encoding.getcwd() |
451 for c in self._tcfg, self._ucfg, self._ocfg: | 451 for c in self._tcfg, self._ucfg, self._ocfg: |
452 for n, p in c.items('paths'): | 452 for n, p in c.items('paths'): |
453 # Ignore sub-options. | 453 # Ignore sub-options. |
454 if ':' in n: | 454 if ':' in n: |
455 continue | 455 continue |