# HG changeset patch # User Martin von Zweigbergk # Date 2019-11-05 22:14:45 # Node ID 5ade47284ddaad60930ed52183be2e6971d4ccfa # Parent c093fb81404f46c9da1ed0caaf2d4fb3bfbfa73a repoview: move changelog.revs() override to filteredchangelog Differential Revision: https://phab.mercurial-scm.org/D7240 diff --git a/mercurial/changelog.py b/mercurial/changelog.py --- a/mercurial/changelog.py +++ b/mercurial/changelog.py @@ -405,12 +405,6 @@ class changelog(revlog.revlog): self.filteredrevs = frozenset() self._copiesstorage = opener.options.get(b'copies-storage') - def revs(self, start=0, stop=None): - """filtered version of revlog.revs""" - for i in super(changelog, self).revs(start, stop): - if i not in self.filteredrevs: - yield i - def _checknofilteredinrevs(self, revs): """raise the appropriate error if 'revs' contains a filtered revision diff --git a/mercurial/repoview.py b/mercurial/repoview.py --- a/mercurial/repoview.py +++ b/mercurial/repoview.py @@ -247,6 +247,12 @@ def wrapchangelog(unfichangelog, filtere return filterediter() + def revs(self, start=0, stop=None): + """filtered version of revlog.revs""" + for i in super(filteredchangelog, self).revs(start, stop): + if i not in self.filteredrevs: + yield i + cl.__class__ = filteredchangelog return cl