Patchwork [4,of,6] histedit: use _getsummary in torule

login
register
mail settings
Submitter Sean Farley
Date June 21, 2016, 11:32 p.m.
Message ID <6a766bb848aeadc8fc88.1466551964@laptop.local>
Download mbox | patch
Permalink /patch/15569/
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 1464382956 25200
#      Fri May 27 14:02:36 2016 -0700
# Node ID 6a766bb848aeadc8fc88d14e67bc8165a7a7fbd6
# Parent  48edf19158a5ca7bcac95e815dba8e4d351ba4ee
# EXP-Topic autoverb
histedit: use _getsummary in torule

Patch

diff --git a/hgext/histedit.py b/hgext/histedit.py
--- a/hgext/histedit.py
+++ b/hgext/histedit.py
@@ -418,13 +418,11 @@  class histeditaction(object):
 
         by default lines are in the form:
         <hash> <rev> <summary>
         """
         ctx = self.repo[self.node]
-        summary = ''
-        if ctx.description():
-            summary = ctx.description().splitlines()[0]
+        summary = _getsummary(ctx)
         line = '%s %s %d %s' % (self.verb, ctx, ctx.rev(), summary)
         # trim to 75 columns by default so it's not stupidly wide in my editor
         # (the 5 more are left for verb)
         maxlen = self.repo.ui.configint('histedit', 'linelen', default=80)
         maxlen = max(maxlen, 22) # avoid truncating hash