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
$ 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.

   13 # virtual/path = /real/path
   14 # virtual/path = /real/path
   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
   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
   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
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':
  145                 elif fl:
  146                     for f in fl.split("|")[1:]:
  147                         v = filters[f](v)
  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)
   29     now = time.time()
   30     then = int(x[2].split(' ')[0])
   31     delta = max(1, int(now - then))
then undefined, builtin int = <type 'int'>, x = 1127400078, ].split

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

More information about the Mercurial mailing list