pull: split remote phases retrieval from actual application
authorPierre-Yves David <pierre-yves.david@fb.com>
Tue, 27 May 2014 15:29:08 -0700
changeset 21654 ddf9a00c1239
parent 21653 4188cae727ce
child 21655 35095f332846
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.
mercurial/exchange.py
--- 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