repoview: add a FilteredLookupError class
This exception is a more precise LookupError that will allow us to
issue a special message when we end up accessing a filtered revision.
--- a/mercurial/changelog.py Wed Oct 15 17:02:44 2014 -0700
+++ b/mercurial/changelog.py Thu Oct 16 02:05:06 2014 -0700
@@ -190,7 +190,8 @@
"""filtered version of revlog.rev"""
r = super(changelog, self).rev(node)
if r in self.filteredrevs:
- raise error.LookupError(hex(node), self.indexfile, _('no node'))
+ raise error.FilteredLookupError(hex(node), self.indexfile,
+ _('filtered node'))
return r
def node(self, rev):
--- a/mercurial/error.py Wed Oct 15 17:02:44 2014 -0700
+++ b/mercurial/error.py Thu Oct 16 02:05:06 2014 -0700
@@ -30,6 +30,9 @@
def __str__(self):
return RevlogError.__str__(self)
+class FilteredLookupError(LookupError):
+ pass
+
class ManifestLookupError(LookupError):
pass