email notification setup

Zbynek Winkler zwin at users.sourceforge.net
Thu Sep 22 16:10:37 CDT 2005


Ok, I have something working but it is kind of hackish ;)

[hooks]
commit = commithook /home/zbynek/tmp/hg-test zwin at users.sourceforge.net

and commithook contains

#!/bin/sh

REPO=$1
shift 1

SUBJECT=`hg -R $REPO log -r $NODE 2>/dev/null| grep "^summary:" | cut -b 
14-`
hg -R $REPO log -vpr $NODE 2>&1 | mail -s "commit: $SUBJECT" "$@"

I am sending the path to the repo to the commithook script as a first 
parametr. I think that it would be nice if the parent hg process could 
change the working directory to that of the repo before executing the hooks.

Zbynek

-- 
http://zw.matfyz.cz/     http://robotika.cz/
Faculty of Mathematics and Physics, Charles University, Prague, Czech Republic



More information about the Mercurial mailing list