changeset 44388:2e2cfc3bea0b

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
author Augie Fackler <augie@google.com>
date Tue, 11 Feb 2020 00:08:28 -0500
parents 54d185eb24b5
children 7a4e1d245f19
files mercurial/context.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/context.py	Thu Jan 16 23:06:01 2020 +0100
+++ b/mercurial/context.py	Tue Feb 11 00:08:28 2020 -0500
@@ -267,7 +267,7 @@
     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')