Mercurial > public > mercurial-scm > hg-stable
diff hgext/notify.py @ 37087:f0b6fbea00cf
stringutil: bulk-replace call sites to point to new module
This might conflict with other patches floating around, sorry.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Thu, 22 Mar 2018 21:56:20 +0900 |
parents | c6061cadb400 |
children | a4cac7b0ea4f |
line wrap: on
line diff
--- a/hgext/notify.py Thu Mar 22 21:19:31 2018 +0900 +++ b/hgext/notify.py Thu Mar 22 21:56:20 2018 +0900 @@ -149,7 +149,10 @@ registrar, util, ) -from mercurial.utils import dateutil +from mercurial.utils import ( + dateutil, + stringutil, +) # Note for extension authors: ONLY specify testedwith = 'ships-with-hg-core' for # extensions which SHIP WITH MERCURIAL. Non-mainline extensions should @@ -277,7 +280,7 @@ def fixmail(self, addr): '''try to clean up email addresses.''' - addr = util.email(addr.strip()) + addr = stringutil.email(addr.strip()) if self.domain: a = addr.find('@localhost') if a != -1: @@ -372,7 +375,7 @@ subject = '%s: %s' % (self.root, s) maxsubject = int(self.ui.config('notify', 'maxsubject')) if maxsubject: - subject = util.ellipsis(subject, maxsubject) + subject = stringutil.ellipsis(subject, maxsubject) msg['Subject'] = mail.headencode(self.ui, subject, self.charsets, self.test) @@ -399,7 +402,7 @@ else: self.ui.status(_('notify: sending %d subscribers %d changes\n') % (len(subs), count)) - mail.sendmail(self.ui, util.email(msg['From']), + mail.sendmail(self.ui, stringutil.email(msg['From']), subs, msgtext, mbox=self.mbox) def diff(self, ctx, ref=None):