Hgwebdir WSGI - error reading .hg/hgrc files

Paul Malmsten pmalmsten at gmail.com
Sat Jul 11 11:15:15 CDT 2009


Greg,
Thanks for your advice. I'll upgrade to 1.3 and see if that resolves
anything.

As for the file permissions, I have been using CGI flawlessly with the same
repositories for a few weeks, so I'm pretty confident that they are correct.
I haven't configured WSGI to run in daemon mode as a separate user (no need
at the moment), so it should inherit the same privileges as apache and the
CGI script. My CGI setup is still in place and it works fine for both
pulling and pushing, so you can see why I'm a little confused.

~Paul Malmsten


On Sat, Jul 11, 2009 at 6:23 AM, Greg Ward <greg-hg at gerg.ca> wrote:

> On Sat, Jul 11, 2009 at 12:10 AM, Paul Malmsten<pmalmsten at gmail.com>
> wrote:
> > Hi everyone,
> > I'm having a bit of trouble migrating from hgwebdir.cgi to the
> > WSGI version with mercurial 1.2.1 on Debian Lenny. Apache,
> > mod_wsgi, and hgwebdir are all playing nicely together, but when
> > the hgwebdir script comes across a mercurial repository which
> > has a .hg/hgrc file present, it dies with the
> > following trace:
>
> First, have you tried with Mercurial 1.3?  I know, it's nicer to use
> the Debian packages, but if there is a bug in 1.2.1, it might well be
> fixed in 1.3.  And if it's still present in 1.3, maybe it'll be fixed
> in 1.3.1.  (It looks like the code in question has not changed much,
> so I suspect you'll see the same behaviour in 1.3.  Still, worth a
> try.)
>
> Anyways, from reading the stack trace, it looks like there is an error
> reading that .hg/hgrc file, and then a bug reporting the error.
> Things to try:
>
>  * check permissions: make sure that every dir on the path to
> .hg/hgrc is readable and executable by the WSGI user, and that the
> file itself is readable
>  * revert to CGI and see if that works (if so, does the WSGI version
> run as a different user from the CGI version?)
>  * try running the WSGI script with the same user as CGI (not
> appropriate long term, but possibly useful for troubleshooting)
>
> Anyways, there is almost certainly a filesystem problem on your end as
> well as a Mercurial bug in reporting the error.  It would be very
> helpful if you could try it with 1.3 and see if the bug is still
> there.
>
> Greg
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://selenic.com/pipermail/mercurial/attachments/20090711/bd171cba/attachment.htm 


More information about the Mercurial mailing list