equal
deleted
inserted
replaced
133 return path |
133 return path |
134 |
134 |
135 def fixmail(self, addr): |
135 def fixmail(self, addr): |
136 '''try to clean up email addresses.''' |
136 '''try to clean up email addresses.''' |
137 |
137 |
138 addr = templater.email(addr.strip()) |
138 addr = util.email(addr.strip()) |
139 if self.domain: |
139 if self.domain: |
140 a = addr.find('@localhost') |
140 a = addr.find('@localhost') |
141 if a != -1: |
141 if a != -1: |
142 addr = addr[:a] |
142 addr = addr[:a] |
143 if '@' not in addr: |
143 if '@' not in addr: |
229 if not msgtext.endswith('\n'): |
229 if not msgtext.endswith('\n'): |
230 self.ui.write('\n') |
230 self.ui.write('\n') |
231 else: |
231 else: |
232 self.ui.status(_('notify: sending %d subscribers %d changes\n') % |
232 self.ui.status(_('notify: sending %d subscribers %d changes\n') % |
233 (len(self.subs), count)) |
233 (len(self.subs), count)) |
234 mail.sendmail(self.ui, templater.email(msg['From']), |
234 mail.sendmail(self.ui, util.email(msg['From']), |
235 self.subs, msgtext) |
235 self.subs, msgtext) |
236 |
236 |
237 def diff(self, node, ref): |
237 def diff(self, node, ref): |
238 maxdiff = int(self.ui.config('notify', 'maxdiff', 300)) |
238 maxdiff = int(self.ui.config('notify', 'maxdiff', 300)) |
239 if maxdiff == 0: |
239 if maxdiff == 0: |