diff --git a/mercurial/debugcommands.py b/mercurial/debugcommands.py --- a/mercurial/debugcommands.py +++ b/mercurial/debugcommands.py @@ -3787,9 +3787,7 @@ def debugtemplate(ui, repo, tmpl, **opts def debuguigetpass(ui, prompt=b''): """show prompt to type password""" r = ui.getpass(prompt) - if r is not None: - r = encoding.strtolocal(r) - else: + if r is None: r = b"" ui.writenoi18n(b'response: %s\n' % r)