Mercurial > public > mercurial-scm > hg
diff contrib/check-code.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 | c52a8af4052a |
children | 876494fd967d |
line wrap: on
line diff
--- a/contrib/check-code.py Mon Sep 24 22:46:22 2018 -0400 +++ b/contrib/check-code.py Fri Sep 21 19:48:23 2018 -0400 @@ -503,7 +503,7 @@ [ (r'os\.environ', "use encoding.environ instead (py3)", r'#.*re-exports'), (r'os\.name', "use pycompat.osname instead (py3)"), - (r'os\.getcwd', "use pycompat.getcwd instead (py3)"), + (r'os\.getcwd', "use encoding.getcwd instead (py3)", r'#.*re-exports'), (r'os\.sep', "use pycompat.ossep instead (py3)"), (r'os\.pathsep', "use pycompat.ospathsep instead (py3)"), (r'os\.altsep', "use pycompat.osaltsep instead (py3)"),