# HG changeset patch # User Martin von Zweigbergk # Date 1574204053 28800 # Node ID 04104042c6adbed6c7c2d0d0d2ad0845ca5a46a7 # Parent effce0a1f5bd5ade7c107e0b62d8cdf28a781351 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. diff -r effce0a1f5bd -r 04104042c6ad hgext3rd/evolve/evolvecmd.py --- 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) diff -r effce0a1f5bd -r 04104042c6ad tests/test-evolve-continue.t --- 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