Closed by commit rHG11417741f562: repoview: move changelog.rev() 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/D7243?vs=17573&id=17593 CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7243/new/ REVISION DETAIL https://phab.mercurial-scm.org/D7243 AFFECTED FILES mercurial/changelog.py mercurial/repoview.py CHANGE DETAILS diff --git a/mercurial/repoview.py b/mercurial/repoview.py --- a/mercurial/repoview.py +++ b/mercurial/repoview.py @@ -11,7 +11,11 @@ import copy import weakref -from .node import nullrev +from .i18n import _ +from .node import ( + hex, + nullrev, +) from .pycompat import ( delattr, getattr, @@ -293,6 +297,15 @@ assert not self.filteredrevs super(filteredchangelog, self).strip(*args, **kwargs) + def rev(self, node): + """filtered version of revlog.rev""" + r = super(filteredchangelog, self).rev(node) + if r in self.filteredrevs: + raise error.FilteredLookupError( + hex(node), self.indexfile, _(b'filtered node') + ) + return r + cl.__class__ = filteredchangelog return cl diff --git a/mercurial/changelog.py b/mercurial/changelog.py --- a/mercurial/changelog.py +++ b/mercurial/changelog.py @@ -404,15 +404,6 @@ self.filteredrevs = frozenset() self._copiesstorage = opener.options.get(b'copies-storage') - def rev(self, node): - """filtered version of revlog.rev""" - r = super(changelog, self).rev(node) - if r in self.filteredrevs: - raise error.FilteredLookupError( - hex(node), self.indexfile, _(b'filtered node') - ) - return r - def node(self, rev): """filtered version of revlog.node""" if rev in self.filteredrevs: To: martinvonz, #hg-reviewers, indygreg Cc: mercurial-devel _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel