mercurial/repoview.py
changeset 18242 e4687edec014
parent 18233 59a9f18d4587
child 18245 aff706b3a21c
--- a/mercurial/repoview.py	Fri Jan 04 19:24:32 2013 +0100
+++ b/mercurial/repoview.py	Mon Jan 07 19:24:06 2013 +0100
@@ -9,6 +9,16 @@
 import copy
 import phases
 
+
+def computehidden(repo):
+    """compute the set of hidden revision to filter
+
+    During most operation hidden should be filtered."""
+    assert not repo.changelog.filteredrevs
+    if repo.obsstore:
+        return frozenset(repo.revs('hidden()'))
+    return frozenset()
+
 def computeunserved(repo):
     """compute the set of revision that should be filtered when used a server
 
@@ -20,14 +30,16 @@
     return frozenset()
 
 # function to compute filtered set
-filtertable = {'unserved': computeunserved}
+filtertable = {'hidden': computehidden,
+               'unserved': computeunserved}
 ### Nearest subset relation
 # Nearest subset of filter X is a filter Y so that:
 # * Y is included in X,
 # * X - Y is as small as possible.
 # This create and ordering used for branchmap purpose.
 # the ordering may be partial
-subsettable = {None: 'unserved'}
+subsettable = {None: 'hidden',
+               'hidden': 'unserved'}
 
 def filteredrevs(repo, filtername):
     """returns set of filtered revision for this filter name"""