hgweb not running hooks

Morten Laursen Morten at laursennet.dk
Tue Nov 19 07:42:44 UTC 2019


Hi

We had an Ubuntu 16.04 server running SCM Manager for serving Mercurial
(v3.7.3). We have a custom script running in a changegroup hook.

After update to Ubuntu 18.04 (Mercurial 4.5.3) this hook is no longer
called.

The hook configuration is

$ ls -la /home/scm/.hgrc
-rw-r--r-- 1 scm scm 82 Nov 11 11:21 /home/scm/.hgrc
$ cat /home/scm/.hgrc
[hooks]
changegroup.rp = /home/rp/rp/hg/rps_hook_changegroup

scm is the user running the web server:
scm       96357   2058  0 10:13 ?        00:00:00      \_ python
/var/lib/scm/lib/python/hgweb.py

This worked fine before upgrading. We have identified that restoring the
old server and upgrading only Mercurial to 4.4.1 or 4.8.1 also causes the
hook to not be called.

If the hook is placed in /etc/mercurial/hgrc it is still not called.

If the hook is placed inside the repository it works:
-rwxr-xr-x 1 scm scm 450 Nov 11 11:31
/home/repo/hg/Projects/rptest1/.hg/hgrc

In this file I tried to make a hook to dump the configuration in this
context.
changegroup.rp4 = hg config --debug

The output of this shows, that the hook from /home/scm/.hgrc is loaded.

It seems to me, that hgweb does not read the same config files as hg.

Can you advice on how to configure a post-push server side hook on Mercurial
4.5.1 ?


Best regards,

Morten
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mercurial-scm.org/pipermail/mercurial/attachments/20191119/f2b2b9e6/attachment.html>


More information about the Mercurial mailing list