diff -r dbc2ee17053e -r 18c2489ac96d mercurial/commands.py --- 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),