diff --git a/hgext/bugzilla.py b/hgext/bugzilla.py --- a/hgext/bugzilla.py +++ b/hgext/bugzilla.py @@ -795,7 +795,9 @@ class bzxmlrpc(bzaccess): self.fixstatus = self.ui.config(b'bugzilla', b'fixstatus') self.fixresolution = self.ui.config(b'bugzilla', b'fixresolution') - self.bzproxy = xmlrpclib.ServerProxy(bzweb, self.transport(bzweb)) + self.bzproxy = xmlrpclib.ServerProxy( + pycompat.strurl(bzweb), self.transport(bzweb) + ) ver = self.bzproxy.Bugzilla.version()[b'version'].split(b'.') self.bzvermajor = int(ver[0]) self.bzverminor = int(ver[1]) @@ -1247,4 +1249,4 @@ def hook(ui, repo, hooktype, node=None, bz.update(bug, bugs[bug], ctx) bz.notify(bugs, stringutil.email(ctx.user())) except Exception as e: - raise error.Abort(_(b'Bugzilla error: %s') % e) + raise error.Abort(_(b'Bugzilla error: %s') % stringutil.forcebytestr(e)) diff --git a/mercurial/debugcommands.py b/mercurial/debugcommands.py --- a/mercurial/debugcommands.py +++ b/mercurial/debugcommands.py @@ -3850,9 +3850,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)