Mercurial > hg
changeset 22674:06c8b58647b9
formatter: convert booleans to json
It will be used in branches output.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Thu, 02 Oct 2014 23:20:59 +0900 |
parents | 16a46003b50c |
children | 4e64d255f1a8 |
files | mercurial/formatter.py |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/formatter.py Wed Oct 01 03:42:00 2014 +0200 +++ b/mercurial/formatter.py Thu Oct 02 23:20:59 2014 +0900 @@ -91,6 +91,10 @@ def _jsonifyobj(v): if isinstance(v, tuple): return '[' + ', '.join(_jsonifyobj(e) for e in v) + ']' + elif v is True: + return 'true' + elif v is False: + return 'false' elif isinstance(v, (int, float)): return str(v) else: