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

login
register
mail settings
Submitter phabricator
Date Jan. 19, 2018, 8:12 p.m.
Message ID <b372d9c44fbfbd1c6008112a09333521@localhost.localdomain>
Download mbox | patch
Permalink /patch/26974/
State Not Applicable
Headers show

Comments

phabricator - Jan. 19, 2018, 8:12 p.m.
durin42 updated this revision to Diff 4950.

REPOSITORY
  rHG Mercurial

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

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

AFFECTED FILES
  mercurial/localrepo.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
--- a/mercurial/localrepo.py
+++ b/mercurial/localrepo.py
@@ -1569,7 +1569,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()