mercurial/exchange.py
changeset 26643 d2e16419d3f4
parent 26640 b13fdcc4e700
child 26644 74de1c59f71c
--- a/mercurial/exchange.py	Mon Oct 05 21:31:32 2015 -0700
+++ b/mercurial/exchange.py	Tue Oct 13 10:41:54 2015 -0700
@@ -1653,7 +1653,11 @@
             try:
                 fh = urlmod.open(ui, url)
                 cg = readbundle(ui, fh, 'stream')
-                changegroup.addchangegroup(repo, cg, 'clonebundles', url)
+
+                if isinstance(cg, bundle2.unbundle20):
+                    bundle2.processbundle(repo, cg, lambda: tr)
+                else:
+                    changegroup.addchangegroup(repo, cg, 'clonebundles', url)
                 tr.close()
                 return True
             except urllib2.HTTPError as e: