I have a server which serves a "central" Mercurial repository; the team clones it and pushes their changes up to it via ssh. Hudson is installed on the same server (RHEL 5.5). I wish to trigger a Hudson build whenever anyone pushes to the central Mercurial repository. I also wish to send a notification email upon a push.
In ProjectName/.hg/.hgrc there is the following:
[hooks]
changegroup.hudson = wget http://Server.Name:8080//job/Project_Name/builds?delay=0sec >&2
If I use putty to ssh to this server and then issue the wget command, a build is successfully triggered, so I don't think it's a permissions issue.
Another hook is:
changegroup.notify = /the/path/.hg/hooks/notify
where notify is:
dest='comma separated list of email addresses'
repo="path/to/repository/"
subject="New changesets in $repo"
hg glog -l 10 -r $HG_NODE: | mail -s "$subject" $dest
When I run ./notify directly from the shell, the mail is sent correctly when I am in the central repository's path; if I execute notify from my home directory, the repository is not found and I get an empty email, but at least I get an email. I assume these hooks are just not being run.
What could be getting in the way? What should I check?