--- a/mercurial/repoview.py Tue Nov 05 14:17:58 2019 -0800
+++ b/mercurial/repoview.py Tue Nov 05 14:21:47 2019 -0800
@@ -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,
@@ -294,6 +298,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