diff mercurial/commands.py @ 33043:18c2489ac96d

bundle: make applybundle() delegate v1 bundles to applybundle1()
author Martin von Zweigbergk <martinvonz@google.com>
date Thu, 22 Jun 2017 15:00:19 -0700
parents dbc2ee17053e
children 15a79ac823e8
line wrap: on
line diff
--- a/mercurial/commands.py	Thu Jun 22 21:27:57 2017 -0700
+++ b/mercurial/commands.py	Thu Jun 22 15:00:19 2017 -0700
@@ -5207,13 +5207,8 @@
                 if not isinstance(gen, bundle2.unbundle20):
                     txnname = 'unbundle\n%s' % util.hidepassword(url)
                 with repo.transaction(txnname) as tr:
-                    if isinstance(gen, bundle2.unbundle20):
-                        op = bundle2.applybundle(repo, gen, tr,
-                                                 source='unbundle',
-                                                 url=url)
-                    else:
-                        op = bundle2.applybundle1(repo, gen, tr,
-                                                  source='unbundle', url=url)
+                    op = bundle2.applybundle(repo, gen, tr, source='unbundle',
+                                             url=url)
             except error.BundleUnknownFeatureError as exc:
                 raise error.Abort(
                     _('%s: unknown bundle feature, %s') % (fname, exc),