Hgwebdir WSGI - error reading .hg/hgrc files

Greg Ward greg-hg at gerg.ca
Sat Jul 11 08:23:34 CDT 2009


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


More information about the Mercurial mailing list