##// END OF EJS Templates
bundle2: use cg?unpacker.apply() instead of changegroup.addchangegroup()
Augie Fackler -
r26698:c94cdeeb default
parent child Browse files
Show More
@@ -1271,8 +1271,7 b' def handlechangegroup(op, inpart):'
1271 nbchangesets = None
1271 nbchangesets = None
1272 if 'nbchanges' in inpart.params:
1272 if 'nbchanges' in inpart.params:
1273 nbchangesets = int(inpart.params.get('nbchanges'))
1273 nbchangesets = int(inpart.params.get('nbchanges'))
1274 ret = changegroup.addchangegroup(op.repo, cg, 'bundle2', 'bundle2',
1274 ret = cg.apply(op.repo, 'bundle2', 'bundle2', expectedtotal=nbchangesets)
1275 expectedtotal=nbchangesets)
1276 op.records.add('changegroup', {'return': ret})
1275 op.records.add('changegroup', {'return': ret})
1277 if op.reply is not None:
1276 if op.reply is not None:
1278 # This is definitely not the final form of this
1277 # This is definitely not the final form of this
@@ -1341,7 +1340,7 b' def handleremotechangegroup(op, inpart):'
1341 if not isinstance(cg, changegroup.cg1unpacker):
1340 if not isinstance(cg, changegroup.cg1unpacker):
1342 raise error.Abort(_('%s: not a bundle version 1.0') %
1341 raise error.Abort(_('%s: not a bundle version 1.0') %
1343 util.hidepassword(raw_url))
1342 util.hidepassword(raw_url))
1344 ret = changegroup.addchangegroup(op.repo, cg, 'bundle2', 'bundle2')
1343 ret = cg.apply(op.repo, 'bundle2', 'bundle2')
1345 op.records.add('changegroup', {'return': ret})
1344 op.records.add('changegroup', {'return': ret})
1346 if op.reply is not None:
1345 if op.reply is not None:
1347 # This is definitely not the final form of this
1346 # This is definitely not the final form of this
General Comments 0
You need to be logged in to leave comments. Login now