[PATCH 1 of 2] histedit: break _histedit into smaller pieces (add _finishaction)
Kostia Balytskyi
ikostia at fb.com
Mon Feb 15 15:03:57 UTC 2016
# HG changeset patch
# User Kostia Balytskyi <ikostia at fb.com>
# Date 1455538053 0
# Mon Feb 15 12:07:33 2016 +0000
# Node ID 5f4766e10d8dae1a1a3cbc1a9ff1c15c852f0005
# Parent f17513bc8f81f768f1eb627870b74a4e025fdd9e
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 @@
_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 @@
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()
More information about the Mercurial-devel
mailing list