changeset 20485:de2544933139

pull: move pulled subset into the object We compute the set of local changeset that were target of the pull. This is then used by phases logic to decide which part of the history should have it phase updated. We move this information into the object to allow extraction of phase synchronisation in its own function. I expect obsolete marker exchange to use it too in the future.
author Pierre-Yves David <pierre-yves.david@logilab.fr>
date Fri, 31 Jan 2014 01:21:42 -0800
parents 0f1ef9e9e904
children 0c469df6e914
files mercurial/exchange.py
diffstat 1 files changed, 9 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/exchange.py	Thu Feb 06 15:56:25 2014 -0800
+++ b/mercurial/exchange.py	Fri Jan 31 01:21:42 2014 -0800
@@ -395,6 +395,8 @@
         self._trname = 'pull\n' + util.hidepassword(remote.url())
         # hold the transaction once created
         self._tr = None
+        # heads of the set of changeset target by the pull
+        self.pulledsubset = None
 
     def gettransaction(self):
         """get appropriate pull transaction, creating it if needed"""
@@ -469,20 +471,24 @@
             # We pulled a specific subset
             # sync on this subset
             subset = pullop.heads
+        pullop.pulledsubset = subset
 
         # Get remote phases data from remote
         remotephases = pullop.remote.listkeys('phases')
         publishing = bool(remotephases.get('publishing', False))
         if remotephases and not publishing:
             # remote is new and unpublishing
-            pheads, _dr = phases.analyzeremotephases(pullop.repo, subset,
+            pheads, _dr = phases.analyzeremotephases(pullop.repo,
+                                                     pullop.pulledsubset,
                                                      remotephases)
             phases.advanceboundary(pullop.repo, phases.public, pheads)
-            phases.advanceboundary(pullop.repo, phases.draft, subset)
+            phases.advanceboundary(pullop.repo, phases.draft,
+                                   pullop.pulledsubset)
         else:
             # Remote is old or publishing all common changesets
             # should be seen as public
-            phases.advanceboundary(pullop.repo, phases.public, subset)
+            phases.advanceboundary(pullop.repo, phases.public,
+                                   pullop.pulledsubset)
 
         _pullobsolete(pullop)
         pullop.closetransaction()