[issue1164] Exception from {files|escape} in log template

James Walker mercurial-bugs at selenic.com
Thu Jun 5 11:42:21 CDT 2008


New submission from James Walker <jamesw at frameforge3d.com>:

When I tried
  hg log --template "files: {files|escape}\n"
I got this:


** unknown exception encountered, details follow
** report bug details to http://www.selenic.com/mercurial/bts
** or mercurial at selenic.com
** Mercurial Distributed SCM (version 1.0.1)
Traceback (most recent call last):
  File "/usr/local/bin/hg", line 20, in <module>
    mercurial.dispatch.run()
  File "/Library/Python/2.5/site-packages/mercurial/dispatch.py", line 20, in 
run
    sys.exit(dispatch(sys.argv[1:]))
  File "/Library/Python/2.5/site-packages/mercurial/dispatch.py", line 29, in 
dispatch
    return _runcatch(u, args)
  File "/Library/Python/2.5/site-packages/mercurial/dispatch.py", line 45, in 
_runcatch
    return _dispatch(ui, args)
  File "/Library/Python/2.5/site-packages/mercurial/dispatch.py", line 364, in 
_dispatch
    ret = _runcommand(ui, options, cmd, d)
  File "/Library/Python/2.5/site-packages/mercurial/dispatch.py", line 417, in 
_runcommand
    return checkargs()
  File "/Library/Python/2.5/site-packages/mercurial/dispatch.py", line 373, in 
checkargs
    return cmdfunc()
  File "/Library/Python/2.5/site-packages/mercurial/dispatch.py", line 356, in 
<lambda>
    d = lambda: func(ui, repo, *args, **cmdoptions)
  File "/Library/Python/2.5/site-packages/mercurial/commands.py", line 1816, in 
log
    displayer.show(rev, changenode, copies=copies)
  File "/Library/Python/2.5/site-packages/mercurial/cmdutil.py", line 585, in 
show
    self._show(rev, changenode, copies, props)
  File "/Library/Python/2.5/site-packages/mercurial/cmdutil.py", line 864, in 
_show
    self.ui.write(templater.stringify(self.t(key, **props)))
  File "/Library/Python/2.5/site-packages/mercurial/templater.py", line 148, in 
stringify
    return "".join([stringify(t) for t in thing if t is not None])
  File "/Library/Python/2.5/site-packages/mercurial/templater.py", line 126, in 
__call__
    v = self.filters[f](v)
  File "/Library/Python/2.5/site-packages/mercurial/templatefilters.py", line 
132, in <lambda>
    "escape": lambda x: cgi.escape(x, True),
  File 
"/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/cgi.py", 
line 1046, in escape
    s = s.replace("&", "&amp;") # Must be done first!
AttributeError: 'generator' object has no attribute 'replace'

----------
messages: 6180
nosy: jwwalker
priority: bug
status: unread
title: Exception from {files|escape} in log template

____________________________________________________
Mercurial issue tracker <mercurial-bugs at selenic.com>
<http://www.selenic.com/mercurial/bts/issue1164>
____________________________________________________



More information about the Mercurial-devel mailing list