hgext/notify.py
branchstable
changeset 13202 d83566f4453b
parent 10282 08a0f04b56bd
child 13878 a8d13ee0ce68
equal deleted inserted replaced
13192:4d03707916d3 13202:d83566f4453b
   213                 subject = _('%s: %d new changesets') % (self.root, count)
   213                 subject = _('%s: %d new changesets') % (self.root, count)
   214             else:
   214             else:
   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 
   223         # try to make message have proper sender
   223         # try to make message have proper sender
   224         if not sender:
   224         if not sender: