0

I need to send notifications to certain email due to a certain string in the commit message in the mercurial repository. I have now the notify extension working but it sends notifications at every push. thanx in advance.

1 Answers1

0

You could use the notify extension as a reference and roll out your own hook that will examine the commit messages in incoming changesets and send out emails if they contain a certain string. The book Mercurial: The Definitive Guide has a great chapter on writing hooks, which should help you get started.

smooth reggae
  • 2,189
  • 13
  • 14
  • thx so much :) , is it possible to enable/disable the notify extension through a python script ? – Mustafa Abdel-Khalik Sep 23 '12 at 17:34
  • Writing your own "version" of `notify` that is based on patterns in the commit messages might be a cleaner way to do what you asked about. Extensions are [enabled](http://mercurial.selenic.com/wiki/UsingExtensions#Enabling_an_extension) by simply adding an entry for them under `[extensions]` in `mercurial.ini' or 'hgrc' – smooth reggae Sep 24 '12 at 01:37