Mercurial > public > mercurial-scm > hg
comparison mercurial/httprepo.py @ 11759:05deba16c5d5
Merge with stable
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Fri, 06 Aug 2010 12:59:13 -0500 |
parents | 26e0782b8380 65bd4b8e48bd |
children | c327bfa5e831 |
comparison
equal
deleted
inserted
replaced
11751:b8b4a2417fbd | 11759:05deba16c5d5 |
---|---|
15 | 15 |
16 def zgenerator(f): | 16 def zgenerator(f): |
17 zd = zlib.decompressobj() | 17 zd = zlib.decompressobj() |
18 try: | 18 try: |
19 for chunk in util.filechunkiter(f): | 19 for chunk in util.filechunkiter(f): |
20 yield zd.decompress(chunk) | 20 while chunk: |
21 yield zd.decompress(chunk, 2**18) | |
22 chunk = zd.unconsumed_tail | |
21 except httplib.HTTPException: | 23 except httplib.HTTPException: |
22 raise IOError(None, _('connection ended unexpectedly')) | 24 raise IOError(None, _('connection ended unexpectedly')) |
23 yield zd.flush() | 25 yield zd.flush() |
24 | 26 |
25 class httprepository(wireproto.wirerepository): | 27 class httprepository(wireproto.wirerepository): |