changeset 3826:8e8bd5bb2f90

evolve: declare updated and pctx variables in stopevolve() They will used in next patch.
author Pulkit Goyal <7895pulkit@gmail.com>
date Mon, 11 Jun 2018 00:43:39 +0530
parents b5dfa78073b9
children 82c72eb37f85
files hgext3rd/evolve/evolvecmd.py
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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)