changegroup hook Linux httpd cgi
Simon King
simon at simonking.org.uk
Tue Feb 21 10:54:34 UTC 2017
On Mon, Feb 20, 2017 at 7:55 PM, Jérôme Godbout <jerome at bodycad.com> wrote:
> Hi,
> I'm trying to have a repos on a mount drive that is used by multiple VM
> under different OS (Windows, Linux). This save a lot of disk space and the
> lock is just fine for that use case.
>
> I was trying to add a hook that could be execute cross platform. In my
> *.hg/hgrc* I added this:
>
> *[hooks]*
> *changegroup.refresh_repos = refresh_repos*
>
> In my root repos directory I made a *refresh_repos.cmd* file and a *refresh_repos
> *shell script. Both script execute into command line just fine. The
> Windows mount seem to perform the hook properly and the refresh is perform
> after a push to the drive localy. But the Linux machine that do the httpd
> cgi hgserve doesn't seem to perform the hook properly.
>
> I was wondering if the entry into the hgrc for Linux should be made
> differently (path wise *./resfresh_repos*) ?
>
> Or does the hgserve perform the hgrc hook at all? Do I have to add the
> hook inside the *hgserve.config* used by cgi script?
>
> Inside the .cgi script
> *from mercurial import demandimport; demandimport.enable()*
> *from mercurial.hgweb import hgweb, wsgicgi*
> *application = hgweb("**hgserve.config"**)*
> *wsgicgi.launch(application)*
>
>
> Is there any permission involved here? does the file need a special
> permission inside Apache ? pushing/pulling to that drive work just fine and
> the script file have the apache:apache with rx permission. Is apache aware
> that the python script access a file outside and block it?
>
>
Are there any messages from mercurial in the Apache error log? One possible
problem is the ownership of the hgrc file. If the cgi script runs as
apache:apache, then the hgrc file must usually also be owned by the same
user. See https://www.mercurial-scm.org/wiki/Trust for details.
Hope that helps,
Simon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20170221/40276fbe/attachment-0002.html>
More information about the Mercurial
mailing list