From: Neil Date: Sun, 27 Jan 2013 13:19:46 +0000 (+0200) Subject: Truncate file list if it looks likely to be too long X-Git-Url: https://git.ctpug.org.za/?a=commitdiff_plain;h=50b7357b0e79d5bdb91cc71c368c4bccbdf09463;p=bzrirker.git Truncate file list if it looks likely to be too long --- diff --git a/irkerhook.py b/irkerhook.py index a1323b0..e9aabc8 100644 --- a/irkerhook.py +++ b/irkerhook.py @@ -42,6 +42,9 @@ class IrkerSender(object): 'files': ' '.join(files), 'logmsg': self.revision.get_summary(), } + if len(fields['files']) > 250: + # Dangerously long looking list of files, so truncate it + fields['files'] = fields['files'][:250] fields.update(self.colours()) text = ('%(bold)s%(project)s:%(reset)s ' '%(green)s%(committer)s%(reset)s '