# HG changeset patch # User Kostia Balytskyi # Date 2016-02-15 12:07:33 # Node ID 17c474fdb225eee48c56a088c6b4e86a9327d13c # Parent 5ec1ce8fdf0a72699a771962de083d227375b20d histedit: break _histedit into smaller pieces (add _finishaction) This is a part of a bigger effort to refactor histedit with ultimate goal of understanding it. diff --git a/hgext/histedit.py b/hgext/histedit.py --- a/hgext/histedit.py +++ b/hgext/histedit.py @@ -1064,6 +1064,7 @@ def _histedit(ui, repo, state, *freeargs _newaction(ui, repo, state, revs, freeargs, opts) _continueaction(ui, repo, state) + _finishaction(ui, repo, state) def _continueaction(ui, repo, state): """This action runs after either: @@ -1094,6 +1095,8 @@ def _continueaction(ui, repo, state): state.write() ui.progress(_("editing"), None) +def _finishaction(ui, repo, state): + """This action runs when histedit is finishing its session""" repo.ui.pushbuffer() hg.update(repo, state.parentctxnode, quietempty=True) repo.ui.popbuffer()