Hgwebdir WSGI - error reading .hg/hgrc files

Graham Dumpleton graham.dumpleton at gmail.com
Sun Jul 12 00:01:04 CDT 2009


Read:

  http://blog.dscpl.com.au/2009/04/wsgi-and-printing-to-standard-output.html

Graham

On Jul 11, 2:10 pm, Paul Malmsten <pmalms... 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:
>
> [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
>
> _______________________________________________
> Mercurial mailing list
> Mercur... at selenic.comhttp://selenic.com/mailman/listinfo/mercurial



More information about the Mercurial mailing list