Log Message: |
In FSX, unifify the concept of revision and transaction numbers and
call it a "change set".
The mapping is trivial (revs == non-neg change sets, txns are negative
change set numbers) and a few conversion functions are being provided.
As a first step, we use it in fs_x__id_t to represent the noderev_id
unifying txn_id and rev_item. The API is kept unchanged but the textual
representation changes.
* subversion/libsvn_fs_x/id.h
(svn_fs_x__change_set_t): Define the new change set number type.
(SVN_FS_X__INVALID_CHANGE_SET): Define the corresponding NULL value.
(svn_fs_x__is_revision,
svn_fs_x__is_txn,
svn_fs_x__get_revnum,
svn_fs_x__get_txn_id,
svn_fs_x__change_set_by_rev,
svn_fs_x__change_set_by_txn): Declare new conversion & check functions.
(svn_fs_x__id_part_t): Replace REVISION with CHANGE_SET.
* subversion/libsvn_fs_x/id.c
(fs_x__id_t): Replace TXN_ID and REV_NUM by NODEREV_ID.
(svn_fs_x__is_revision,
svn_fs_x__is_txn,
svn_fs_x__get_revnum,
svn_fs_x__get_txn_id,
svn_fs_x__change_set_by_rev,
svn_fs_x__change_set_by_txn): Declare new conversion & check functions.
(txn_id_parse): Drop because we don't have separate txn ids anymore.
(part_parse): Store ID parts as <number[+,-]change_set> with both
elements encoded in base36.
(unparse_id_part): Rename to ...
(part_unparse): ... this and re-implement.
(svn_fs_x__id_part_is_root,
svn_fs_x__id_part_eq): Update due to struct member rename.
(svn_fs_x__id_txn_id): Extract the txn id from the noderev change set.
(svn_fs_x__id_rev_item): Make sure to return a well-defined "invalid" /
"unused" struct for non-revision IDs.
(svn_fs_x__id_rev): Extract the revnum from the noderev change set.
(svn_fs_x__id_item): Update due to struct member rename.
(svn_fs_x__id_is_txn): Use the new change set number API.
(svn_fs_x__id_unparse): Simplify writing just the 3 ID parts.
(svn_fs_x__id_eq): Adapt to struct change.
(svn_fs_x__id_check_related): Update check for TXN IDs.
(svn_fs_x__id_part_compare,
svn_fs_x__id_txn_create_root,
svn_fs_x__id_create_root,
svn_fs_x__id_txn_create,
svn_fs_x__id_rev_create): Adapt to struct update.
(svn_fs_x__id_parse): Simplify as we just have to parse 3 id parts.
* subversion/libsvn_fs_x/changes.c
(binary_change_t): Rename REV_ID to NODEREV_ID.
(append_change): Update to rename and usage of change set numbers.
(svn_fs_x__write_changes_container,
svn_fs_x__read_changes_container): Adapt to struct member renames.
(svn_fs_x__changes_get_list,
svn_fs_x__changes_get_list_func): Adapt to ID API changes.
* subversion/libsvn_fs_x/transaction.c
(get_new_txn_node_id,
svn_fs_x__reserve_copy_id,
rep_write_contents_close,
write_hash_delta_rep,
get_final_id,
write_final_rev): Use change set instead of revision numbers and say
"noderev_id" instead of "rev_item".
* subversion/libsvn_fs_x/fs_x.c
(write_revision_zero): Update rev 0 template to use the new ID format.
* subversion/libsvn_fs_x/noderevs.c
(svn_fs_x__write_noderevs_container,
svn_fs_x__read_noderevs_container): Adapt to id part member rename.
* subversion/libsvn_fs_x/verify.c
(compare_l2p_to_p2l_index,
compare_p2l_to_l2p_index): Convert from and to change set numbers as
required by the APIs and follow renames.
* subversion/libsvn_fs_x/cached_data.c
(get_node_revision_body,
svn_fs_x__get_node_revision,
svn_fs_x__get_mergeinfo_count,
init_rep_state,
svn_fs_x__get_representation_length,
block_read_changes,
block_read_changes_container,
block_read_noderevs_container,
block_read_reps_container,
block_read): Ditto
* subversion/libsvn_fs_x/pack.c
(add_item_rep_mapping,
get_item,
copy_rep_to_temp,
copy_node_to_temp,
compare_p2l_info,
compare_sub_items,
compare_p2l_info_rev,
write_reps_containers,
write_l2p_index): Same.
* subversion/libsvn_fs_x/index.c
(svn_fs_x__p2l_index_create,
read_entry): Ditto.
* subversion/libsvn_fs_x/tree.c
(x_node_origin_rev): Ditto.
|