Mercurial > public > mercurial-scm > hg-stable
diff mercurial/context.py @ 30350:608ba935e041
manifest: remove manifest.find
As part of removing dependencies on manifest, this drops the find function and
fixes up the two existing callers to use the equivalent apis on manifestctx.
author | Durham Goode <durham@fb.com> |
---|---|
date | Tue, 08 Nov 2016 08:03:43 -0800 |
parents | e81d72b4b0ae |
children | 362f6f651b2e |
line wrap: on
line diff
--- a/mercurial/context.py Tue Nov 08 08:03:43 2016 -0800 +++ b/mercurial/context.py Tue Nov 08 08:03:43 2016 -0800 @@ -259,8 +259,10 @@ if path in self._manifestdelta: return (self._manifestdelta[path], self._manifestdelta.flags(path)) - node, flag = self._repo.manifest.find(self._changeset.manifest, path) - if not node: + mfl = self._repo.manifestlog + try: + node, flag = mfl[self._changeset.manifest].find(path) + except KeyError: raise error.ManifestLookupError(self._node, path, _('not found in manifest'))