changeset 41453:0b636d1720a0

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.
author Matt Harbison <matt_harbison@yahoo.com>
date Sun, 27 Jan 2019 20:50:52 -0500
parents 52a4a3e7cc6a
children 080a5c83914f
files hgext/lfs/blobstore.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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())))