# HG changeset patch # User Kostia Balytskyi # Date 1455483605 0 # Node ID 8fc55388ece5148c746f77c401d0a438849ae379 # Parent 2d09a400b4955e4807997269c71e3e633eac719d 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 -r 2d09a400b495 -r 8fc55388ece5 hgext/histedit.py --- a/hgext/histedit.py Mon Feb 01 17:20:51 2016 +0000 +++ b/hgext/histedit.py Sun Feb 14 21:00:05 2016 +0000 @@ -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)