lfs: strip the response headers from the Batch API before printing
For reasons unknown, py3 is adding an extra '\n' before the headers print out.
This makes the output the same as py2.
--- a/hgext/lfs/blobstore.py Sun Jan 27 18:34:17 2019 -0500
+++ b/hgext/lfs/blobstore.py Sun Jan 27 20:50:52 2019 -0500
@@ -329,7 +329,7 @@
if self.ui.debugflag:
self.ui.debug(b'Status: %d\n' % rsp.status)
# lfs-test-server and hg serve return headers in different order
- headers = pycompat.bytestr(rsp.info())
+ headers = pycompat.bytestr(rsp.info()).strip()
self.ui.debug(b'%s\n'
% b'\n'.join(sorted(headers.splitlines())))
@@ -440,7 +440,7 @@
ui.debug(b'Status: %d\n' % req.status)
# lfs-test-server and hg serve return headers in different
# order
- headers = pycompat.bytestr(req.info())
+ headers = pycompat.bytestr(req.info()).strip()
ui.debug(b'%s\n'
% b'\n'.join(sorted(headers.splitlines())))