# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@fb.com>
# Date 2014-10-16 09:05:06
# Node ID 21c44c1aed87af62069b23eb9a524170869de6ba
# Parent  f00813325c5ad971fb351e5b5ae9db43f7e7b3e3

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.

diff --git a/mercurial/changelog.py b/mercurial/changelog.py
--- a/mercurial/changelog.py
+++ b/mercurial/changelog.py
@@ -190,7 +190,8 @@ class changelog(revlog.revlog):
         """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):
diff --git a/mercurial/error.py b/mercurial/error.py
--- a/mercurial/error.py
+++ b/mercurial/error.py
@@ -30,6 +30,9 @@ class LookupError(RevlogError, KeyError)
     def __str__(self):
         return RevlogError.__str__(self)
 
+class FilteredLookupError(LookupError):
+    pass
+
 class ManifestLookupError(LookupError):
     pass