comparison 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
comparison
equal deleted inserted replaced
50915:d97227f42558 50916:b3174be5e7f7
3026 continue 3026 continue
3027 3027
3028 if clearfilecache: 3028 if clearfilecache:
3029 del self._filecache[k] 3029 del self._filecache[k]
3030 try: 3030 try:
3031 delattr(unfiltered, k) 3031 # XXX ideally, the key would be a unicode string to match the
3032 # fact it refers to an attribut name. However changing this was
3033 # a bit a scope creep compared to the series cleaning up
3034 # del/set/getattr so we kept thing simple here.
3035 delattr(unfiltered, pycompat.sysstr(k))
3032 except AttributeError: 3036 except AttributeError:
3033 pass 3037 pass
3034 self.invalidatecaches() 3038 self.invalidatecaches()
3035 if not self.currenttransaction(): 3039 if not self.currenttransaction():
3036 # TODO: Changing contents of store outside transaction 3040 # TODO: Changing contents of store outside transaction