# HG changeset patch
# User Pulkit Goyal <pulkit@yandex-team.ru>
# Date 1534756899 -10800
# Node ID b4d0245c7f409bdfbdb8262a903f5fe5ad82cf52
# Parent  828b423545b158282cc19c56f5b07b0322442b8f
evolve: delete evolvestate after aborting interrupted `next --evolve`

We didn't use to delete the evolvestate after aborting an interrupted `next
--evolve`. This patch makes sure we do that. The test changes demonstrate the
fix and we add a CHANGELOG entry about the fix.

diff -r 828b423545b1 -r b4d0245c7f40 CHANGELOG
--- a/CHANGELOG	Mon Aug 20 12:19:05 2018 +0300
+++ b/CHANGELOG	Mon Aug 20 12:21:39 2018 +0300
@@ -9,6 +9,7 @@
   * clone: fix possible crash when using clone bundle and forcing cache warming
   * obshashrange: fix speed and consistency issues during cache invalidation
   * obshashrange: properly persist all caches involved in obshashrange discovery
+  * delete the evolvestate after aborting interrupted `next --evolve`
 
 8.1.0 -- 2018-08-03
 -------------------
diff -r 828b423545b1 -r b4d0245c7f40 hgext3rd/evolve/evolvecmd.py
--- a/hgext3rd/evolve/evolvecmd.py	Mon Aug 20 12:19:05 2018 +0300
+++ b/hgext3rd/evolve/evolvecmd.py	Mon Aug 20 12:21:39 2018 +0300
@@ -1543,6 +1543,7 @@
             ui.status(_('evolve aborted\n'))
             ui.status(_('working directory is now at %s\n')
                       % pctx.hex()[:12])
+            evolvestate.delete()
             return 0
         return abortevolve(ui, repo, evolvestate)
     else:
diff -r 828b423545b1 -r b4d0245c7f40 tests/test-evolve-abort-orphan.t
--- a/tests/test-evolve-abort-orphan.t	Mon Aug 20 12:19:05 2018 +0300
+++ b/tests/test-evolve-abort-orphan.t	Mon Aug 20 12:21:39 2018 +0300
@@ -547,7 +547,6 @@
   branch
   cache
   dirstate
-  evolvestate
   last-message.txt
   requires
   store