--- a/tests/test-evolve-continue.t Tue Mar 05 21:15:05 2019 +0530
+++ b/tests/test-evolve-continue.t Thu Mar 07 01:02:05 2019 +0530
@@ -356,3 +356,73 @@
continue: hg evolve --continue
$ hg evolve --continue
evolving 22:d2c94a8f44bd "added g"
+
+Testing that interrupted evolve don't get confused about copies (issue5930):
+----------------------------------------------------------------------------
+
+ $ cd ..
+ $ hg init issue5930
+ $ cd issue5930
+ $ echo a > a
+ $ hg ci -Am "added a"
+ adding a
+ $ hg cp a b
+ $ hg ci -m "rename a to b"
+
+ $ hg up 0 -q
+ $ echo c > c
+ $ hg ci -Am "added c"
+ adding c
+ created new head
+
+ $ echo d > c
+ $ echo d > d
+ $ hg ci -Am "added d, modified c"
+ adding d
+ $ hg up .^
+ 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
+
+ $ hg log -G -T "{rev} {desc}\n"
+ o 3 added d, modified c
+ |
+ @ 2 added c
+ |
+ | o 1 rename a to b
+ |/
+ o 0 added a
+
+ $ hg rebase -r . -d 1
+ rebasing 2:29edef26570b "added c"
+ 1 new orphan changesets
+ $ echo conflict > c
+ $ hg amend
+
+ $ hg log -G -T "{rev} {desc}\n"
+ @ 5 added c
+ |
+ | * 3 added d, modified c
+ | |
+ | x 2 added c
+ | |
+ o | 1 rename a to b
+ |/
+ o 0 added a
+
+
+ $ hg evolve
+ move:[3] added d, modified c
+ atop:[5] added c
+ merging c
+ warning: conflicts while merging c! (edit, then use 'hg resolve --mark')
+ fix conflicts and see `hg help evolve.interrupted`
+ [1]
+
+Status mentions file 'b' (copied from 'a') here, even though it wasn't
+affected by the evolved changeset (nor was 'a')
+
+ $ hg st -C
+ M b
+ a
+ M c
+ A d
+ ? c.orig