On Mon, 13 Mar 2017 22:15:43 -0700, Gregory Szorc wrote: > # HG changeset patch > # User Gregory Szorc <[email protected]> > # Date 1489455089 25200 > # Mon Mar 13 18:31:29 2017 -0700 > # Node ID f6f1f5efe05f4e3737dc198284f548e31a616f4b > # Parent 1c48a8278b2f015fca607dfc652823560a5ac580 > 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. > > diff --git a/mercurial/formatter.py b/mercurial/formatter.py > --- a/mercurial/formatter.py > +++ b/mercurial/formatter.py > @@ -295,7 +295,7 @@ def _jsonifyobj(v): > return 'true' > elif v is False: > return 'false' > - elif isinstance(v, (int, float)): > + elif isinstance(v, (int, long, float)): > return str(v)
Looks okay, but we'll need to export long on Python 3, by pycompat or code transformer. _______________________________________________ Mercurial-devel mailing list [email protected] https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
