[PATCH 2 of 4] templater: fix if() to not evaluate False as bool('False')

Yuya Nishihara yuya at tcha.org
Thu Aug 25 11:07:43 EDT 2016


On Wed, 24 Aug 2016 13:35:40 -0400, timeless wrote:
> While I support this change, I think it needs a BC

Good point. I didn't mark it as a BC because log templates would never
generate a boolean object, but that's true there are BC where experimental
formatter is used.

> On Sun, Aug 21, 2016 at 10:53 AM, Yuya Nishihara <yuya at tcha.org> wrote:
> > templater: fix if() to not evaluate False as bool('False')
> >
> > Before, False was True. This patch fixes the issue by processing True/False
> > transparently. The other values (including integer 0) are tested as strings
> > for backward compatibility, which means "if(latesttagdistance)" never be False.


More information about the Mercurial-devel mailing list