Differences between revisions 5 and 6
Revision 5 as of 2006-06-12 20:32:34
Size: 1742
Editor: AronGriffis
Comment:
Revision 6 as of 2007-01-17 20:00:57
Size: 1880
Comment: Add additional comments
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
= Introduction = == Notify extension ==
'''This extension is currently being distributed along with Mercurial.'''
Line 3: Line 4:
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.
=== Overview ===
This extension is used to send email notifications to a list of subscribed addresses whenever a repo has changes.
Line 7: Line 7:
= Configuration = It can be used from the incoming.notify and/or changegroup.notify hooks depending on the desired behaviour.
Line 9: Line 9:
== .hgrc configuration options == === Configuration ===

==
== .hgrc configuration options ====
Line 48: Line 50:
== subscription file configuration options == ==== subscription file configuration options ====

Notify extension

This extension is currently being distributed along with Mercurial.

1. Overview

This extension is used to send 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

NotifyExtension (last edited 2018-04-18 13:41:29 by JoergSonnenberger)