# HG changeset patch # User Pulkit Goyal <7895pulkit@gmail.com> # Date 1521196468 -19800 # Node ID b0438c9101adbe9e2aee775a7cf928245f6d477a # Parent 60e132e20b14f6875a22d598a1013f2f9251173d 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. diff -r 60e132e20b14 -r b0438c9101ad hgext3rd/evolve/evolvecmd.py --- 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