py3: use bytes() to byte-stringify url object in url.py
Perhaps we'll have to convert it back and forth from/to bytes and unicode
at urllib boundary, but at least util.hidepassword() wants a byte string.
--- a/mercurial/url.py Sun Feb 18 22:12:11 2018 +0900
+++ b/mercurial/url.py Sun Feb 18 22:13:25 2018 +0900
@@ -71,10 +71,10 @@
u.query = None
if not self.ui.interactive():
raise error.Abort(_('http authorization required for %s') %
- util.hidepassword(str(u)))
+ util.hidepassword(bytes(u)))
self.ui.write(_("http authorization required for %s\n") %
- util.hidepassword(str(u)))
+ util.hidepassword(bytes(u)))
self.ui.write(_("realm: %s\n") % realm)
if user:
self.ui.write(_("user: %s\n") % user)
@@ -124,7 +124,7 @@
else:
self.no_list = no_list
- proxyurl = str(proxy)
+ proxyurl = bytes(proxy)
proxies = {'http': proxyurl, 'https': proxyurl}
ui.debug('proxying through %s\n' % util.hidepassword(proxyurl))
else: