Patchwork D1898: localrepo: consistently use native str when __dict__ is involved

login
register
mail settings
Submitter phabricator
Date Feb. 1, 2018, 8:39 p.m.
Message ID <c1072c9735b7bd5b0eb651fada8f4144@localhost.localdomain>
Download mbox | patch
Permalink /patch/27137/
State Not Applicable
Headers show

Comments

phabricator - Feb. 1, 2018, 8:39 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG5a34d8b667c1: localrepo: consistently use native str when __dict__ is involved (authored by durin42, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D1898?vs=5043&id=5068

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

AFFECTED FILES
  mercurial/localrepo.py

CHANGE DETAILS




To: durin42, #hg-reviewers, pulkit, indygreg
Cc: indygreg, mercurial-devel

Patch

diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
--- a/mercurial/localrepo.py
+++ b/mercurial/localrepo.py
@@ -1574,7 +1574,8 @@ 
     def _refreshfilecachestats(self, tr):
         """Reload stats of cached files so that they are flagged as valid"""
         for k, ce in self._filecache.items():
-            if k == 'dirstate' or k not in self.__dict__:
+            k = pycompat.sysstr(k)
+            if k == r'dirstate' or k not in self.__dict__:
                 continue
             ce.refresh()