stringutil: have buildrepr delegate to pprint for unknown types
authorAugie Fackler <augie@google.com>
Fri, 10 Aug 2018 01:42:01 -0400
changeset 39052 38409be2f521
parent 39051 2aebe138ef6e
child 39053 836433f3bdd6
stringutil: have buildrepr delegate to pprint for unknown types This stabilizes some revset reprs across Python 2 and 3. Differential Revision: https://phab.mercurial-scm.org/D4244
mercurial/utils/stringutil.py
--- a/mercurial/utils/stringutil.py	Fri Aug 10 01:41:31 2018 -0400
+++ b/mercurial/utils/stringutil.py	Fri Aug 10 01:42:01 2018 -0400
@@ -114,7 +114,7 @@
     elif callable(r):
         return r()
     else:
-        return pycompat.byterepr(r)
+        return pprint(r)
 
 def binary(s):
     """return true if a string is binary data"""