# HG changeset patch # User Ingo Bressler # Date 2011-06-14 11:29:25 # Node ID 23f4e1e40988256cb8ea695ddb142b4c759113df # Parent 64dfbe5764558ddf3e0fa100467450977a0804ad notify: send changesets on 'outgoing' hook, updated doc diff --git a/hgext/notify.py b/hgext/notify.py --- a/hgext/notify.py +++ b/hgext/notify.py @@ -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, 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]): diff --git a/tests/test-notify.t b/tests/test-notify.t --- a/tests/test-notify.t +++ b/tests/test-notify.t @@ -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