Mercurial > hg
changeset 31396:ab3e9eab754f
formatter: support json formatting of long type
By luck, we appear to not pass any long instances into
the JSON formatter. I suspect this will change with all the
Python 3 porting work. Plus I have another series that will
convert some ints to longs that triggers this.
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Mon, 13 Mar 2017 18:31:29 -0700 |
parents | 361bccce566a |
children | 8f5ed8fa39f8 |
files | mercurial/formatter.py |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/formatter.py Sun Mar 12 21:56:39 2017 -0700 +++ b/mercurial/formatter.py Mon Mar 13 18:31:29 2017 -0700 @@ -295,7 +295,7 @@ return 'true' elif v is False: return 'false' - elif isinstance(v, (int, float)): + elif isinstance(v, (int, long, float)): return str(v) else: return '"%s"' % encoding.jsonescape(v)