Skip to content
Snippets Groups Projects
Commit 7a463053 authored by Manuel Jacob's avatar Manuel Jacob
Browse files

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.
parent d545b895
No related branches found
No related tags found
No related merge requests found
...@@ -535,7 +535,9 @@ ...@@ -535,7 +535,9 @@
% (name, path) % (name, path)
) )
return None 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 return path
rev = optrev(self.last_changed) rev = optrev(self.last_changed)
...@@ -1208,7 +1210,10 @@ ...@@ -1208,7 +1210,10 @@
return relative return relative
# The path is outside our tracked tree... # 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 return None
def _checkpath(self, path, revnum, module=None): def _checkpath(self, path, revnum, module=None):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment