##// END OF EJS Templates
pull: move phases synchronisation in its own function...
Pierre-Yves David -
r20486:0c469df6 default
parent child Browse files
Show More
@@ -473,23 +473,7 b' def pull(repo, remote, heads=None, force'
473 subset = pullop.heads
473 subset = pullop.heads
474 pullop.pulledsubset = subset
474 pullop.pulledsubset = subset
475
475
476 # Get remote phases data from remote
476 _pullphase(pullop)
477 remotephases = pullop.remote.listkeys('phases')
478 publishing = bool(remotephases.get('publishing', False))
479 if remotephases and not publishing:
480 # remote is new and unpublishing
481 pheads, _dr = phases.analyzeremotephases(pullop.repo,
482 pullop.pulledsubset,
483 remotephases)
484 phases.advanceboundary(pullop.repo, phases.public, pheads)
485 phases.advanceboundary(pullop.repo, phases.draft,
486 pullop.pulledsubset)
487 else:
488 # Remote is old or publishing all common changesets
489 # should be seen as public
490 phases.advanceboundary(pullop.repo, phases.public,
491 pullop.pulledsubset)
492
493 _pullobsolete(pullop)
477 _pullobsolete(pullop)
494 pullop.closetransaction()
478 pullop.closetransaction()
495 finally:
479 finally:
@@ -498,6 +482,24 b' def pull(repo, remote, heads=None, force'
498
482
499 return result
483 return result
500
484
485 def _pullphase(pullop):
486 # Get remote phases data from remote
487 remotephases = pullop.remote.listkeys('phases')
488 publishing = bool(remotephases.get('publishing', False))
489 if remotephases and not publishing:
490 # remote is new and unpublishing
491 pheads, _dr = phases.analyzeremotephases(pullop.repo,
492 pullop.pulledsubset,
493 remotephases)
494 phases.advanceboundary(pullop.repo, phases.public, pheads)
495 phases.advanceboundary(pullop.repo, phases.draft,
496 pullop.pulledsubset)
497 else:
498 # Remote is old or publishing all common changesets
499 # should be seen as public
500 phases.advanceboundary(pullop.repo, phases.public,
501 pullop.pulledsubset)
502
501 def _pullobsolete(pullop):
503 def _pullobsolete(pullop):
502 """utility function to pull obsolete markers from a remote
504 """utility function to pull obsolete markers from a remote
503
505
General Comments 0
You need to be logged in to leave comments. Login now