changeset 21654:ddf9a00c1239

pull: split remote phases retrieval from actual application We want to be able to retrieve phases information through bundle2. The logic to apply remote phases will not change.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Tue, 27 May 2014 15:29:08 -0700
parents 4188cae727ce
children 35095f332846
files mercurial/exchange.py
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/exchange.py	Tue May 27 15:02:51 2014 -0700
+++ b/mercurial/exchange.py	Tue May 27 15:29:08 2014 -0700
@@ -595,8 +595,12 @@
 
 def _pullphase(pullop):
     # Get remote phases data from remote
+    remotephases = pullop.remote.listkeys('phases')
+    _pullapplyphases(pullop, remotephases)
+
+def _pullapplyphases(pullop, remotephases):
+    """apply phase movement from observed remote state"""
     pullop.todosteps.remove('phases')
-    remotephases = pullop.remote.listkeys('phases')
     publishing = bool(remotephases.get('publishing', False))
     if remotephases and not publishing:
         # remote is new and unpublishing