changeset 5011:04104042c6ad

evolve: delete redundant and incorrect code for updating dirstate In relocate() when we notice conflicts, we will try to fix up the dirstate by calling copies.duplicatecopies() and dirstatedance(). However, we had called _evolvemerge() just before that point and that has already fixed up the dirstate, so there's no need to do it again. Also, we did it incorrectly as the test case shows.
author Martin von Zweigbergk <martinvonz@google.com>
date Tue, 19 Nov 2019 14:54:13 -0800
parents effce0a1f5bd
children 5b5cfb9b0a0b
files hgext3rd/evolve/evolvecmd.py tests/test-evolve-continue.t
diffstat 2 files changed, 1 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/hgext3rd/evolve/evolvecmd.py	Tue Nov 19 14:24:31 2019 -0800
+++ b/hgext3rd/evolve/evolvecmd.py	Tue Nov 19 14:54:13 2019 -0800
@@ -16,7 +16,6 @@
     cmdutil,
     commands,
     context,
-    copies,
     error,
     encoding,
     hg,
@@ -1003,10 +1002,6 @@
         with repo.dirstate.parentchange():
             repo.setparents(dest.node(), orig.node())
             repo.dirstate.write(tr)
-            # fix up dirstate for copies and renames
-            copies.duplicatecopies(repo, repo[None], dest.rev(),
-                                   orig.p1().rev())
-            dirstatedance(repo, dest, orig.node(), None)
         hint = _(b"see 'hg help evolve.interrupted'")
         raise error.InterventionRequired(_(b"unresolved merge conflicts"),
                                          hint=hint)
--- a/tests/test-evolve-continue.t	Tue Nov 19 14:24:31 2019 -0800
+++ b/tests/test-evolve-continue.t	Tue Nov 19 14:54:13 2019 -0800
@@ -456,9 +456,9 @@
   unresolved merge conflicts
   (see 'hg help evolve.interrupted')
   [1]
-BROKEN: 'd' should be marked as a copy
   $ hg st -C
   M a
   A d
+    c
   R c
   ? a.orig