changeset 37921:a8a7ccec1783

scmutil: fix __repr__ of status tuple We should probably start giving some thought to migrating the status tuple to attrs, but not now. Differential Revision: https://phab.mercurial-scm.org/D3508
author Augie Fackler <augie@google.com>
date Fri, 27 Apr 2018 11:49:49 -0400
parents ea63a2004d09
children 0d95ad9fc5f4
files mercurial/scmutil.py
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/scmutil.py	Mon May 07 19:43:43 2018 -0700
+++ b/mercurial/scmutil.py	Fri Apr 27 11:49:49 2018 -0400
@@ -104,8 +104,10 @@
         return self[6]
 
     def __repr__(self, *args, **kwargs):
-        return (('<status modified=%r, added=%r, removed=%r, deleted=%r, '
-                 'unknown=%r, ignored=%r, clean=%r>') % self)
+        return ((r'<status modified=%s, added=%s, removed=%s, deleted=%s, '
+                 r'unknown=%s, ignored=%s, clean=%s>') %
+                tuple(pycompat.sysstr(stringutil.pprint(
+                    v, bprefix=False)) for v in self))
 
 def itersubrepos(ctx1, ctx2):
     """find subrepos in ctx1 or ctx2"""