[PATCH 03 of 14 clfilter part 1 V2] clfilter: introduce an "unfiltered" method on localrepo
pierre-yves.david at logilab.fr
pierre-yves.david at logilab.fr
Mon Nov 26 12:34:36 CST 2012
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at ens-lyon.org>
# Date 1353454589 -3600
# Node ID f6833b60312714f2c6828a5ba98f9e3f6f95b4b7
# Parent ae3d59b9ea8fa520ca232255e5a35a8c7e1a9a9c
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 mean the same
localrepo object. But this method will be overwritten by filtered version of a
repository to returns the core unfiltered version of the repo.
Introducing this simple first allows later commit to prepare the landing of
filtered version a repository.
A new repo method is added because a lot of user may call it. At the end of this
series of commit about 40 calls exist in core and hgext.
diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
--- a/mercurial/localrepo.py
+++ b/mercurial/localrepo.py
@@ -261,10 +261,16 @@ class localrepository(object):
return False
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)
@filecache('bookmarks.current')
More information about the Mercurial-devel
mailing list