Log Message: |
On the log-addressing branch: Automatically upgrade transactions from
physical to logical addressing mode for recently upgraded repositories.
Provide a test-case.
This turned out to be slightly easier to do than initially thought:
Most item indexes are assigned only during the commit phase when the
final addressing mode is known. The items written before is file
repesentations. Thus, simply scan all noderevs created in the txn
for file representations, allocate item indexes for them and update
the respective noderevs.
* subversion/include/svn_error_codes.h
(SVN_ERR_FS_TXN_ADDRESSING_MODE_OUT_OF_DATE): obsolete now -> drop
* subversion/libsvn_fs_fs/transaction.c
(get_writable_proto_rev_body): we need to be able to also read from
the proto-rev file
(using_log_addressing,
is_noderev_file,
fnv1a_checksum_on_file_range,
compare_sort_p2l_entry): new utility methods
(upgrade_transaction): main upgrade function
(commit_body): upgrade phys addressing txns to log addressing when
committing them into the log addressing revision range
* subversion/tests/libsvn_fs_fs
(): svn:ignore the new test repository
* subversion/tests/libsvn_fs_fs/fs-fs-pack-test.c
(upgrade_txn_to_log_addressing): new test function
(test_funcs): register the new test
|