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,
                     )
                 )