Show More
@@ -350,7 +350,8 b' class hybriditem(mappable, wrapped):' | |||
|
350 | 350 | return gen |
|
351 | 351 | |
|
352 | 352 | def tobool(self, context, mapping): |
|
353 | return bool(self.tovalue(context, mapping)) | |
|
353 | w = makewrapped(context, mapping, self._value) | |
|
354 | return w.tobool(context, mapping) | |
|
354 | 355 | |
|
355 | 356 | def tovalue(self, context, mapping): |
|
356 | 357 | return _unthunk(context, mapping, self._value) |
@@ -932,6 +932,8 b' Test boolean expression/literal passed t' | |||
|
932 | 932 | rev 0 is True |
|
933 | 933 | $ hg log -r 0 -T '{if(0, "literal 0 is True as well")}\n' |
|
934 | 934 | literal 0 is True as well |
|
935 | $ hg log -r 0 -T '{if(min(revset(r"0")), "0 of hybriditem is also True")}\n' | |
|
936 | 0 of hybriditem is also True | |
|
935 | 937 | $ hg log -r 0 -T '{if("", "", "empty string is False")}\n' |
|
936 | 938 | empty string is False |
|
937 | 939 | $ hg log -r 0 -T '{if(revset(r"0 - 0"), "", "empty list is False")}\n' |
General Comments 0
You need to be logged in to leave comments.
Login now