# HG changeset patch # User Sushil khanchi # Date 1551903434 -19800 # Node ID 7d97e08d13a074f343d17095cb298ad742ed8dac # Parent 43c24cf6d24b6d344f81bf80a0761b495be47198 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. diff -r 43c24cf6d24b -r 7d97e08d13a0 hgext3rd/evolve/evolvecmd.py --- 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 diff -r 43c24cf6d24b -r 7d97e08d13a0 tests/test-evolve-continue.t --- 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