evolve: fix the dirstate after setting parents with dirty wdir (issue5930) stable
authorSushil khanchi <sushilkhanchi97@gmail.com>
Thu, 07 Mar 2019 01:47:14 +0530
branchstable
changeset 4426 7d97e08d13a0
parent 4425 43c24cf6d24b
child 4427 9e2ee7dc5e34
evolve: fix the dirstate after setting parents with dirty wdir (issue5930) Before this patch, during an interrupted evolve it can be confused about copies. This patch fix the dirstate when parents are changed using dirstate.setparents() with a dirty wdir. Changes in test file reflect the fixed behaviour.
hgext3rd/evolve/evolvecmd.py
tests/test-evolve-continue.t
--- a/hgext3rd/evolve/evolvecmd.py	Thu Mar 07 01:02:05 2019 +0530
+++ b/hgext3rd/evolve/evolvecmd.py	Thu Mar 07 01:47:14 2019 +0530
@@ -825,6 +825,7 @@
             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)
 
         class LocalMergeFailure(MergeFailure, exc.__class__):
             pass
--- a/tests/test-evolve-continue.t	Thu Mar 07 01:02:05 2019 +0530
+++ b/tests/test-evolve-continue.t	Thu Mar 07 01:47:14 2019 +0530
@@ -421,8 +421,6 @@
 affected by the evolved changeset (nor was 'a')
 
   $ hg st -C
-  M b
-    a
   M c
   A d
   ? c.orig