If we run this $ mkdir hgtmp && cd hgtmp $ hg init . $ echo a>>a $ hg ci -Am 'This should not be a number: {rev}' $ hg log -r 0 --template '{if(rev, desc)}\n' it erroneously displays This should not be a number: 0
Fixed by http://selenic.com/repo/hg/rev/3d8bfe2ecf6d Matt Mackall <mpm@selenic.com> templater: only recursively evaluate string literals as templates (issue4103) (please test the fix)