Checkout Tools
  • last updated 7 hours ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Apply the standard pre-branch whitespace cleanup via

tools/dev/remove-trailing-whitespace.zsh

There should be no functional changes.

* .ycm_extra_conf.py

* build/generator/gen_win.py

* build/generator/gen_win_dependencies.py

* subversion/bindings/javahl/native/EditorProxy.h

* subversion/bindings/javahl/native/StateReporter.cpp

* subversion/bindings/javahl/native/org_apache_subversion_javahl_util_ConfigImpl_Category.cpp

* subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl.c

* subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl.h

* subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c

* subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.c

* subversion/bindings/swig/ruby/test/test_fs.rb

* subversion/bindings/swig/ruby/test/util.rb

* subversion/bindings/swig/ruby/test/windows_util.rb

* subversion/include/private/svn_fs_fs_private.h

* subversion/include/private/svn_packed_data.h

* subversion/include/private/svn_repos_private.h

* subversion/include/private/svn_sorts_private.h

* subversion/include/private/svn_subr_private.h

* subversion/include/private/svn_wc_private.h

* subversion/include/svn_auth.h

* subversion/include/svn_cache_config.h

* subversion/include/svn_client.h

* subversion/include/svn_cmdline.h

* subversion/include/svn_diff.h

* subversion/include/svn_fs.h

* subversion/include/svn_io.h

* subversion/include/svn_ra.h

* subversion/include/svn_repos.h

* subversion/include/svn_string.h

* subversion/libsvn_client/blame.c

* subversion/libsvn_client/commit.c

* subversion/libsvn_client/commit_util.c

* subversion/libsvn_client/copy.c

* subversion/libsvn_client/diff.c

* subversion/libsvn_client/externals.c

* subversion/libsvn_client/log.c

* subversion/libsvn_client/patch.c

* subversion/libsvn_client/ra.c

* subversion/libsvn_client/update.c

* subversion/libsvn_delta/svndiff.c

* subversion/libsvn_diff/parse-diff.c

* subversion/libsvn_fs/fs-loader.c

* subversion/libsvn_fs_base/lock.c

* subversion/libsvn_fs_fs/cached_data.c

* subversion/libsvn_fs_fs/fs_fs.c

* subversion/libsvn_fs_fs/hotcopy.c

* subversion/libsvn_fs_fs/id.c

* subversion/libsvn_fs_fs/index.c

* subversion/libsvn_fs_fs/index.h

* subversion/libsvn_fs_fs/lock.c

* subversion/libsvn_fs_fs/low_level.c

* subversion/libsvn_fs_fs/low_level.h

* subversion/libsvn_fs_fs/pack.c

* subversion/libsvn_fs_fs/recovery.c

* subversion/libsvn_fs_fs/rev_file.c

* subversion/libsvn_fs_fs/revprops.c

* subversion/libsvn_fs_fs/revprops.h

* subversion/libsvn_fs_fs/stats.c

* subversion/libsvn_fs_fs/transaction.c

* subversion/libsvn_fs_fs/tree.c

* subversion/libsvn_fs_fs/verify.c

* subversion/libsvn_fs_x/cached_data.c

* subversion/libsvn_fs_x/changes.c

* subversion/libsvn_fs_x/dag.h

* subversion/libsvn_fs_x/fs.h

* subversion/libsvn_fs_x/fs_id.c

* subversion/libsvn_fs_x/fs_x.c

* subversion/libsvn_fs_x/hotcopy.c

* subversion/libsvn_fs_x/hotcopy.h

* subversion/libsvn_fs_x/index.c

* subversion/libsvn_fs_x/index.h

* subversion/libsvn_fs_x/lock.c

* subversion/libsvn_fs_x/lock.h

* subversion/libsvn_fs_x/low_level.c

* subversion/libsvn_fs_x/low_level.h

* subversion/libsvn_fs_x/noderevs.c

* subversion/libsvn_fs_x/pack.c

* subversion/libsvn_fs_x/reps.c

* subversion/libsvn_fs_x/rev_file.c

* subversion/libsvn_fs_x/revprops.c

* subversion/libsvn_fs_x/revprops.h

* subversion/libsvn_fs_x/string_table.c

* subversion/libsvn_fs_x/string_table.h

* subversion/libsvn_fs_x/transaction.c

* subversion/libsvn_fs_x/tree.c

* subversion/libsvn_fs_x/util.c

* subversion/libsvn_fs_x/verify.c

* subversion/libsvn_ra_local/ra_plugin.c

* subversion/libsvn_ra_serf/ra_serf.h

* subversion/libsvn_ra_serf/serf.c

* subversion/libsvn_ra_serf/update.c

* subversion/libsvn_ra_serf/util.c

* subversion/libsvn_ra_svn/client.c

* subversion/libsvn_ra_svn/marshal.c

* subversion/libsvn_repos/authz_pool.c

* subversion/libsvn_repos/config_pool.c

* subversion/libsvn_repos/dump.c

* subversion/libsvn_repos/fs-wrap.c

* subversion/libsvn_repos/log.c

* subversion/libsvn_subr/bit_array.c

* subversion/libsvn_subr/cache-membuffer.c

* subversion/libsvn_subr/config.c

* subversion/libsvn_subr/dirent_uri.c

* subversion/libsvn_subr/fnv1a.c

* subversion/libsvn_subr/gpg_agent.c

* subversion/libsvn_subr/hash.c

* subversion/libsvn_subr/io.c

* subversion/libsvn_subr/object_pool.c

* subversion/libsvn_subr/packed_data.c

* subversion/libsvn_subr/prefix_string.c

* subversion/libsvn_subr/sorts.c

* subversion/libsvn_subr/sqlite.c

* subversion/libsvn_subr/subst.c

* subversion/libsvn_subr/sysinfo.c

* subversion/libsvn_subr/types.c

* subversion/libsvn_subr/utf.c

* subversion/libsvn_subr/utf8proc/utf8proc_data.c

* subversion/libsvn_subr/x509info.c

* subversion/libsvn_wc/diff.h

* subversion/libsvn_wc/props.c

* subversion/libsvn_wc/update_editor.c

* subversion/libsvn_wc/wc.h

* subversion/libsvn_wc/wc_db.c

* subversion/libsvn_wc/wc_db.h

* subversion/mod_dav_svn/lock.c

* subversion/mod_dav_svn/mod_dav_svn.c

* subversion/mod_dav_svn/status.c

* subversion/svn/auth-cmd.c

* subversion/svn/info-cmd.c

* subversion/svn/mergeinfo-cmd.c

* subversion/svn/notify.c

* subversion/svn/propget-cmd.c

* subversion/svn/svn.c

* subversion/svnadmin/svnadmin.c

* subversion/svnserve/logger.c

* subversion/svnserve/serve.c

* subversion/svnserve/server.h

* subversion/svnserve/svnserve.c

* subversion/tests/cmdline/blame_tests.py

* subversion/tests/cmdline/checkout_tests.py

* subversion/tests/cmdline/commit_tests.py

* subversion/tests/cmdline/export_tests.py

* subversion/tests/cmdline/externals_tests.py

* subversion/tests/cmdline/lock_tests.py

* subversion/tests/cmdline/merge_tests.py

* subversion/tests/cmdline/merge_tree_conflict_tests.py

* subversion/tests/cmdline/move_tests.py

* subversion/tests/cmdline/redirect_tests.py

* subversion/tests/cmdline/stat_tests.py

* subversion/tests/cmdline/svnadmin_tests.py

* subversion/tests/cmdline/switch_tests.py

* subversion/tests/cmdline/update_tests.py

* subversion/tests/libsvn_client/client-test.c

* subversion/tests/libsvn_client/mtcc-test.c

* subversion/tests/libsvn_fs/fs-test.c

* subversion/tests/libsvn_fs/locks-test.c

* subversion/tests/libsvn_fs_fs/fs-fs-fuzzy-test.c

* subversion/tests/libsvn_fs_fs/fs-fs-pack-test.c

* subversion/tests/libsvn_fs_x/fs-x-pack-test.c

* subversion/tests/libsvn_fs_x/string-table-test.c

* subversion/tests/libsvn_ra/ra-test.c

* subversion/tests/libsvn_subr/cache-test.c

* subversion/tests/libsvn_subr/checksum-test.c

* subversion/tests/libsvn_subr/config-test.c

* subversion/tests/libsvn_subr/io-test.c

* subversion/tests/libsvn_subr/packed-data-test.c

* subversion/tests/libsvn_subr/priority-queue-test.c

* subversion/tests/libsvn_subr/sqlite-test.c

* subversion/tests/libsvn_subr/string-test.c

* subversion/tests/libsvn_subr/subst_translate-test.c

* subversion/tests/libsvn_subr/x509-test.c

* subversion/tests/libsvn_wc/op-depth-test.c

* subversion/tests/svn_test_main.c

* tools/dev/benchmarks/RepoPerf/copy_repo.py

* tools/dev/benchmarks/RepoPerf/win_repo_bench.py

* tools/dev/build-svn-deps-win.pl

* tools/dev/fsfs-access-map.c

* tools/dev/po-merge.py

* tools/dev/x509-parser.c

* tools/diff/diff.c

* tools/dist/backport.pl

* tools/dist/backport_tests.py

* tools/hook-scripts/mailer/mailer.py

* tools/server-side/svnpubsub/daemonize.py

* win-tests.py

Remove unneeded whitespace via script.

  1. … 184 more files in changeset.
* subversion/libsvn_fs_fs/index.c

* subversion/libsvn_fs_fs/index.h

(svn_fs_fs__p2l_proto_index_add_entry): Mark ENTRY argument as const.

  1. … 1 more file in changeset.
To make an index-related FSFS private API feasible, we need to publish

svn_fs_fs__p2l_entry_t and its substructure svn_fs_fs__id_part_t as

part of the private API.

* subversion/include/private/svn_fs_fs_private.h

(svn_fs_fs__id_part_t,

svn_fs_fs__p2l_entry_t): Move definitions here.

* subversion/libsvn_fs_fs/id.h

(svn_fs_fs__id_part_t): Remove here.

* subversion/libsvn_fs_fs/index.h

(svn_fs_fs__p2l_entry_t): Remove here.

  1. … 2 more files in changeset.
Finalize the FSFS f7 format by adding checksums to the P2L and L2P index

data itself. Now, all of the rev / pack files can be verified.

We simply wrap the streams through which we write the two indexes with

MD5 generator wrappers and put the results into the footer next to the

index offsets. Updating generators, parsers and writers is pretty

straight forward.

The checksum verification code will be added in the next patch.

* subversion/libsvn_fs_fs/index.h

(svn_fs_fs__l2p_index_append,

svn_fs_fs__p2l_index_append): Return the index content checksum as well.

* subversion/libsvn_fs_fs/index.c

(svn_fs_fs__l2p_index_append,

svn_fs_fs__p2l_index_append): Use simple stream wrappers to automatically

calculate the MD5 checksums.

* subversion/libsvn_fs_fs/transaction.c

(svn_fs_fs__add_index_data): Receive the index checksums and pass

them on to the serialization code.

* subversion/libsvn_fs_fs/low_level.h

(svn_fs_fs__parse_footer): Update signature to return the index

checksums as well.

(svn_fs_fs__unparse_footer): Update signature to accept the index

checksums, too.

* subversion/libsvn_fs_fs/low_level.c

(svn_fs_fs__parse_footer): Update the footer reader.

(svn_fs_fs__unparse_footer): Update the footer writer.

* subversion/libsvn_fs_fs/rev_file.h

(svn_fs_fs__revision_file_t): Add members for the index checksums.

* subversion/libsvn_fs_fs/rev_file.c

(init_revision_file): Update struct initialization code.

(svn_fs_fs__auto_read_footer): Receive the checksums as well.

* subversion/libsvn_fs_fs/structure

(Revision file format): Update the description of the file footer.

* subversion/tests/cmdline/svnadmin_tests.py

(set_changed_path_list): Update to preserve the two checksums

in the footer as well.

  1. … 8 more files in changeset.
Pin the FSFS f7 item type to a fixed-length data type.

Make sure we use that type consistently.

* subversion/libsvn_fs_fs/index.h

(svn_fs_fs__p2l_entry_t): Fix the item type to 32 bits which is way

more than we'll ever need and which aligns

nicely with the rest of the struct.

* subversion/libsvn_fs_fs/index.c

(read_entry): Remove unnecessary type conversion.

* subversion/libsvn_fs_fs/cached_data.c

(dbg_log_access): Always use uint32 to hold item types.

* subversion/libsvn_fs_fs/transaction.c

(write_container_rep,

write_container_delta_rep,

write_final_rev): Same.

  1. … 3 more files in changeset.
Switch FSFS index API functions that could actually use two different pool

parameters to the two-pool paradigm.

Although almost all current callers will pass the same (temporary) pool to

both parameters, this patch improves consistency, readability and

documentation.

* subversion/libsvn_fs_fs/index.h

(svn_fs_fs__p2l_index_lookup,

svn_fs_fs__p2l_entry_lookup,

svn_fs_fs__l2p_get_max_ids): Accept two pools instead of one.

* subversion/libsvn_fs_fs/index.c

(p2l_index_lookup): The POOL parameter is actually a SCRATCH_POOL. All

results are flat data stored in the pre-allocated

*ENTRIES result.

(svn_fs_fs__l2p_get_max_ids,

svn_fs_fs__p2l_index_lookup): Only the result array needs to be allocated

in the RESULT_POOL. It contains flat data

and no pointers.

(svn_fs_fs__p2l_entry_lookup): Use the SCRATCH_POOL with function calls

only require a temporary pool.

* subversion/libsvn_fs_fs/cached_data.c

(svn_fs_fs__check_rep,

block_read): Update caller by passing the same pool to both parameters.

That pool is already for temporaries only.

* subversion/libsvn_fs_fs/pack.c

(pack_range,

append_revision): Same.

(pack_log_addressed): Update caller, actually providing different pools.

* subversion/libsvn_fs_fs/verify.c

(compare_l2p_to_p2l_index): Same.

(compare_p2l_to_l2p_index,

compare_p2l_to_rev): Update caller by passing the same temporary pool

to both parameters.

* subversion/svnfsfs/dump-index-cmd.c

(dump_index): Same.

* subversion/svnfsfs/stats-cmd.c

(read_log_rev_or_packfile): Same.

  1. … 6 more files in changeset.
New code should use the two-pool paradigm pool names. So, let's do it

for the index.* functions that don't do it yet, have only a single POOL,

shouldn't have two and don't have the signature defined by the cache

interface.

IOW, just rename a bunch of pool parameters and update the doc strings

accordingly.

* subversion/libsvn_fs_fs/index.h

(svn_fs_fs__l2p_proto_index_open): The POOL is the RESULT_POOL.

(svn_fs_fs__l2p_proto_index_add_revision,

svn_fs_fs__l2p_proto_index_add_entry,

svn_fs_fs__l2p_index_append): The POOL is a SCRATCH_POOL; there is no

result to be allocated.

(svn_fs_fs__p2l_proto_index_open): The POOL is the RESULT_POOL.

(svn_fs_fs__p2l_proto_index_add_entry,

svn_fs_fs__p2l_proto_index_next_offset,

svn_fs_fs__p2l_index_append,

svn_fs_fs__p2l_entry_lookup,

svn_fs_fs__item_offset,

svn_fs_fs__p2l_get_max_offset): The POOL is a SCRATCH_POOL; there is

no result to be allocated.

* subversion/libsvn_fs_fs/index.c

(packed_stream_open): The POOL is the RESULT_POOL.

(write_entry_to_proto_index,

encode_l2p_page): The POOL is a SCRATCH_POOL.

(svn_fs_fs__l2p_proto_index_open,

svn_fs_fs__l2p_proto_index_add_revision,

svn_fs_fs__l2p_proto_index_add_entry,

svn_fs_fs__l2p_index_append): Mirror header / API changes.

(get_l2p_page_info,

get_l2p_page_table): The result is a pre-allocated struct.

The POOL is just a SCRATCH_POOL.

(get_l2p_page): The only allocations done here are for the result.

(l2p_index_lookup,

l2p_proto_index_lookup): The result is pre-allocated.

The POOL is just a SCRATCH_POOL.

(get_l2p_header): All allocations are for the result.

(svn_fs_fs__item_offset,

svn_fs_fs__p2l_proto_index_open,

svn_fs_fs__p2l_proto_index_add_entry,

svn_fs_fs__p2l_proto_index_next_offset,

svn_fs_fs__p2l_index_append): Mirror header / API changes.

(get_p2l_page_info): The result is a pre-allocated struct.

The POOL is just a SCRATCH_POOL.

(get_p2l_page): All allocations are for the result.

(get_p2l_keys,

p2l_get_max_offset): The result is pre-allocated.

The POOL is just a SCRATCH_POOL.

(svn_fs_fs__p2l_get_max_offset): Mirror header / API change.

(calc_fnv1): The result is written to a pre-allocated struct.

The POOL is just a SCRATCH_POOL.

  1. … 1 more file in changeset.
Revert r1620909 as requested by zhakov.
  1. … 12 more files in changeset.
[Reverted in r1620928]

Make FSFS export the private APIs that svnfsfs comsumes.

Not much going on here, mainly moving lots of declarations

and definitions to the new svn_fs_fs_private.h header.

* build.conf

(libsvn_fs_fs): Tell msvc what to export.

* subversion/include/private/svn_fs_fs_private.h

(): New header file. Contents taken from the following headers.

* subversion/libsvn_fs_fs/fs.h

(fs_fs_shared_txn_data_t,

fs_fs_shared_data_t,

fs_fs_dag_cache_t,

fs_fs_data_t): Moved to the new header.

* subversion/libsvn_fs_fs/id.h

(svn_fs_fs__id_part_t): Same.

* subversion/libsvn_fs_fs/index.h

(SVN_FS_FS__ITEM_INDEX_*,

SVN_FS_FS__ITEM_TYPE_*,

svn_fs_fs__p2l_entry_t,

svn_fs_fs__p2l_index_lookup,

svn_fs_fs__p2l_get_max_offset,

svn_fs_fs__l2p_index_from_p2l_entries,

svn_fs_fs__p2l_index_from_p2l_entries): Same.

* subversion/libsvn_fs_fs/pack.h

(svn_fs_fs__get_packed_offset): Same.

* subversion/libsvn_fs_fs/rev_file.h

(svn_fs_fs__packed_number_stream_t,

svn_fs_fs__revision_file_t,

svn_fs_fs__open_pack_or_rev_file,

svn_fs_fs__open_pack_or_rev_file_writable,

svn_fs_fs__auto_read_footer,

svn_fs_fs__close_revision_file): Same.

* subversion/libsvn_fs_fs/transaction.h

(svn_fs_fs__add_index_data): Same.

* subversion/libsvn_fs_fs/util.h

(svn_fs_fs__use_log_addressing): Same.

* subversion/libsvn_fs_fs/cached_data.c

(): Add (now) missing #include.

* subversion/svnfsfs/dump-index-cmd.c,

subversion/svnfsfs/load-index-cmd.c,

subversion/svnfsfs/stats-cmd.c:

(): #include the new header instead of the lib-internal ones.

  1. … 12 more files in changeset.
Move FSFS index rewrite functions from svnfsfs to index.* and give

it them a two-pool signature.

This prepares the switch to a partly generated revision zero.

* tools/server-side/svnfsfs/load-index-cmd.c

(calc_fnv1,

write_p2l_index,

compare_p2l_entry_revision,

write_l2p_index): Move this code from here to index.c.

(load_index): Call the new internal API instead.

* subversion/libsvn_fs_fs/index.c

(calc_fnv1,

compare_p2l_entry_revision): Code moved over from load-index-cmd.c

(svn_fs_fs__l2p_index_from_p2l_entries): Former write_l2p_index with

modified signature.

(svn_fs_fs__p2l_index_from_p2l_entries): Same for write_p2l_index.

* subversion/libsvn_fs_fs/index.h

(svn_fs_fs__l2p_index_from_p2l_entries,

svn_fs_fs__p2l_index_from_p2l_entries): Declare new internal API.

  1. … 2 more files in changeset.
Append index data to the rev data file instead of using separate files.

This gives unpacked FSFS format 7 similar I/O characteristics and disk

space usage as earlier formats. It also eliminates the need for retries

after a potential background pack run because each file is now always

consistent with itself (earlier, data or index files might already have

been deleted while the respective other was still valid). Overall,

most of this patch is removing code necessary to handle separate files.

The new file format is simple:

<rep data><l2p index><p2l index><footer><footer length>

with the first three being identical what we had before. <footer length>

is a single byte giving the length of the preceding footer, so it's

easier to extract than the pre-f7 rev trailer and there is only one

per pack / rev file.

The footer itself is just two decimal file offsets marking the start

of the index sections, separated by a single space char.

* subversion/libsvn_fs_fs/low_level.h

(svn_fs_fs__parse_footer,

svn_fs_fs__unparse_footer): Declare new parser / generator API for the

f7 footer, similar to f6- revision trailer

but slightly simplified.

* subversion/libsvn_fs_fs/low_level.c

(svn_fs_fs__parse_footer,

svn_fs_fs__unparse_footer): Implement.

* subversion/libsvn_fs_fs/rev_file.h

(svn_fs_fs__revision_file_t): Add members for footer contents access

block size.

(svn_fs_fs__reopen_revision_file): Drop. Retry is no longer necessary.

(svn_fs_fs__auto_read_footer): Declare new function that reads the footer

if we didn't yet.

* subversion/libsvn_fs_fs/rev_file.c

(svn_fs_fs__reopen_revision_file): Drop.

(svn_fs_fs__auto_read_footer): Implement.

(svn_fs_fs__close_revision_file): Index streams don't carry any releasable

resources anymore.

* subversion/libsvn_fs_fs/index.h

(svn_fs_fs__packed_stream_close): Drop. There are no independent file

resources linked to the index data

streams anymore.

(svn_fs_fs__l2p_index_create,

svn_fs_fs__p2l_index_create): Rename to ...

(svn_fs_fs__l2p_index_append

svn_fs_fs__p2l_index_create): ... these and accept an open file instead

of a file name to be created.

* subversion/libsvn_fs_fs/index.c

(packed_stream_open): Instead of opening our own index file, accept an

already open one and use the specified offset range.

(svn_fs_fs__packed_stream_close): Drop.

(index_create): Drop. The files already exist.

(svn_fs_fs__l2p_index_create,

svn_fs_fs__p2l_index_create): Rename to ...

(svn_fs_fs__l2p_index_append

svn_fs_fs__p2l_index_create): ... these and use the already open file

instead of creating new ones.

(retry_open_l2p_index,

retry_open_p2l_index): No longer necessary.

(svn_fs_fs__item_offset,

svn_fs_fs__p2l_get_max_offset): No lookup retry necessary anymore.

(auto_open_l2p_index,

auto_open_p2l_index): Make sure we know the index location and then

open the stream based on the existing file.

* subversion/libsvn_fs_fs/transaction.h

(svn_fs_fs__add_index_data): New private API that combines index data

with the rep data file and finalizes it.

* subversion/libsvn_fs_fs/transaction.c

(svn_fs_fs__add_index_data): Implement.

(commit_body): Use the above.

* subversion/libsvn_fs_fs/fs_fs.c

(write_revision_zero): Update r0 template by simply appending the

index contents and a final footer.

* subversion/libsvn_fs_fs/cached_data.c

(block_read): Remove the now unnecessary retry-on-pack code.

* subversion/libsvn_fs_fs/hotcopy.c

(hotcopy_copy_shard_file): Remove index file copy code.

(hotcopy_copy_packed_shard,

hotcopy_revisions): Update callers.

* subversion/libsvn_fs_fs/pack.c

(close_pack_context): Use the new transaction.h API to finalize the

index data.

(pack_range): Instead of ending with the file, revision content now ends

where L2P index data starts.

* subversion/libsvn_fs_fs/util.h

(svn_fs_fs__path_l2p_index,

svn_fs_fs__path_p2l_index): Drop. These are no longer separate files.

* subversion/libsvn_fs_fs/util.c

(svn_fs_fs__path_l2p_index,

svn_fs_fs__path_p2l_index): Drop.

* subversion/libsvn_fs_fs/verify.c

(compare_p2l_to_rev): Rev contents now ends where the L2P index begins.

* subversion/tests/libsvn_fs_fs/fs-fs-pack-test.c

(pack_filesystem): There are no separate index files anymore.

* subversion/tests/cmdline/svnadmin_tests.py

(read_l2p): Use contents of the rev file instead of a separate index file.

(set_changed_path_list): Parse footer and splice data correctly retaining

the index contents as-is.

* tools/server-side/svnfsfs/load-index-cmd.c

(write_p2l_index,

write_l2p_index): Instead of creating the final index files, create

the proto-index files only.

(load_index): Trim the old index from the pack / rev file and append

the new ones using our new transaction.h API.

  1. … 17 more files in changeset.
Ensure consistency between proto rev and proto index files in FSFS f7

after a write operation to the transaction crashed.

Bottom line here is that the proto rev file may contain extra (garbage)

data that is not being referenced by anybody.

* subversion/libsvn_fs_fs/index.h

(svn_fs_fs__p2l_proto_index_next_offset): Add private API to retrieve

the expected length of the

proto-rev file.

* subversion/libsvn_fs_fs/index.c

(svn_fs_fs__p2l_proto_index_next_offset): Implement.

* subversion/libsvn_fs_fs/transaction.c

(auto_truncate_proto_rev): New function matching the actual proto-rev

file size with the value expected as per

proto-index.

(get_writable_proto_rev): Call the new function whenever we open the

proto-rev file.

  1. … 2 more files in changeset.
Teach the p2l index to efficiently return the entries for arbitrary ranges

of offsets in the rev / pack file.

This allows us to use a much larger page sizes in these indexes than the

block read size, which in turn reduces the size of the page table for very

large rev / pack files. 1MB pages take about 8k to describe on disk which

is still well within the 64kB default read block size. At the same time,

the page table of a 1TB rev file will fit into the default cache size.

* subversion/libsvn_fs_fs/index.h

(svn_fs_fs__p2l_index_lookup): Change signature to accept an offset range

instead of a single offset implying a range.

* subversion/libsvn_fs_fs/index.c

(compare_start_p2l_entry,

append_p2l_entries,

struct p2l_entries_baton_t

p2l_entries_func): New functions and data types to extract only the

requested sub-set of the respective p2l page entries.

(p2l_index_lookup): Add ability to extract only a sub-range of the

respective page. Also take care of misaligned ranges

at the end of the file.

(svn_fs_fs__p2l_index_lookup): Iteratively gather data from individual

index pages until the full range got

covered.

(svn_fs_fs__p2l_entry_lookup): Update to signature change.

* subversion/libsvn_fs_fs/cached_data.c

(block_read): Request item descriptions for the current read block.

* subversion/libsvn_fs_fs/fs_fs.c

(read_config): Use 1MB pages in p2l index by default.

(write_config): Update fsfs.conf template.

* subversion/libsvn_fs_fs/pack.c

(pack_range,

append_revision): Read index data in index page granularity.

* subversion/libsvn_fs_fs/verify.c

(compare_p2l_to_l2p_index,

compare_p2l_to_rev): Same.

* tools/server-side/fsfs-stats.c

(read_log_rev_or_packfile): Same.

  1. … 6 more files in changeset.
* subversion/bindings/javahl/native/jniwrapper/jni_channel.cpp

* subversion/bindings/javahl/native/org_apache_subversion_javahl_util_PropLib.cpp

* subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNConfig.java

* subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNEditor.java

* subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNRemote.java

* subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNReporter.java

* subversion/bindings/javahl/src/org/apache/subversion/javahl/JNIObject.java

* subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNUtil.java

* subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/ConfigEvent.java

* subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/InheritedProplistCallback.java

* subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/RemoteFileRevisionsCallback.java

* subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/RemoteLocationSegmentsCallback.java

* subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/RemoteStatus.java

* subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/ReposFreezeAction.java

* subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/TunnelAgent.java

* subversion/bindings/javahl/src/org/apache/subversion/javahl/remote/CommitEditor.java

* subversion/bindings/javahl/src/org/apache/subversion/javahl/remote/RemoteFactory.java

* subversion/bindings/javahl/src/org/apache/subversion/javahl/remote/RemoteSession.java

* subversion/bindings/javahl/src/org/apache/subversion/javahl/remote/RetryOpenSession.java

* subversion/bindings/javahl/src/org/apache/subversion/javahl/remote/StateReporter.java

* subversion/bindings/javahl/src/org/apache/subversion/javahl/remote/StatusEditor.java

* subversion/bindings/javahl/src/org/apache/subversion/javahl/types/DiffOptions.java

* subversion/bindings/javahl/src/org/apache/subversion/javahl/types/RevisionRangeList.java

* subversion/bindings/javahl/src/org/apache/subversion/javahl/types/VersionExtended.java

* subversion/bindings/javahl/src/org/apache/subversion/javahl/util/ConfigImpl.java

* subversion/bindings/javahl/src/org/apache/subversion/javahl/util/ConfigLib.java

* subversion/bindings/javahl/src/org/apache/subversion/javahl/util/DiffLib.java

* subversion/bindings/javahl/src/org/apache/subversion/javahl/util/PropLib.java

* subversion/bindings/javahl/src/org/apache/subversion/javahl/util/RequestChannel.java

* subversion/bindings/javahl/src/org/apache/subversion/javahl/util/ResponseChannel.java

* subversion/bindings/javahl/src/org/apache/subversion/javahl/util/TunnelChannel.java

* subversion/bindings/javahl/tests/org/apache/subversion/javahl/UtilTests.java

* subversion/libsvn_fs_fs/index.c

* subversion/libsvn_fs_fs/index.h

* subversion/libsvn_fs_fs/rev_file.c

* subversion/libsvn_fs_fs/rev_file.h

* subversion/libsvn_subr/checksum.h

* subversion/libsvn_subr/fnv1a.c

* subversion/libsvn_subr/fnv1a.h

* subversion/svn/cl-log.h

(svn:eol-style): Set to native.

  1. … 39 more files in changeset.
Merge FSFS format 7 into /trunk, i.e. everything from the

fsfs-improvements branch. There were no conflicts.

For easier review, the following is a summary of the changes.

Please refer to either the in-source comments or the original

commit messages for details.

BRANCH-README contains a feature overview. The structure and

structure-indexes files contain a detailed description of the

new addressing concepts and their external representation.

* BRANCH-README

(): Replace the old description with that for FSFS f7.

* subversion/libsvn_fs_fs/structure

(): Add format 7 to format list and add index files as new

elements. Describe the concept of addressing modes,

"item index" and "item type" in detail. Explain the

intention behind the new pack code.

* subversion/libsvn_fs_fs/structure-indexes

(): New file.

Detailed description of the two-way mapping between

logical and physical addresses. Also describes the

binary format used to store the index files on disk.

* subversion/libsvn_fs_fs/index.*

(): New files.

Add a FSFS-private API for both indexes providing the

mapping functionality as defined in structure-indexes.

* subversion/libsvn_fs_fs/rev_file.*

(): New files.

Provide a FSFS-private API that combines the 3 physical

files (rev/pack, 2 x index) into a common data structure

and ensures that they are being accessed consistently wrt.

pack state. This is necessary when there is an svnadmin

pack running in the background while we read the repo.

* subversion/libsvn_fs_fs/id.*

(): Replace OFFSET with ITEM_INDEX.

(svn_fs_fs__id_create_root): New utility function enabled by

all root nodes having the same

item index.

* subversion/libsvn_fs_fs/util.*

(): Add new path constructors for index files. Move item

to offset mapping and rev / pack file open functions

to their respective new API files.

* subversion/libsvn_fs_fs/low_level.*

(): Replace OFFSET with ITEM_INDEX.

* subversion/libsvn_fs_fs/fs.h

(PATH_*): Path constants for the new index files.

(CONFIG_*): New fsfs.conf configuration options.

(SVN_FS_FS__FORMAT_NUMBER): Bump format number.

(*_t): Replace OFFSET with ITEM_INDEX.

(fs_fs_data_t): Add config settings and caches for the various

index elements.

* subversion/libsvn_fs_fs/caching.c

(svn_fs_fs__initialize_caches): Initialize new caches.

* subversion/libsvn_fs_fs/fs.c

(initialize_fs_struct): Default to physical addressing.

* subversion/libsvn_fs_fs/fs_fs.c

(): Handle new addressing format info and config file options.

Use a different revision 0 template for format 7.

* subversion/libsvn_fs_fs/cached_data.c

(): Switch file access function to the new rev_file API.

Follow the OFFSET to ITEM_INDEX rename.

Implement the "block read" feature and make all data read

functionality use the block_read() function.

(dbg_log_access): Produce a more detailed access log in logical

addressing mode.

* subversion/libsvn_fs_fs/transaction.c

(): Provide generic item_index allocator and index writer

functions that work in both addressing modes. Also, add

wrappers streams that calculate the new low-level FVN-1a

checksums for everything we write to disk. Invoke all

of this when writing data to the proto-rev file. Finally,

predict the addressing mode of the future revision and

upgrade transactions from physical to log addressing mode

upon misprediction or for old txns.

* subversion/libsvn_fs_fs/pack.h

(svn_fs_fs__order_dir_entries): In mixed addressing mode repos,

the optimal read order depends

on the revision number.

* subversion/libsvn_fs_fs/pack.c

(): Implement the new reorder-on-pack feature that is a core

element of f7. Details of it are described at the top of

this file.

(svn_fs_fs__order_dir_entries): Select the optimal order depending

on the addressing mode.

* subversion/libsvn_fs_fs/tree.c

(fs_dir_optimal_order): Adapt to pack API change.

* subversion/libsvn_fs_fs/verify.c

(): In log. addressing mode, verify the forward and backward

indexes are consistent with one another. Verify that rev /

pack file size match the index values and that the low-level

checksums for every item in the rev / pack file match the

index data as well.

* subversion/libsvn_fs_fs/hotcopy.c

(): Copy the new index files as well, if the respective revs

use logical addressing. Also, clean them up when a shard

got packed since the last incremental hotcopy.

* subversion/libsvn_fs_fs/recovery.c

(): Adapt to new rev_file API and ID API changes.

* subversion/libsvn_fs_fs/rep-cache.c

(): Follow the OFFSET to ITEM_INDEX rename.

* subversion/tests/cmdline/svnadmin_tests.py

(): Add very limited f7 index read functionality - just enough

to manipulate the changed paths lists in f7 as well. Update

expected output patterns for f7. Restrict verify_non_utf8_paths

to pre-f7 repos as manipulating f7 repos is harder and not

relevant for the code / test coverage here.

* subversion/tests/cmdline/svntest/main.py

(is_fs_log_addressing): FSFS f7 also uses log addressing.

* subversion/tests/libsvn_fs_fs

(): svn:ignore test repositories

* subversion/tests/libsvn_fs_fs/fs-fs-pack-test.c

(): Write correct addressing mode info and check for the right

files in packed f7 repos. Add tests TXN format upgrade tests.

* tools/server-side/svn-rep-sharing-stats.c

(record): Follow the OFFSET to ITEM_INDEX rename.

  1. … 30 more files in changeset.