localrepo: consistently use native str when __dict__ is involved
authorAugie Fackler <augie@google.com>
Thu, 01 Feb 2018 12:38:04 -0800
changeset 35839 9dad46c23185
parent 35838 f484b9d95c23
child 35840 b43b314cc46a
localrepo: consistently use native str when __dict__ is involved Differential Revision: https://phab.mercurial-scm.org/D1898
mercurial/localrepo.py
--- a/mercurial/localrepo.py	Wed Jan 17 21:46:29 2018 -0500
+++ b/mercurial/localrepo.py	Thu Feb 01 12:38:04 2018 -0800
@@ -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()