##// END OF EJS Templates
localrepo: purge filecache attribute using there unicode name...
marmoute -
r51812:b3174be5 default
parent child Browse files
Show More
@@ -3028,7 +3028,11 b' class localrepository:'
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()
@@ -1692,6 +1692,10 b' class filecache:'
1692 def __call__(self, func):
1692 def __call__(self, func):
1693 self.func = func
1693 self.func = func
1694 self.sname = func.__name__
1694 self.sname = func.__name__
1695 # XXX We should be using a unicode string instead of bytes for the main
1696 # name (and the _filecache key). The fact we use bytes is a remains
1697 # from Python2, since the name is derived from an attribute name a
1698 # `str` is a better fit now that we support Python3 only
1695 self.name = pycompat.sysbytes(self.sname)
1699 self.name = pycompat.sysbytes(self.sname)
1696 return self
1700 return self
1697
1701
General Comments 0
You need to be logged in to leave comments. Login now