Mercurial > public > mercurial-scm > hg
comparison mercurial/manifest.py @ 44247:c443b9ba6f63 stable
py3: __repr__ needs to return str, not bytes
Differential Revision: https://phab.mercurial-scm.org/D8089
author | Kyle Lippincott <spectral@google.com> |
---|---|
date | Thu, 02 Jan 2020 11:04:18 -0800 |
parents | 888bd39ed555 |
children | 63d84c18247a |
comparison
equal
deleted
inserted
replaced
44246:eecc005229ff | 44247:c443b9ba6f63 |
---|---|
19 nullid, | 19 nullid, |
20 nullrev, | 20 nullrev, |
21 ) | 21 ) |
22 from .pycompat import getattr | 22 from .pycompat import getattr |
23 from . import ( | 23 from . import ( |
24 encoding, | |
24 error, | 25 error, |
25 mdiff, | 26 mdiff, |
26 pathutil, | 27 pathutil, |
27 policy, | 28 policy, |
28 pycompat, | 29 pycompat, |
865 ): | 866 ): |
866 return False | 867 return False |
867 self._loadalllazy() | 868 self._loadalllazy() |
868 return not self._dirs or all(m._isempty() for m in self._dirs.values()) | 869 return not self._dirs or all(m._isempty() for m in self._dirs.values()) |
869 | 870 |
871 @encoding.strmethod | |
870 def __repr__(self): | 872 def __repr__(self): |
871 return ( | 873 return ( |
872 b'<treemanifest dir=%s, node=%s, loaded=%s, dirty=%s at 0x%x>' | 874 b'<treemanifest dir=%s, node=%s, loaded=%r, dirty=%r at 0x%x>' |
873 % ( | 875 % ( |
874 self._dir, | 876 self._dir, |
875 hex(self._node), | 877 hex(self._node), |
876 bool(self._loadfunc is _noop), | 878 bool(self._loadfunc is _noop), |
877 self._dirty, | 879 self._dirty, |