hgweb broken in current tip?

Michal Kvasnica kvasnica at control.ee.ethz.ch
Fri Sep 23 17:03:17 CDT 2005


it seems that commit 5f277e73778f breaks hgweb, at least for solaris (if
it is an os issue at all):

$ hg clone http://www.selenic.com/hg/
$ hg -q tip
1324:77cd8068dbf4
$ python setup.py install

hgweb gives a traceback as below. same happens with BOS's tip. reverting
to 5a15df632e6a helps.

A problem occurred in a Python script. Here is the sequence of function
calls leading up to the error, in the order they occurred.

 /home/mpt/public_html/hg/index.cgi
   13 # virtual/path = /real/path
   14 # virtual/path = /real/path
   15
   16 h = hgweb.hgwebdir("hgweb.config")
   17 h.run()
h = <mercurial.hgweb.hgwebdir instance>, h.run = <bound method
hgwebdir.run of <mercurial.hgweb.hgwebdir instance>>

 /home/mpt/lib/python.solaris/mercurial/hgweb.py in
run(self=<mercurial.hgweb.hgwebdir instance>,
req=<mercurial.hgweb.hgrequest instance>)
  973                 hgweb(real).run(req)
  974             else:
  975                 req.write(tmpl("notfound", repo=virtual))
  976         else:
  977             req.write(tmpl("index", entries=entries))
req = <mercurial.hgweb.hgrequest instance>, req.write = <bound method
hgrequest.write of <mercurial.hgweb.hgrequest instance>>, tmpl =
<mercurial.hgweb.templater instance>, entries = <function entries>

 /home/mpt/lib/python.solaris/mercurial/hgweb.py in
write(self=<mercurial.hgweb.hgrequest instance>, *things=(<generator
object>,))
   73             if hasattr(thing, "__iter__"):
   74                 for part in thing:
   75                     self.write(part)
   76             else:
   77                 try:
self = <mercurial.hgweb.hgrequest instance>, self.write = <bound method
hgrequest.write of <mercurial.hgweb.hgrequest instance>>, part =
<generator object>

 /home/mpt/lib/python.solaris/mercurial/hgweb.py in
write(self=<mercurial.hgweb.hgrequest instance>, *things=(<generator
object>,))
   72         for thing in things:
   73             if hasattr(thing, "__iter__"):
   74                 for part in thing:
   75                     self.write(part)
   76             else:
part = '</td><td>', thing = <generator object>

 /home/mpt/lib/python.solaris/mercurial/hgweb.py in
template(self=<mercurial.hgweb.templater instance>,
tmpl='</td><td>#lastupdate|age# ago</td><td><a
href="#url#?cmd=changelog;style=rss">RSS</a></td></tr>',
filters={'addbreaks': <function nl2br>, 'age': <function age>, 'date':
<function datestr>, 'escape': <function escape>, 'firstline': <function
<lambda>>, 'obfuscate': <function obfuscate>, 'permissions': <function
<lambda>>, 'rfc822date': <function <lambda>>, 'short': <function
<lambda>>}, **map={'contact': 'Michal Kvasnica
<kvasnica at control.ee.ethz.ch>', 'entries': <function entries>, 'footer':
<function footer>, 'header': <function header>, 'lastupdate':
1127400078, 'name': 'mpt', 'parity': 0, 'shortdesc': 'unknown', 'url':
'/~mpt/hg/mpt'})
  145                 elif fl:
  146                     for f in fl.split("|")[1:]:
  147                         v = filters[f](v)
  148
  149                 yield v
v = 1127400078, filters = {'addbreaks': <function nl2br>, 'age':
<function age>, 'date': <function datestr>, 'escape': <function escape>,
'firstline': <function <lambda>>, 'obfuscate': <function obfuscate>,
'permissions': <function <lambda>>, 'rfc822date': <function <lambda>>,
'short': <function <lambda>>}, f = 'age'

 /home/mpt/lib/python.solaris/mercurial/hgweb.py in age(x=1127400078)
   28
   29     now = time.time()
   30     then = int(x[2].split(' ')[0])
   31     delta = max(1, int(now - then))
   32
then undefined, builtin int = <type 'int'>, x = 1127400078, ].split
undefined

TypeError: unsubscriptable object
      args = ('unsubscriptable object',)


More information about the Mercurial mailing list