changeset 1375:9e062e6598e9 stable

evolve: search divergence within all precursors Before this patches we looking for divergence base in immediate successors only. This was a bug leading the divergence base to be reported missing more than it should.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Thu, 18 Jun 2015 15:56:56 -0700
parents 39f2c1ab3a53
children 8bb2e04cc18c
files README hgext/evolve.py tests/test-stabilize-result.t
diffstat 3 files changed, 10 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/README	Thu Jun 18 15:25:51 2015 -0700
+++ b/README	Thu Jun 18 15:56:56 2015 -0700
@@ -60,6 +60,7 @@
 - fix simple4server bug tracker URL
 - compatibility with bookmark API change in future Mercurial 3.5
 - prune no longer move the active bookmark for no reason (issue4559)
+- evolve: stop reporting divergence base as missing when we actually have it
 
 5.1.4 -- 2015-04-23
 
--- a/hgext/evolve.py	Thu Jun 18 15:25:51 2015 -0700
+++ b/hgext/evolve.py	Thu Jun 18 15:56:56 2015 -0700
@@ -1586,8 +1586,8 @@
 
     XXX this woobly function won't survive XXX
     """
-    repo = ctx.repo.unfitered()
-    for base in repo.set('reverse(precursors(%d))', ctx):
+    repo = ctx._repo.unfiltered()
+    for base in repo.set('reverse(allprecursors(%d))', ctx):
         newer = obsolete.successorssets(ctx._repo, base.node())
         # drop filter and solution including the original ctx
         newer = [n for n in newer if n and ctx.node() not in n]
--- a/tests/test-stabilize-result.t	Thu Jun 18 15:25:51 2015 -0700
+++ b/tests/test-stabilize-result.t	Thu Jun 18 15:56:56 2015 -0700
@@ -319,18 +319,20 @@
   $ echo 'gotta break' >> a
   $ hg amend
   2 new divergent changesets
+# reamend so that the case is not the first precursor.
+  $ hg amend -m "More addition (2)"
   $ hg phase 'divergent()'
   21: draft
-  23: draft
+  24: draft
   $ hg evolve -qn
-  hg update -c 36e188246d67 &&
+  hg update -c 0b336205a5d0 &&
   hg merge f344982e63c4 &&
-  hg commit -m "auto merge resolving conflict between 36e188246d67 and f344982e63c4"&&
+  hg commit -m "auto merge resolving conflict between 0b336205a5d0 and f344982e63c4"&&
   hg up -C 3932c176bbaa &&
   hg revert --all --rev tip &&
-  hg commit -m "`hg log -r 36e188246d67 --template={desc}`";
+  hg commit -m "`hg log -r 0b336205a5d0 --template={desc}`";
   $ hg evolve
-  merge:[23] More addition
+  merge:[24] More addition (2)
   with: [21] More addition
   base: [15] More addition
   merging a