##// END OF EJS Templates
bundle2: allow extensions to plug into the push process...
Pierre-Yves David -
r21149:c0d96bce default
parent child Browse files
Show More
@@ -219,6 +219,7 b' def _pushbundle2(pushop):'
219 part = bundle2.bundlepart('B2X:CHECK:HEADS',
219 part = bundle2.bundlepart('B2X:CHECK:HEADS',
220 data=iter(pushop.remoteheads))
220 data=iter(pushop.remoteheads))
221 bundler.addpart(part)
221 bundler.addpart(part)
222 extrainfo = _pushbundle2extraparts(pushop, bundler)
222 # add the changegroup bundle
223 # add the changegroup bundle
223 cg = changegroup.getlocalbundle(pushop.repo, 'push', pushop.outgoing)
224 cg = changegroup.getlocalbundle(pushop.repo, 'push', pushop.outgoing)
224 cgpart = bundle2.bundlepart('B2X:CHANGEGROUP', data=cg.getchunks())
225 cgpart = bundle2.bundlepart('B2X:CHANGEGROUP', data=cg.getchunks())
@@ -232,6 +233,21 b' def _pushbundle2(pushop):'
232 cgreplies = op.records.getreplies(cgpart.id)
233 cgreplies = op.records.getreplies(cgpart.id)
233 assert len(cgreplies['changegroup']) == 1
234 assert len(cgreplies['changegroup']) == 1
234 pushop.ret = cgreplies['changegroup'][0]['return']
235 pushop.ret = cgreplies['changegroup'][0]['return']
236 _pushbundle2extrareply(pushop, op, extrainfo)
237
238 def _pushbundle2extraparts(pushop, bundler):
239 """hook function to let extensions add parts
240
241 Return a dict to let extensions pass data to the reply processing.
242 """
243 return {}
244
245 def _pushbundle2extrareply(pushop, op, extrainfo):
246 """hook function to let extensions react to part replies
247
248 The dict from _pushbundle2extrareply is fed to this function.
249 """
250 pass
235
251
236 def _pushchangeset(pushop):
252 def _pushchangeset(pushop):
237 """Make the actual push of changeset bundle to remote repo"""
253 """Make the actual push of changeset bundle to remote repo"""
General Comments 0
You need to be logged in to leave comments. Login now