##// END OF EJS Templates
bundle2: provide number of changesets information to 'addchangegroup'...
Pierre-Yves David -
r25518:ca656f3d default
parent child Browse files
Show More
@@ -1146,7 +1146,7 b' def obsmarkersversion(caps):'
1146 obscaps = caps.get('obsmarkers', ())
1146 obscaps = caps.get('obsmarkers', ())
1147 return [int(c[1:]) for c in obscaps if c.startswith('V')]
1147 return [int(c[1:]) for c in obscaps if c.startswith('V')]
1148
1148
1149 @parthandler('changegroup', ('version',))
1149 @parthandler('changegroup', ('version', 'nbchanges'))
1150 def handlechangegroup(op, inpart):
1150 def handlechangegroup(op, inpart):
1151 """apply a changegroup part on the repo
1151 """apply a changegroup part on the repo
1152
1152
@@ -1165,7 +1165,11 b' def handlechangegroup(op, inpart):'
1165 cg = unpacker(inpart, 'UN')
1165 cg = unpacker(inpart, 'UN')
1166 # the source and url passed here are overwritten by the one contained in
1166 # the source and url passed here are overwritten by the one contained in
1167 # the transaction.hookargs argument. So 'bundle2' is a placeholder
1167 # the transaction.hookargs argument. So 'bundle2' is a placeholder
1168 ret = changegroup.addchangegroup(op.repo, cg, 'bundle2', 'bundle2')
1168 nbchangesets = None
1169 if 'nbchanges' in inpart.params:
1170 nbchangesets = int(inpart.params.get('nbchanges'))
1171 ret = changegroup.addchangegroup(op.repo, cg, 'bundle2', 'bundle2',
1172 expectedtotal=nbchangesets)
1169 op.records.add('changegroup', {'return': ret})
1173 op.records.add('changegroup', {'return': ret})
1170 if op.reply is not None:
1174 if op.reply is not None:
1171 # This is definitely not the final form of this
1175 # This is definitely not the final form of this
General Comments 0
You need to be logged in to leave comments. Login now