##// END OF EJS Templates
lfs: rename a variable to clarify its use...
Matt Harbison -
r44543:84f2becb default
parent child Browse files
Show More
@@ -491,22 +491,22 b' class _gitlfsremote(object):'
491
491
492 response = b''
492 response = b''
493 try:
493 try:
494 with contextlib.closing(self.urlopener.open(request)) as req:
494 with contextlib.closing(self.urlopener.open(request)) as res:
495 ui = self.ui # Shorten debug lines
495 ui = self.ui # Shorten debug lines
496 if self.ui.debugflag:
496 if self.ui.debugflag:
497 ui.debug(b'Status: %d\n' % req.status)
497 ui.debug(b'Status: %d\n' % res.status)
498 # lfs-test-server and hg serve return headers in different
498 # lfs-test-server and hg serve return headers in different
499 # order
499 # order
500 headers = pycompat.bytestr(req.info()).strip()
500 headers = pycompat.bytestr(res.info()).strip()
501 ui.debug(b'%s\n' % b'\n'.join(sorted(headers.splitlines())))
501 ui.debug(b'%s\n' % b'\n'.join(sorted(headers.splitlines())))
502
502
503 if action == b'download':
503 if action == b'download':
504 # If downloading blobs, store downloaded data to local
504 # If downloading blobs, store downloaded data to local
505 # blobstore
505 # blobstore
506 localstore.download(oid, req)
506 localstore.download(oid, res)
507 else:
507 else:
508 while True:
508 while True:
509 data = req.read(1048576)
509 data = res.read(1048576)
510 if not data:
510 if not data:
511 break
511 break
512 response += data
512 response += data
General Comments 0
You need to be logged in to leave comments. Login now