Comments
Patch
@@ -348,11 +348,12 @@ class localrepository(object):
# message is rare enough to not be translated
msg = 'obsolete feature not enabled but %i markers found!\n'
self.ui.warn(msg % len(list(store)))
return store
- @unfilteredpropertycache
+ @property
+ @unfiltered
def hiddenrevs(self):
"""hiddenrevs: revs that should be hidden by command and tools
This set is carried on the repo to ease initialization and lazy
loading; it'll probably move back to changelog for efficiency and
@@ -362,16 +363,11 @@ class localrepository(object):
- a new changesets is added (possible unstable above extinct)
- a new obsolete marker is added (possible new extinct changeset)
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):
c = changelog.changelog(self.sopener)
if 'HG_PENDING' in os.environ:
@@ -964,12 +960,10 @@ class localrepository(object):
self.invalidatevolatilesets()
def invalidatevolatilesets(self):
self.filteredrevcache.clear()
obsolete.clearobscaches(self)
- if 'hiddenrevs' in vars(self):
- del self.hiddenrevs
def invalidatedirstate(self):
'''Invalidates the dirstate, causing the next call to dirstate
to check if it was modified since the last time it was read,
rereading it if it has.
@@ -15,11 +15,13 @@ 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()'))
+ ### hide extinct changeset that are not accessible by any mean
+ hiddenquery = 'extinct() - ::(. + bookmark())'
+ return frozenset(repo.revs(hiddenquery))
return frozenset()
def computeunserved(repo):
"""compute the set of revision that should be filtered when used a server