[Bug 3645] New: hg log barfs on {tags|strip}
bugzilla-daemon at bz.selenic.com
bugzilla-daemon at bz.selenic.com
Wed Oct 3 08:37:18 UTC 2012
http://bz.selenic.com/show_bug.cgi?id=3645
Priority: normal
Bug ID: 3645
CC: mercurial-devel at selenic.com
Assignee: bugzilla at selenic.com
Summary: hg log barfs on {tags|strip}
Severity: bug
Classification: Unclassified
OS: Linux
Reporter: mercurial at planetmaker.de
Hardware: PC
Status: UNCONFIRMED
Version: 2.2.3
Component: Mercurial
Product: Mercurial
a call like hg log --template='{tags|strip}\n' will cause an error
AttributeError: 'generator' object has no attribute 'strip'
Full error log:
~/bin/hg$ hhg log --template='{tags} [{rev|strip}:{node|short} {branch}]
{date|isodate} {author}\n\t{desc|tabindent}\n\n' --graph
** unknown exception encountered, please report by visiting
** http://mercurial.selenic.com/wiki/BugTracker
** Python 2.7.3rc2 (default, Apr 22 2012, 22:30:17) [GCC 4.6.3]
** Mercurial Distributed SCM (version 2.2.3+119-23b247234454)
** Extensions loaded: graphlog, mq, rebase, purge, color, record
Traceback (most recent call last):
File "/home/ingo/bin/hg/hg", line 38, in <module>
mercurial.dispatch.run()
File "/home/ingo/bin/hg/mercurial/dispatch.py", line 28, in run
sys.exit((dispatch(request(sys.argv[1:])) or 0) & 255)
File "/home/ingo/bin/hg/mercurial/dispatch.py", line 65, in dispatch
return _runcatch(req)
File "/home/ingo/bin/hg/mercurial/dispatch.py", line 88, in _runcatch
return _dispatch(req)
File "/home/ingo/bin/hg/mercurial/dispatch.py", line 740, in _dispatch
cmdpats, cmdoptions)
File "/home/ingo/bin/hg/mercurial/dispatch.py", line 514, in runcommand
ret = _runcommand(ui, options, cmd, d)
File "/home/ingo/bin/hg/mercurial/extensions.py", line 189, in wrap
return wrapper(origfn, *args, **kwargs)
File "/home/ingo/bin/hg/hgext/color.py", line 364, in colorcmd
return orig(ui_, opts, cmd, cmdfunc)
File "/home/ingo/bin/hg/mercurial/dispatch.py", line 830, in _runcommand
return checkargs()
File "/home/ingo/bin/hg/mercurial/dispatch.py", line 801, in checkargs
return cmdfunc()
File "/home/ingo/bin/hg/mercurial/dispatch.py", line 737, in <lambda>
d = lambda: util.checksignature(func)(ui, *args, **cmdoptions)
File "/home/ingo/bin/hg/mercurial/util.py", line 471, in check
return func(*args, **kwargs)
File "/home/ingo/bin/hg/mercurial/extensions.py", line 144, in wrap
util.checksignature(origfn), *args, **kwargs)
File "/home/ingo/bin/hg/mercurial/util.py", line 471, in check
return func(*args, **kwargs)
File "/home/ingo/bin/hg/hgext/mq.py", line 3528, in mqcommand
return orig(ui, repo, *args, **kwargs)
File "/home/ingo/bin/hg/mercurial/util.py", line 471, in check
return func(*args, **kwargs)
File "/home/ingo/bin/hg/mercurial/commands.py", line 4071, in log
return cmdutil.graphlog(ui, repo, *pats, **opts)
File "/home/ingo/bin/hg/mercurial/cmdutil.py", line 1451, in graphlog
graphmod.asciiedges, getrenamed, filematcher)
File "/home/ingo/bin/hg/mercurial/cmdutil.py", line 1423, in displaygraph
displayer.show(ctx, copies=copies, matchfn=revmatchfn)
File "/home/ingo/bin/hg/mercurial/cmdutil.py", line 658, in show
self._show(ctx, copies, matchfn, props)
File "/home/ingo/bin/hg/mercurial/cmdutil.py", line 872, in _show
self.ui.write(templater.stringify(self.t(key, **props)))
File "/home/ingo/bin/hg/mercurial/templatefilters.py", line 309, in stringify
return "".join([stringify(t) for t in thing if t is not None])
File "/home/ingo/bin/hg/mercurial/util.py", line 323, in increasingchunks
for chunk in source:
File "/home/ingo/bin/hg/mercurial/templater.py", line 210, in _flatten
for i in thing:
File "/home/ingo/bin/hg/mercurial/templater.py", line 266, in <genexpr>
return _flatten(func(self, mapping, data) for func, data in
File "/home/ingo/bin/hg/mercurial/templater.py", line 149, in runfilter
return filt(func(context, mapping, data))
File "/home/ingo/bin/hg/mercurial/templatefilters.py", line 314, in strip
return text.strip()
AttributeError: 'int' object has no attribute 'strip'
ingo at aeolusmaximus:~/bin/hg$ hhg log --template='{tags|strip}\n' -l5
** unknown exception encountered, please report by visiting
** http://mercurial.selenic.com/wiki/BugTracker
** Python 2.7.3rc2 (default, Apr 22 2012, 22:30:17) [GCC 4.6.3]
** Mercurial Distributed SCM (version 2.2.3+119-23b247234454)
** Extensions loaded: graphlog, mq, rebase, purge, color, record
Traceback (most recent call last):
File "/home/ingo/bin/hg/hg", line 38, in <module>
mercurial.dispatch.run()
File "/home/ingo/bin/hg/mercurial/dispatch.py", line 28, in run
sys.exit((dispatch(request(sys.argv[1:])) or 0) & 255)
File "/home/ingo/bin/hg/mercurial/dispatch.py", line 65, in dispatch
return _runcatch(req)
File "/home/ingo/bin/hg/mercurial/dispatch.py", line 88, in _runcatch
return _dispatch(req)
File "/home/ingo/bin/hg/mercurial/dispatch.py", line 740, in _dispatch
cmdpats, cmdoptions)
File "/home/ingo/bin/hg/mercurial/dispatch.py", line 514, in runcommand
ret = _runcommand(ui, options, cmd, d)
File "/home/ingo/bin/hg/mercurial/extensions.py", line 189, in wrap
return wrapper(origfn, *args, **kwargs)
File "/home/ingo/bin/hg/hgext/color.py", line 364, in colorcmd
return orig(ui_, opts, cmd, cmdfunc)
File "/home/ingo/bin/hg/mercurial/dispatch.py", line 830, in _runcommand
return checkargs()
File "/home/ingo/bin/hg/mercurial/dispatch.py", line 801, in checkargs
return cmdfunc()
File "/home/ingo/bin/hg/mercurial/dispatch.py", line 737, in <lambda>
d = lambda: util.checksignature(func)(ui, *args, **cmdoptions)
File "/home/ingo/bin/hg/mercurial/util.py", line 471, in check
return func(*args, **kwargs)
File "/home/ingo/bin/hg/mercurial/extensions.py", line 144, in wrap
util.checksignature(origfn), *args, **kwargs)
File "/home/ingo/bin/hg/mercurial/util.py", line 471, in check
return func(*args, **kwargs)
File "/home/ingo/bin/hg/hgext/mq.py", line 3528, in mqcommand
return orig(ui, repo, *args, **kwargs)
File "/home/ingo/bin/hg/mercurial/util.py", line 471, in check
return func(*args, **kwargs)
File "/home/ingo/bin/hg/mercurial/commands.py", line 4142, in log
for ctx in cmdutil.walkchangerevs(repo, matchfn, opts, prep):
File "/home/ingo/bin/hg/mercurial/cmdutil.py", line 1190, in iterate
prepare(ctx, fns)
File "/home/ingo/bin/hg/mercurial/commands.py", line 4140, in prep
displayer.show(ctx, copies=copies, matchfn=revmatchfn)
File "/home/ingo/bin/hg/mercurial/cmdutil.py", line 658, in show
self._show(ctx, copies, matchfn, props)
File "/home/ingo/bin/hg/mercurial/cmdutil.py", line 872, in _show
self.ui.write(templater.stringify(self.t(key, **props)))
File "/home/ingo/bin/hg/mercurial/templatefilters.py", line 309, in stringify
return "".join([stringify(t) for t in thing if t is not None])
File "/home/ingo/bin/hg/mercurial/util.py", line 323, in increasingchunks
for chunk in source:
File "/home/ingo/bin/hg/mercurial/templater.py", line 210, in _flatten
for i in thing:
File "/home/ingo/bin/hg/mercurial/templater.py", line 266, in <genexpr>
return _flatten(func(self, mapping, data) for func, data in
File "/home/ingo/bin/hg/mercurial/templater.py", line 149, in runfilter
return filt(func(context, mapping, data))
File "/home/ingo/bin/hg/mercurial/templatefilters.py", line 314, in strip
return text.strip()
AttributeError: 'generator' object has no attribute 'strip'
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Mercurial-devel
mailing list