diff -r 62329b759635 -r 87e7dd8e7734 mercurial/debugcommands.py --- a/mercurial/debugcommands.py Thu Nov 26 02:28:42 2020 -0500 +++ b/mercurial/debugcommands.py Mon Nov 23 11:47:06 2020 -0500 @@ -3792,6 +3792,10 @@ def debuguigetpass(ui, prompt=b''): """show prompt to type password""" r = ui.getpass(prompt) + if r is not None: + r = encoding.strtolocal(r) + else: + r = b"" ui.writenoi18n(b'response: %s\n' % r)