Comments
Patch
@@ -5,11 +5,10 @@
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2 or any later version.
from i18n import _
from node import hex, nullid
-import cStringIO
import errno
import util, scmutil, changegroup, base85
import discovery, phases, obsolete, bookmarks, bundle2
@@ -605,15 +604,11 @@ def getbundle(repo, source, heads=None,
yield 'HG10UN'
for c in cg.getchunks():
yield c
part = bundle2.part('changegroup', data=cgchunks())
bundler.addpart(part)
- temp = cStringIO.StringIO()
- for c in bundler.getchunks():
- temp.write(c)
- temp.seek(0)
- return bundle2.unbundle20(repo.ui, temp)
+ return bundle2.unbundle20(repo.ui, util.chunkbuffer(bundler.getchunks()))
class PushRaced(RuntimeError):
"""An exception raised during unbunding that indicate a push race"""
def check_heads(repo, their_heads, context):