Show More
@@ -90,7 +90,7 b' class httppeer(wireproto.wirepeer):' | |||||
90 | def lock(self): |
|
90 | def lock(self): | |
91 | raise error.Abort(_('operation not supported over http')) |
|
91 | raise error.Abort(_('operation not supported over http')) | |
92 |
|
92 | |||
93 | def _callstream(self, cmd, **args): |
|
93 | def _callstream(self, cmd, _compressible=False, **args): | |
94 | if cmd == 'pushkey': |
|
94 | if cmd == 'pushkey': | |
95 | args['data'] = '' |
|
95 | args['data'] = '' | |
96 | data = args.pop('data', None) |
|
96 | data = args.pop('data', None) | |
@@ -201,6 +201,9 b' class httppeer(wireproto.wirepeer):' | |||||
201 | raise error.RepoError(_("'%s' uses newer protocol %s") % |
|
201 | raise error.RepoError(_("'%s' uses newer protocol %s") % | |
202 | (safeurl, version)) |
|
202 | (safeurl, version)) | |
203 |
|
203 | |||
|
204 | if _compressible: | |||
|
205 | return util.chunkbuffer(zgenerator(resp)) | |||
|
206 | ||||
204 | return resp |
|
207 | return resp | |
205 |
|
208 | |||
206 | def _call(self, cmd, **args): |
|
209 | def _call(self, cmd, **args): | |
@@ -271,8 +274,7 b' class httppeer(wireproto.wirepeer):' | |||||
271 | os.unlink(filename) |
|
274 | os.unlink(filename) | |
272 |
|
275 | |||
273 | def _callcompressable(self, cmd, **args): |
|
276 | def _callcompressable(self, cmd, **args): | |
274 |
|
|
277 | return self._callstream(cmd, _compressible=True, **args) | |
275 | return util.chunkbuffer(zgenerator(stream)) |
|
|||
276 |
|
278 | |||
277 | def _abort(self, exception): |
|
279 | def _abort(self, exception): | |
278 | raise exception |
|
280 | raise exception |
General Comments 0
You need to be logged in to leave comments.
Login now