D5291: branchmap: build the revbranchcache._namesreverse() only when required
Yuya Nishihara
yuya at tcha.org
Thu Nov 22 08:29:57 EST 2018
> > Maybe _namesreverse can be a propertycache, instead of duplicating it.
> > `del self.__dict__[r'...']` can be used to discard the cache.
>
> Hm, I am not sure if I feel good about doing `del self.__dict__[r'...']` thing.
It's pretty common in Mercurial codebase. That said, I found a better way.
`util.clearcachedproperty(self, '...')`.
More information about the Mercurial-devel
mailing list