Mercurial > public > mercurial-scm > hg-stable
diff mercurial/cmdutil.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 | fd805a44b89d |
children | 0d703063d0c8 |
line wrap: on
line diff
--- a/mercurial/cmdutil.py Mon Sep 24 22:46:22 2018 -0400 +++ b/mercurial/cmdutil.py Fri Sep 21 19:48:23 2018 -0400 @@ -581,7 +581,7 @@ unresolvedlist = [f for f in mergestate.unresolved() if m(f)] if unresolvedlist: mergeliststr = '\n'.join( - [' %s' % util.pathto(repo.root, pycompat.getcwd(), path) + [' %s' % util.pathto(repo.root, encoding.getcwd(), path) for path in unresolvedlist]) msg = _('''Unresolved merge conflicts: @@ -1110,7 +1110,7 @@ raise error.CommandError(cmd, _('invalid arguments')) if not os.path.isfile(file_): raise error.Abort(_("revlog '%s' not found") % file_) - r = revlog.revlog(vfsmod.vfs(pycompat.getcwd(), audit=False), + r = revlog.revlog(vfsmod.vfs(encoding.getcwd(), audit=False), file_[:-2] + ".i") return r @@ -2629,7 +2629,7 @@ committext = buildcommittext(repo, ctx, subs, extramsg) # run editor in the repository root - olddir = pycompat.getcwd() + olddir = encoding.getcwd() os.chdir(repo.root) # make in-memory changes visible to external process