# HG changeset patch # User Pulkit Goyal <7895pulkit@gmail.com> # Date 1528658019 -19800 # Node ID 8e8bd5bb2f904609c862c8e2d136db43e3302914 # Parent b5dfa78073b920c5731fb726488a20bd98978f71 evolve: declare updated and pctx variables in stopevolve() They will used in next patch. diff -r b5dfa78073b9 -r 8e8bd5bb2f90 hgext3rd/evolve/evolvecmd.py --- a/hgext3rd/evolve/evolvecmd.py Sun Jun 10 22:52:11 2018 +0530 +++ b/hgext3rd/evolve/evolvecmd.py Mon Jun 11 00:43:39 2018 +0530 @@ -1474,8 +1474,11 @@ def stopevolve(ui, repo, evolvestate): """logic for handling of `hg evolve --stop`""" - pctx = repo['.'] - hg.updaterepo(repo, pctx.node(), True) + updated = False + pctx = None + if not updated: + pctx = repo['.'] + hg.updaterepo(repo, pctx.node(), True) ui.status(_('stopped the interrupted evolve\n')) ui.status(_('working directory is now at %s\n') % pctx)