Mercurial > public > mercurial-scm > hg
diff mercurial/localrepo.py @ 50916:b3174be5e7f7
localrepo: purge filecache attribute using there unicode name
This could be better, but that's a good step.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Wed, 30 Aug 2023 01:23:30 +0200 |
parents | f0ae403bf704 |
children | d718eddf01d9 |
line wrap: on
line diff
--- a/mercurial/localrepo.py Thu Aug 31 01:21:57 2023 +0200 +++ b/mercurial/localrepo.py Wed Aug 30 01:23:30 2023 +0200 @@ -3028,7 +3028,11 @@ if clearfilecache: del self._filecache[k] try: - delattr(unfiltered, k) + # XXX ideally, the key would be a unicode string to match the + # fact it refers to an attribut name. However changing this was + # a bit a scope creep compared to the series cleaning up + # del/set/getattr so we kept thing simple here. + delattr(unfiltered, pycompat.sysstr(k)) except AttributeError: pass self.invalidatecaches()