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