--- a/hgext3rd/evolve/evolvecmd.py Mon Jan 22 17:29:56 2018 +0530
+++ b/hgext3rd/evolve/evolvecmd.py Mon Jan 22 17:44:57 2018 +0530
@@ -47,7 +47,8 @@
_bookmarksupdater = rewriteutil.bookmarksupdater
mergetoolopts = cmdutil.mergetoolopts
-def _solveone(ui, repo, ctx, dryrun, confirm, progresscb, category):
+def _solveone(ui, repo, ctx, evolvestate, dryrun, confirm,
+ progresscb, category):
"""Resolve the troubles affecting one revision
returns a tuple (bool, newnode) where,
@@ -62,12 +63,14 @@
lock = repo.lock()
tr = repo.transaction("evolve")
if 'orphan' == category:
- result = _solveunstable(ui, repo, ctx, dryrun, confirm, progresscb)
+ result = _solveunstable(ui, repo, ctx, evolvestate,
+ dryrun, confirm, progresscb)
elif 'phasedivergent' == category:
- result = _solvebumped(ui, repo, ctx, dryrun, confirm, progresscb)
+ result = _solvebumped(ui, repo, ctx, evolvestate,
+ dryrun, confirm, progresscb)
elif 'contentdivergent' == category:
- result = _solvedivergent(ui, repo, ctx, dryrun, confirm,
- progresscb)
+ result = _solvedivergent(ui, repo, ctx, evolvestate,
+ dryrun, confirm, progresscb)
else:
assert False, "unknown trouble category: %s" % (category)
tr.close()
@@ -75,7 +78,7 @@
finally:
lockmod.release(tr, lock, wlock)
-def _solveunstable(ui, repo, orig, dryrun=False, confirm=False,
+def _solveunstable(ui, repo, orig, evolvestate, dryrun=False, confirm=False,
progresscb=None):
""" Tries to stabilize the changeset orig which is orphan.
@@ -162,7 +165,7 @@
" or use 'hg update -C .' to abort\n"))
raise
-def _solvebumped(ui, repo, bumped, dryrun=False, confirm=False,
+def _solvebumped(ui, repo, bumped, evolvestate, dryrun=False, confirm=False,
progresscb=None):
"""Stabilize a bumped changeset
@@ -277,8 +280,8 @@
repo.dirstate.setparents(newid, node.nullid)
return (True, newid)
-def _solvedivergent(ui, repo, divergent, dryrun=False, confirm=False,
- progresscb=None):
+def _solvedivergent(ui, repo, divergent, evolvestate, dryrun=False,
+ confirm=False, progresscb=None):
"""tries to solve content-divergence of a changeset
returns a tuple (bool, newnode) where,
@@ -1155,7 +1158,7 @@
for rev in revs:
curctx = repo[rev]
progresscb()
- ret = _solveone(ui, repo, curctx, dryrunopt, confirmopt,
+ ret = _solveone(ui, repo, curctx, evolvestate, dryrunopt, confirmopt,
progresscb, targetcat)
seen += 1
if ret[0]: