repoview: move changelog.parentrevs() override to filteredchangelog
authorMartin von Zweigbergk <martinvonz@google.com>
Tue, 05 Nov 2019 14:31:50 -0800
changeset 43452 e1dae2ef5588
parent 43451 983cda0e110c
child 43453 61c372100008
repoview: move changelog.parentrevs() override to filteredchangelog Differential Revision: https://phab.mercurial-scm.org/D7246
mercurial/changelog.py
mercurial/repoview.py
--- a/mercurial/changelog.py	Tue Nov 05 14:23:32 2019 -0800
+++ b/mercurial/changelog.py	Tue Nov 05 14:31:50 2019 -0800
@@ -404,12 +404,6 @@
         self.filteredrevs = frozenset()
         self._copiesstorage = opener.options.get(b'copies-storage')
 
-    def parentrevs(self, rev):
-        """filtered version of revlog.parentrevs"""
-        if rev in self.filteredrevs:
-            raise error.FilteredIndexError(rev)
-        return super(changelog, self).parentrevs(rev)
-
     def flags(self, rev):
         """filtered version of revlog.flags"""
         if rev in self.filteredrevs:
--- a/mercurial/repoview.py	Tue Nov 05 14:23:32 2019 -0800
+++ b/mercurial/repoview.py	Tue Nov 05 14:31:50 2019 -0800
@@ -319,6 +319,12 @@
                 raise error.FilteredIndexError(rev)
             return super(filteredchangelog, self).linkrev(rev)
 
+        def parentrevs(self, rev):
+            """filtered version of revlog.parentrevs"""
+            if rev in self.filteredrevs:
+                raise error.FilteredIndexError(rev)
+            return super(filteredchangelog, self).parentrevs(rev)
+
     cl.__class__ = filteredchangelog
 
     return cl