Before this patch,
In [13]: repo.filtered('visible').class
Out[13]: mercurial.localrepo.visiblefilteredrepo
In [14]: repo.filtered('served').class
Out[14]: mercurial.localrepo.visiblefilteredrepo
repo.unfiltered().__class__ can be same for two different repoviews, so that's
not a good key for the cache. We need to include the filtername in the key so
that we can have different keys for different repoview classes. After this
patch,
In [13]: repo.filtered('visible').class
Out[13]: mercurial.localrepo.visiblefilteredrepo
In [14]: repo.filtered('served').class
Out[14]: mercurial.localrepo.servedfilteredrepo
The above behaviour can also be noticed using hg debugshell.
Perhaps a tuple of (cls, filter name) is a better key if we have
to create a type object per filter.