Index: subversion/libsvn_repos/replay.c =================================================================== --- subversion/libsvn_repos/replay.c (revision 1919485) +++ subversion/libsvn_repos/replay.c (working copy) @@ -158,6 +158,7 @@ static svn_error_t * add_subdir(svn_fs_root_t *source_root, svn_fs_root_t *target_root, + svn_fs_root_t *compare_root, const svn_delta_editor_t *editor, void *edit_baton, const char *edit_path, @@ -276,7 +277,7 @@ } else { - SVN_ERR(add_subdir(new_source_root, target_root, + SVN_ERR(add_subdir(new_source_root, target_root, compare_root, editor, edit_baton, new_edit_path, *dir_baton, new_source_fspath, authz_read_func, authz_read_baton, @@ -319,10 +320,16 @@ delta_handler_baton, pool)); - SVN_ERR(svn_fs_file_checksum(&checksum, svn_checksum_md5, target_root, + const char *hex_digest = NULL; + if (compare_root) + { + SVN_ERR(svn_fs_file_checksum(&checksum, svn_checksum_md5, target_root, new_edit_path, TRUE, pool)); + hex_digest = svn_checksum_to_cstring(checksum, pool); + } + SVN_ERR(editor->close_file(file_baton, - svn_checksum_to_cstring(checksum, pool), + hex_digest, pool)); } else @@ -579,7 +586,7 @@ contents. */ if (change->copyfrom_path && ! copyfrom_path) { - SVN_ERR(add_subdir(copyfrom_root, root, editor, edit_baton, + SVN_ERR(add_subdir(copyfrom_root, root, cb->compare_root, editor, edit_baton, edit_path, parent_baton, change->copyfrom_path, cb->authz_read_func, cb->authz_read_baton, cb->changed_paths, pool, dir_baton)); @@ -783,11 +790,17 @@ /* Close the file baton if we opened it. */ if (file_baton) { - svn_checksum_t *checksum; - SVN_ERR(svn_fs_file_checksum(&checksum, svn_checksum_md5, root, edit_path, - TRUE, pool)); + const char *hex_digest = NULL; + if (cb->compare_root) + { + svn_checksum_t *checksum; + SVN_ERR(svn_fs_file_checksum(&checksum, svn_checksum_md5, root, edit_path, + TRUE, pool)); + hex_digest = svn_checksum_to_cstring(checksum, pool); + } + SVN_ERR(editor->close_file(file_baton, - svn_checksum_to_cstring(checksum, pool), + hex_digest, pool)); } Index: subversion/svnlook/svnlook.c =================================================================== --- subversion/svnlook/svnlook.c (revision 1919485) +++ subversion/svnlook/svnlook.c (working copy) @@ -506,7 +506,7 @@ base_root, root, pool, edit_pool)); /* Drive our editor. */ - SVN_ERR(svn_repos_replay2(root, "", SVN_INVALID_REVNUM, TRUE, + SVN_ERR(svn_repos_replay2(root, "", SVN_INVALID_REVNUM, FALSE, editor, edit_baton, NULL, NULL, edit_pool)); /* Return the tree we just built. */