# HG changeset patch # User Pulkit Goyal <7895pulkit@gmail.com> # Date 1521398170 -19800 # Node ID d5d42c170f4dd086a925eae256975ce473755838 # Parent 0baf0e3ee5696f65f71f69700e727541b904fa7f py3: use pycompat.bytestr() in dirstate.py This prevents extra b'' prefixes in output. Differential Revision: https://phab.mercurial-scm.org/D2894 diff -r 0baf0e3ee569 -r d5d42c170f4d mercurial/dirstate.py --- 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)