Mercurial > public > mercurial-scm > hg
diff mercurial/commands.py @ 33039:b82615afde65
bundle: add a applybundle1() method
This is one step towards removing a bunch of "if isinstance(gen,
unbundle20)" by treating bundle1 and bundle2 more similarly.
The name may sounds ironic for a method in the bundle2 module, but I
didn't think it was worth it yet to create a new 'bundle' module that
depends on the 'bundle2' module. Besides, we'll inline the method
again later.
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Fri, 16 Jun 2017 10:25:11 -0700 |
parents | d765ad56081f |
children | 2baef42a2881 |
line wrap: on
line diff
--- 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)