diff hgext/lfs/blobstore.py @ 41431: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 7df10ea7a5b8
children 1bc01490178a
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())))