[PATCH 4 of 6] histedit: use _getsummary in torule

Sean Farley sean at farley.io
Tue Jun 21 19:32:44 EDT 2016


# HG changeset patch
# User Sean Farley <sean at 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

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


More information about the Mercurial-devel mailing list