Patchwork D2894: py3: use pycompat.bytestr() in dirstate.py

login
register
mail settings
Submitter phabricator
Date March 19, 2018, 1:46 p.m.
Message ID <91a42cb8f293baf40ced6209529f68b1@localhost.localdomain>
Download mbox | patch
Permalink /patch/29627/
State Not Applicable
Headers show

Comments

phabricator - March 19, 2018, 1:46 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGd5d42c170f4d: py3: use pycompat.bytestr() in dirstate.py (authored by pulkit, committed by ).

CHANGED PRIOR TO COMMIT
  https://phab.mercurial-scm.org/D2894?vs=7099&id=7112#toc

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D2894?vs=7099&id=7112

REVISION DETAIL
  https://phab.mercurial-scm.org/D2894

AFFECTED FILES
  mercurial/dirstate.py

CHANGE DETAILS




To: pulkit, #hg-reviewers, yuja
Cc: mercurial-devel

Patch

diff --git a/mercurial/dirstate.py b/mercurial/dirstate.py
--- a/mercurial/dirstate.py
+++ b/mercurial/dirstate.py
@@ -371,15 +371,17 @@ 
         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):
                     break
                 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)