349
Comment:
|
1742
|
Deletions are marked like this. | Additions are marked like this. |
Line 2: | Line 2: |
This extension is intended to be used from incoming.notify and/or changegroup.notify hooks to send email notifications. The default mode prints messages to stdout, for testing and configuration. |
|
Line 7: | Line 11: |
''Note: Currently issue http://www.selenic.com/mercurial/bts/issue222 requires that the configuration for this extension be defined in global hgrc.'' |
''Note: Currently issue http://www.selenic.com/mercurial/bts/issue222 requires that the configuration for this extension be defined in global hgrc.'' |
Line 11: | Line 16: |
[extensions] hgext.notify = # XXX How do these differ, and should they both be configured or only # one? [hooks] incoming.notify = python:hgext.notify.hook changegroup.notify = python:hgext.notify.hook [email] from = your@email.address [smtp] host = localhost # presently it is necessary to specify the baseurl for the notify # extension to work. It can be a dummy value if your repo isn't # available via http [web] baseurl = http://hgserver/... |
|
Line 12: | Line 38: |
; multiple sources can be specified as a whitespace separated list sources = push serve pull |
# multiple sources can be specified as a whitespace separated list sources = serve push pull bundle # set this to False when you're ready for mail to start sending test = True config = /path/to/subscription/file |
Line 15: | Line 44: |
There are more configuration items available, see hgext/notify.py in the mercurial distribution. == subscription file configuration options == The notify subscriptions file has same format as regular hgrc. it has two sections so you can express subscriptions in whatever way is handier for you. The glob patterns are matched against path to repo root. {{{ [usersubs] # key is subscriber email, value is comma-separated list of glob patterns user@host = pattern [reposubs] # key is glob pattern, value is comma-separated list of subscriber emails pattern = user@host }}} |
Introduction
This extension is intended to be used from incoming.notify and/or changegroup.notify hooks to send email notifications. The default mode prints messages to stdout, for testing and configuration.
Configuration
1. .hgrc configuration options
Note: Currently issue http://www.selenic.com/mercurial/bts/issue222 requires that the configuration for this extension be defined in global hgrc.
[extensions] hgext.notify = # XXX How do these differ, and should they both be configured or only # one? [hooks] incoming.notify = python:hgext.notify.hook changegroup.notify = python:hgext.notify.hook [email] from = your@email.address [smtp] host = localhost # presently it is necessary to specify the baseurl for the notify # extension to work. It can be a dummy value if your repo isn't # available via http [web] baseurl = http://hgserver/... [notify] # multiple sources can be specified as a whitespace separated list sources = serve push pull bundle # set this to False when you're ready for mail to start sending test = True config = /path/to/subscription/file
There are more configuration items available, see hgext/notify.py in the mercurial distribution.
2. subscription file configuration options
The notify subscriptions file has same format as regular hgrc. it has two sections so you can express subscriptions in whatever way is handier for you. The glob patterns are matched against path to repo root.
[usersubs] # key is subscriber email, value is comma-separated list of glob patterns user@host = pattern [reposubs] # key is glob pattern, value is comma-separated list of subscriber emails pattern = user@host