Mercurial > public > mercurial-scm > hg
diff hgext/notify.py @ 2889:20b95aef3fe0
Move ui.sendmail to mail.connect/sendmail
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Tue, 15 Aug 2006 14:06:50 -0500 |
parents | 4ec58b157265 |
children | 47aad3489da8 |
line wrap: on
line diff
--- a/hgext/notify.py Tue Aug 15 11:34:08 2006 -0500 +++ b/hgext/notify.py Tue Aug 15 14:06:50 2006 -0500 @@ -67,8 +67,8 @@ from mercurial.demandload import * from mercurial.i18n import gettext as _ from mercurial.node import * -demandload(globals(), 'email.Parser mercurial:commands,patch,templater,util') -demandload(globals(), 'fnmatch socket time') +demandload(globals(), 'mercurial:commands,patch,templater,util,mail') +demandload(globals(), 'email.Parser fnmatch socket time') # template for single changeset can include email headers. single_template = ''' @@ -229,8 +229,8 @@ else: self.ui.status(_('notify: sending %d subscribers %d changes\n') % (len(self.subs), count)) - mail = self.ui.sendmail() - mail.sendmail(templater.email(msg['From']), self.subs, msgtext) + mail.sendmail(self.ui, templater.email(msg['From']), + self.subs, msgtext) def diff(self, node, ref): maxdiff = int(self.ui.config('notify', 'maxdiff', 300))