builddependencies: don't remove found deps when divergence found (issue5946) stable
authorMartin von Zweigbergk <martinvonz@google.com>
Wed, 25 Jul 2018 15:30:37 -0700
branchstable
changeset 3901 f2b8429db565
parent 3900 05cb942cb9b9
child 3902 9c4847b93d3c
child 3907 4cd909a17873
child 3914 96945ea908df
builddependencies: don't remove found deps when divergence found (issue5946) It seems obviously wrong to not keep any dependencies for a revision that we had already found (for p1) if we run into divergence (from p2). It also happens to fix issue5946 :)
hgext3rd/evolve/utility.py
tests/test-evolve-issue5832.t
--- a/hgext3rd/evolve/utility.py	Wed Jul 25 14:47:16 2018 -0700
+++ b/hgext3rd/evolve/utility.py	Wed Jul 25 15:30:37 2018 -0700
@@ -109,7 +109,7 @@
                         succ = repo[node].rev()
                         if succ in revs:
                             tset.add(succ)
-                dependencies[r] = tset
+                dependencies[r].update(tset)
                 continue
             if succ in revs:
                 dependencies[r].add(succ)
--- a/tests/test-evolve-issue5832.t	Wed Jul 25 14:47:16 2018 -0700
+++ b/tests/test-evolve-issue5832.t	Wed Jul 25 15:30:37 2018 -0700
@@ -393,8 +393,41 @@
   o  0:bde1d2b6b5e5 added base
       () draft
 
-  $ hg evolve --any --all --dry-run 2> error.log
-  [1]
-  $ tail -2 error.log
-      dependencies[dependent].remove(rev)
-  KeyError: 2
+  $ hg evolve --any --all --dry-run
+  move:[2] added b
+  atop:[6] added a
+  hg rebase -r a1da0651488c -d 5568b87b1491
+  could not solve instability, ambiguous destination: parent split across two branches
+
+  $ hg evolve --any --all --config ui.interactive=True <<EOF
+  > 1
+  > EOF
+  move:[2] added b
+  atop:[6] added a
+  ancestor 'b9b387427a53' split over multiple topological branches.
+  choose an evolve destination:
+  0: [62fb70414f99] added c
+  1: [5841d7cf9893] added d
+  q: quit the prompt
+  enter the index of the revision you want to select: 1
+  move:[4] merge commit
+  atop:[8] added d
+  move:[10] merge commit
+  atop:[9] added b
+  working directory is now at 578c938ebd2e
+
+  $ hg glog
+  @    11:578c938ebd2e merge commit
+  |\    () draft
+  | o  9:da76bb7cd904 added b
+  | |   () draft
+  o |  8:5841d7cf9893 added d
+  | |   () draft
+  +---o  7:62fb70414f99 added c
+  | |     () draft
+  | o  6:5568b87b1491 added a
+  | |   () draft
+  | o  5:0a6281e212fe added l
+  |/    () draft
+  o  0:bde1d2b6b5e5 added base
+      () draft