Patchwork [5,of,6] histedit: use _getsummary in ruleeditor

login
register
mail settings
Submitter Sean Farley
Date June 21, 2016, 11:32 p.m.
Message ID <6459e0be7633c075e610.1466551965@laptop.local>
Download mbox | patch
Permalink /patch/15570/
State Changes Requested
Headers show

Comments

Sean Farley - June 21, 2016, 11:32 p.m.
# HG changeset patch
# User Sean Farley <sean@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

Patch

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: