clfilter: introduce an "unfiltered" method on localrepo
authorPierre-Yves David <pierre-yves.david@ens-lyon.org>
Wed, 21 Nov 2012 00:36:29 +0100
changeset 17993 1a6f8820eb71
parent 17992 c95210b82c0e
child 17994 8899bf48116a
clfilter: introduce an "unfiltered" method on localrepo This commit is part of the changelog level filtering effort. It returns the main "unfiltered" version of a repo-like object. For localrepo this means the same localrepo object. But this method will be overwritten by the filtered versions of a repository to return the core unfiltered version of the repo. Introducing this simple method first allows later commits to prepare for the use of a filtered version of a repository. A new repo method is added because a lot of users may call it. At the end of this series of commits, about 40 calls exist in core and hgext.
mercurial/localrepo.py
--- a/mercurial/localrepo.py	Tue Nov 20 19:05:46 2012 +0100
+++ b/mercurial/localrepo.py	Wed Nov 21 00:36:29 2012 +0100
@@ -263,6 +263,12 @@
     def peer(self):
         return localpeer(self) # not cached to avoid reference cycle
 
+    def unfiltered(self):
+        """Return unfiltered version of the repository
+
+        Intended to be ovewritten by filtered repo."""
+        return self
+
     @filecache('bookmarks')
     def _bookmarks(self):
         return bookmarks.bmstore(self)