[PATCH 1 of 1] revlog: fix partial read error introduced in 57a41c08feab (issue1672)

Henrik Stuart hg at hstuart.dk
Sat May 23 04:50:02 CDT 2009


# HG changeset patch
# User Henrik Stuart <hg at hstuart.dk>
# Date 1243071825 -7200
# Node ID 8ac77e18bdbe3c93f56ee5230bc99290a0995af3
# Parent  9f85da26050895c67a162d0d2097255402618017
revlog: fix partial read error introduced in 57a41c08feab (issue1672)

If an inline revlog is larger than _prereadsize, the remainder of the
revlog is never read, or if util.openhardlinks() evaluates to False,
e.g. on Windows.

diff -r 9f85da260508 -r 8ac77e18bdbe mercurial/revlog.py
--- a/mercurial/revlog.py	Sat May 23 00:24:00 2009 +0200
+++ b/mercurial/revlog.py	Sat May 23 11:43:45 2009 +0200
@@ -380,6 +380,8 @@
             index[0] = e
             return index, nodemap, None
 
+        if size > _prereadsize:
+            data += fp.read()
         # call the C implementation to parse the index data
         index, nodemap, cache = parsers.parse_index(data, inline)
         return index, nodemap, cache


More information about the Mercurial-devel mailing list