# HG changeset patch # User Manuel Jacob # Date 1592310730 -7200 # Node ID 7a4630536e536c0617d4aa8423d3b6469b2d0856 # Parent d545b895234ac0ada32190d36b0af67b6ab8b42e py3: avoid using %r format on bytes Before the patch, the 'b' prefix appeared in the formatted string. Wrapping the bytes as pycompat.bytestr solves this problem. Eventually, I think that we should move away from using %r (like 975e517451a6 and 4d6019c0e0ef did), but that would change output of non-ASCII bytes on Python 2, so we can’t do it on the stable branch. Also, many places continue to use %r, so it would be a good idea to do the change all at once. diff -r d545b895234a -r 7a4630536e53 hgext/convert/subversion.py --- a/hgext/convert/subversion.py Tue Jun 16 14:03:00 2020 +0200 +++ b/hgext/convert/subversion.py Tue Jun 16 14:32:10 2020 +0200 @@ -535,7 +535,9 @@ % (name, path) ) return None - self.ui.note(_(b'found %s at %r\n') % (name, path)) + self.ui.note( + _(b'found %s at %r\n') % (name, pycompat.bytestr(path)) + ) return path rev = optrev(self.last_changed) @@ -1208,7 +1210,10 @@ return relative # The path is outside our tracked tree... - self.ui.debug(b'%r is not under %r, ignoring\n' % (path, module)) + self.ui.debug( + b'%r is not under %r, ignoring\n' + % (pycompat.bytestr(path), pycompat.bytestr(module)) + ) return None def _checkpath(self, path, revnum, module=None):