##// END OF EJS Templates
pull: add a set of steps that remain to be done during the pull...
Pierre-Yves David -
r20901:a26dfa7f default
parent child Browse files
Show More
@@ -403,6 +403,8 b' class pulloperation(object):'
403 403 self.fetch = None
404 404 # result of changegroup pulling (used as returng code by pull)
405 405 self.cgresult = None
406 # list of step remaining todo (related to future bundle2 usage)
407 self.todosteps = set(['changegroup', 'phases', 'obsmarkers'])
406 408
407 409 @util.propertycache
408 410 def pulledsubset(self):
@@ -451,9 +453,12 b' def pull(repo, remote, heads=None, force'
451 453 lock = pullop.repo.lock()
452 454 try:
453 455 _pulldiscovery(pullop)
454 _pullchangeset(pullop)
455 _pullphase(pullop)
456 _pullobsolete(pullop)
456 if 'changegroup' in pullop.todosteps:
457 _pullchangeset(pullop)
458 if 'phases' in pullop.todosteps:
459 _pullphase(pullop)
460 if 'obsmarkers' in pullop.todosteps:
461 _pullobsolete(pullop)
457 462 pullop.closetransaction()
458 463 finally:
459 464 pullop.releasetransaction()
@@ -477,6 +482,7 b' def _pullchangeset(pullop):'
477 482 # We delay the open of the transaction as late as possible so we
478 483 # don't open transaction for nothing or you break future useful
479 484 # rollback call
485 pullop.todosteps.remove('changegroup')
480 486 if not pullop.fetch:
481 487 pullop.repo.ui.status(_("no changes found\n"))
482 488 pullop.cgresult = 0
@@ -505,6 +511,7 b' def _pullchangeset(pullop):'
505 511
506 512 def _pullphase(pullop):
507 513 # Get remote phases data from remote
514 pullop.todosteps.remove('phases')
508 515 remotephases = pullop.remote.listkeys('phases')
509 516 publishing = bool(remotephases.get('publishing', False))
510 517 if remotephases and not publishing:
@@ -529,6 +536,7 b' def _pullobsolete(pullop):'
529 536 a new transaction have been created (when applicable).
530 537
531 538 Exists mostly to allow overriding for experimentation purpose"""
539 pullop.todosteps.remove('obsmarkers')
532 540 tr = None
533 541 if obsolete._enabled:
534 542 pullop.repo.ui.debug('fetching remote obsolete markers\n')
General Comments 0
You need to be logged in to leave comments. Login now