mercurial/localrepo.py
changeset 18100 3a6ddacb7198
parent 18092 ff36650e4238
child 18101 a464deecc9dd
equal deleted inserted replaced
18099:11748167a78e 18100:3a6ddacb7198
     4 #
     4 #
     5 # This software may be used and distributed according to the terms of the
     5 # This software may be used and distributed according to the terms of the
     6 # GNU General Public License version 2 or any later version.
     6 # GNU General Public License version 2 or any later version.
     7 from node import bin, hex, nullid, nullrev, short
     7 from node import bin, hex, nullid, nullrev, short
     8 from i18n import _
     8 from i18n import _
     9 import peer, changegroup, subrepo, discovery, pushkey, obsolete
     9 import peer, changegroup, subrepo, discovery, pushkey, obsolete, repoview
    10 import changelog, dirstate, filelog, manifest, context, bookmarks, phases
    10 import changelog, dirstate, filelog, manifest, context, bookmarks, phases
    11 import lock, transaction, store, encoding, base85
    11 import lock, transaction, store, encoding, base85
    12 import scmutil, util, extensions, hook, error, revset
    12 import scmutil, util, extensions, hook, error, revset
    13 import match as matchmod
    13 import match as matchmod
    14 import merge as mergemod
    14 import merge as mergemod
   300     def unfiltered(self):
   300     def unfiltered(self):
   301         """Return unfiltered version of the repository
   301         """Return unfiltered version of the repository
   302 
   302 
   303         Intended to be ovewritten by filtered repo."""
   303         Intended to be ovewritten by filtered repo."""
   304         return self
   304         return self
       
   305 
       
   306     def filtered(self, name):
       
   307         """Return a filtered version of a repository"""
       
   308         # build a new class with the mixin and the current class
       
   309         # (possibily subclass of the repo)
       
   310         class proxycls(repoview.repoview, self.unfiltered().__class__):
       
   311             pass
       
   312         return proxycls(self, name)
   305 
   313 
   306     @repofilecache('bookmarks')
   314     @repofilecache('bookmarks')
   307     def _bookmarks(self):
   315     def _bookmarks(self):
   308         return bookmarks.bmstore(self)
   316         return bookmarks.bmstore(self)
   309 
   317