From 3f06f6fb40b41813e946154d591f4d1f37b52f85 Mon Sep 17 00:00:00 2001 From: Konstantin Ryabitsev Date: Fri, 10 Apr 2020 15:05:40 -0400 Subject: Add summaries to default templates They are much more useful if b4.thanks-commit-url-mask is set, but even without them this will list all subjects and corresponding commit IDs. Signed-off-by: Konstantin Ryabitsev --- b4/mbox.py | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'b4/mbox.py') diff --git a/b4/mbox.py b/b4/mbox.py index bafe754..8c4ddec 100644 --- a/b4/mbox.py +++ b/b4/mbox.py @@ -169,16 +169,6 @@ def thanks_record_am(lser): allto = email.utils.getaddresses([str(x) for x in lmsg.msg.get_all('to', [])]) allcc = email.utils.getaddresses([str(x) for x in lmsg.msg.get_all('cc', [])]) - quotelines = list() - qcount = 0 - for line in lmsg.body.split('\n'): - # Quote the first paragraph only and then [snip] if we quoted more than 5 lines - if qcount > 5 and (not len(line.strip()) or line.strip().find('---') == 0): - quotelines.append('> ') - quotelines.append('> [...]') - break - quotelines.append('> %s' % line.strip('\r\n')) - qcount += 1 out = { 'msgid': lmsg.msgid, @@ -189,7 +179,7 @@ def thanks_record_am(lser): 'cc': b4.format_addrs(allcc), 'references': b4.LoreMessage.clean_header(lmsg.msg['References']), 'sentdate': b4.LoreMessage.clean_header(lmsg.msg['Date']), - 'quote': '\n'.join(quotelines), + 'quote': b4.make_quote(lmsg.body, maxlines=5), 'patches': patches, } fullpath = os.path.join(datadir, filename) -- cgit v1.2.3