Show More
@@ -99,7 +99,9 b' class notifier(object):' | |||
|
99 | 99 | |
|
100 | 100 | def __init__(self, ui, repo, hooktype): |
|
101 | 101 | self.ui = ui |
|
102 |
|
|
|
102 | cfg = self.ui.config('notify', 'config') | |
|
103 | if cfg: | |
|
104 | self.ui.readconfig(cfg) | |
|
103 | 105 | self.repo = repo |
|
104 | 106 | self.stripcount = int(self.ui.config('notify', 'strip', 0)) |
|
105 | 107 | self.root = self.strip(self.repo.root) |
@@ -225,6 +227,8 b' class notifier(object):' | |||
|
225 | 227 | if not msgtext.endswith('\n'): |
|
226 | 228 | self.ui.write('\n') |
|
227 | 229 | else: |
|
230 | self.ui.status(_('notify: sending %d subscribers %d changes\n') % | |
|
231 | (len(self.subs), count)) | |
|
228 | 232 | mail = self.ui.sendmail() |
|
229 | 233 | mail.sendmail(templater.email(msg['From']), self.subs, msgtext) |
|
230 | 234 | |
@@ -250,7 +254,12 b' def hook(ui, repo, hooktype, node=None, ' | |||
|
250 | 254 | if used as changegroup hook, send one email for all changesets in |
|
251 | 255 | changegroup. else send one email per changeset.''' |
|
252 | 256 | n = notifier(ui, repo, hooktype) |
|
253 |
if not n.subs |
|
|
257 | if not n.subs: | |
|
258 | ui.debug(_('notify: no subscribers to this repo\n')) | |
|
259 | return | |
|
260 | if n.skipsource(source): | |
|
261 | ui.debug(_('notify: changes have source "%s" - skipping\n') % | |
|
262 | source) | |
|
254 | 263 | return |
|
255 | 264 | node = bin(node) |
|
256 | 265 | if hooktype == 'changegroup': |
General Comments 0
You need to be logged in to leave comments.
Login now