[PATCH 05 of 27 clfilter V2] clfilter: introduce an "unfiltered" method on localrepo

Pierre-Yves David pierre-yves.david at ens-lyon.org
Mon Oct 8 16:37:56 CDT 2012

# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at ens-lyon.org>
# Date 1349708851 -7200
# Node ID f572fa1de467af83cc2f11650fe00701bb97151e
# Parent  74df73e21c7f870880967603b23eaa07d320da22
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 arrival 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
@@ -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
     def _bookmarks(self):
         return bookmarks.read(self)

More information about the Mercurial-devel mailing list