comparison mercurial/context.py @ 23687:8f32dcfbc338

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.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Tue, 23 Dec 2014 17:13:51 -0800
parents 11a160547d7f
children 20932983d520
comparison
equal deleted inserted replaced
23686:164915e8ef7b 23687:8f32dcfbc338
893 893
894 @propertycache 894 @propertycache
895 def _changectx(self): 895 def _changectx(self):
896 try: 896 try:
897 return changectx(self._repo, self._changeid) 897 return changectx(self._repo, self._changeid)
898 except error.RepoLookupError: 898 except error.FilteredRepoLookupError:
899 # Linkrev may point to any revision in the repository. When the 899 # Linkrev may point to any revision in the repository. When the
900 # repository is filtered this may lead to `filectx` trying to build 900 # repository is filtered this may lead to `filectx` trying to build
901 # `changectx` for filtered revision. In such case we fallback to 901 # `changectx` for filtered revision. In such case we fallback to
902 # creating `changectx` on the unfiltered version of the reposition. 902 # creating `changectx` on the unfiltered version of the reposition.
903 # This fallback should not be an issue because `changectx` from 903 # This fallback should not be an issue because `changectx` from