# HG changeset patch # User Yuya Nishihara # Date 1521804235 -32400 # Node ID 53e6b7e05553c6bed2f7beeca2f28f27a5a3f28c # Parent b56b79185aad2ba475faddd174f6537ce6d67516 templater: drop bool support from evalastype() Future patches will split evalastype() into two functions, evalrawexp() and unwrapastype(), so we can catch the exception of type conversion. # evaluating function may bubble up inner ParseError thing = evalrawexp(context, mapping, arg) try: return unwrapastype(context, thing) except ParseError: # add hint and reraise However, evalboolean() can't be factored out in this way since it has to process boolean-like symbols as non keyword. Fortunately, it's unlikely that we'll need a general type converter supporting bool, so this patch drops it from the table. diff -r b56b79185aad -r 53e6b7e05553 mercurial/templateutil.py --- a/mercurial/templateutil.py Sat Mar 17 20:13:06 2018 +0900 +++ b/mercurial/templateutil.py Fri Mar 23 20:23:55 2018 +0900 @@ -333,7 +333,6 @@ return stringify(thing) _evalfuncbytype = { - bool: evalboolean, bytes: evalstring, int: evalinteger, }