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.
--- 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