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.
--- 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):