diff -r d97227f42558 -r b3174be5e7f7 mercurial/localrepo.py --- 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()