I would like to write a hook for Mercurial to do the following, an am struggling to get going.:
- Run on central repo, and execute when changeset(s) are pushed (I think I should use the "input" or "changegroup" hook)
- Search each commit message for a string with the format "issue:[0-9]*"
- IF string found, call a webservice, and provide the issue number, commit message, and a list of files that were changed
So, just for starters, how can I get the commit message for each commit from the "input" or "changegroup" hook? Any advice beyond this on how to achieve the other points would also be appeciated.
Thanks for any help.