[issue2987] passing a non-string to a string-expecting filter in a template crashes mercurial

Jan bugs at mercurial.selenic.com
Wed Sep 7 05:59:45 CDT 2011


New submission from Jan <jan.code at jankanis.nl>:

Running "hg parent --template '{date|obfuscate}"' crashes with the 
following exception: 

** unknown exception encountered, please report by visiting
**  http://mercurial.selenic.com/wiki/BugTracker
** Python 2.6.5 (r265:79063, Apr 16 2010, 13:57:41) [GCC 4.4.3]
** Mercurial Distributed SCM (version 1.9.2+3-86380f24e697)
** Extensions loaded: rebase, svn
Traceback (most recent call last):
[omitted traceback]
TypeError: coercing to Unicode: need string or buffer, tuple found


The same happens (with different exceptions) for other filters that expect 
string input if they aren't given strings. Hg should give a sensible error 
message instead of crashing. If this is not a bug but expected behaviour, 
it is a bug that mercurial instructs me to report this.

Related: Issue 2159

----------
messages: 17309
nosy: JanKanis
priority: bug
status: unread
title: passing a non-string to a string-expecting filter in a template crashes mercurial

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


More information about the Mercurial-devel mailing list