From 50b7357b0e79d5bdb91cc71c368c4bccbdf09463 Mon Sep 17 00:00:00 2001 From: Neil Date: Sun, 27 Jan 2013 15:19:46 +0200 Subject: [PATCH] Truncate file list if it looks likely to be too long --- irkerhook.py | 3 +++ 1 file changed, 3 insertions(+) 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 ' -- 2.34.1