Philip Martin <phi...@codematters.co.uk> writes: > I think the raw > window cache may have to be modified to include the svndiff version.
Experimental patch: Index: subversion/libsvn_fs_fs/cached_data.c =================================================================== --- subversion/libsvn_fs_fs/cached_data.c (revision 1826834) +++ subversion/libsvn_fs_fs/cached_data.c (working copy) @@ -1268,7 +1268,7 @@ parse_raw_window(void **out, stream = svn_stream_from_string(&raw_window, result_pool); /* parse it */ - SVN_ERR(svn_txdelta_read_svndiff_window(&result->window, stream, 1, + SVN_ERR(svn_txdelta_read_svndiff_window(&result->window, stream, window->ver, result_pool)); /* complete the window and return it */ @@ -3212,7 +3212,7 @@ init_rep_state(rep_state_t *rs, rs->start = entry->offset + rs->header_size; rs->current = rep_header->type == svn_fs_fs__rep_plain ? 0 : 4; rs->size = entry->size - rep_header->header_size - 7; - rs->ver = 1; + rs->ver = -1; rs->chunk_index = 0; rs->raw_window_cache = ffd->raw_window_cache; rs->window_cache = ffd->txdelta_window_cache; @@ -3310,6 +3310,8 @@ cache_windows(svn_fs_t *fs, apr_size_t window_len; char *buf; + auto_read_diff_version(rs, iterpool); + /* navigate to the current window */ SVN_ERR(rs_aligned_seek(rs, NULL, start_offset, iterpool)); SVN_ERR(svn_txdelta__read_raw_window_len(&window_len, @@ -3330,6 +3332,7 @@ cache_windows(svn_fs_t *fs, window.end_offset = rs->current; window.window.len = window_len; window.window.data = buf; + window.ver = rs->ver; /* cache the window now */ SVN_ERR(svn_cache__set(rs->raw_window_cache, &key, &window, Index: subversion/libsvn_fs_fs/temp_serializer.h =================================================================== --- subversion/libsvn_fs_fs/temp_serializer.h (revision 1826834) +++ subversion/libsvn_fs_fs/temp_serializer.h (working copy) @@ -60,6 +60,9 @@ typedef struct /* the offset within the representation right after reading the window */ apr_off_t end_offset; + + /* svndiff version */ + int ver; } svn_fs_fs__raw_cached_window_t; -- Philip