hgweb not running hooks
Pierre-Yves David
pierre-yves.david at ens-lyon.org
Wed Nov 20 18:08:21 UTC 2019
I remember that config is a regular issue with hgweb, it read a
different file and usually run with a different user who might not trust
the owner of the config.
I CCed Georges Racinet, A colleague who recently worked with hgweb
On 11/19/19 8:42 AM, Morten Laursen wrote:
> 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
>
>
>
> _______________________________________________
> Mercurial mailing list
> Mercurial at mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial
>
--
Pierre-Yves David
More information about the Mercurial
mailing list