diff mercurial/exchange.py @ 21068:c15b66a6bbb4

bundle2: return a stream from exchange.getbundle For friendliness with the wire protocol implementation, the `exchange.getbundle` now returns a binary stream when asked for a bundle2. We detect a bundle2 request and upgrade the binary stream to an unbundler object. In the future the unbundler may gain feature to look like a binary stream, but we are not quite there yet.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Tue, 15 Apr 2014 11:27:55 -0400
parents 7974aa88868e
children 408877d491fb
line wrap: on
line diff
--- a/mercurial/exchange.py	Tue Apr 15 13:57:15 2014 -0400
+++ b/mercurial/exchange.py	Tue Apr 15 11:27:55 2014 -0400
@@ -659,7 +659,7 @@
     bundler = bundle2.bundle20(repo.ui)
     part = bundle2.bundlepart('changegroup', data=cg.getchunks())
     bundler.addpart(part)
-    return bundle2.unbundle20(repo.ui, util.chunkbuffer(bundler.getchunks()))
+    return util.chunkbuffer(bundler.getchunks())
 
 class PushRaced(RuntimeError):
     """An exception raised during unbundling that indicate a push race"""