Mercurial > public > mercurial-scm > hg
comparison mercurial/httprepo.py @ 7280:810ca383da9c
remove unused variables
author | Benoit Boissinot <benoit.boissinot@ens-lyon.org> |
---|---|
date | Tue, 28 Oct 2008 19:25:26 +0100 |
parents | 1f0f84660dea |
children | 1dcd2cc6878b |
comparison
equal
deleted
inserted
replaced
7279:1f0f84660dea | 7280:810ca383da9c |
---|---|
7 # of the GNU General Public License, incorporated herein by reference. | 7 # of the GNU General Public License, incorporated herein by reference. |
8 | 8 |
9 from node import bin, hex, nullid | 9 from node import bin, hex, nullid |
10 from i18n import _ | 10 from i18n import _ |
11 import repo, os, urllib, urllib2, urlparse, zlib, util, httplib | 11 import repo, os, urllib, urllib2, urlparse, zlib, util, httplib |
12 import errno, keepalive, socket, changegroup, statichttprepo | 12 import errno, socket, changegroup, statichttprepo |
13 import url | 13 import url |
14 | 14 |
15 def zgenerator(f): | 15 def zgenerator(f): |
16 zd = zlib.decompressobj() | 16 zd = zlib.decompressobj() |
17 try: | 17 try: |
18 for chunk in util.filechunkiter(f): | 18 for chunk in util.filechunkiter(f): |
19 yield zd.decompress(chunk) | 19 yield zd.decompress(chunk) |
20 except httplib.HTTPException, inst: | 20 except httplib.HTTPException: |
21 raise IOError(None, _('connection ended unexpectedly')) | 21 raise IOError(None, _('connection ended unexpectedly')) |
22 yield zd.flush() | 22 yield zd.flush() |
23 | 23 |
24 class httprepository(repo.repository): | 24 class httprepository(repo.repository): |
25 def __init__(self, ui, path): | 25 def __init__(self, ui, path): |