# HG changeset patch # User Kyle Lippincott # Date 1577991858 28800 # Node ID c443b9ba6f63e96d30606ee9fa4377cebf1d9f80 # Parent eecc005229ffca7f6384f87a8edb26706cc6cad7 py3: __repr__ needs to return str, not bytes Differential Revision: https://phab.mercurial-scm.org/D8089 diff -r eecc005229ff -r c443b9ba6f63 mercurial/bundle2.py --- a/mercurial/bundle2.py Tue Feb 04 12:07:37 2020 +0100 +++ b/mercurial/bundle2.py Thu Jan 02 11:04:18 2020 -0800 @@ -1013,6 +1013,7 @@ self._generated = None self.mandatory = mandatory + @encoding.strmethod def __repr__(self): cls = b"%s.%s" % (self.__class__.__module__, self.__class__.__name__) return b'<%s object at %x; id: %s; type: %s; mandatory: %s>' % ( diff -r eecc005229ff -r c443b9ba6f63 mercurial/linelog.py --- a/mercurial/linelog.py Tue Feb 04 12:07:37 2020 +0100 +++ b/mercurial/linelog.py Thu Jan 02 11:04:18 2020 -0800 @@ -255,7 +255,7 @@ ) def __repr__(self): - return b'' % ( + return '' % ( hex(id(self)), self._maxrev, len(self._program), diff -r eecc005229ff -r c443b9ba6f63 mercurial/manifest.py --- a/mercurial/manifest.py Tue Feb 04 12:07:37 2020 +0100 +++ b/mercurial/manifest.py Thu Jan 02 11:04:18 2020 -0800 @@ -21,6 +21,7 @@ ) from .pycompat import getattr from . import ( + encoding, error, mdiff, pathutil, @@ -867,9 +868,10 @@ self._loadalllazy() return not self._dirs or all(m._isempty() for m in self._dirs.values()) + @encoding.strmethod def __repr__(self): return ( - b'' + b'' % ( self._dir, hex(self._node), diff -r eecc005229ff -r c443b9ba6f63 mercurial/patch.py --- a/mercurial/patch.py Tue Feb 04 12:07:37 2020 +0100 +++ b/mercurial/patch.py Thu Jan 02 11:04:18 2020 -0800 @@ -1090,6 +1090,7 @@ def filename(self): return self.header.filename() + @encoding.strmethod def __repr__(self): return b'' % (self.filename(), self.fromline)