about sending mercurial commit notification email script on windows
Klasky, Hilda B.
klaskyhb at ornl.gov
Wed Nov 4 12:37:11 CST 2009
Hi
Does anyone you have a notify hook working on windows? Does anyone know how to get the hg commands to work from a bat script? I cannot it working.
In the documentation says that we need to enable, but also, we need to have a script to run it. The hgrc code:
[extensions]
hgext.notify =
[hooks]
commit = c:\commithook.bat
The code of commithook.bat:
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.
More information about the Mercurial
mailing list