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.
--- 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