1994
Comment: Add category extension
|
2022
Add author
|
Deletions are marked like this. | Additions are marked like this. |
Line 3: | Line 3: |
''Author: Vadim Gelfer'' |
Notify extension
This extension is currently being distributed along with Mercurial.
Author: Vadim Gelfer
1. Overview
This extension is used to send automated email notifications to a list of subscribed addresses whenever a repo has changes.
It can be used from the incoming.notify and/or changegroup.notify hooks depending on the desired behaviour.
2. Configuration
2.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.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
3. Usage
This extension doesn't require user interaction to work.