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.
Do adding filenolink = '' to templates/raw/map make it work?
Yes adding filelink = '' resolves the issue.
filelink? you meant filenolink, right?
Yes, sorry filenolink = '' resolves this, however I would like to have this fixed inside filenolink. Or am I misunderstanding what I have done/what the bug is. Ton
Fixed by http://hg.intevation.org/mercurial/crew/rev/5b559934d504 Matt Mackall <mpm@selenic.com> templates: add filenolink to raw style (issue2332)
--- Bug imported by bugzilla@serpentine.com 2012-05-12 09:11 EDT --- This bug was previously known as _bug_ 2332 at http://mercurial.selenic.com/bts/issue2332