diff -r 24e493ec2229 -r fb628c048d64 mercurial/encoding.py --- a/mercurial/encoding.py Fri Sep 21 19:48:23 2018 -0400 +++ b/mercurial/encoding.py Sun Sep 23 22:36:44 2018 -0400 @@ -236,7 +236,12 @@ if pycompat.ispy3: # os.getcwd() on Python 3 returns string, but it has os.getcwdb() which # returns bytes. - getcwd = os.getcwdb # re-exports + if pycompat.iswindows: + # Python 3 on Windows issues a DeprecationWarning about using the bytes + # API when os.getcwdb() is called. + getcwd = lambda: strtolocal(os.getcwd()) # re-exports + else: + getcwd = os.getcwdb # re-exports else: getcwd = os.getcwd # re-exports