Overview

HTML Commit Email Notification for Mercurial
--------------------------------------------

This code uses a modified version of the notify.py hook script from version
0.9.4 of the Mercurial (http://www.selenic.com/mercurial/wiki/) distribution to
gather commit information. It also uses a modified version of the cvsspam email
code from the CVSspam (http://www.badgers-in-foil.co.uk/projects/cvsspam/)
project.

Both Mercurial and CVSspam are released under the terms of the GPL v2, and so
is this code (see COPYING).


Setting up email notification
-----------------------------

Assuming you've already made your repository accessible on a server
(if you haven't, look at
http://www.selenic.com/mercurial/wiki/index.cgi/PublishingRepositories
for information on publishing repositories), you'll want to edit the
.hg/hgrc file in the server's repository. If there's no .hg/hgrc,
create one, and add these lines:

[extensions]
gsnotify = /var/lib/hgspam/gsnotify.py

[hooks]
incoming.notify = python:gsnotify.hook

[notify]
emailer = /var/lib/hgspam/cvsspam.rb
emailconfig = /var/lib/hgspam/cvsspam.conf

The [extensions] section tells Mercurial to load the gsnotify plugin:
gsnotify = /var/lib/hgspam/gsnotify.py

The [hooks] section tells Mercurial to call the hook() method in the
gsnotify.py script whenever it sees an incoming (pushed) changeset.

The [notify] section contains settings for the gsnotify.py plugin,
telling it where to find cvsspam.rb and the cvsspam config file.

You'll want to replace /var/lib/hgspam with the path to where you've
put the email scripts.

You'll also want to create a cvsspam config file. The sample config
cvsspam.conf file provided is well-commented and should be easy to
figure out. Generally you just need to add one email recipient. If you
don't have a local mail server (Sendmail compatible), you'll want to
specify an SMTP server for email.