tests/test-evolve-issue5832.t
branchstable
changeset 3898 93d9cde93b82
parent 3657 b36e38e3a176
child 3901 f2b8429db565
--- a/tests/test-evolve-issue5832.t	Wed Jul 18 18:17:16 2018 +0800
+++ b/tests/test-evolve-issue5832.t	Wed Jul 25 14:00:49 2018 -0700
@@ -180,7 +180,13 @@
   |/    () draft
   o  0:bde1d2b6b5e5 added base
       () draft
- 
+  $ hg log -r 'p1(.)'
+  changeset:   3:9402371b436e
+  parent:      0:bde1d2b6b5e5
+  user:        test
+  date:        Thu Jan 01 00:00:00 1970 +0000
+  summary:     added c and d
+  
   $ hg up bde1d2b6b5e5
   0 files updated, 0 files merged, 4 files removed, 0 files unresolved
   $ echo l > l
@@ -279,3 +285,116 @@
   |/    () draft
   o  0:bde1d2b6b5e5 added base
       () draft
+
+Test for issue5946 present at https://bz.mercurial-scm.org/show_bug.cgi?id=5946
+===============================================================================
+issue with computing dependency with split and merge
+
+  $ hg init issue5946
+  $ cd issue5946
+  $ echo base > base
+  $ hg ci -Aqm "added base"
+
+  $ echo a > a
+  $ hg ci -Aqm "added a"
+
+  $ echo b > b
+  $ hg ci -Aqm "added b"
+
+  $ hg up .^^
+  0 files updated, 0 files merged, 2 files removed, 0 files unresolved
+  $ echo c > c
+  $ echo d > d
+  $ hg ci -Aqm "added c and d"
+The next line is the only difference from issue5833 above, i.e. the order of
+the parents is reversed
+  $ hg co 2
+  2 files updated, 0 files merged, 2 files removed, 0 files unresolved
+
+  $ hg merge
+  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  (branch merge, don't forget to commit)
+  $ hg ci -m "merge commit"
+
+  $ hg glog
+  @    4:b9b387427a53 merge commit
+  |\    () draft
+  | o  3:9402371b436e added c and d
+  | |   () draft
+  o |  2:a1da0651488c added b
+  | |   () draft
+  o |  1:1b24879c5c3c added a
+  |/    () draft
+  o  0:bde1d2b6b5e5 added base
+      () draft
+  $ hg log -r 'p1(.)'
+  changeset:   2:a1da0651488c
+  user:        test
+  date:        Thu Jan 01 00:00:00 1970 +0000
+  summary:     added b
+  
+  $ hg up bde1d2b6b5e5
+  0 files updated, 0 files merged, 4 files removed, 0 files unresolved
+  $ echo l > l
+  $ hg ci -Aqm "added l"
+  $ hg grab -r 1b24879c5c3c
+  grabbing 1:1b24879c5c3c "added a"
+  2 new orphan changesets
+
+  $ hg up bde1d2b6b5e5
+  0 files updated, 0 files merged, 2 files removed, 0 files unresolved
+  $ echo c > c
+  $ hg ci -Aqm "added c"
+  $ hg up .^
+  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  $ echo d > d
+  $ hg ci -Aqm "added d"
+
+  $ hg glog
+  @  8:5841d7cf9893 added d
+  |   () draft
+  | o  7:62fb70414f99 added c
+  |/    () draft
+  | o  6:5568b87b1491 added a
+  | |   () draft
+  | o  5:0a6281e212fe added l
+  |/    () draft
+  | *    4:b9b387427a53 merge commit
+  | |\    () draft
+  +---o  3:9402371b436e added c and d
+  | |     () draft
+  | *  2:a1da0651488c added b
+  | |   () draft
+  | x  1:1b24879c5c3c added a
+  |/    () draft
+  o  0:bde1d2b6b5e5 added base
+      () draft
+
+  $ hg prune -r 9402371b436e --succ 5841d7cf9893 --succ 62fb70414f99 --split
+  1 changesets pruned
+
+  $ hg glog
+  @  8:5841d7cf9893 added d
+  |   () draft
+  | o  7:62fb70414f99 added c
+  |/    () draft
+  | o  6:5568b87b1491 added a
+  | |   () draft
+  | o  5:0a6281e212fe added l
+  |/    () draft
+  | *    4:b9b387427a53 merge commit
+  | |\    () draft
+  +---x  3:9402371b436e added c and d
+  | |     () draft
+  | *  2:a1da0651488c added b
+  | |   () draft
+  | x  1:1b24879c5c3c added a
+  |/    () draft
+  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