context: catch FilteredRepoLookupError instead of RepoLookupError
authorPierre-Yves David <pierre-yves.david@fb.com>
Tue, 23 Dec 2014 17:13:51 -0800
changeset 23687 8f32dcfbc338
parent 23686 164915e8ef7b
child 23688 20932983d520
context: catch FilteredRepoLookupError instead of RepoLookupError Now that we have a more specialised exception, lets use it when we meant to catch the more specialised case.
mercurial/context.py
--- a/mercurial/context.py	Thu Nov 27 10:16:56 2014 -0500
+++ b/mercurial/context.py	Tue Dec 23 17:13:51 2014 -0800
@@ -895,7 +895,7 @@
     def _changectx(self):
         try:
             return changectx(self._repo, self._changeid)
-        except error.RepoLookupError:
+        except error.FilteredRepoLookupError:
             # Linkrev may point to any revision in the repository.  When the
             # repository is filtered this may lead to `filectx` trying to build
             # `changectx` for filtered revision. In such case we fallback to