diff mercurial/hgweb/webutil.py @ 38289:f9c426385853

templater: abstract truth testing to fix {if(list_of_empty_strings)} Non-empty list should always be True even if it's stringified to ''. Spotted by Martin von Zweigbergk.
author Yuya Nishihara <yuya@tcha.org>
date Sat, 09 Jun 2018 13:34:47 +0900
parents fb874fc1d9b4
children dae829b4de78
line wrap: on
line diff
--- a/mercurial/hgweb/webutil.py	Tue Jun 12 23:17:38 2018 +0900
+++ b/mercurial/hgweb/webutil.py	Sat Jun 09 13:34:47 2018 +0900
@@ -743,6 +743,9 @@
     def show(self, context, mapping):
         return self.join(context, '')
 
+    def tobool(self, context, mapping):
+        return bool(self._vars)
+
     def tovalue(self, context, mapping):
         return self._vars