changeset 37976:bf6bb710b40f

stringutil: teach pprint about tuples Differential Revision: https://phab.mercurial-scm.org/D3521
author Augie Fackler <augie@google.com>
date Fri, 27 Apr 2018 13:15:16 -0400
parents faa41fd282d1
children f71c97d9b97b
files mercurial/utils/stringutil.py
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/utils/stringutil.py	Thu Apr 19 21:00:12 2018 +0900
+++ b/mercurial/utils/stringutil.py	Fri Apr 27 13:15:16 2018 -0400
@@ -46,6 +46,8 @@
         return '%d' % o
     elif isinstance(o, float):
         return '%f' % o
+    elif isinstance(o, tuple):
+        return '(%s)' % (b', '.join(pprint(a, bprefix=bprefix) for a in o))
     elif o is None:
         return b'None'
     else: