changeset 3556:b0438c9101ad

evolve: load evolvestate before passing to continueevolve() This patch moves some code from continueevolve() to evolve() function so that we have a loaded evolvestate present in the evolve() function for post processing.
author Pulkit Goyal <7895pulkit@gmail.com>
date Fri, 16 Mar 2018 16:04:28 +0530
parents 60e132e20b14
children 77a400149758
files hgext3rd/evolve/evolvecmd.py
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/hgext3rd/evolve/evolvecmd.py	Fri Mar 16 15:56:05 2018 +0530
+++ b/hgext3rd/evolve/evolvecmd.py	Fri Mar 16 16:04:28 2018 +0530
@@ -1126,6 +1126,9 @@
     evolvestate = state.cmdstate(repo)
     # Continuation handling
     if contopt:
+        if not evolvestate:
+            raise error.Abort('no evolve to continue')
+        evolvestate.load()
         return continueevolve(ui, repo, evolvestate, progresscb)
 
     else:
@@ -1162,9 +1165,6 @@
 
 def continueevolve(ui, repo, evolvestate, progresscb):
     """logic for handling of `hg evolve --continue`"""
-    if not evolvestate:
-        raise error.Abort('no evolve to continue')
-    evolvestate.load()
     orig = repo[evolvestate['current']]
     with repo.wlock(), repo.lock():
         ctx = orig