[issue2332] Internal error in HGwebdir raw-rev for one specific status.

Ton bugs at mercurial.selenic.com
Mon Aug 16 12:45:26 UTC 2010


New submission from Ton <tcplomp at gmail.com>:

I have one specific changeset that causes HGWEBDIR and HGWEB to throw an
'internal server error' on Windows and on Linux.

Here's the log from the error-hg.log for an apache serve on Linux:
-----------------------------------------
[Mon Aug 16 14:15:53 2010] [error] [client 192.168.1.24] Traceback (most
recent call last):
[Mon Aug 16 14:15:53 2010] [error] [client 192.168.1.24]   File
"/usr/share/hg/index.cgi", line 67, in <module>
[Mon Aug 16 14:15:53 2010] [error] [client 192.168.1.24]     
[Mon Aug 16 14:15:53 2010] [error] [client 192.168.1.24]
wsgicgi.launch(application)
[Mon Aug 16 14:15:53 2010] [error] [client 192.168.1.24]   File
"/usr/lib/pymodules/python2.6/mercurial/hgweb/wsgicgi.py", line 71, in launch
[Mon Aug 16 14:15:53 2010] [error] [client 192.168.1.24]     
[Mon Aug 16 14:15:53 2010] [error] [client 192.168.1.24] content =
application(environ, start_response)
[Mon Aug 16 14:15:53 2010] [error] [client 192.168.1.24]   File
"/usr/lib/pymodules/python2.6/mercurial/hgweb/hgwebdir_mod.py", line 105, in
__call__
[Mon Aug 16 14:15:53 2010] [error] [client 192.168.1.24]     
[Mon Aug 16 14:15:53 2010] [error] [client 192.168.1.24] return
self.run_wsgi(req)
[Mon Aug 16 14:15:53 2010] [error] [client 192.168.1.24]   File
"/usr/lib/pymodules/python2.6/mercurial/hgweb/hgwebdir_mod.py", line 162, in
run_wsgi
[Mon Aug 16 14:15:53 2010] [error] [client 192.168.1.24]     
[Mon Aug 16 14:15:53 2010] [error] [client 192.168.1.24] return
hgweb(repo).run_wsgi(req)
[Mon Aug 16 14:15:53 2010] [error] [client 192.168.1.24]   File
"/usr/lib/pymodules/python2.6/mercurial/hgweb/hgweb_mod.py", line 194, in
run_wsgi
[Mon Aug 16 14:15:53 2010] [error] [client 192.168.1.24]     
[Mon Aug 16 14:15:53 2010] [error] [client 192.168.1.24] content =
getattr(webcommands, cmd)(self, req, tmpl)
[Mon Aug 16 14:15:53 2010] [error] [client 192.168.1.24]   File
"/usr/lib/pymodules/python2.6/mercurial/hgweb/webcommands.py", line 258, in
changeset
[Mon Aug 16 14:15:53 2010] [error] [client 192.168.1.24]     
[Mon Aug 16 14:15:53 2010] [error] [client 192.168.1.24] parity=parity.next()))
[Mon Aug 16 14:15:53 2010] [error] [client 192.168.1.24]   File
"/usr/lib/pymodules/python2.6/mercurial/templater.py", line 226, in __call__
[Mon Aug 16 14:15:53 2010] [error] [client 192.168.1.24]     
[Mon Aug 16 14:15:53 2010] [error] [client 192.168.1.24] stream =
proc.process(t, mapping)
[Mon Aug 16 14:15:53 2010] [error] [client 192.168.1.24]   File
"/usr/lib/pymodules/python2.6/mercurial/templater.py", line 73, in process
[Mon Aug 16 14:15:53 2010] [error] [client 192.168.1.24]     
[Mon Aug 16 14:15:53 2010] [error] [client 192.168.1.24] return
_flatten(self._process(self._load(t), mapping))
[Mon Aug 16 14:15:53 2010] [error] [client 192.168.1.24]   File
"/usr/lib/pymodules/python2.6/mercurial/templater.py", line 78, in _load
[Mon Aug 16 14:15:53 2010] [error] [client 192.168.1.24]     
[Mon Aug 16 14:15:53 2010] [error] [client 192.168.1.24] self._cache[t] =
self._parse(self._loader(t))
[Mon Aug 16 14:15:53 2010] [error] [client 192.168.1.24]   File
"/usr/lib/pymodules/python2.6/mercurial/templater.py", line 213, in load
[Mon Aug 16 14:15:53 2010] [error] [client 192.168.1.24]     
[Mon Aug 16 14:15:53 2010] [error] [client 192.168.1.24] self.cache[t] =
open(self.map[t][1]).read()
[Mon Aug 16 14:15:53 2010] [error] [client 192.168.1.24] KeyError
[Mon Aug 16 14:15:53 2010] [error] [client 192.168.1.24] : 
[Mon Aug 16 14:15:53 2010] [error] [client 192.168.1.24] 'filenolink'
[Mon Aug 16 14:15:53 2010] [error] [client 192.168.1.24] 
[Mon Aug 16 14:15:53 2010] [error] [client 192.168.1.24] Premature end of
script headers: index.cgi
-------------------------------
here's the log for a hg serve on Windows:
----------------------------------------
127.0.0.1 - - [16/Aug/2010 14:40:25] Exception happened during processing
request '/raw-rev/fd6084214c7d':
Traceback (most recent call last):
  File "mercurial\hgweb\server.pyc", line 65, in do_POST
  File "mercurial\hgweb\server.pyc", line 58, in do_write
  File "mercurial\hgweb\server.pyc", line 122, in do_hgweb
  File "mercurial\hgweb\hgweb_mod.pyc", line 85, in __call__
  File "mercurial\hgweb\hgweb_mod.pyc", line 194, in run_wsgi
  File "mercurial\hgweb\webcommands.pyc", line 258, in changeset
  File "mercurial\templater.pyc", line 226, in __call__
  File "mercurial\templater.pyc", line 73, in process
  File "mercurial\templater.pyc", line 78, in _load
  File "mercurial\templater.pyc", line 213, in load
KeyError: 'filenolink'
---------------------------------------------
A new commit allows me to read the raw-rev of tip, but this specifc revision
is not traceable via raw-rev. I have tried using hg verify to fix this but
that doesn't work.

----------
messages: 13361
nosy: tcplomp
priority: bug
status: unread
title: Internal error in HGwebdir raw-rev for one specific status.
topic: 1.6.2, hgweb

____________________________________________________
Mercurial issue tracker <bugs at mercurial.selenic.com>
<http://mercurial.selenic.com/bts/issue2332>
____________________________________________________


More information about the Mercurial-devel mailing list