--- a/mercurial/wireproto.py Thu Oct 13 01:30:14 2016 +0200
+++ b/mercurial/wireproto.py Sun Oct 16 10:38:52 2016 -0700
@@ -772,8 +772,10 @@
if not exchange.bundle2requested(opts.get('bundlecaps')):
return ooberror(bundle2required)
- cg = exchange.getbundle(repo, 'serve', **opts)
- return streamres(proto.groupchunks(cg))
+ chunks = exchange.getbundlechunks(repo, 'serve', **opts)
+ # TODO avoid util.chunkbuffer() here since it is adding overhead to
+ # what is fundamentally a generator proxying operation.
+ return streamres(proto.groupchunks(util.chunkbuffer(chunks)))
@wireprotocommand('heads')
def heads(repo, proto):