Ashlux writes about triggering Hudson builds with Mercurial hooks on his blog. The basic hook described is:
[hooks] changegroup.hudson = curl http://hudson_url/job/project_name/build?delay=0sec
I use this technique as well a lot with two refinements:
- I use polling instead of build. So the url is http://hudson_url/job/project_name/polling. This will poll your Mercurial repository and only if something really changed, the build will be triggered.
- Instead of setting up authentication I always use the TOKEN approach described on Remote access API, so the url gets http://hudson_url/job/project_name/polling?token=TOKEN