Inspired by Martin's answer, I thought I'd try to write Python, and here's how I managed to get it to work. I am using Mercurial 2.0.2 and the mercurial.commands module (which, AFAIK, is included in the Mercurial Python package).
I created the myhook.py file on the server:
import mercurial.commands def update(ui, repo, **kwargs): mercurial.commands.update(ui, repo)
Then in my .hg / hgrc file on the server, I added the following:
[hooks] changegroup = python:C:\path\to\my\myhook.py:update
I would change the line in which the command is executed to specifically update the "prompt". If you use named branches, then since it is higher than the command, it will have no effect. I believe this will be better: commands.update (ui, repo, repo ['tip'])
source share