Mercurial > public > mercurial-scm > hg-stable
diff mercurial/localrepo.py @ 37385:ecd3f6909184
context: move handling of filtering error to revsymbol() (API)
When changectx's constructor runs into various Filtered*Error, it
creates an exception with a hint about using --hidden. This only makes
sense when the revision was provided by the user (if we get e.g. a
FilteredLookupError from repo[p1], then it's instead a programming
error). Thus, I'm moving the handling into revsymbol(). Also changed
"unfilteredrepo[changeid]" to "revsymbol(unfilteredrepo, changeid)" as
part of the move.
Differential Revision: https://phab.mercurial-scm.org/D3143
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Thu, 05 Apr 2018 00:04:09 -0700 |
parents | 92171562c7f3 |
children | f3dc8239e3a9 |
line wrap: on
line diff
--- a/mercurial/localrepo.py Thu Apr 05 17:56:24 2018 +0530 +++ b/mercurial/localrepo.py Thu Apr 05 00:04:09 2018 -0700 @@ -802,7 +802,8 @@ try: self[changeid] return True - except error.RepoLookupError: + except (error.RepoLookupError, error.FilteredIndexError, + error.FilteredLookupError): return False def __nonzero__(self):