equal
deleted
inserted
replaced
770 |
770 |
771 if not bundle1allowed(repo, 'pull'): |
771 if not bundle1allowed(repo, 'pull'): |
772 if not exchange.bundle2requested(opts.get('bundlecaps')): |
772 if not exchange.bundle2requested(opts.get('bundlecaps')): |
773 return ooberror(bundle2required) |
773 return ooberror(bundle2required) |
774 |
774 |
775 cg = exchange.getbundle(repo, 'serve', **opts) |
775 chunks = exchange.getbundlechunks(repo, 'serve', **opts) |
776 return streamres(proto.groupchunks(cg)) |
776 # TODO avoid util.chunkbuffer() here since it is adding overhead to |
|
777 # what is fundamentally a generator proxying operation. |
|
778 return streamres(proto.groupchunks(util.chunkbuffer(chunks))) |
777 |
779 |
778 @wireprotocommand('heads') |
780 @wireprotocommand('heads') |
779 def heads(repo, proto): |
781 def heads(repo, proto): |
780 h = repo.heads() |
782 h = repo.heads() |
781 return encodelist(h) + "\n" |
783 return encodelist(h) + "\n" |