[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>
  File "/Library/Python/2.5/site-packages/mercurial/dispatch.py", line 20, in 
  File "/Library/Python/2.5/site-packages/mercurial/dispatch.py", line 29, in 
    return _runcatch(u, args)
  File "/Library/Python/2.5/site-packages/mercurial/dispatch.py", line 45, in 
    return _dispatch(ui, args)
  File "/Library/Python/2.5/site-packages/mercurial/dispatch.py", line 364, in 
    ret = _runcommand(ui, options, cmd, d)
  File "/Library/Python/2.5/site-packages/mercurial/dispatch.py", line 417, in 
    return checkargs()
  File "/Library/Python/2.5/site-packages/mercurial/dispatch.py", line 373, in 
    return cmdfunc()
  File "/Library/Python/2.5/site-packages/mercurial/dispatch.py", line 356, in 
    d = lambda: func(ui, repo, *args, **cmdoptions)
  File "/Library/Python/2.5/site-packages/mercurial/commands.py", line 1816, in 
    displayer.show(rev, changenode, copies=copies)
  File "/Library/Python/2.5/site-packages/mercurial/cmdutil.py", line 585, in 
    self._show(rev, changenode, copies, props)
  File "/Library/Python/2.5/site-packages/mercurial/cmdutil.py", line 864, in 
    self.ui.write(templater.stringify(self.t(key, **props)))
  File "/Library/Python/2.5/site-packages/mercurial/templater.py", line 148, in 
    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 
    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),
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>

More information about the Mercurial-devel mailing list