mercurial/exchange.py
changeset 21062 e7c0a65a5c9c
parent 21061 62d35f251c60
child 21063 7ca4f2049d3b
--- a/mercurial/exchange.py	Thu Apr 10 10:53:43 2014 -0700
+++ b/mercurial/exchange.py	Mon Apr 14 14:46:32 2014 -0400
@@ -109,6 +109,7 @@
                 if pushop.remote.capable('bundle2'):
                     _pushbundle2(pushop)
                 else:
+                    _pushchangeset(pushop)
             _pushcomputecommonheads(pushop)
             _pushsyncphase(pushop)
             _pushobsolete(pushop)
@@ -186,11 +187,7 @@
         bundler.addpart(part)
     # add the changegroup bundle
     cg = changegroup.getlocalbundle(pushop.repo, 'push', pushop.outgoing)
-    def cgchunks(cg=cg):
-        yield 'HG10UN'
-        for c in cg.getchunks():
-            yield c
-    cgpart = bundle2.bundlepart('CHANGEGROUP', data=cgchunks())
+    cgpart = bundle2.bundlepart('CHANGEGROUP', data=cg.getchunks())
     bundler.addpart(cgpart)
     stream = util.chunkbuffer(bundler.getchunks())
     sent = bundle2.unbundle20(pushop.repo.ui, stream)
@@ -634,11 +631,7 @@
     # very crude first implementation,
     # the bundle API will change and the generation will be done lazily.
     bundler = bundle2.bundle20(repo.ui)
-    def cgchunks(cg=cg):
-        yield 'HG10UN'
-        for c in cg.getchunks():
-            yield c
-    part = bundle2.bundlepart('changegroup', data=cgchunks())
+    part = bundle2.bundlepart('changegroup', data=cg.getchunks())
     bundler.addpart(part)
     return bundle2.unbundle20(repo.ui, util.chunkbuffer(bundler.getchunks()))