Use notify extension to send email on commit

Matt Bunch matt.bunch at harmonic-capital.com
Wed Aug 31 18:08:26 UTC 2011


I have the following settings, which have successfully set the notify extension up to send an email each time I push to a local repository.
Now I'd like to alter things a little - I want an email to be sent each time I commit, instead of each time I push.

I am having great trouble figuring out how to do this - the "sources" parameter doesn't seem to have a valid value that works for me.

But:
(1) "hg help notify" says "notify extension - hooks for sending email notifications at commit/push time".
(2) 4.17 in the Mercurial FAQ: QUESTION: "I want to get an email when a commit happens!", ANSWER: "Use the NotifyExtension".
(3) The Notify Extension Wiki page says "send automated email notifications to a list of subscribed addresses whenever a repo has changes" (which I would imagine includes when I commit something to it).

So I'm pretty convinced it should be possible to send email on commit using the notify extension?
I am running on Windows, if that's relevant?


Here's my current Settings (send email on push to any local repo):


[extensions]
notify =

[hooks]
changegroup.notify = python:hgext.notify.hook

[email]
from = someAddress at someDomain.com<mailto:someAddress at someDomain.com>

[smtp]
host = myMailServer

[notify]
test = False
sources = push

[reposubs]
* = someAddress at someDomain.com<mailto:someAddress at someDomain.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20110831/32c59726/attachment-0002.html>


More information about the Mercurial mailing list