Truncate file list if it looks likely to be too long
authorNeil <neil@dip.sun.ac.za>
Sun, 27 Jan 2013 13:19:46 +0000 (15:19 +0200)
committerNeil <neil@dip.sun.ac.za>
Sun, 27 Jan 2013 13:19:46 +0000 (15:19 +0200)
irkerhook.py

index a1323b04a92b750a72f7d33b46177dcb96195268..e9aabc8477726d850f9779cb0f6844333f62c995 100644 (file)
@@ -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 '