Patchwork D10591: revlog: fix error message when data are missing

login
register
mail settings
Submitter phabricator
Date May 3, 2021, 12:07 p.m.
Message ID <differential-rev-PHID-DREV-h7lk7s4cizqr6a4vt56l-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/48911/
State Superseded
Headers show

Comments

phabricator - May 3, 2021, 12:07 p.m.
marmoute created this revision.
Herald added a reviewer: indygreg.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  The error message the message was not using the requested offset, but the
  adjusted offset to that read more data for improved caching. This resulted in
  confusing error message.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  mercurial/revlog.py

CHANGE DETAILS




To: marmoute, indygreg, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/mercurial/revlog.py b/mercurial/revlog.py
--- a/mercurial/revlog.py
+++ b/mercurial/revlog.py
@@ -1556,7 +1556,7 @@ 
                     % (
                         self._indexfile if self._inline else self._datafile,
                         length,
-                        realoffset,
+                        offset,
                         len(d) - startoffset,
                     )
                 )