Mercurial > hg
diff hgext/fastannotate/commands.py @ 39818: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 | b77f2ea51da5 |
children | fa88170c10bb |
line wrap: on
line diff
--- a/hgext/fastannotate/commands.py Mon Sep 24 22:46:22 2018 -0400 +++ b/hgext/fastannotate/commands.py Fri Sep 21 19:48:23 2018 -0400 @@ -12,6 +12,7 @@ from mercurial.i18n import _ from mercurial import ( commands, + encoding, error, extensions, patch, @@ -41,7 +42,7 @@ if perfhack: # cwd related to reporoot reporoot = os.path.dirname(repo.path) - reldir = os.path.relpath(pycompat.getcwd(), reporoot) + reldir = os.path.relpath(encoding.getcwd(), reporoot) if reldir == '.': reldir = '' if any(opts.get(o[1]) for o in commands.walkopts): # a)