##// END OF EJS Templates
notify: use util.ellipsis() to truncate long subject
Yuya Nishihara -
r13202:d83566f4 stable
parent child Browse files
Show More
@@ -215,8 +215,8 b' class notifier(object):'
215 s = ctx.description().lstrip().split('\n', 1)[0].rstrip()
215 s = ctx.description().lstrip().split('\n', 1)[0].rstrip()
216 subject = '%s: %s' % (self.root, s)
216 subject = '%s: %s' % (self.root, s)
217 maxsubject = int(self.ui.config('notify', 'maxsubject', 67))
217 maxsubject = int(self.ui.config('notify', 'maxsubject', 67))
218 if maxsubject and len(subject) > maxsubject:
218 if maxsubject:
219 subject = subject[:maxsubject - 3] + '...'
219 subject = util.ellipsis(subject, maxsubject)
220 msg['Subject'] = mail.headencode(self.ui, subject,
220 msg['Subject'] = mail.headencode(self.ui, subject,
221 self.charsets, self.test)
221 self.charsets, self.test)
222
222
General Comments 0
You need to be logged in to leave comments. Login now