Hgwebdir WSGI - error reading .hg/hgrc files

Paul Malmsten pmalmsten at gmail.com
Fri Jul 10 23:10:35 CDT 2009


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:

[Fri Jul 10 20:55:46 2009] [error] [client 192.168.1.1] mod_wsgi (pid=1130):
Exception occurred processing WSGI script '/home/hg/wsgi/hgwebdir.wsgi'.
[Fri Jul 10 20:55:46 2009] [error] [client 192.168.1.1] Traceback (most
recent call last):
[Fri Jul 10 20:55:46 2009] [error] [client 192.168.1.1]   File
"/usr/local/lib/python2.5/site-packages/mercurial/util.py", line 319, in
increasingchunks
[Fri Jul 10 20:55:46 2009] [error] [client 192.168.1.1]     for chunk in
source:
[Fri Jul 10 20:55:46 2009] [error] [client 192.168.1.1]   File
"/usr/local/lib/python2.5/site-packages/mercurial/templater.py", line 148,
in expand
[Fri Jul 10 20:55:46 2009] [error] [client 192.168.1.1]     item =
iters[0].next()
[Fri Jul 10 20:55:46 2009] [error] [client 192.168.1.1]   File
"/usr/local/lib/python2.5/site-packages/mercurial/templater.py", line 124,
in _process
[Fri Jul 10 20:55:46 2009] [error] [client 192.168.1.1]     for i in v:
[Fri Jul 10 20:55:46 2009] [error] [client 192.168.1.1]   File
"/usr/local/lib/python2.5/site-packages/mercurial/hgweb/hgwebdir_mod.py",
line 210, in entries
[Fri Jul 10 20:55:46 2009] [error] [client 192.168.1.1]     u.warn(_('error
reading %s/.hg/hgrc: %s\\n') % (path, e))
[Fri Jul 10 20:55:46 2009] [error] [client 192.168.1.1]   File
"/usr/local/lib/python2.5/site-packages/mercurial/ui.py", line 449, in warn
[Fri Jul 10 20:55:46 2009] [error] [client 192.168.1.1]
self.write_err(*msg)
[Fri Jul 10 20:55:46 2009] [error] [client 192.168.1.1]   File
"/usr/local/lib/python2.5/site-packages/mercurial/ui.py", line 386, in
write_err
[Fri Jul 10 20:55:46 2009] [error] [client 192.168.1.1]     if not
sys.stdout.closed: sys.stdout.flush()
[Fri Jul 10 20:55:46 2009] [error] [client 192.168.1.1] IOError: sys.stdout
access restricted by mod_wsgi

There is no error if an .hg/hgrc file is not present in any repository
served by hgwebdir. Any thoughts on how to fix this?

Thanks for your help,
~Paul Malmsten
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://selenic.com/pipermail/mercurial/attachments/20090710/5bfa6dde/attachment.htm 


More information about the Mercurial mailing list