How to make mercury run script when clicked?

I have a server hosting the mercury repository with hgwebdir. Is it possible to make mercurial to run the script when someone clicked on this repository?
I am currently using a script that checks the status of the repository every few minutes, but this is obviously an ugly solution.

+4
source share
2 answers

You need to add a hook to your Mercurial server:

  • Edit .hg / hgrc (or mercurial.ini on Windows)
  • Add or edit the [hooks] section
  • Link the shell command to the hook you are interested in (in your case, the changegroup hook)

See Hooking repository events in the Mercurial red-bean book for more details.

+8
source

You might want to take a look at the mercury hooks,

http://hgbook.red-bean.com/read/handling-repository-events-with-hooks.html

+2
source

Source: https://habr.com/ru/post/1313905/


All Articles