##// END OF EJS Templates
bundle2: generate check:heads in a independent function
Ryan McElroy -
r26428:b75c4651 default
parent child Browse files
Show More
@@ -475,6 +475,14 b' def b2partsgenerator(stepname, idx=None)'
475 return func
475 return func
476 return dec
476 return dec
477
477
478 def _pushb2ctxcheckheads(pushop, bundler):
479 """Generate race condition checking parts
480
481 Exists as an indepedent function to aid extensions
482 """
483 if not pushop.force:
484 bundler.newpart('check:heads', data=iter(pushop.remoteheads))
485
478 @b2partsgenerator('changeset')
486 @b2partsgenerator('changeset')
479 def _pushb2ctx(pushop, bundler):
487 def _pushb2ctx(pushop, bundler):
480 """handle changegroup push through bundle2
488 """handle changegroup push through bundle2
@@ -490,8 +498,9 b' def _pushb2ctx(pushop, bundler):'
490 pushop.repo.prepushoutgoinghooks(pushop.repo,
498 pushop.repo.prepushoutgoinghooks(pushop.repo,
491 pushop.remote,
499 pushop.remote,
492 pushop.outgoing)
500 pushop.outgoing)
493 if not pushop.force:
501
494 bundler.newpart('check:heads', data=iter(pushop.remoteheads))
502 _pushb2ctxcheckheads(pushop, bundler)
503
495 b2caps = bundle2.bundle2caps(pushop.remote)
504 b2caps = bundle2.bundle2caps(pushop.remote)
496 version = None
505 version = None
497 cgversions = b2caps.get('changegroup')
506 cgversions = b2caps.get('changegroup')
General Comments 0
You need to be logged in to leave comments. Login now