equal
deleted
inserted
replaced
271 """ |
271 """ |
272 if (ui.debugflag |
272 if (ui.debugflag |
273 and ui.configbool('devel', 'debug.peer-request')): |
273 and ui.configbool('devel', 'debug.peer-request')): |
274 dbg = ui.debug |
274 dbg = ui.debug |
275 line = 'devel-peer-request: %s\n' |
275 line = 'devel-peer-request: %s\n' |
276 dbg(line % '%s %s' % (req.get_method(), req.get_full_url())) |
276 dbg(line % '%s %s' % (pycompat.bytesurl(req.get_method()), |
|
277 pycompat.bytesurl(req.get_full_url()))) |
277 hgargssize = None |
278 hgargssize = None |
278 |
279 |
279 for header, value in sorted(req.header_items()): |
280 for header, value in sorted(req.header_items()): |
280 if header.startswith('X-hgarg-'): |
281 if header.startswith('X-hgarg-'): |
281 if hgargssize is None: |
282 if hgargssize is None: |
308 util.hidepassword(req.get_full_url())) |
309 util.hidepassword(req.get_full_url())) |
309 ui.traceback() |
310 ui.traceback() |
310 raise IOError(None, inst) |
311 raise IOError(None, inst) |
311 finally: |
312 finally: |
312 if ui.configbool('devel', 'debug.peer-request'): |
313 if ui.configbool('devel', 'debug.peer-request'): |
313 dbg(line % ' finished in %.4f seconds (%s)' |
314 dbg(line % ' finished in %.4f seconds (%d)' |
314 % (util.timer() - start, res.code)) |
315 % (util.timer() - start, res.code)) |
315 |
316 |
316 # Insert error handlers for common I/O failures. |
317 # Insert error handlers for common I/O failures. |
317 _wraphttpresponse(res) |
318 _wraphttpresponse(res) |
318 |
319 |