comparison mercurial/scmutil.py @ 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 73a74f29eb87
children 32bc3815efae
comparison
equal deleted inserted replaced
37920:ea63a2004d09 37921:a8a7ccec1783
102 def clean(self): 102 def clean(self):
103 '''files that have not been modified''' 103 '''files that have not been modified'''
104 return self[6] 104 return self[6]
105 105
106 def __repr__(self, *args, **kwargs): 106 def __repr__(self, *args, **kwargs):
107 return (('<status modified=%r, added=%r, removed=%r, deleted=%r, ' 107 return ((r'<status modified=%s, added=%s, removed=%s, deleted=%s, '
108 'unknown=%r, ignored=%r, clean=%r>') % self) 108 r'unknown=%s, ignored=%s, clean=%s>') %
109 tuple(pycompat.sysstr(stringutil.pprint(
110 v, bprefix=False)) for v in self))
109 111
110 def itersubrepos(ctx1, ctx2): 112 def itersubrepos(ctx1, ctx2):
111 """find subrepos in ctx1 or ctx2""" 113 """find subrepos in ctx1 or ctx2"""
112 # Create a (subpath, ctx) mapping where we prefer subpaths from 114 # Create a (subpath, ctx) mapping where we prefer subpaths from
113 # ctx1. The subpaths from ctx2 are important when the .hgsub file 115 # ctx1. The subpaths from ctx2 are important when the .hgsub file