Mercurial > hg
changeset 44084:84f2becbd106
lfs: rename a variable to clarify its use
This is the response object, not a request.
Differential Revision: https://phab.mercurial-scm.org/D7880
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Tue, 14 Jan 2020 18:02:20 -0500 |
parents | 29a110e2776e |
children | 0ee0a3f6a990 |
files | hgext/lfs/blobstore.py |
diffstat | 1 files changed, 5 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/lfs/blobstore.py Tue Jan 14 17:53:43 2020 -0800 +++ b/hgext/lfs/blobstore.py Tue Jan 14 18:02:20 2020 -0500 @@ -491,22 +491,22 @@ response = b'' try: - with contextlib.closing(self.urlopener.open(request)) as req: + with contextlib.closing(self.urlopener.open(request)) as res: ui = self.ui # Shorten debug lines if self.ui.debugflag: - ui.debug(b'Status: %d\n' % req.status) + ui.debug(b'Status: %d\n' % res.status) # lfs-test-server and hg serve return headers in different # order - headers = pycompat.bytestr(req.info()).strip() + headers = pycompat.bytestr(res.info()).strip() ui.debug(b'%s\n' % b'\n'.join(sorted(headers.splitlines()))) if action == b'download': # If downloading blobs, store downloaded data to local # blobstore - localstore.download(oid, req) + localstore.download(oid, res) else: while True: - data = req.read(1048576) + data = res.read(1048576) if not data: break response += data