From patchwork Mon Jan 28 05:20:55 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [09, of, 11] lfs: strip the response headers from the Batch API before printing From: Matt Harbison X-Patchwork-Id: 38135 Message-Id: To: mercurial-devel@mercurial-scm.org Date: Mon, 28 Jan 2019 00:20:55 -0500 # HG changeset patch # User Matt Harbison # Date 1548640252 18000 # Sun Jan 27 20:50:52 2019 -0500 # Node ID fa54bec6b7c74114cfe1d59abdf429fff5c3dd22 # Parent 2db104a67b26ee9ff2f2b9ba8bb98d52bada7bb9 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. diff --git a/hgext/lfs/blobstore.py b/hgext/lfs/blobstore.py --- a/hgext/lfs/blobstore.py +++ b/hgext/lfs/blobstore.py @@ -329,7 +329,7 @@ class _gitlfsremote(object): 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 @@ class _gitlfsremote(object): 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())))