evolve: add evolvestate as an argument to evolvecmd.relocate()
This will help us in passing it to _finalizerelocate() and store the bookmark
changes which happend.
--- a/hgext3rd/evolve/evolvecmd.py Wed Mar 28 17:13:08 2018 +0530
+++ b/hgext3rd/evolve/evolvecmd.py Wed Mar 28 17:33:54 2018 +0530
@@ -168,7 +168,8 @@
if progresscb:
progresscb()
try:
- newid = relocate(repo, orig, target, pctx, keepbranch, 'orphan')
+ newid = relocate(repo, orig, target, evolvestate, pctx,
+ keepbranch, 'orphan')
return (True, newid)
except MergeFailure:
ops = {'current': orig.node()}
@@ -236,7 +237,8 @@
repo.ui.status(
_('rebasing to destination parent: %s\n') % prec.p1())
try:
- tmpid = relocate(repo, bumped, prec.p1(), category='phasedivergent')
+ tmpid = relocate(repo, bumped, prec.p1(), evolvestate,
+ category='phasedivergent')
if tmpid is not None:
tmpctx = repo[tmpid]
compat.createmarkers(repo, [(bumped, (tmpctx,))],
@@ -479,7 +481,8 @@
ordering.extend(sorted(dependencies))
return ordering
-def relocate(repo, orig, dest, pctx=None, keepbranch=False, category=None):
+def relocate(repo, orig, dest, evolvestate, pctx=None, keepbranch=False,
+ category=None):
"""rewrites the orig rev on dest rev
returns the node of new commit which is formed