diff -r f0efd2bffe1e -r b82615afde65 mercurial/commands.py --- a/mercurial/commands.py Thu Jun 22 15:59:07 2017 -0700 +++ b/mercurial/commands.py Fri Jun 16 10:25:11 2017 -0700 @@ -5218,7 +5218,9 @@ else: txnname = 'unbundle\n%s' % util.hidepassword(url) with repo.transaction(txnname) as tr: - modheads, addednodes = gen.apply(repo, tr, 'unbundle', url) + modheads = bundle2.applybundle1(repo, gen, tr, + source='unbundle', + url=url) return postincoming(ui, repo, modheads, opts.get(r'update'), None, None)