Mercurial > hg
annotate hgext/__init__.py @ 40003:ad8389ecd3f5
storageutil: consistently raise LookupError (API)
The interface docs say this is supposed to raise LookupError on
failure. But for invalid revision number input, it could raise
IndexError because ifileindex.node() is documented to raise
IndexError.
lookup() for files isn't used that much (pretty much just in
basefilectx in core AFAICT). And callers should already be catching
LookupError. So I don't anticipate that much fallout from this
change.
Differential Revision: https://phab.mercurial-scm.org/D4798
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Fri, 28 Sep 2018 11:16:44 -0700 |
parents | 155e3308289c |
children | 2372284d9457 |
rev | line source |
---|---|
28450
155e3308289c
hgext: officially turn 'hgext' into a namespace package
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1360
diff
changeset
|
1 from __future__ import absolute_import |
155e3308289c
hgext: officially turn 'hgext' into a namespace package
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1360
diff
changeset
|
2 import pkgutil |
155e3308289c
hgext: officially turn 'hgext' into a namespace package
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1360
diff
changeset
|
3 __path__ = pkgutil.extend_path(__path__, __name__) |