[PATCH 9 of 9 phases] phases: set common changeset to public on pull

Pierre-Yves David pierre-yves.david at ens-lyon.org
Mon Nov 7 11:43:21 CST 2011


# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at logilab.fr>
# Date 1319019990 -7200
# Node ID d503581b3aff474f8daf58579e3bcbaef909bdc6
# Parent  648b3733e5b9241867d7ebeb3f2c0923c7098448
phases: set common changeset to public on pull

diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
--- a/mercurial/localrepo.py
+++ b/mercurial/localrepo.py
@@ -1520,6 +1520,7 @@
                     cg = remote.changegroupsubset(fetch, heads, 'pull')
                 result = self.addchangegroup(cg, 'pull', remote.url(),
                                              lock=lock)
+            phases.moveboundary(self, 0, common)
         finally:
             lock.release()
 
diff --git a/tests/test-phases-exchange.t b/tests/test-phases-exchange.t
--- a/tests/test-phases-exchange.t
+++ b/tests/test-phases-exchange.t
@@ -80,3 +80,33 @@
   1 0 a-B
   0 0 a-A
 
+update must update phase of common changeset too
+
+  $ hg pull ../beta # getting b-A
+  pulling from ../beta
+  searching for changes
+  adding changesets
+  adding manifests
+  adding file changes
+  added 1 changesets with 1 changes to 1 files (+1 heads)
+  (run 'hg heads' to see heads, 'hg merge' to merge)
+
+  $ cd ../beta
+  $ hgph # not updated by remote pull
+  4 0 a-D
+  3 0 a-C
+  2 1 b-A
+  1 0 a-B
+  0 0 a-A
+  $ hg pull ../alpha
+  pulling from ../alpha
+  searching for changes
+  no changes found
+  $ hgph
+  4 0 a-D
+  3 0 a-C
+  2 0 b-A
+  1 0 a-B
+  0 0 a-A
+
+


More information about the Mercurial-devel mailing list