repoview: move changelog.node() override to filteredchangelog
authorMartin von Zweigbergk <martinvonz@google.com>
Tue, 05 Nov 2019 14:22:25 -0800
changeset 43450 6f3222bbfce0
parent 43449 c45195f9af0a
child 43451 983cda0e110c
repoview: move changelog.node() override to filteredchangelog Differential Revision: https://phab.mercurial-scm.org/D7244
mercurial/changelog.py
mercurial/repoview.py
--- a/mercurial/changelog.py	Tue Nov 05 14:21:47 2019 -0800
+++ b/mercurial/changelog.py	Tue Nov 05 14:22:25 2019 -0800
@@ -404,12 +404,6 @@
         self.filteredrevs = frozenset()
         self._copiesstorage = opener.options.get(b'copies-storage')
 
-    def node(self, rev):
-        """filtered version of revlog.node"""
-        if rev in self.filteredrevs:
-            raise error.FilteredIndexError(rev)
-        return super(changelog, self).node(rev)
-
     def linkrev(self, rev):
         """filtered version of revlog.linkrev"""
         if rev in self.filteredrevs:
--- a/mercurial/repoview.py	Tue Nov 05 14:21:47 2019 -0800
+++ b/mercurial/repoview.py	Tue Nov 05 14:22:25 2019 -0800
@@ -307,6 +307,12 @@
                 )
             return r
 
+        def node(self, rev):
+            """filtered version of revlog.node"""
+            if rev in self.filteredrevs:
+                raise error.FilteredIndexError(rev)
+            return super(filteredchangelog, self).node(rev)
+
     cl.__class__ = filteredchangelog
 
     return cl