about sending mercurial commit notification email script on windows...

Klasky, Hilda B. klaskyhb at ornl.gov
Wed Nov 4 10:03:32 CST 2009


Hi,

There is something you could possibly help me with. Does anyone have a sample windows script to send notification email upon commit in mercurial?
I do have this working on OS X and Linux, and I've tried to make it work for windows by using sendEmail from http://caspian.dotconf.net/menu/Software/SendEmail/#installation, unfortunately, I've been unable to find out how to make the mercurial commands work from the batch script.

The code:
REM #These works on OS X and Linux:
REM #!/bin/bash
REM #SUBJECT=$(hg log -r $HG_NODE --template '{rev}:{node|short} -- {desc|firstline}')
REM #hg log -vpr $HG_NODE | mail -s "commit: $SUBJECT" test at test.org
REM
REM #These does not work in Windows, it calls the sendEmail but the mercurial commands are not recognized:

set subject = hg log -r $HG_NODE --template '{rev}:{node|short} -- {desc|firstline}'
set message = hg log -vpr $HG_NODE

"C:\Program Files\sendEmail\sendEmail" -f test at test.org  -t test at test.org -s smtp.test.com:25 -u "commit: %subject%" -m "$message$"

I will appreciate, any comments or suggestions. Thank you very much in advance.

Best Regards,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://selenic.com/pipermail/mercurial/attachments/20091104/1218208e/attachment.htm 


More information about the Mercurial mailing list