[PATCH] notify: outgoing hook should also use multiple_template
Dongsheng Song
dongsheng.song at gmail.com
Wed Mar 25 02:10:14 CDT 2009
Here is the update patch:
# HG changeset patch
# User Dongsheng Song <dongsheng.song at gmail.com>
# Date 1237964893 -28800
# Node ID 101d564d6f6974a44861a0f39eb0e712c7b34d2e
# Parent c2ecaf63badee4e973c4d843121139d4d3269f12
notify: outgoing hook should also use multiple_template
diff --git a/hgext/notify.py b/hgext/notify.py
--- a/hgext/notify.py
+++ b/hgext/notify.py
@@ -90,6 +90,7 @@
deftemplates = {
'changegroup': multiple_template,
+ 'outgoing': multiple_template,
}
class notifier(object):
@@ -261,8 +262,8 @@
def hook(ui, repo, hooktype, node=None, source=None, **kwargs):
'''send email notifications to interested subscribers.
- if used as changegroup hook, send one email for all changesets in
- changegroup. else send one email per changeset.'''
+ if used as changegroup or outgoing hook, send one email for all
+ changesets in changegroup. else send one email per changeset.'''
n = notifier(ui, repo, hooktype)
ctx = repo[node]
@@ -275,7 +276,7 @@
return
ui.pushbuffer()
- if hooktype == 'changegroup':
+ if hooktype == 'changegroup' or hooktype == 'outgoing':
start, end = ctx.rev(), len(repo)
count = end - start
for rev in xrange(start, end):
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 489 bytes
Desc: Digital signature
Url : http://selenic.com/pipermail/mercurial-devel/attachments/20090325/208c1347/attachment.pgp
More information about the Mercurial-devel
mailing list