Mercurial > hg-stable
diff mercurial/exchange.py @ 21070:408877d491fb
bundle2: feed a binary stream to `peer.unbundle`
This input will have to travel over the wire anyway, so we feed the peer method
with a simple binary stream and rely on the server side to use `readbundle`
to create the python object.
The test output changes because the bundle is created marginally sooner and the
debug output interleaves in a different way.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Tue, 15 Apr 2014 16:42:52 -0400 |
parents | c15b66a6bbb4 |
children | 19b9f23a8c6f |
line wrap: on
line diff
--- a/mercurial/exchange.py Tue Apr 15 15:20:33 2014 -0400 +++ b/mercurial/exchange.py Tue Apr 15 16:42:52 2014 -0400 @@ -216,8 +216,7 @@ cgpart = bundle2.bundlepart('CHANGEGROUP', data=cg.getchunks()) bundler.addpart(cgpart) stream = util.chunkbuffer(bundler.getchunks()) - sent = bundle2.unbundle20(pushop.repo.ui, stream) - reply = pushop.remote.unbundle(sent, ['force'], 'push') + reply = pushop.remote.unbundle(stream, ['force'], 'push') try: op = bundle2.processbundle(pushop.repo, reply) except KeyError, exc: