Patchwork D8606: context: fix creation of a ProgrammingError to not use non-existent field

login
register
mail settings
Submitter phabricator
Date June 4, 2020, 4:53 a.m.
Message ID <differential-rev-PHID-DREV-pj53svy7rj6e66sptrhj-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/46460/
State Superseded
Headers show

Comments

phabricator - June 4, 2020, 4:53 a.m.
martinvonz created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D8606

AFFECTED FILES
  mercurial/context.py

CHANGE DETAILS




To: martinvonz, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/mercurial/context.py b/mercurial/context.py
--- a/mercurial/context.py
+++ b/mercurial/context.py
@@ -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()