Mercurial > public > mercurial-scm > hg
comparison mercurial/commands.py @ 33036:52c7060b707a
bundle: move combineresults() from changegroup to bundle2
The results only need to be combined if they come from a bundle2. More
importantly, we'll change its argument to a bundleoperation soon, and
then it definitely will no longer belong in changegroup.py.
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Thu, 22 Jun 2017 13:58:20 -0700 |
parents | e8c8d81eb864 |
children | d765ad56081f |
comparison
equal
deleted
inserted
replaced
33035:6e3a6774d998 | 33036:52c7060b707a |
---|---|
5214 hint=_("see https://mercurial-scm.org/" | 5214 hint=_("see https://mercurial-scm.org/" |
5215 "wiki/BundleFeature for more " | 5215 "wiki/BundleFeature for more " |
5216 "information")) | 5216 "information")) |
5217 changes = [r.get('return', 0) | 5217 changes = [r.get('return', 0) |
5218 for r in op.records['changegroup']] | 5218 for r in op.records['changegroup']] |
5219 modheads = changegroup.combineresults(changes) | 5219 modheads = bundle2.combinechangegroupresults(changes) |
5220 else: | 5220 else: |
5221 txnname = 'unbundle\n%s' % util.hidepassword(url) | 5221 txnname = 'unbundle\n%s' % util.hidepassword(url) |
5222 with repo.transaction(txnname) as tr: | 5222 with repo.transaction(txnname) as tr: |
5223 modheads, addednodes = gen.apply(repo, tr, 'unbundle', url) | 5223 modheads, addednodes = gen.apply(repo, tr, 'unbundle', url) |
5224 | 5224 |