[PATCH 1 of 2 v2] histedit: break _histedit function into smaller pieces (add _continueaction)
Kostia Balytskyi
ikostia at fb.com
Sun Feb 14 21:24:43 UTC 2016
# HG changeset patch
# User Kostia Balytskyi <ikostia at fb.com>
# Date 1455483605 0
# Sun Feb 14 21:00:05 2016 +0000
# Node ID 50b59d46a06a5f1909a14043f3cb679a74b17139
# Parent e51c4ee0c781d5e41426e1dfbb43b4fd8d95fd42
histedit: break _histedit function into smaller pieces (add _continueaction)
This is a part of bigger effort to refactor histedit. Initial steps are to
break _histedit function into smaller pieces which will supposedly be more
understandable. After this is done, I will have a better understanding
of how histedit works and apply that to fix issue4800.
diff --git a/hgext/histedit.py b/hgext/histedit.py
--- a/hgext/histedit.py
+++ b/hgext/histedit.py
@@ -1036,7 +1036,6 @@
state.keep = opts.get('keep', False)
- supportsmarkers = obsolete.isenabled(repo, obsolete.createmarkersopt)
# rebuild state
if goal == 'continue':
@@ -1051,6 +1050,13 @@
else:
_newaction(ui, repo, state, revs, freeargs, opts)
+ _continueaction(ui, repo, state)
+
+def _continueaction(ui, repo, state):
+ """This action runs after either:
+ - bootstrapcontinue (if the goal is 'continue')
+ - _newaction (if the goal is 'new')
+ """
# preprocess rules so that we can hide inner folds from the user
# and only show one editor
actions = state.actions[:]
@@ -1092,6 +1098,7 @@
for n in succs[1:]:
ui.debug(m % node.short(n))
+ supportsmarkers = obsolete.isenabled(repo, obsolete.createmarkersopt)
if supportsmarkers:
# Only create markers if the temp nodes weren't already removed.
obsolete.createmarkers(repo, ((repo[t],()) for t in sorted(tmpnodes)
More information about the Mercurial-devel
mailing list