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