changeset 43498:5ade47284dda

repoview: move changelog.revs() override to filteredchangelog Differential Revision: https://phab.mercurial-scm.org/D7240
author Martin von Zweigbergk <martinvonz@google.com>
date Tue, 05 Nov 2019 14:14:45 -0800
parents c093fb81404f
children 476754edac1f
files mercurial/changelog.py mercurial/repoview.py
diffstat 2 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/changelog.py	Tue Nov 05 14:12:10 2019 -0800
+++ b/mercurial/changelog.py	Tue Nov 05 14:14:45 2019 -0800
@@ -405,12 +405,6 @@
         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
 
--- a/mercurial/repoview.py	Tue Nov 05 14:12:10 2019 -0800
+++ b/mercurial/repoview.py	Tue Nov 05 14:14:45 2019 -0800
@@ -247,6 +247,12 @@
 
             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