Mercurial > public > mercurial-scm > hg-stable
diff mercurial/dispatch.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 | ec0a2601bc76 |
children | 106adc261492 |
line wrap: on
line diff
--- a/mercurial/dispatch.py Mon Sep 24 22:46:22 2018 -0400 +++ b/mercurial/dispatch.py Fri Sep 21 19:48:23 2018 -0400 @@ -748,7 +748,7 @@ """ if wd is None: try: - wd = pycompat.getcwd() + wd = encoding.getcwd() except OSError as e: raise error.Abort(_("error getting current working directory: %s") % encoding.strtolocal(e.strerror)) @@ -968,7 +968,7 @@ if not path: raise error.RepoError(_("no repository found in" " '%s' (.hg not found)") - % pycompat.getcwd()) + % encoding.getcwd()) raise if repo: ui = repo.ui