histedit: use _getsummary in ruleeditor
authorSean Farley <sean@farley.io>
Fri, 27 May 2016 14:03:00 -0700
changeset 29469 ffa194c3a83c
parent 29468 04b68ce5e964
child 29470 2ff243c415b4
histedit: use _getsummary in ruleeditor This patch uses our common method instead of duplicating logic.
hgext/histedit.py
--- a/hgext/histedit.py	Fri May 27 14:02:36 2016 -0700
+++ b/hgext/histedit.py	Fri May 27 14:03:00 2016 -0700
@@ -1318,10 +1318,7 @@
     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('!'):