key error in filerevision()
Georg
gwk.rko at googlemail.com
Sun Jul 30 17:40:31 UTC 2006
While browsing hgweb, clicking on a file name in an old changeset of mine:
--> --> -->
*KeyError*Python 2.4.3: /usr/bin/python
Sun Jul 30 19:35:03 2006
A problem occurred in a Python script. Here is the sequence of function
calls leading up to the error, in the order they occurred.
/opt/www/cgi-hg/SimManager/index.cgi 12
13 def make_web_app():
14 return hgweb("/opt/hg/SimManager", "SimManager Test on hunter")
15
16 wsgicgi.launch(wsgiapplication(make_web_app))
*wsgicgi* = <module 'mercurial.hgweb.wsgicgi' from
'/usr/lib...on2.4/site-packages/mercurial/hgweb/wsgicgi.pyc'>, wsgicgi.*
launch* = <function launch>, *wsgiapplication* = <class '
mercurial.hgweb.request.wsgiapplication'>, *make_web_app* = <function
make_web_app> /usr/lib/python2.4/site-packages/mercurial/hgweb/wsgicgi.pyin
*launch*(application=<mercurial.hgweb.request.wsgiapplication object>) 59
return write
60
61 result = application(environ, start_response)
62 try:
63 for data in result:
result *undefined*, *application* = <
mercurial.hgweb.request.wsgiapplication object>, *environ* = {'AUTH_TYPE':
'Basic', 'DOCUMENT_ROOT': '/opt/www/data', 'GATEWAY_INTERFACE': 'CGI/1.1',
'HTTP_ACCEPT': 'text/xml,application/xml,application/xhtml+xml,text/html;q=
0.9,text/plain;q=0.8,image/png,*/*;q=0.5', 'HTTP_ACCEPT_CHARSET': 'UTF-8,*',
'HTTP_ACCEPT_ENCODING': 'gzip,deflate', 'HTTP_ACCEPT_LANGUAGE': 'de,en-us;q=
0.7,en;q=0.3', 'HTTP_CONNECTION': 'keep-alive', 'HTTP_HOST': '
hunter.eu.mscsoftware.com', 'HTTP_KEEP_ALIVE': '300', ...}, *start_response* =
<function start_response>
/usr/lib/python2.4/site-packages/mercurial/hgweb/request.py in *__call__*
(self=<mercurial.hgweb.request.wsgiapplication object>,
wsgienv={'AUTH_TYPE': 'Basic', 'DOCUMENT_ROOT': '/opt/www/data',
'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTP_ACCEPT':
'text/xml,application/xml,application/xhtml+xml,text/html;q=0.9
,text/plain;q=0.8,image/png,*/*;q=0.5', 'HTTP_ACCEPT_CHARSET': 'UTF-8,*',
'HTTP_ACCEPT_ENCODING': 'gzip,deflate', 'HTTP_ACCEPT_LANGUAGE': 'de,en-us;q=
0.7,en;q=0.3', 'HTTP_CONNECTION': 'keep-alive', 'HTTP_HOST': '
hunter.eu.mscsoftware.com', 'HTTP_KEEP_ALIVE': '300', ...},
start_response=<function start_response>) 16
17 def __call__(self, wsgienv, start_response):
18 return _wsgirequest(self.destmaker
(), wsgienv, start_response)
19
20 class _wsgioutputfile(object):
*global* *_wsgirequest* = <class 'mercurial.hgweb.request._wsgirequest'>, *
self* = <mercurial.hgweb.request.wsgiapplication object>, self.*destmaker* =
<function make_web_app>, *wsgienv* = {'AUTH_TYPE': 'Basic', 'DOCUMENT_ROOT':
'/opt/www/data', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTP_ACCEPT':
'text/xml,application/xml,application/xhtml+xml,text/html;q=0.9
,text/plain;q=0.8,image/png,*/*;q=0.5', 'HTTP_ACCEPT_CHARSET': 'UTF-8,*',
'HTTP_ACCEPT_ENCODING': 'gzip,deflate', 'HTTP_ACCEPT_LANGUAGE': 'de,en-us;q=
0.7,en;q=0.3', 'HTTP_CONNECTION': 'keep-alive', 'HTTP_HOST': '
hunter.eu.mscsoftware.com', 'HTTP_KEEP_ALIVE': '300', ...}, *start_response* =
<function start_response>
/usr/lib/python2.4/site-packages/mercurial/hgweb/request.py in *__init__*
(self=<mercurial.hgweb.request._wsgirequest object>, destination=<
mercurial.hgweb.hgweb_mod.hgweb object>, wsgienv={'AUTH_TYPE': 'Basic',
'DOCUMENT_ROOT': '/opt/www/data', 'GATEWAY_INTERFACE': 'CGI/1.1',
'HTTP_ACCEPT': 'text/xml,application/xml,application/xhtml+xml,text/html;q=
0.9,text/plain;q=0.8,image/png,*/*;q=0.5', 'HTTP_ACCEPT_CHARSET': 'UTF-8,*',
'HTTP_ACCEPT_ENCODING': 'gzip,deflate', 'HTTP_ACCEPT_LANGUAGE': 'de,en-us;q=
0.7,en;q=0.3', 'HTTP_CONNECTION': 'keep-alive', 'HTTP_HOST': '
hunter.eu.mscsoftware.com', 'HTTP_KEEP_ALIVE': '300', ...},
start_response=<function start_response>) 49 self.start_response
= start_response
50 self.headers = []
51 destination.run_wsgi(self)
52
53 def __iter__(self):
*destination* = <mercurial.hgweb.hgweb_mod.hgweb object>, destination.*
run_wsgi* = <bound method hgweb.run_wsgi of
<mercurial.hgweb.hgweb_mod.hgwebobject>>,
*self* = <mercurial.hgweb.request._wsgirequest object>
/usr/lib/python2.4/site-packages/mercurial/hgweb/hgweb_mod.py in *run_wsgi*
(self=<mercurial.hgweb.hgweb_mod.hgweb object>, req=<
mercurial.hgweb.request._wsgirequest object>) 749
method = getattr(self, 'do_' + cmd, None)
750 if method:
751 method(req)
752 else:
753 req.write(self.t("error"))
*method* = <bound method hgweb.do_file of
<mercurial.hgweb.hgweb_mod.hgwebobject>>,
*req* = <mercurial.hgweb.request._wsgirequest object>
/usr/lib/python2.4/site-packages/mercurial/hgweb/hgweb_mod.py in *do_file*
(self=<mercurial.hgweb.hgweb_mod.hgweb object>, req=<
mercurial.hgweb.request._wsgirequest object>) 784
def do_file(self, req):
785 req.write(self.filerevision(self.cleanpath(req.form
['file'][0]),
786 req.form['filenode'][0]))
787
788 def do_annotate(self, req):
*req* = <mercurial.hgweb.request._wsgirequest object>, req.*form* = {'cmd':
['file'], 'file': ['SimManager/portals/Base/css/button-moz.css'],
'filenode': ['000000000000']}
/usr/lib/python2.4/site-packages/mercurial/hgweb/request.py in *write*
(self=<mercurial.hgweb.request._wsgirequest object>, *things=(<generator
object>,)) 60 for thing in things:
61 if hasattr(thing, "__iter__"):
62 for part in thing:
63 self.write(part)
64 else:
part *undefined*, *thing* = <generator object>
/usr/lib/python2.4/site-packages/mercurial/hgweb/hgweb_mod.py in *
filerevision*(self=<mercurial.hgweb.hgweb_mod.hgweb object>,
f='SimManager/portals/Base/css/button-moz.css',
node='0000000000000000000000000000000000000000') 394
child=self.siblings(fl.children(n), fl.rev, file=f),
395 rename=self.renamelink(fl, n),
396 permissions=self.repo.manifest.readflags
(mfn)[f])
397
398 def fileannotate(self, f, node):
permissions *undefined*, *self* = <mercurial.hgweb.hgweb_mod.hgweb object>,
self.*repo* = <mercurial.localrepo.localrepository object>, self.repo.*
manifest* = <mercurial.manifest.manifest object>, self.repo.manifest.*
readflags* = <bound method manifest.readflags of <
mercurial.manifest.manifest object>>, *mfn* = '
\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00',
*f* = 'SimManager/portals/Base/css/button-moz.css'
*KeyError*: 'SimManager/portals/Base/css/button-moz.css'
args = ('SimManager/portals/Base/css/button-moz.css',)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20060730/9ff53e37/attachment-0003.html>
More information about the Mercurial
mailing list