notify: send changesets on 'outgoing' hook, updated doc

This commit is contained in:
Ingo Bressler 2011-06-14 13:29:25 +02:00
parent 8176bbbdf9
commit 215b100937
2 changed files with 9 additions and 3 deletions

View File

@ -21,6 +21,8 @@ this::
incoming.notify = python:hgext.notify.hook
# batch emails when many changesets incoming at one time
changegroup.notify = python:hgext.notify.hook
# batch emails when many changesets outgoing at one time (client side)
outgoing.notify = python:hgext.notify.hook
[notify]
# config items go here
@ -37,7 +39,8 @@ Optional configuration items::
style = ... # style file to use when formatting email
template = ... # template to use when formatting email
incoming = ... # template to use when run as incoming hook
changegroup = ... # template when run as changegroup hook
outgoing = ... # template to use when run as outgoing hook
changegroup = ... # template to use when run as changegroup hook
maxdiff = 300 # max lines of diffs to include (0=none, -1=all)
maxsubject = 67 # truncate subject line longer than this
diffstat = True # add a diffstat before the diff content
@ -290,7 +293,7 @@ def hook(ui, repo, hooktype, node=None, source=None, **kwargs):
ui.pushbuffer()
data = ''
count = 0
if hooktype == 'changegroup':
if hooktype == 'changegroup' or hooktype == 'outgoing':
start, end = ctx.rev(), len(repo)
for rev in xrange(start, end):
if n.node(repo[rev]):

View File

@ -32,6 +32,8 @@
incoming.notify = python:hgext.notify.hook
# batch emails when many changesets incoming at one time
changegroup.notify = python:hgext.notify.hook
# batch emails when many changesets outgoing at one time (client side)
outgoing.notify = python:hgext.notify.hook
[notify]
# config items go here
@ -48,7 +50,8 @@
style = ... # style file to use when formatting email
template = ... # template to use when formatting email
incoming = ... # template to use when run as incoming hook
changegroup = ... # template when run as changegroup hook
outgoing = ... # template to use when run as outgoing hook
changegroup = ... # template to use when run as changegroup hook
maxdiff = 300 # max lines of diffs to include (0=none, -1=all)
maxsubject = 67 # truncate subject line longer than this
diffstat = True # add a diffstat before the diff content