[Bug 4638] New: templates: {word(0, author)} stack traces
mercurial-bugs at selenic.com
mercurial-bugs at selenic.com
Thu Apr 30 18:44:32 UTC 2015
http://bz.selenic.com/show_bug.cgi?id=4638
Priority: normal
Bug ID: 4638
CC: mercurial-devel at selenic.com
Assignee: bugzilla at selenic.com
Summary: templates: {word(0, author)} stack traces
Severity: bug
Classification: Unclassified
OS: Linux
Reporter: jordigh at octave.org
Hardware: PC
Status: UNCONFIRMED
Version: default branch
Component: templater
Product: Mercurial
log -T "{word(0, author)}\n"
File "/home/jordi/coding/vcs/mercurial-source/mercurial/commands.py", line
4590, in log
displayer.show(ctx, copies=copies, matchfn=revmatchfn)
File "/home/jordi/coding/vcs/mercurial-source/mercurial/cmdutil.py", line
1095, in show
self._show(ctx, copies, matchfn, props)
File "/home/jordi/coding/vcs/mercurial-source/mercurial/cmdutil.py", line
1422, in _show
self.ui.write(templater.stringify(self.t(key, **props)))
File "/home/jordi/coding/vcs/mercurial-source/mercurial/templatefilters.py",
line 328, in stringify
return "".join([stringify(t) for t in thing if t is not None])
File "/home/jordi/coding/vcs/mercurial-source/mercurial/util.py", line 537,
in increasingchunks
for chunk in source:
File "/home/jordi/coding/vcs/mercurial-source/mercurial/templater.py", line
598, in _flatten
for i in thing:
File "/home/jordi/coding/vcs/mercurial-source/mercurial/templater.py", line
187, in runtemplate
yield func(context, mapping, data)
File "/home/jordi/coding/vcs/mercurial-source/mercurial/templater.py", line
542, in word
num = int(stringify(args[0][0](context, mapping, args[0][1])))
ValueError: invalid literal for int() with base 10: ''
The problem with that line is that args[0][0] can be runsymbol instead of
runstring if there's no quoting in the first argument, which does the
completely wrong thing, returning a None instead of the necessary number.
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Mercurial-devel
mailing list