Patchwork D7240: repoview: move changelog.revs() override to filteredchangelog

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

Comments

phabricator - Nov. 6, 2019, 3:38 a.m.
Closed by commit rHG714fdefa66dc: repoview: move changelog.revs() 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/D7240?vs=17570&id=17590

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

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

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