Patchwork D7246: repoview: move changelog.parentrevs() override to filteredchangelog

login
register
mail settings
Submitter phabricator
Date Nov. 6, 2019, 3:39 a.m.
Message ID <7047f6776ee94be9c0a3a4dc2dce39f5@localhost.localdomain>
Download mbox | patch
Permalink /patch/42792/
State Not Applicable
Headers show

Comments

phabricator - Nov. 6, 2019, 3:39 a.m.
Closed by commit rHGb11aee88b2f0: repoview: move changelog.parentrevs() override to filteredchangelog (authored by martinvonz).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D7246?vs=17576&id=17596

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D7246/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D7246

AFFECTED FILES
  mercurial/changelog.py
  mercurial/repoview.py

CHANGE DETAILS




To: martinvonz, #hg-reviewers, indygreg
Cc: mercurial-devel

Patch

diff --git a/mercurial/repoview.py b/mercurial/repoview.py
--- a/mercurial/repoview.py
+++ b/mercurial/repoview.py
@@ -318,6 +318,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
diff --git a/mercurial/changelog.py b/mercurial/changelog.py
--- a/mercurial/changelog.py
+++ b/mercurial/changelog.py
@@ -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: