changeset 44934:b2e5ec0c596b

context: fix creation of ProgrammingError to not use non-existent field Differential Revision: https://phab.mercurial-scm.org/D8606
author Martin von Zweigbergk <martinvonz@google.com>
date Wed, 03 Jun 2020 12:04:38 -0700
parents 33ef8841da62
children 2093b2fc70d4
files mercurial/context.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/context.py	Wed Jun 03 22:07:26 2020 -0700
+++ b/mercurial/context.py	Wed Jun 03 12:04:38 2020 -0700
@@ -2322,7 +2322,7 @@
                 return self._cache[path][b'flags']
             else:
                 raise error.ProgrammingError(
-                    b"No such file or directory: %s" % self._path
+                    b"No such file or directory: %s" % path
                 )
         else:
             return self._wrappedctx[path].flags()
@@ -2439,7 +2439,7 @@
                 return len(self._cache[path][b'data'])
             else:
                 raise error.ProgrammingError(
-                    b"No such file or directory: %s" % self._path
+                    b"No such file or directory: %s" % path
                 )
         return self._wrappedctx[path].size()