changeset 18248:378a025ff269

hidden: move computation in filter function There is not good reason for this computation to be handle in a different way from the other. We are moving the computation of hidden revs in the filter function. In later changesets, code that access to `repo.hiddenrevs` will be updated and the property dropped.
author Pierre-Yves David <pierre-yves.david@logilab.fr>
date Tue, 08 Jan 2013 14:10:29 +0100
parents da9e544c69d6
children e3504d7ff760
files mercurial/localrepo.py mercurial/repoview.py
diffstat 2 files changed, 4 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/localrepo.py	Tue Jan 08 12:41:51 2013 +0100
+++ b/mercurial/localrepo.py	Tue Jan 08 14:10:29 2013 +0100
@@ -364,12 +364,7 @@
 
         hidden changesets cannot have non-hidden descendants
         """
-        hidden = set()
-        if self.obsstore:
-            ### hide extinct changeset that are not accessible by any mean
-            hiddenquery = 'extinct() - ::(. + bookmark())'
-            hidden.update(self.revs(hiddenquery))
-        return hidden
+        return repoview.filteredrevs(self, 'hidden')
 
     @storecache('00changelog.i')
     def changelog(self):
--- a/mercurial/repoview.py	Tue Jan 08 12:41:51 2013 +0100
+++ b/mercurial/repoview.py	Tue Jan 08 14:10:29 2013 +0100
@@ -17,7 +17,9 @@
     During most operation hidden should be filtered."""
     assert not repo.changelog.filteredrevs
     if repo.obsstore:
-        return frozenset(repo.revs('hidden()'))
+        ### hide extinct changeset that are not accessible by any mean
+        hiddenquery = 'extinct() - ::(. + bookmark())'
+        return frozenset(repo.revs(hiddenquery))
     return frozenset()
 
 def computeunserved(repo):