Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/revlog.py @ 47179:590f2364d33a
revlog: fix error message when data are missing
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.
Differential Revision: https://phab.mercurial-scm.org/D10591
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Mon, 03 May 2021 12:25:12 +0200 |
parents | 04f2f94836a5 |
children | c9ae2e7fe154 |
comparison
equal
deleted
inserted
replaced
47178:04f2f94836a5 | 47179:590f2364d33a |
---|---|
1554 b'offset %d, got %d' | 1554 b'offset %d, got %d' |
1555 ) | 1555 ) |
1556 % ( | 1556 % ( |
1557 self._indexfile if self._inline else self._datafile, | 1557 self._indexfile if self._inline else self._datafile, |
1558 length, | 1558 length, |
1559 realoffset, | 1559 offset, |
1560 len(d) - startoffset, | 1560 len(d) - startoffset, |
1561 ) | 1561 ) |
1562 ) | 1562 ) |
1563 | 1563 |
1564 return util.buffer(d, startoffset, length) | 1564 return util.buffer(d, startoffset, length) |