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 re |
|
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' % re |
|
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(re |
|
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, re |
|
506 | localstore.download(oid, res) | |
507 | else: |
|
507 | else: | |
508 | while True: |
|
508 | while True: | |
509 |
data = re |
|
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