comparison mercurial/localrepo.py @ 35256:9ce4e01f58ee

repoview: do not include filter name in name of proxy class The type object is shared across all filters. I'll add __repr__() instead.
author Yuya Nishihara <yuya@tcha.org>
date Tue, 05 Dec 2017 21:37:30 +0900
parents 9153871d50e0
children c752fbe228fb
comparison
equal deleted inserted replaced
35255:d73ccc63b8f9 35256:9ce4e01f58ee
686 # invocation. 686 # invocation.
687 687
688 key = self.unfiltered().__class__ 688 key = self.unfiltered().__class__
689 if key not in self._filteredrepotypes: 689 if key not in self._filteredrepotypes:
690 # Build a new type with the repoview mixin and the base 690 # Build a new type with the repoview mixin and the base
691 # class of this repo. Give it a name containing the 691 # class of this repo.
692 # filter name to aid debugging. 692 class filteredrepo(repoview.repoview, key):
693 bases = (repoview.repoview, key) 693 pass
694 cls = type(r'%sfilteredrepo' % name, bases, {}) 694 self._filteredrepotypes[key] = filteredrepo
695 self._filteredrepotypes[key] = cls
696 695
697 return self._filteredrepotypes[key](self, name) 696 return self._filteredrepotypes[key](self, name)
698 697
699 @repofilecache('bookmarks', 'bookmarks.current') 698 @repofilecache('bookmarks', 'bookmarks.current')
700 def _bookmarks(self): 699 def _bookmarks(self):