[issue1989] Exception in templater
David Soria Parra
bugs at mercurial.selenic.com
Mon Jan 18 01:00:12 UTC 2010
New submission from David Soria Parra <dsp at php.net>:
The template is broken since version 1a85861f59af
the following templates doesn't work anymore, which breaks the Gource
application:
$ cat gource.style
changeset = '{file_adds}{file_copies}{file_mods}{file_dels}'
file_mod = "{date|hgdate}|{author|person}|M|{file_mod}\n"
file_add = "{date|hgdate}|{author|person}|A|{file_add}\n"
file_del = "{date|hgdate}|{author|person}|D|{file_del}\n"
file_copy = "{date|hgdate}|{author|person}|A|{name}\n"
$ hg log -r 0:tip --style gource.style
....
return func(*args, **kwargs)
File "/opt/local/lib/python2.6/site-packages/mercurial/extensions.py",
line 116, in wrap
util.checksignature(origfn), *args, **kwargs)
File "/opt/local/lib/python2.6/site-packages/mercurial/dispatch.py", line
30, in dispatch
return _runcatch(u, args)
File "/opt/local/lib/python2.6/site-packages/mercurial/dispatch.py", line
46, in _runcatch
return _dispatch(ui, args)
File "/opt/local/lib/python2.6/site-packages/mercurial/dispatch.py", line
464, in _dispatch
return runcommand(lui, repo, cmd, fullargs, ui, options, d)
File "/opt/local/lib/python2.6/site-packages/mercurial/dispatch.py", line
334, in runcommand
ret = _runcommand(ui, options, cmd, d)
File "/opt/local/lib/python2.6/site-packages/mercurial/extensions.py",
line 128, in wrap
return wrapper(origfn, *args, **kwargs)
File "/opt/local/lib/python2.6/site-packages/hgext/pager.py", line 65, in
pagecmd
return orig(ui, options, cmd, cmdfunc)
File "/opt/local/lib/python2.6/site-packages/mercurial/dispatch.py", line
515, in _runcommand
return checkargs()
File "/opt/local/lib/python2.6/site-packages/mercurial/dispatch.py", line
469, in checkargs
return cmdfunc()
File "/opt/local/lib/python2.6/site-packages/mercurial/dispatch.py", line
463, in <lambda>
d = lambda: util.checksignature(func)(ui, *args, **cmdoptions)
File "/opt/local/lib/python2.6/site-packages/mercurial/util.py", line 386,
in check
return func(*args, **kwargs)
File "/opt/local/lib/python2.6/site-packages/mercurial/extensions.py",
line 116, in wrap
util.checksignature(origfn), *args, **kwargs)
File "/opt/local/lib/python2.6/site-packages/mercurial/util.py", line 386,
in check
return func(*args, **kwargs)
File "/opt/local/lib/python2.6/site-packages/hgext/color.py", line 321, in
nocolor
return orig(*args, **opts)
File "/opt/local/lib/python2.6/site-packages/mercurial/util.py", line 386,
in check
return func(*args, **kwargs)
File "/opt/local/lib/python2.6/site-packages/mercurial/extensions.py",
line 116, in wrap
util.checksignature(origfn), *args, **kwargs)
File "/opt/local/lib/python2.6/site-packages/mercurial/util.py", line 386,
in check
return func(*args, **kwargs)
File "/opt/local/lib/python2.6/site-packages/hgext/graphlog.py", line 362,
in graph
return orig(*args, **kwargs)
File "/opt/local/lib/python2.6/site-packages/mercurial/util.py", line 386,
in check
return func(*args, **kwargs)
File "/opt/local/lib/python2.6/site-packages/mercurial/commands.py", line
2087, in log
for ctx in cmdutil.walkchangerevs(repo, matchfn, opts, prep):
File "/opt/local/lib/python2.6/site-packages/mercurial/cmdutil.py", line
1160, in iterate
prepare(ctx, fns)
File "/opt/local/lib/python2.6/site-packages/mercurial/commands.py", line
2085, in prep
displayer.show(ctx, copies=copies)
File "/opt/local/lib/python2.6/site-packages/mercurial/cmdutil.py", line
657, in show
self._show(ctx, copies, props)
File "/opt/local/lib/python2.6/site-packages/mercurial/cmdutil.py", line
901, in _show
self.ui.write(templater.stringify(self.t(key, **props)))
File "/opt/local/lib/python2.6/site-
packages/mercurial/templatefilters.py", line 14, in stringify
return "".join([stringify(t) for t in thing if t is not None])
File "/opt/local/lib/python2.6/site-packages/mercurial/util.py", line 220,
in increasingchunks
for chunk in source:
File "/opt/local/lib/python2.6/site-packages/mercurial/templater.py", line
60, in process
item = iters[0].next()
File "/opt/local/lib/python2.6/site-packages/mercurial/util.py", line 220,
in increasingchunks
for chunk in source:
File "/opt/local/lib/python2.6/site-packages/mercurial/templater.py", line
60, in process
item = iters[0].next()
File "/opt/local/lib/python2.6/site-packages/mercurial/templater.py", line
127, in _process
yield self._filter(expr, get, map)
File "/opt/local/lib/python2.6/site-packages/mercurial/templater.py", line
97, in _filter
return self.cache[expr](get)
File "/opt/local/lib/python2.6/site-packages/mercurial/templater.py", line
92, in apply
x = get(val)
File "/opt/local/lib/python2.6/site-packages/mercurial/templater.py", line
107, in get
v = v(**map)
TypeError: showdate() takes exactly 2 non-keyword arguments (0 given)
$ python --version
Python 2.6.1
----------
messages: 11480
nosy: dsp
priority: bug
status: unread
title: Exception in templater
____________________________________________________
Mercurial issue tracker <bugs at mercurial.selenic.com>
<http://mercurial.selenic.com/bts/issue1989>
____________________________________________________
More information about the Mercurial-devel
mailing list