[PATCH 7 of 7 phases V2] phases: set common changeset to public on pull
Pierre-Yves David
pierre-yves.david at ens-lyon.org
Thu Nov 10 23:26:10 UTC 2011
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at ens-lyon.org>
# Date 1320967322 -3600
# Node ID 9682e4581675a2ede7b7193b2a47336b7ef3a8d5
# Parent 8612aabc5c9109a09d42ff1c8f2f2c019687355d
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.advanceboundary(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