You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ju...@apache.org on 2013/01/03 22:51:04 UTC
svn commit: r1428621 [1/3] - in /subversion/trunk/subversion/libsvn_wc:
wc_db.c wc_db_pristine.c wc_db_private.h wc_db_update_move.c
Author: julianfoad
Date: Thu Jan 3 21:51:03 2013
New Revision: 1428621
URL: http://svn.apache.org/viewvc?rev=1428621&view=rev
Log:
Introduce SVN_WC__DB_WITH_TXN macro as an alternative to the function
svn_wc__db_with_txn(). The macro provides a more convenient interface for
wrapping a transaction, because there is no need to marshall the called
function's parameters via a 'baton' structure.
Use it for most of the transactions throughout libsvn_wc. Some exceptions:
- in backward-compatibility code, it is not worth the code churn;
- in insert_base_node(), insert_working_node(), insert_external_node(),
the baton is used mainly as a representation of the new node rather than
as a set of function parameters, so there is little benefit.
* subversion/libsvn_wc/wc_db_private.h
(SVN_WC__DB_WITH_TXN): New macro.
* subversion/libsvn_wc/wc_db_pristine.c
(pristine_read_txn,
svn_wc__db_pristine_read,
pristine_read_baton_t):
Let the inner function take all its parameters directly, let the outer
function call it through SVN_WC__DB_WITH_TXN, and remove the baton type.
(pristine_transfer_txn2,
pristine_transfer_txn1,
svn_wc__db_pristine_transfer,
pristine_transfer_baton):
Same, with two 'inner' functions in this case.
* subversion/libsvn_wc/wc_db_update_move.c
(update_moved_away_conflict_victim,
svn_wc__db_update_moved_away_conflict_victim,
update_moved_away_conflict_victim_baton):
Same.
* subversion/libsvn_wc/wc_db.c
(db_base_remove, svn_wc__db_base_remove,
base_remove_baton,
db_external_remove, svn_wc__db_external_remove,
external_remove_baton,
set_props_txn, svn_wc__db_op_set_props,
set_props_baton_t,
db_op_mark_resolved, svn_wc__db_op_mark_resolved,
op_mark_resolved_baton,
revert_list_read, svn_wc__db_revert_list_read,
revert_list_read_baton,
revert_list_read_copied_children,
svn_wc__db_revert_list_read_copied_children,
revert_list_read_copied_children_baton,
db_op_set_base_depth, svn_wc__db_op_set_base_depth,
set_base_depth_baton_t,
read_children_info, svn_wc__db_read_children_info,
read_children_info_baton_t,
read_url_txn, svn_wc__db_read_url,
read_url_baton_t,
db_read_props, svn_wc__db_read_props
db_read_props_baton_t,
db_read_inherited_props, svn_wc__db_read_inherited_props,
read_inherited_props_baton_t,
check_replace_txn, svn_wc__db_node_check_replace,
check_replace_baton,
relocate_txn, svn_wc__db_global_relocate,
relocate_baton_t,
commit_node, svn_wc__db_global_commit,
commit_baton_t,
bump_revisions_post_update, svn_wc__db_op_bump_revisions_post_update,
bump_revisions_baton_t,
lock_add_txn, svn_wc__db_lock_add,
lock_remove_txn, svn_wc__db_lock_remove,
scan_deletion_txn, svn_wc__db_scan_deletion_internal,
scan_deletion_baton_t,
wq_fetch_next, svn_wc__db_wq_fetch_next,
wq_fetch_next_baton_t,
get_conflict_marker_files, svn_wc__db_get_conflict_marker_files,
marker_files_baton,
db_is_switched, svn_wc__db_is_switched,
db_is_switched_baton_t,
wclock_steal, svn_wc__db_wclock_obtain,
wclock_obtain_baton_t,
is_wclocked, svn_wc__db_wclocked,
end_directory_update, svn_wc__db_temp_op_end_directory_update,
start_directory_update_txn, svn_wc__db_temp_op_start_directory_update,
start_directory_update_baton_t,
make_copy_txn, svn_wc__db_op_make_copy,
make_copy_baton_t,
revision_status_txn, svn_wc__db_revision_status,
revision_status_baton_t,
):
Same as above, for each triplet listed here. Where no baton type is
listed, none was in use.
(svn_wc__db_global_update, update_baton_t): Update this commented-out code
in the same way.
(get_moved_to): Take separate parameters instead of using an existing
baton that happened to be convenient before.
(read_url): Remove, as no longer useful.
(bump_node_revision): Track the changes.
Modified:
subversion/trunk/subversion/libsvn_wc/wc_db.c
subversion/trunk/subversion/libsvn_wc/wc_db_pristine.c
subversion/trunk/subversion/libsvn_wc/wc_db_private.h
subversion/trunk/subversion/libsvn_wc/wc_db_update_move.c