diff --git a/mercurial/context.py b/mercurial/context.py --- a/mercurial/context.py +++ b/mercurial/context.py @@ -497,8 +497,10 @@ class changectx(basectx): changeid = hex(changeid) except TypeError: pass - except (error.FilteredIndexError, error.FilteredLookupError, - error.FilteredRepoLookupError): + except (error.FilteredIndexError, error.FilteredLookupError): + raise error.FilteredRepoLookupError(_("filtered revision '%s'") + % changeid) + except error.FilteredRepoLookupError: raise except IndexError: pass diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py --- a/mercurial/localrepo.py +++ b/mercurial/localrepo.py @@ -850,8 +850,7 @@ class localrepository(object): try: self[changeid] return True - except (error.RepoLookupError, error.FilteredIndexError, - error.FilteredLookupError): + except error.RepoLookupError: return False def __nonzero__(self):