Mercurial > hg
changeset 26698:c94cdeeb586a
bundle2: use cg?unpacker.apply() instead of changegroup.addchangegroup()
author | Augie Fackler <augie@google.com> |
---|---|
date | Tue, 13 Oct 2015 17:11:52 -0400 |
parents | 008761affe3f |
children | 76f20fc8d54d |
files | mercurial/bundle2.py |
diffstat | 1 files changed, 2 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/bundle2.py Tue Oct 13 17:11:18 2015 -0400 +++ b/mercurial/bundle2.py Tue Oct 13 17:11:52 2015 -0400 @@ -1271,8 +1271,7 @@ nbchangesets = None if 'nbchanges' in inpart.params: nbchangesets = int(inpart.params.get('nbchanges')) - ret = changegroup.addchangegroup(op.repo, cg, 'bundle2', 'bundle2', - expectedtotal=nbchangesets) + ret = cg.apply(op.repo, 'bundle2', 'bundle2', expectedtotal=nbchangesets) op.records.add('changegroup', {'return': ret}) if op.reply is not None: # This is definitely not the final form of this @@ -1341,7 +1340,7 @@ if not isinstance(cg, changegroup.cg1unpacker): raise error.Abort(_('%s: not a bundle version 1.0') % util.hidepassword(raw_url)) - ret = changegroup.addchangegroup(op.repo, cg, 'bundle2', 'bundle2') + ret = cg.apply(op.repo, 'bundle2', 'bundle2') op.records.add('changegroup', {'return': ret}) if op.reply is not None: # This is definitely not the final form of this