hg serve error when using the "raw" template

Angel Ezquerra angel.ezquerra at gmail.com
Wed Jul 25 16:12:59 CDT 2012


Hi,

I've been playing around with the hgweb templates, working on a way to
add a link to the parent directory (to make it easier to navigate the
tree of repositories). This is something that I plan to submit to the
list after the freeze. However, while doing so I tried the "raw"
template and I noticed that if you try to access a repository while
using the raw template you get an error:

192.168.1.37 - - [25/Jul/2012 23:07:12] "GET /test/hg/hg/ HTTP/1.1" 500 -
192.168.1.37 - - [25/Jul/2012 23:07:12] Exception happened during processing req
uest '/test/hg/hg/':
Traceback (most recent call last):
  File "C:\Users\Angel\Documents\Repositories\hg-2.1\mercurial\hgweb\server.py",
 line 77, in do_POST
    self.do_write()
  File "C:\Users\Angel\Documents\Repositories\hg-2.1\mercurial\hgweb\server.py",
 line 70, in do_write
    self.do_hgweb()
  File "C:\Users\Angel\Documents\Repositories\hg-2.1\mercurial\hgweb\server.py",
 line 137, in do_hgweb
    for chunk in self.server.application(env, self._start_response):
  File "C:\Users\Angel\Documents\Repositories\hg-2.1\mercurial\hgweb\hgwebdir_mo
d.py", line 147, in __call__
    return self.run_wsgi(req)
  File "C:\Users\Angel\Documents\Repositories\hg-2.1\mercurial\hgweb\hgwebdir_mo
d.py", line 205, in run_wsgi
    return hgweb(repo).run_wsgi(req)
  File "C:\Users\Angel\Documents\Repositories\hg-2.1\mercurial\hgweb\hgweb_mod.p
y", line 189, in run_wsgi
    req.form['cmd'] = [tmpl.cache['default']]
KeyError: 'default'

This happens on the tip of stable but also on 2.2. I don't really know
what the purpose of the raw template is so I don't know if this is
normal. I'd like to confirm whether this is expected or it is a real
error.

Cheers,

Angel


More information about the Mercurial-devel mailing list