Mercurial > hg
comparison mercurial/scmutil.py @ 37942:32bc3815efae
stringutil: flip the default of pprint() to bprefix=False
If we use pprint() as a drop-in replacement for repr(), bprefix=False is more
appropriate. Let's make it the default to remove bprefix=False noise.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Thu, 10 May 2018 21:08:32 +0900 |
parents | a8a7ccec1783 |
children | 2f86f259aefa |
comparison
equal
deleted
inserted
replaced
37941:af83a0ed0afb | 37942:32bc3815efae |
---|---|
104 return self[6] | 104 return self[6] |
105 | 105 |
106 def __repr__(self, *args, **kwargs): | 106 def __repr__(self, *args, **kwargs): |
107 return ((r'<status modified=%s, added=%s, removed=%s, deleted=%s, ' | 107 return ((r'<status modified=%s, added=%s, removed=%s, deleted=%s, ' |
108 r'unknown=%s, ignored=%s, clean=%s>') % | 108 r'unknown=%s, ignored=%s, clean=%s>') % |
109 tuple(pycompat.sysstr(stringutil.pprint( | 109 tuple(pycompat.sysstr(stringutil.pprint(v)) for v in self)) |
110 v, bprefix=False)) for v in self)) | |
111 | 110 |
112 def itersubrepos(ctx1, ctx2): | 111 def itersubrepos(ctx1, ctx2): |
113 """find subrepos in ctx1 or ctx2""" | 112 """find subrepos in ctx1 or ctx2""" |
114 # Create a (subpath, ctx) mapping where we prefer subpaths from | 113 # Create a (subpath, ctx) mapping where we prefer subpaths from |
115 # ctx1. The subpaths from ctx2 are important when the .hgsub file | 114 # ctx1. The subpaths from ctx2 are important when the .hgsub file |