hgext/notify.py
changeset 43575 67b4439c09b2
parent 43506 9f70512ae2cf
child 43576 14b96072797d
equal deleted inserted replaced
43574:02802fa87b74 43575:67b4439c09b2
   419                 s = ctx.description().lstrip().split(b'\n', 1)[0].rstrip()
   419                 s = ctx.description().lstrip().split(b'\n', 1)[0].rstrip()
   420                 subject = b'%s: %s' % (self.root, s)
   420                 subject = b'%s: %s' % (self.root, s)
   421         maxsubject = int(self.ui.config(b'notify', b'maxsubject'))
   421         maxsubject = int(self.ui.config(b'notify', b'maxsubject'))
   422         if maxsubject:
   422         if maxsubject:
   423             subject = stringutil.ellipsis(subject, maxsubject)
   423             subject = stringutil.ellipsis(subject, maxsubject)
   424         msg['Subject'] = encoding.strfromlocal(
   424         msg['Subject'] = mail.headencode(
   425             mail.headencode(self.ui, subject, self.charsets, self.test)
   425             self.ui, subject, self.charsets, self.test
   426         )
   426         )
   427 
   427 
   428         # try to make message have proper sender
   428         # try to make message have proper sender
   429         if not sender:
   429         if not sender:
   430             sender = self.ui.config(b'email', b'from') or self.ui.username()
   430             sender = self.ui.config(b'email', b'from') or self.ui.username()