Mercurial > hg
changeset 37736:e10b695b9c41
httppeer: fix debug prints to work on Python 3
Differential Revision: https://phab.mercurial-scm.org/D3345
author | Augie Fackler <augie@google.com> |
---|---|
date | Fri, 13 Apr 2018 21:06:50 -0400 |
parents | 126998dcfb08 |
children | 6cb7e3b91883 |
files | mercurial/httppeer.py |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/httppeer.py Fri Apr 13 21:04:25 2018 -0400 +++ b/mercurial/httppeer.py Fri Apr 13 21:06:50 2018 -0400 @@ -273,7 +273,8 @@ and ui.configbool('devel', 'debug.peer-request')): dbg = ui.debug line = 'devel-peer-request: %s\n' - dbg(line % '%s %s' % (req.get_method(), req.get_full_url())) + dbg(line % '%s %s' % (pycompat.bytesurl(req.get_method()), + pycompat.bytesurl(req.get_full_url()))) hgargssize = None for header, value in sorted(req.header_items()): @@ -310,7 +311,7 @@ raise IOError(None, inst) finally: if ui.configbool('devel', 'debug.peer-request'): - dbg(line % ' finished in %.4f seconds (%s)' + dbg(line % ' finished in %.4f seconds (%d)' % (util.timer() - start, res.code)) # Insert error handlers for common I/O failures.