py3: use pycompat.bytestr() in dirstate.py
This prevents extra b'' prefixes in output.
Differential Revision: https://phab.mercurial-scm.org/D2894
--- a/mercurial/dirstate.py Mon Mar 19 00:02:59 2018 +0530
+++ b/mercurial/dirstate.py Mon Mar 19 00:06:10 2018 +0530
@@ -371,7 +371,8 @@
if state == 'a' or oldstate == 'r':
scmutil.checkfilename(f)
if self._map.hastrackeddir(f):
- raise error.Abort(_('directory %r already in dirstate') % f)
+ raise error.Abort(_('directory %r already in dirstate') %
+ pycompat.bytestr(f))
# shadows
for d in util.finddirs(f):
if self._map.hastrackeddir(d):
@@ -379,7 +380,8 @@
entry = self._map.get(d)
if entry is not None and entry[0] != 'r':
raise error.Abort(
- _('file %r in dirstate clashes with %r') % (d, f))
+ _('file %r in dirstate clashes with %r') %
+ (pycompat.bytestr(d), pycompat.bytestr(f)))
self._dirty = True
self._updatedfiles.add(f)
self._map.addfile(f, oldstate, state, mode, size, mtime)