I have a server which hosts a mercurial repository with hgwebdir. Is it possible to make mercurial to run a script when someone pushes to this repository?
Currently I use a script that checks the repository state every few minutes, but this is obviously an ugly solution.
views:
72answers:
2
+6
A:
You have to add a hook to your Mercurial server:
- Edit .hg/hgrc (or mercurial.ini on Windows)
- Add or edit the [hooks] section
- Associate a shell command to the hook you are interested in (in your case, the changegroup hook)
Look at Handling repository events with hooks in the Mercurial red-bean book for more details.
marcslogic
2010-06-25 18:46:29
+2
A:
You might want to take a look at mercurial hooks,
http://hgbook.red-bean.com/read/handling-repository-events-with-hooks.html
in3xes
2010-06-25 18:48:06