# HG changeset patch # User Augie Fackler # Date 2020-02-11 05:08:28 # Node ID 2e2cfc3bea0b59aa064a9d4a904caa2212353d19 # Parent 54d185eb24b5dd8623e0eff1d1e4787f5fcdbd99 context: use manifest.find() instead of two separate calls I noticed this while debugging an extension that's implementing the manifest interface. Always nice to save a function call. Differential Revision: https://phab.mercurial-scm.org/D8109 diff --git a/mercurial/context.py b/mercurial/context.py --- a/mercurial/context.py +++ b/mercurial/context.py @@ -267,7 +267,7 @@ class basectx(object): def _fileinfo(self, path): if '_manifest' in self.__dict__: try: - return self._manifest[path], self._manifest.flags(path) + return self._manifest.find(path) except KeyError: raise error.ManifestLookupError( self._node, path, _(b'not found in manifest')