evolve: add evolvestate as an argument to _finalizerelocate()
authorPulkit Goyal <7895pulkit@gmail.com>
Wed, 28 Mar 2018 17:37:10 +0530
changeset 3639 95a767b2769e
parent 3638 7bc4a72b8a0b
child 3640 5a127bc27419
evolve: add evolvestate as an argument to _finalizerelocate() This will help us to store bookmark changes to evolvestate to revert them in case when `hg evolve --abort` is called.
hgext3rd/evolve/evolvecmd.py
--- a/hgext3rd/evolve/evolvecmd.py	Wed Mar 28 17:33:54 2018 +0530
+++ b/hgext3rd/evolve/evolvecmd.py	Wed Mar 28 17:37:10 2018 +0530
@@ -547,7 +547,7 @@
         exc.__class__ = LocalMergeFailure
         tr.close() # to keep changes in this transaction (e.g. dirstate)
         raise
-    _finalizerelocate(repo, orig, dest, nodenew, tr, category)
+    _finalizerelocate(repo, orig, dest, nodenew, tr, category, evolvestate)
     return nodenew
 
 def _relocatecommit(repo, orig, commitmsg):
@@ -569,7 +569,7 @@
         repo.ui.restoreconfig(backup)
     return nodenew
 
-def _finalizerelocate(repo, orig, dest, nodenew, tr, category):
+def _finalizerelocate(repo, orig, dest, nodenew, tr, category, evolvestate):
     destbookmarks = repo.nodebookmarks(dest.node())
     nodesrc = orig.node()
     oldbookmarks = repo.nodebookmarks(nodesrc)