[PATCH 5 of 6] histedit: use _getsummary in ruleeditor
Sean Farley
sean at farley.io
Tue Jun 21 19:32:45 EDT 2016
# HG changeset patch
# User Sean Farley <sean at farley.io>
# Date 1464382980 25200
# Fri May 27 14:03:00 2016 -0700
# Node ID 6459e0be7633c075e61017f2eab9f41a3d21f5e8
# Parent 6a766bb848aeadc8fc88d14e67bc8165a7a7fbd6
# EXP-Topic autoverb
histedit: use _getsummary in ruleeditor
diff --git a/hgext/histedit.py b/hgext/histedit.py
--- a/hgext/histedit.py
+++ b/hgext/histedit.py
@@ -1316,14 +1316,11 @@ def ruleeditor(repo, ui, actions, editco
rules are in the format [ [act, ctx], ...] like in state.rules
"""
if repo.ui.configbool("experimental", "histedit.autoverb"):
for act in actions:
ctx = repo[act.node]
- summary = ''
- if ctx.description():
- summary = ctx.description().splitlines()[0]
-
+ summary = _getsummary(ctx)
fword = summary.split(' ', 1)[0].lower()
# if it doesn't end with the special character '!' just skip this
if fword.endswith('!'):
fword = fword[:-1]
if fword in primaryactions | secondaryactions | tertiaryactions:
More information about the Mercurial-devel
mailing list