diff tests/test-branches.t @ 29816:034412ca28c3

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. Should we change the behavior of "if(0)" as well?
author Yuya Nishihara <yuya@tcha.org>
date Thu, 18 Aug 2016 16:29:22 +0900
parents 0d588332ad2c
children 052e4f1ffce9
line wrap: on
line diff
--- a/tests/test-branches.t	Thu Aug 18 15:55:07 2016 +0900
+++ b/tests/test-branches.t	Thu Aug 18 16:29:22 2016 +0900
@@ -516,6 +516,8 @@
    }
   ]
 
+  $ hg branches --closed -T '{if(closed, "{branch}\n")}'
+  c
 
 Tests of revision branch name caching