From patchwork Mon May 3 12:07:37 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: D10591: revlog: fix error message when data are missing From: phabricator X-Patchwork-Id: 48911 Message-Id: To: Phabricator Cc: mercurial-devel@mercurial-scm.org Date: Mon, 3 May 2021 12:07:37 +0000 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 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, ) )