--- 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