conflict-data-test.c

Checkout Tools
  • last updated 5 hours ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Record the move target path in a moved-away tree conflict skel.

Updates can modify the NODES table in ways which discard local move

information about tree conflict victims. One example is:

echo foo >> epsilon/foo.txt

svn mv epsilon alpha

svn ci # create r2

svn up -r1

svn mv epsilon beta

svn up -r2

When 'epsilon' is updated to r2, a tree conflict is raised and the move

'epsilon' -> 'beta' is deleted from the NODES table. 'beta' remains a copy.

$ svn status

A + beta

! C epsilon

> local dir moved away, incoming dir delete or move upon update

$

The conflict skel for the tree conflict on 'epsilon' now contains:

(tree () moved-away deleted epsilon)

This leaves the resolver with insufficient information about the local

move 'epsilon' -> 'beta' which existed before the update. To resolve this

conflict we must be able to identify the copy 'beta' as one potential move

target. The fact that copyfrom on 'beta' points to 'epsilon' is insufficient

because, in the general case, this copy could have occurred independently

of the tree conflict.

As of this commit, the tree conflict skel also records a move destination

path, 'beta' in our example:

(tree () moved-away deleted epsilon beta)

Apart from recording the path in the skel, this commit introduces no other

visible change in behaviour. In the future, the conflict resolver will be

able to make use of this new information to correlate the copy 'beta' with

the conflict victim 'epsilon' in the above example.

Note that old clients will simply ignore the new extra element at the end

of the conflict skel.

* subversion/libsvn_wc/conflicts.c

(svn_wc__conflict_skel_add_tree_conflict): Add move_dst_op_root_abspath

parameter and append it to the skel if it is non-NULL.

(svn_wc__conflict_read_tree_conflict): Return the move_dst_op_root_abspath

if present in the conflict skel.

(read_tree_conflict_desc, resolve_tree_conflict_on_node,

svn_wc__conflict_tree_update_break_moved_away,

svn_wc__conflict_tree_update_incoming_move,

svn_wc__conflict_tree_update_local_add): Update callers.

* subversion/libsvn_wc/conflicts.h

(svn_wc__conflict_skel_add_tree_conflict,

svn_wc__conflict_read_tree_conflict): Update declaration and docstring.

* subversion/libsvn_wc/questions.c

(internal_conflicted_p): Update caller.

* subversion/libsvn_wc/tree_conflicts.c

(svn_wc__add_tree_conflict): Update caller.

* subversion/libsvn_wc/update_editor.c

(open_root, check_tree_conflict, add_directory, open_directory,

add_file, open_file, change_file_prop): Update callers.

* subversion/libsvn_wc/upgrade.c

(svn_wc__upgrade_conflict_skel_from_raw): Update caller.

* subversion/libsvn_wc/wc_db.c

(revert_maybe_raise_moved_away): Update caller.

* subversion/libsvn_wc/wc_db_update_move.c

(create_tree_conflict, fetch_conflict_details): Update callers.

* subversion/tests/libsvn_wc/conflict-data-test.c

(test_serialize_tree_conflict): Update test expectations.

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

(check_db_conflicts): Update caller.

  1. … 9 more files in changeset.
When obtaining conflicts from wc-db, also allow directly obtaining properties.

We already read from the records that have the data, so this doesn't have a

real cost, while reading them separately (introduced in r1667228) does.

The final result after the combination of these patches is that we provide

better information using less database transactions, so this provides an

overall performance improvement.

This patch also makes the resolver avoid creating temporary files during

resolves where the code already knows that nobody is using these files,

because there is no resolver callback.

* subversion/libsvn_wc/conflicts.c

(read_prop_conflict_descs): Stop abusing no tempfile flag for not showing

details. Only read base properties if we don't already have them.

(svn_wc__read_conflicts): Allow obtaining skel in one step, and not reading

not-tree conflicts.

(resolve_tree_conflict_on_node,

svn_wc__mark_resolved_text_conflict,

svn_wc__mark_resolved_prop_conflicts): Update caller.

(conflict_status_walker): Use one db operation instead of two.

* subversion/libsvn_wc/copy.c

(copy_versioned_file,

remove_node_conflict_markers): Update caller.

* subversion/libsvn_wc/delete.c

(create_delete_wq_items): Update caller.

* subversion/libsvn_wc/entries.c

(read_one_entry): Update caller.

* subversion/libsvn_wc/info.c

(build_info_for_node): Update caller.

(svn_wc__get_info): Update caller.

* subversion/libsvn_wc/props.c

(svn_wc__create_prejfile): Update caller.

* subversion/libsvn_wc/questions.c

(internal_conflicted_p): Update caller.

* subversion/libsvn_wc/tree_conflicts.c

(svn_wc__get_tree_conflict): Update caller.

* subversion/libsvn_wc/wc.h

(svn_wc__read_conflicts): Add two arguments.

* subversion/libsvn_wc/wc_db.c

(op_revert_txn): Update caller.

(svn_wc__db_read_conflict,

svn_wc__db_read_conflict_internal): Handle properties.

* subversion/libsvn_wc/wc_db.h

(svn_wc__db_read_conflict): Add optional properties argument.

* subversion/libsvn_wc/wc_db_private.h

(svn_wc__db_read_conflict_internal): Add optional properties argument.

* subversion/libsvn_wc/wc_db_update_move.c

(create_tree_conflict,

bump_moved_layer,

svn_wc__db_op_raise_moved_away): Update caller.

* subversion/libsvn_wc/workqueue.c

(run_prej_install,

run_set_text_conflict_markers,

run_set_property_conflict_marker): Update caller.

* subversion/tests/libsvn_wc/conflict-data-test.c

(test_prop_conflict_resolving,

test_binary_file_conflict): Update caller.

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

(check_db_conflicts): Update caller.

  1. … 15 more files in changeset.
* subversion/tests/libsvn_wc/conflict-data-test.c

(test_binary_file_conflict): Ensure that file size changes when

the binary file is changed. Makes sleep for timestamp unnecessary.

Suggested by: rhuijben

Fix text conflict description for binary files.

The is_binary flag in conflict description was set to zero even

for binary files. As a result, 'svn resolve' offered 'mine-conflict'

and 'theirs-conflict' options which don't make any sense for binaries.

Add a regression test to catch this problem in the future.

* subversion/libsvn_wc/conflicts.c

(read_text_conflict_desc): Drop is_binary paramter. Use the mime type to

detemine whether the conflicted file is binary.

(svn_wc__conflict_invoke_resolver): Stop passing FALSE for is_binary.

Let read_text_conflict_desc figure it out based on the mime type.

(svn_wc__read_conflicts): Read WORKING properties for text-conflicted files

and pass the mime type to read_text_conflict_desc().

* subversion/tests/libsvn_wc/conflict-data-test.c

(test_binary_file_conflict, test_funcs): New test.

  1. … 1 more file in changeset.
Following up on r1663338, enable resolving individual property conflicts

via svn_wc__resolve_conflicts(). This allows accessing a feature that was

already available when passing a callback, but not directly.

Use this to add a regression test for the problems fixed in r1663338.

* subversion/libsvn_wc/conflicts.c

(svn_wc__resolve_conflicts): Remove limitation.

* subversion/tests/libsvn_wc/conflict-data-test.c

(test_prop_conflict_resolving): New function

(test_list): Add test_prop_conflict_resolving.

* subversion/tests/libsvn_wc/utils.c

(sbox_wc_resolve_prop): New function.

* subversion/tests/libsvn_wc/utils.h

(sbox_wc_resolve_prop): New function.

  1. … 3 more files in changeset.
Enable directly reading the node kind when reading conflicts from wc_db.

This avoids a database transaction for a common operation during conflict

resolving (and when retrieving conflicts via apis like 'svn info').

* subversion/libsvn_wc/conflicts.c

(read_tree_conflict_desc): Add node kind argument and use that to

fill kind.

(svn_wc__conflict_invoke_resolver): Update caller. Fetch kind.

(svn_wc__read_conflicts): Fetch and pass kind.

(resolve_prop_conflict_on_node): Add conflicts argument.

(svn_wc__mark_resolved_text_conflict,

svn_wc__mark_resolved_prop_conflicts,

conflict_status_walker): Update caller.

* subversion/libsvn_wc/copy.c

(copy_versioned_file,

remove_node_conflict_markers): Update caller.

* subversion/libsvn_wc/delete.c

(create_delete_wq_items): Update caller.

* subversion/libsvn_wc/entries.c

(read_one_entry): Update caller.

* subversion/libsvn_wc/props.c

(svn_wc__create_prejfile): Update caller.

* subversion/libsvn_wc/questions.c

(internal_conflicted_p): Update caller.

* subversion/libsvn_wc/wc_db.c

(op_revert_txn,

svn_wc__db_read_conflict): Update caller.

(svn_wc__db_read_conflict_internal): Extend usage of error handling query.

* subversion/libsvn_wc/wc_db.h

(svn_wc__db_read_conflict): Add optional argument.

* subversion/libsvn_wc/wc_db_private.h

(svn_wc__db_read_conflict_internal): Add optional argument.

* subversion/libsvn_wc/wc_db_update_move.c

(create_tree_conflict,

get_tc_info,

bump_moved_layer): Update caller.

* subversion/libsvn_wc/workqueue.c

(run_prej_install): Update caller.

* subversion/tests/libsvn_wc/conflict-data-test.c

(test_read_write_tree_conflicts): Add file to allow retrieving kind from db.

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

(check_db_conflicts,

check_tree_conflict_repos_path): Update caller.

  1. … 12 more files in changeset.
Make sbox_file_write() use proper error handling. Update all callers.

* subversion/tests/libsvn_wc/conflict-data-test.c

(test_read_write_tree_conflicts): Update caller.

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

(wc_wc_copies,

test_deletes,

test_adds_change_kind,

test_shadowed_update,

commit_file_external,

revert_file_externals,

copy_file_externals,

move_update,

update_prop_mod_into_moved,

nested_move_update,

nested_move_commit,

move_update_conflicts,

move_update_delete_mods,

finite_move_update_bump,

move_delete_file_externals): Update caller.

* subversion/tests/libsvn_wc/utils.c

(sbox_file_write): Use svn_io functions and return svn_error_t *.

* subversion/tests/libsvn_wc/utils.h

(sbox_file_write): Return svn_error_t *.

  1. … 3 more files in changeset.
Use SVN_TEST_STRING_ASSERT() in a few more C tests to improve error

reporting.

* subversion/tests/libsvn_diff/parse-diff-test.c

(test_parse_property_diff): Use SVN_TEST_STRING_ASSERT.

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

(cleanup_callback,

test_auth_clear): Use SVN_TEST_STRING_ASSERT.

* subversion/tests/libsvn_wc/conflict-data-test.c

(test_parse_property_diff): Use SVN_TEST_STRING_ASSERT.

  1. … 2 more files in changeset.
Fix misreporting of tree conflict victim's node kind, in particular

in cases where the victim is an obstruction.

* subversion/libsvn_wc/conflicts.c

(read_tree_conflict_desc): The local node kind cannot be derived from the

incoming src-left or src-right node kind as was done here. For example,

local unversioned files were labeled as 'local dir' if they obstructed

an incoming directory addition. If the conflict reason is an obstruction

we must check the on-disk state of the node and use it to describe the

victim's node kind. Missing nodes obviously have node type 'none' but

they were described as 'file'.

* subversion/svn/cl-conflicts.c

(local_reason_str, incoming_action_str): Describe symlinks as files.

Handle 'none' and 'unknown' type nodes.

* subversion/tests/cmdline/switch_tests.py

(forced_switch_failures): This test had node kinds swapped around. Fix it.

* subversion/tests/cmdline/tree_conflict_tests.py

(actual_only_node_behaviour): Output for 'none' type nodes has changed.

Adjust expected output accordingly.

* subversion/tests/libsvn_wc/conflict-data-test.c

(test_read_write_tree_conflicts): Create on-disk files and directories

in the test working copy since they are now required for proper node

kind detection. Previously, this test was using wc-db data only.

  1. … 4 more files in changeset.
Undo the introduction of svn_wc_conflict_description3_t.

Instead of revving svn_wc_conflict_description2_t ("desc2"), we can extend the

struct with new fields or a pointer to private data to be accessed via functions,

and keep the existing fields as they are now.

This approach avoids an unwieldy cascade of changes to callbacks and other API

elements which already use desc2. This commit does not add new fields or private

data for desc2 -- that is future work.

Discussed with philip, julianfoad, rhuijben, and breser.

* subversion/include/private/svn_wc_private.h

(svn_wc__get_tree_conflict, svn_wc__add_tree_conflict): Switch back to desc2.

(svn_wc__cd3_to_cd2, svn_wc__cd3_array_to_cd2_array ): Remove declaration.

* subversion/include/svn_wc.h

(svn_wc_conflict_description_private_t): New typedef.

(svn_wc_conflict_description3_t): Remove.

(svn_wc_conflict_description2_t): Enhance documentation based on improvements

made for desc3. Extend this structure with a pointer to private data.

(svn_wc_conflict_description_create_text3,

svn_wc_conflict_description_create_prop3,

svn_wc_conflict_description_create_tree3,

svn_wc__conflict_description3_dup,

svn_wc_conflict_resolver_func3_t): Un-declare.

(svn_wc_conflict_description_create_text2,

svn_wc_conflict_description_create_prop2,

svn_wc_conflict_description_create_tree2,

svn_wc_conflict_resolver_func2_t): Un-deprecate.

(svn_wc_info_t): Remove 'conflicts2' field.

* subversion/libsvn_client/merge.c

(merge_dir_baton_t): Document that 'new_tree_conflicts' array now has

desc2 elements again.

(record_tree_conflict, merge_file_opened, merge_dir_opened): Use desc2.

* subversion/libsvn_wc/conflicts.c

(local_change_map): Rename back to reason_map for consistency.

(incoming_change_map): Rename back to action_map for consistency.

(svn_wc__conflict_skel_add_tree_conflict,

svn_wc__conflict_read_prop_conflict,

svn_wc__conflict_read_tree_conflict): Rename local_change and

incoming_change parameters back to reason and action for consistency.

(generate_propconflict, resolve_text_conflict, read_text_conflict_desc,

svn_wc__conflict_invoke_resolver, read_prop_conflict_descs,

svn_wc__read_conflicts, conflict_status_walker): Use desc2.

(eval_text_conflict_func_result): Rename 'merged_abspath' parameter back to

'merged_file' for consistency. Use desc2.

* subversion/libsvn_wc/deprecated.c

(svn_wc__status2_from_3): Use desc2.

(svn_wc_conflict_description_create_text2,

svn_wc_conflict_description_create_prop2,

svn_wc_conflict_description_create_tree2): Moved back to libsvn_wc/util.c.

* subversion/libsvn_wc/entries.c

(read_one_entry, write_entry): Use desc2.

* subversion/libsvn_wc/info.c

(svn_wc_info_dup, build_info_for_node, svn_wc__get_info): Use desc2 and drop

support for removed 'conflicts2' member of svn_wc_info_t.

* subversion/libsvn_wc/tree_conflicts.c

(svn_wc__deserialize_conflict, svn_wc__serialize_conflict,

svn_wc__add_tree_conflict, svn_wc__get_tree_conflict): Use desc2.

* subversion/libsvn_wc/tree_conflicts.h

(svn_wc__serialize_conflict,

svn_wc__deserialize_conflict): Tweak declarations for desc2.

* subversion/libsvn_wc/upgrade.c

(read_tree_conflicts, migrate_single_tree_conflict_data,

svn_wc__upgrade_conflict_skel_from_raw): Use desc2.

* subversion/libsvn_wc/util.c

(svn_wc_conflict_description_create_text3,

svn_wc_conflict_description_create_prop3,

svn_wc_conflict_description_create_tree3,

svn_wc__conflict_description3_dup,

svn_wc__cd3_array_to_cd2_array, svn_wc__cd3_to_cd2): Remove.

(svn_wc_conflict_description_create_text2,

svn_wc_conflict_description_create_prop2,

svn_wc_conflict_description_create_tree2): Move back here

from libsvn_wc/deprecated.c

* subversion/libsvn_wc/wc.h

(svn_wc__read_conflicts): Change mention in docstring back to desc2.

* subversion/svn/cl-conflicts.c

(svn_cl__get_human_readable_prop_conflict_description,

svn_cl__get_human_readable_tree_conflict_description,

append_tree_conflict_info_xml, svn_cl__append_conflict_info_xml): Use desc2.

* subversion/svn/cl-conflicts.h

(svn_cl__get_human_readable_prop_conflict_description,

svn_cl__get_human_readable_tree_conflict_description,

svn_cl__append_conflict_info_xml): Change declarations for desc2.

* subversion/svn/cl.h

(svn_cl__conflict_func_interactive): Change declaration back to desc2.

* subversion/svn/conflict-callbacks.c

(show_diff, show_conflicts, merge_prop_conflict, show_prop_conflict,

edit_prop_conflict, handle_text_conflict, handle_prop_conflict,

handle_tree_conflict, handle_obstructed_add,

conflict_func_interactive): Use desc2. In handle_prop_conflict, restore

workaround for wrongly filled in fields in desc2 for now.

* subversion/svn/info-cmd.c

(print_info_xml, print_info): Use desc2.

* subversion/svn/status.c

(print_status): Use desc2.

* subversion/tests/libsvn_wc/conflict-data-test.c

(compare_version, compare_file_content, compare_prop_conflict,

tree_conflict_create, test_deserialize_tree_conflict,

test_read_write_tree_conflicts, test_serialize_tree_conflict): Use desc2.

* tools/dev/svnraisetreeconflict/svnraisetreeconflict.c

(raise_tree_conflict): Use desc2.

  1. … 19 more files in changeset.
Rename the 'node_kind' field in svn_wc_conflict_description3_t

to 'local_node_kind'.

No functional change.

* subversion/include/svn_wc.h

(svn_wc_conflict_description3_t): Rename 'node_kind' to 'local_node_kind'.

Resolve a question in a comment by explaining where kinds of other nodes

involved in the conflict can be found.

(svn_wc_conflict_description_create_tree3): Rename 'node_kind' parameter

to 'local_node_kind'.

* subversion/libsvn_wc/info.c

(svn_wc__get_info): Track rename.

* subversion/libsvn_wc/tree_conflicts.c

(svn_wc__serialize_conflict): Track rename.

* subversion/libsvn_wc/util.c

(svn_wc_conflict_description_create_text3,

svn_wc_conflict_description_create_prop3,

svn_wc__cd3_to_cd2): Track rename.

(svn_wc_conflict_description_create_tree3): Rename 'node_kind' parameter

to 'local_node_kind'.

* subversion/tests/libsvn_wc/conflict-data-test.c

(compare_conflict, test_deserialize_tree_conflict): Track rename.

  1. … 4 more files in changeset.
Rename 'action' and 'reason' fields in svn_wc_conflict_description3_t

to 'incoming_change' and 'local_change', respectively. The new names

make it more apparent whether a given change was made in the source

or the target of an operation, especially with tree conflicts.

No functional change.

* subversion/include/svn_wc.h

(svn_wc_conflict_description3_t): Rename 'action' to 'incoming_change'

and 'reason' to 'local_change'. Enhance related documentation.

* subversion/libsvn_client/merge.c

(record_tree_conflict, merge_file_opened, merge_dir_opened): Track renames.

* subversion/libsvn_wc/conflicts.c

(generate_propconflict, read_tree_conflict_desc,

read_prop_conflict_descs): Track renames.

* subversion/libsvn_wc/entries.c

(write_entry): Track rename.

* subversion/libsvn_wc/tree_conflicts.c

(svn_wc__deserialize_conflict, svn_wc__serialize_conflict,

svn_wc__add_tree_conflict): Track renames.

* subversion/libsvn_wc/upgrade.c

(svn_wc__upgrade_conflict_skel_from_raw): Track renames.

* subversion/libsvn_wc/util.c

(svn_wc_conflict_description_create_text3, svn_wc__cd3_to_cd2): Track renames.

* subversion/tests/libsvn_wc/conflict-data-test.c

(compare_conflict, tree_conflict_create, test_deserialize_tree_conflict,

test_serialize_tree_conflict_data): Track renames.

* tools/dev/svnraisetreeconflict/svnraisetreeconflict.c

(raise_tree_conflict): Track renames.

  1. … 8 more files in changeset.
Resolve an open question in svn_wc.h by renaming a variable and verifying

all setters.

* subversion/include/svn_wc.h

(svn_wc_conflict_description3_t): Tweak comment to remove the notion

that line endings are always LF (that would only apply to eol-style

native). Answer abspath vs path by renaming the variable.

* subversion/libsvn_wc/conflicts.c

(generate_propconflict): Update user.

(resolve_text_conflict): Update user.

* subversion/libsvn_wc/util.c

(svn_wc__conflict_description3_dup,

svn_wc__cd3_to_cd2): Update user.

* subversion/tests/libsvn_wc/conflict-data-test.c

(compare_conflict): Update user.

  1. … 3 more files in changeset.
Revert r1508225, which moved the include of svn_private_config.h before all

includes of our public headers. Public headers shouldn't depend on private

headers and all changes that required this are long reverted on trunk.

This patch excludes all conflicting cases.

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

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

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

* subversion/libsvn_auth_gnome_keyring/gnome_keyring.c

* subversion/libsvn_client/add.c

* subversion/libsvn_client/cat.c

* subversion/libsvn_client/changelist.c

* subversion/libsvn_client/cleanup.c

* subversion/libsvn_client/commit.c

* subversion/libsvn_client/commit_util.c

* subversion/libsvn_client/copy.c

* subversion/libsvn_client/copy_foreign.c

* subversion/libsvn_client/ctx.c

* subversion/libsvn_client/delete.c

* subversion/libsvn_client/deprecated.c

* subversion/libsvn_client/diff.c

* subversion/libsvn_client/diff_local.c

* subversion/libsvn_client/diff_summarize.c

* subversion/libsvn_client/export.c

* subversion/libsvn_client/externals.c

* subversion/libsvn_client/import.c

* subversion/libsvn_client/info.c

* subversion/libsvn_client/iprops.c

* subversion/libsvn_client/list.c

* subversion/libsvn_client/locking_commands.c

* subversion/libsvn_client/log.c

* subversion/libsvn_client/merge.c

* subversion/libsvn_client/mergeinfo.c

* subversion/libsvn_client/patch.c

* subversion/libsvn_client/prop_commands.c

* subversion/libsvn_client/ra.c

* subversion/libsvn_client/repos_diff.c

* subversion/libsvn_client/resolved.c

* subversion/libsvn_client/revert.c

* subversion/libsvn_client/switch.c

* subversion/libsvn_client/update.c

* subversion/libsvn_client/util.c

* subversion/libsvn_delta/compat.c

* subversion/libsvn_delta/xdelta.c

* subversion/libsvn_diff/parse-diff.c

* subversion/libsvn_diff/util.c

* subversion/libsvn_fs/access.c

* subversion/libsvn_fs_base/bdb/changes-table.c

* subversion/libsvn_fs_base/bdb/env.c

* subversion/libsvn_fs_base/dag.c

* subversion/libsvn_fs_base/fs.c

* subversion/libsvn_fs_base/lock.c

* subversion/libsvn_fs_base/revs-txns.c

* subversion/libsvn_fs_base/tree.c

* subversion/libsvn_fs_fs/caching.c

* subversion/libsvn_fs_fs/lock.c

* subversion/libsvn_fs_fs/temp_serializer.c

* subversion/libsvn_fs_fs/tree.c

* subversion/libsvn_ra/compat.c

* subversion/libsvn_ra/deprecated.c

* subversion/libsvn_ra/ra_loader.c

* subversion/libsvn_ra_local/ra_plugin.c

* subversion/libsvn_ra_serf/blame.c

* subversion/libsvn_ra_serf/blncache.c

* subversion/libsvn_ra_serf/commit.c

* subversion/libsvn_ra_serf/getlocations.c

* subversion/libsvn_ra_serf/getlocationsegments.c

* subversion/libsvn_ra_serf/getlocks.c

* subversion/libsvn_ra_serf/inherited_props.c

* subversion/libsvn_ra_serf/log.c

* subversion/libsvn_ra_serf/merge.c

* subversion/libsvn_ra_serf/mergeinfo.c

* subversion/libsvn_ra_serf/options.c

* subversion/libsvn_ra_serf/property.c

* subversion/libsvn_ra_serf/replay.c

* subversion/libsvn_ra_serf/serf.c

* subversion/libsvn_ra_serf/update.c

* subversion/libsvn_ra_serf/util.c

* subversion/libsvn_ra_serf/xml.c

* subversion/libsvn_ra_svn/client.c

* subversion/libsvn_ra_svn/editorp.c

* subversion/libsvn_ra_svn/marshal.c

* subversion/libsvn_repos/authz.c

* subversion/libsvn_repos/commit.c

* subversion/libsvn_repos/delta.c

* subversion/libsvn_repos/deprecated.c

* subversion/libsvn_repos/fs-wrap.c

* subversion/libsvn_repos/hooks.c

* subversion/libsvn_repos/log.c

* subversion/libsvn_repos/replay.c

* subversion/libsvn_repos/reporter.c

* subversion/libsvn_repos/repos.c

* subversion/libsvn_repos/rev_hunt.c

* subversion/libsvn_subr/auth.c

* subversion/libsvn_subr/cmdline.c

* subversion/libsvn_subr/compat.c

* subversion/libsvn_subr/config.c

* subversion/libsvn_subr/config_auth.c

* subversion/libsvn_subr/deprecated.c

* subversion/libsvn_subr/dso.c

* subversion/libsvn_subr/hash.c

* subversion/libsvn_subr/io.c

* subversion/libsvn_subr/mergeinfo.c

* subversion/libsvn_subr/opt.c

* subversion/libsvn_subr/properties.c

* subversion/libsvn_subr/simple_providers.c

* subversion/libsvn_subr/sorts.c

* subversion/libsvn_subr/ssl_client_cert_providers.c

* subversion/libsvn_subr/ssl_client_cert_pw_providers.c

* subversion/libsvn_subr/ssl_server_trust_providers.c

* subversion/libsvn_subr/subst.c

* subversion/libsvn_subr/types.c

* subversion/libsvn_subr/username_providers.c

* subversion/libsvn_subr/utf.c

* subversion/libsvn_subr/win32_crypto.c

* subversion/libsvn_wc/adm_crawler.c

* subversion/libsvn_wc/adm_files.c

* subversion/libsvn_wc/conflicts.c

* subversion/libsvn_wc/copy.c

* subversion/libsvn_wc/deprecated.c

* subversion/libsvn_wc/diff_editor.c

* subversion/libsvn_wc/diff_local.c

* subversion/libsvn_wc/entries.c

* subversion/libsvn_wc/externals.c

* subversion/libsvn_wc/info.c

* subversion/libsvn_wc/lock.c

* subversion/libsvn_wc/node.c

* subversion/libsvn_wc/old-and-busted.c

* subversion/libsvn_wc/props.c

* subversion/libsvn_wc/revert.c

* subversion/libsvn_wc/status.c

* subversion/libsvn_wc/update_editor.c

* subversion/libsvn_wc/upgrade.c

* subversion/libsvn_wc/wc_db_update_move.c

* subversion/libsvn_wc/wc_db_wcroot.c

* subversion/mod_dav_svn/repos.c

* subversion/mod_dav_svn/version.c

* subversion/svn/cl-conflicts.c

* subversion/svn/commit-cmd.c

* subversion/svn/conflict-callbacks.c

* subversion/svn/diff-cmd.c

* subversion/svn/help-cmd.c

* subversion/svn/notify.c

* subversion/svn/propedit-cmd.c

* subversion/svn/propget-cmd.c

* subversion/svn/props.c

* subversion/svn/status-cmd.c

* subversion/svn/status.c

* subversion/svn/svn.c

* subversion/svn/util.c

* subversion/svnadmin/svnadmin.c

* subversion/svnlook/svnlook.c

* subversion/svnrdump/dump_editor.c

* subversion/svnrdump/svnrdump.c

* subversion/svnrdump/util.c

* subversion/svnserve/serve.c

* subversion/svnsync/svnsync.c

* subversion/svnsync/sync.c

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

* subversion/tests/libsvn_repos/repos-test.c

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

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

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

* subversion/tests/libsvn_wc/conflict-data-test.c

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

* subversion/tests/libsvn_wc/wc-test.c

* subversion/tests/svn_test_fs.c

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

Move the svn_string_private.h include back to the original location.

  1. … 162 more files in changeset.
Make the C tests work with the --enable-optimize configure option.

Because the main() function used to be defined in libsvn_test,

the -flto option (which performs rather aggressive link-time

optimizations) would cause the linker to remove all "unreferenced"

static functions ... which includes all the actual tests.

Which this change, main() is now defined in each test driver.

* subversion/tests/svn_test.h

(test_funcs, svn_test_max_threads): Remove external declarations.

(svn_test_main): New prototype for the (existing-but-renamed) test driver.

(SVN_TEST_MAIN): Bolierplate macro that generates a main() implementation.

* subversion/tests/svn_test_main.c

(svn_test_main): Renamed from 'main', and takes two extra parameters,

'max_threads' and 'test_funcs'. Propagates test_funcs to get_array_size,

do_test_num and do_tests_concurrently.

(get_array_size, do_test_num,

test_params_t, test_thread, do_tests_concurrently): Require a test_funcs

parameter. All uses updated.

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

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

subversion/tests/libsvn_delta/random-test.c,

subversion/tests/libsvn_delta/window-test.c,

subversion/tests/libsvn_diff/diff-diff3-test.c,

subversion/tests/libsvn_diff/parse-diff-test.c,

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

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

subversion/tests/libsvn_fs_base/

subversion/tests/libsvn_fs_base/changes-test.c,

subversion/tests/libsvn_fs_base/fs-base-test.c,

subversion/tests/libsvn_fs_base/strings-reps-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_ra_local/ra-local-test.c,

subversion/tests/libsvn_repos/repos-test.c,

subversion/tests/libsvn_subr/auth-test.c,

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

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

subversion/tests/libsvn_subr/compat-test.c,

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

subversion/tests/libsvn_subr/crypto-test.c,

subversion/tests/libsvn_subr/dirent_uri-test.c,

subversion/tests/libsvn_subr/error-code-test.c,

subversion/tests/libsvn_subr/error-test.c,

subversion/tests/libsvn_subr/hashdump-test.c,

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

subversion/tests/libsvn_subr/mergeinfo-test.c,

subversion/tests/libsvn_subr/named_atomic-test.c,

subversion/tests/libsvn_subr/opt-test.c,

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

subversion/tests/libsvn_subr/path-test.c,

subversion/tests/libsvn_subr/prefix-string-test.c,

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

subversion/tests/libsvn_subr/revision-test.c,

subversion/tests/libsvn_subr/root-pools-test.c,

subversion/tests/libsvn_subr/skel-test.c,

subversion/tests/libsvn_subr/spillbuf-test.c,

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

subversion/tests/libsvn_subr/stream-test.c,

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

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

subversion/tests/libsvn_subr/time-test.c,

subversion/tests/libsvn_subr/translate-test.c,

subversion/tests/libsvn_subr/utf-test.c,

subversion/tests/libsvn_wc/conflict-data-test.c,

subversion/tests/libsvn_wc/db-test.c,

subversion/tests/libsvn_wc/entries-compat.c,

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

subversion/tests/libsvn_wc/pristine-store-test.c,

subversion/tests/libsvn_wc/wc-queries-test.c,

subversion/tests/libsvn_wc/wc-test.c:

(max_threads): Renamed from svn_test_max_threads and made static.

(test_funcs): Made static.

(SVN_TEST_MAIN): Expanded boilerplate main() function.

  1. … 54 more files in changeset.
Add "--parallel" option to our C tests.

Besides shaving off a few seconds off our total test execution time,

parallel execution also stresses our code and the tests themselves

harder. It uncovers things like improperly separated working sets

that make post-failure analysis harder.

Parallel mode is only available with APR 1.3+ and threads enabled.

The option will simply be ignored in other configurations. Further

limitations are cleanups being delayed to after all tests completed

and segfaults not being intercepted.

Some tests can't be executed in parallel. Therefore, we introduce

svn_test_max_threads a simple upper limit to the number of threads

supported that each test must define alongside the test_funcs array.

This patch sets it to "1" in many cases because the tests are so

small that multi-threaded execution is simply not worth it.

* build/run_tests.py

(TestHarness._run_c_test): Pass --parallel option to the individual

test applications.

* subversion/tests/svn_test.h

(svn_test_max_threads): Declare new external setting to be set by

every test application.

* subversion/tests/svn_test_main.c

(parallel): New command line option presence flag.

(parallel_opt,

cl_options): Declare the new "--parallel" option.

(svn_test_add_dir_cleanup): Synchronize shared pool access since

this might be called from multiple

threads at the same time.

(log_results): Result logger function factored out from do_test_num

to be shared between serialized and parallel test

execution code.

(do_test_num): Use that new function.

(test_params_t,

test_thread,

do_tests_concurrently): Threads, their parameter and the thread

starter for thread-pooled test execution.

(main): Handle the new option.

Call concurrent execution when in PARALLEL mode.

* subversion/tests/libsvn_delta/random-test.c

subversion/tests/libsvn_subr/named_atomic-test.c

(svn_test_max_threads): These tests don't support concurrent execution.

* subversion/tests/libsvn_delta/random-test.c

subversion/tests/libsvn_delta/window-test.c

subversion/tests/libsvn_diff/parse-diff-test.c

subversion/tests/libsvn_ra_local/ra-local-test.c

subversion/tests/libsvn_ra/ra-test.c

subversion/tests/libsvn_subr/auth-test.c

subversion/tests/libsvn_subr/cache-test.c

subversion/tests/libsvn_subr/checksum-test.c

subversion/tests/libsvn_subr/compat-test.c

subversion/tests/libsvn_subr/config-test.c

subversion/tests/libsvn_subr/crypto-test.c

subversion/tests/libsvn_subr/dirent_uri-test.c

subversion/tests/libsvn_subr/error-code-test.c

subversion/tests/libsvn_subr/error-test.c

subversion/tests/libsvn_subr/hashdump-test.c

subversion/tests/libsvn_subr/mergeinfo-test.c

subversion/tests/libsvn_subr/named_atomic-test.c

subversion/tests/libsvn_subr/opt-test.c

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

subversion/tests/libsvn_subr/path-test.c

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

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

subversion/tests/libsvn_subr/revision-test.c

subversion/tests/libsvn_subr/root-pools-test.c

subversion/tests/libsvn_subr/skel-test.c

subversion/tests/libsvn_subr/spillbuf-test.c

subversion/tests/libsvn_subr/sqlite-test.c

subversion/tests/libsvn_subr/stream-test.c

subversion/tests/libsvn_subr/string-test.c

subversion/tests/libsvn_subr/subst_translate-test.c

subversion/tests/libsvn_subr/time-test.c

subversion/tests/libsvn_subr/utf-test.c

subversion/tests/libsvn_wc/conflict-data-test.c

subversion/tests/libsvn_wc/wc-queries-test.c:

(svn_test_max_threads): These are too small to benefit from multi-threading.

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

subversion/tests/libsvn_diff/diff-diff3-test.c

subversion/tests/libsvn_fs_base/changes-test.c

subversion/tests/libsvn_fs_base/fs-base-test.c

subversion/tests/libsvn_fs_base/strings-reps-test.c

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

subversion/tests/libsvn_fs/fs-test.c

subversion/tests/libsvn_fs/locks-test.c

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

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

subversion/tests/libsvn_repos/repos-test.c

subversion/tests/libsvn_subr/io-test.c

subversion/tests/libsvn_subr/translate-test.c

subversion/tests/libsvn_wc/db-test.c

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

subversion/tests/libsvn_wc/wc-test.c

(svn_test_max_threads): Set concurrency limit to whatever various test

runs suggested as the most efficient value.

* subversion/tests/libsvn_wc/entries-compat.c

subversion/tests/libsvn_wc/pristine-store-test.c

(svn_test_max_threads): Set concurrency limit to "unbounded".

  1. … 54 more files in changeset.
Fix the #include order such that svn_private_config.h is always

included first before any other svn header - if we also include

svn_hash.h.

* subversion/bindings/javahl/native/org_apache_subversion_javahl_ConfigImpl_Category.cpp,

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

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

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

subversion/libsvn_auth_gnome_keyring/gnome_keyring.c,

subversion/libsvn_client/add.c,

subversion/libsvn_client/cat.c,

subversion/libsvn_client/changelist.c,

subversion/libsvn_client/cleanup.c,

subversion/libsvn_client/commit.c,

subversion/libsvn_client/commit_util.c,

subversion/libsvn_client/copy.c,

subversion/libsvn_client/copy_foreign.c,

subversion/libsvn_client/ctx.c,

subversion/libsvn_client/delete.c,

subversion/libsvn_client/deprecated.c,

subversion/libsvn_client/diff.c,

subversion/libsvn_client/diff_local.c,

subversion/libsvn_client/diff_summarize.c,

subversion/libsvn_client/export.c,

subversion/libsvn_client/externals.c,

subversion/libsvn_client/import.c,

subversion/libsvn_client/info.c,

subversion/libsvn_client/iprops.c,

subversion/libsvn_client/list.c,

subversion/libsvn_client/locking_commands.c,

subversion/libsvn_client/log.c,

subversion/libsvn_client/merge.c,

subversion/libsvn_client/mergeinfo.c,

subversion/libsvn_client/patch.c,

subversion/libsvn_client/prop_commands.c,

subversion/libsvn_client/ra.c,

subversion/libsvn_client/repos_diff.c,

subversion/libsvn_client/resolved.c,

subversion/libsvn_client/revert.c,

subversion/libsvn_client/status.c,

subversion/libsvn_client/switch.c,

subversion/libsvn_client/update.c,

subversion/libsvn_client/util.c,

subversion/libsvn_delta/compat.c,

subversion/libsvn_delta/xdelta.c,

subversion/libsvn_diff/parse-diff.c,

subversion/libsvn_diff/util.c,

subversion/libsvn_fs/access.c,

subversion/libsvn_fs_base/bdb/changes-table.c,

subversion/libsvn_fs_base/bdb/env.c,

subversion/libsvn_fs_base/dag.c,

subversion/libsvn_fs_base/fs.c,

subversion/libsvn_fs_base/lock.c,

subversion/libsvn_fs_base/revs-txns.c,

subversion/libsvn_fs_base/tree.c,

subversion/libsvn_fs_fs/caching.c,

subversion/libsvn_fs_fs/fs_fs.c,

subversion/libsvn_fs/fs-loader.c,

subversion/libsvn_fs_fs/lock.c,

subversion/libsvn_fs_fs/temp_serializer.c,

subversion/libsvn_fs_fs/tree.c,

subversion/libsvn_fs_util/fs-util.c,

subversion/libsvn_ra/compat.c,

subversion/libsvn_ra/deprecated.c,

subversion/libsvn_ra_local/ra_plugin.c,

subversion/libsvn_ra/ra_loader.c,

subversion/libsvn_ra_serf/blame.c,

subversion/libsvn_ra_serf/blncache.c,

subversion/libsvn_ra_serf/commit.c,

subversion/libsvn_ra_serf/getlocations.c,

subversion/libsvn_ra_serf/getlocationsegments.c,

subversion/libsvn_ra_serf/getlocks.c,

subversion/libsvn_ra_serf/inherited_props.c,

subversion/libsvn_ra_serf/log.c,

subversion/libsvn_ra_serf/merge.c,

subversion/libsvn_ra_serf/mergeinfo.c,

subversion/libsvn_ra_serf/options.c,

subversion/libsvn_ra_serf/property.c,

subversion/libsvn_ra_serf/replay.c,

subversion/libsvn_ra_serf/serf.c,

subversion/libsvn_ra_serf/update.c,

subversion/libsvn_ra_serf/util.c,

subversion/libsvn_ra_serf/xml.c,

subversion/libsvn_ra_svn/client.c,

subversion/libsvn_ra_svn/editorp.c,

subversion/libsvn_ra_svn/marshal.c,

subversion/libsvn_repos/authz.c,

subversion/libsvn_repos/commit.c,

subversion/libsvn_repos/delta.c,

subversion/libsvn_repos/deprecated.c,

subversion/libsvn_repos/fs-wrap.c,

subversion/libsvn_repos/hooks.c,

subversion/libsvn_repos/log.c,

subversion/libsvn_repos/replay.c,

subversion/libsvn_repos/reporter.c,

subversion/libsvn_repos/repos.c,

subversion/libsvn_repos/rev_hunt.c,

subversion/libsvn_subr/auth.c,

subversion/libsvn_subr/cmdline.c,

subversion/libsvn_subr/compat.c,

subversion/libsvn_subr/config_auth.c,

subversion/libsvn_subr/config.c,

subversion/libsvn_subr/deprecated.c,

subversion/libsvn_subr/dso.c,

subversion/libsvn_subr/hash.c,

subversion/libsvn_subr/io.c,

subversion/libsvn_subr/mergeinfo.c,

subversion/libsvn_subr/opt.c,

subversion/libsvn_subr/properties.c,

subversion/libsvn_subr/simple_providers.c,

subversion/libsvn_subr/sorts.c,

subversion/libsvn_subr/ssl_client_cert_providers.c,

subversion/libsvn_subr/ssl_client_cert_pw_providers.c,

subversion/libsvn_subr/ssl_server_trust_providers.c,

subversion/libsvn_subr/subst.c,

subversion/libsvn_subr/types.c,

subversion/libsvn_subr/username_providers.c,

subversion/libsvn_subr/utf.c,

subversion/libsvn_subr/win32_crypto.c,

subversion/libsvn_wc/adm_crawler.c,

subversion/libsvn_wc/adm_files.c,

subversion/libsvn_wc/adm_ops.c,

subversion/libsvn_wc/conflicts.c,

subversion/libsvn_wc/copy.c,

subversion/libsvn_wc/deprecated.c,

subversion/libsvn_wc/diff_editor.c,

subversion/libsvn_wc/diff_local.c,

subversion/libsvn_wc/entries.c,

subversion/libsvn_wc/externals.c,

subversion/libsvn_wc/info.c,

subversion/libsvn_wc/lock.c,

subversion/libsvn_wc/node.c,

subversion/libsvn_wc/old-and-busted.c,

subversion/libsvn_wc/props.c,

subversion/libsvn_wc/revert.c,

subversion/libsvn_wc/status.c,

subversion/libsvn_wc/translate.c,

subversion/libsvn_wc/update_editor.c,

subversion/libsvn_wc/upgrade.c,

subversion/libsvn_wc/wc_db.c,

subversion/libsvn_wc/wc_db_update_move.c,

subversion/libsvn_wc/wc_db_wcroot.c,

subversion/libsvn_wc/workqueue.c,

subversion/mod_dav_svn/activity.c,

subversion/mod_dav_svn/deadprops.c,

subversion/mod_dav_svn/lock.c,

subversion/mod_dav_svn/merge.c,

subversion/mod_dav_svn/mod_dav_svn.c,

subversion/mod_dav_svn/reports/update.c,

subversion/mod_dav_svn/repos.c,

subversion/mod_dav_svn/version.c,

subversion/svnadmin/svnadmin.c,

subversion/svnauth/svnauth.c,

subversion/svn/cl-conflicts.c,

subversion/svn/commit-cmd.c,

subversion/svn/conflict-callbacks.c,

subversion/svn/diff-cmd.c,

subversion/svn/help-cmd.c,

subversion/svnlook/svnlook.c,

subversion/svnmucc/svnmucc.c,

subversion/svn/notify.c,

subversion/svn/propedit-cmd.c,

subversion/svn/propget-cmd.c,

subversion/svn/props.c,

subversion/svnrdump/dump_editor.c,

subversion/svnrdump/svnrdump.c,

subversion/svnrdump/util.c,

subversion/svnserve/serve.c,

subversion/svn/status.c,

subversion/svn/status-cmd.c,

subversion/svn/svn.c,

subversion/svnsync/svnsync.c,

subversion/svnsync/sync.c,

subversion/svn/util.c,

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

subversion/tests/libsvn_repos/repos-test.c,

subversion/tests/libsvn_subr/hashdump-test.c,

subversion/tests/libsvn_subr/mergeinfo-test.c,

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

subversion/tests/libsvn_wc/conflict-data-test.c,

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

subversion/tests/libsvn_wc/wc-test.c,

subversion/tests/svn_test_fs.c,

tools/dev/fsfs-reorg.c,

tools/server-side/fsfs-stats.c): #include svn_private_config.h first

  1. … 180 more files in changeset.
Update svn_wc__add_tree_conflict() to svn_wc_conflict_description3_t.

No functional change yet, since tree conflicts are currently described in the

same way by svn_wc_conflict_description3_t and svn_wc_conflict_description2_t.

* subversion/include/private/svn_wc_private.h

(svn_wc__add_tree_conflict): Update declaration.

* subversion/libsvn_client/merge.c

(merge_dir_baton_t): Store tree conflicts as svn_wc_conflict_description3_t.

(record_tree_conflict, merge_file_opened,

merge_dir_opened): Use svn_wc_conflict_description3_t.

* subversion/libsvn_wc/tree_conflicts.c

(svn_wc__add_tree_conflict): Expect svn_wc_conflict_description3_t.

Fix whitespace formatting inconsistency while here.

* subversion/tests/libsvn_wc/conflict-data-test.c

(test_read_write_tree_conflicts): Update caller.

  1. … 3 more files in changeset.
Update svn_wc__get_tree_conflict() to svn_wc_conflict_description3_t.

No functional change yet, since tree conflicts are currently described in the

same way by svn_wc_conflict_description3_t and svn_wc_conflict_description2_t.

* subversion/include/private/svn_wc_private.h

(svn_wc__get_tree_conflict): Update declaration.

* subversion/libsvn_wc/deprecated.c

(svn_wc__status2_from_3): Update caller.

* subversion/libsvn_wc/tree_conflicts.c

(svn_wc__get_tree_conflict): Return svn_wc_conflict_description3_t.

* subversion/svn/status.c

(print_status): Update caller.

* subversion/tests/libsvn_wc/conflict-data-test.c

(compare_conflict): Use svn_wc_conflict_description3_t for actual and

expected conflict data.

(tree_conflict_create): Return svn_wc_conflict_description3_t.

(test_read_write_tree_conflicts): Use svn_wc_conflict_description3_t.

  1. … 4 more files in changeset.
* subversion/tests/libsvn_wc/conflict-data-test.c

(test_deserialize_tree_conflict): Use svn_wc_conflict_description3_t for

expected tree conflict test data.

Make svn_wc__serialize_conflict() and svn_wc__deserialize_conflict() use the

new conflict description structure (svn_wc_conflict_description3_t).

* subversion/libsvn_wc/entries.c

(read_one_entry): Remove now unneeded conversion to old conflict description.

(write_entry): Pass new conflict description svn_wc__deserialize_conflict().

* subversion/libsvn_wc/tree_conflicts.c

(svn_wc__deserialize_conflict, svn_wc__serialize_conflict): Use new conflict

description. As far as tree conflicts are concerned, both descriptions are

still equivalent so this is not a functional change yet.

* subversion/libsvn_wc/tree_conflicts.h

(svn_wc__deserialize_conflict, svn_wc__serialize_conflict): Update docstrings

and declarations.

* subversion/libsvn_wc/upgrade.c

(read_tree_conflicts, migrate_single_tree_conflict_data,

svn_wc__upgrade_conflict_skel_from_raw): Update callers.

* subversion/tests/libsvn_wc/conflict-data-test.c

(tree_conflict_data, test_deserialize_tree_conflict,

test_serialize_tree_conflict_data): Update callers.

  1. … 4 more files in changeset.
* subversion/tests/libsvn_wc/conflict-data-test.c

(test_prop_conflicts): Allocate correct size.

Add a test for correct retrieval of property conflict descriptions. This

catches the node-kind bug that was fixed in r1477876.

* subversion/tests/libsvn_wc/conflict-data-test.c

(compare_file_content,

compare_prop_conflict,

test_prop_conflict_baton_t,

create_prop_conflict_skel,

prop_conflict_cb): New

(test_prop_conflicts): New test.

(test_funcs): Run it.

Tidy some test code, prior to extending it.

* subversion/tests/libsvn_wc/conflict-data-test.c

(ASSERT_INT_EQ, ASSERT_STR_EQ): New macros; the first one gives much more

useful debug output when it fails than a simple assert(a == b) does.

(compare_version, compare_conflict): Swap the 'actual' and 'expected'

arguments to match the way SVN_TEST_STRING_ASSERT has them ('actual'

first), so that error messages from SVN_TEST_STRING_ASSERT make sense.

Use the new macros.

(test_read_write_tree_conflicts): Adjust callers.

Following up on r1443451, make the path stored for local-moved-away tree

conflicts no longer required for conflicts raised by merge operations.

(In other words: only required for update and switch.)

Merge doesn't have the power to look in the deeper layers of WC-NG,

nor do we intend to expose them to libsvn_client.

* subversion/include/private/svn_wc_private.h

(svn_wc__add_tree_conflict): Update comment. Remove argument.

* subversion/libsvn_client/merge.c

(record_tree_conflict): Update caller.

* subversion/libsvn_wc/conflicts.c

(svn_wc__conflict_skel_add_tree_conflict): Only store moved away

path when provided and valid for this state.

(svn_wc__conflict_read_tree_conflict): Allow reading just the path,

and handle move conflicts without path

* subversion/libsvn_wc/tree_conflicts.c

(svn_wc__add_tree_conflict): Verify requirements for new in 1.8 values.

Always pass NULL for path to svn_wc__conflict_skel_add_tree_conflict.

* subversion/tests/libsvn_wc/conflict-data-test.c

(test_read_write_tree_conflicts): Update caller.

* tools/dev/svnraisetreeconflict/svnraisetreeconflict.c

(raise_tree_conflict): Update caller.

  1. … 5 more files in changeset.
Allow move-update to handle replaced nodes. This change adds a path

to the moved-away conflict stored in ACTUAL_NODE and paves the way

for handling multiple moved-to at one local_relpath.

* subversion/libsvn_wc/conflicts.h

* subversion/libsvn_wc/conflicts.c

(svn_wc__conflict_skel_add_tree_conflict): Add path parameter.

(svn_wc__conflict_read_tree_conflict): Add path parameter.

* subversion/include/private/svn_wc_private.h

* subversion/libsvn_wc/tree_conflicts.c

(svn_wc__add_tree_conflict): Add path parameter.

* subversion/libsvn_wc/wc_db.h

(svn_wc__db_base_moved_to): New.

* subversion/libsvn_wc/wc_db_private.h

(svn_wc__db_op_depth_moved_to): New.

* subversion/libsvn_wc/wc_db.c

(svn_wc__db_op_depth_moved_to, svn_wc__db_base_moved_to): New.

* subversion/libsvn_wc/update_editor.c

(check_tree_conflict): Raise a moved-away conflict for replaces that

overlay a move, store the new path in the conflict.

(delete_entry, add_directory, open_directory, add_file, open_file,

change_file_prop): Pass NULL.

* subversion/libsvn_wc/wc_db_update_move.c

(mark_tree_conflict, get_tc_info): Add path parameter.

(check_tree_conflict): Use new functions.

(tc_editor_add_directory, tc_editor_add_file, tc_editor_delete): Pass NULL.

(update_moved_away_conflict_victim): Add path parameter, use new function.

* subversion/libsvn_wc/wc-queries.sql

(STMT_SELECT_LOWEST_WORKING_NODE): Select moved-to.

* subversion/libsvn_wc/upgrade.c

(svn_wc__upgrade_conflict_skel_from_raw): Pass NULL.

* subversion/libsvn_client/merge.c

(tree_conflict): Add path parameter.

(tree_conflict_on_add): Adjust call.

(check_moved_away): Replace boolean parameter with path.

(merge_file_changed, merge_file_deleted, merge_dir_opened,

merge_dir_props_changed, merge_dir_deleted): Use path instead of boolean.

* tools/dev/svnraisetreeconflict/svnraisetreeconflict.c

(raise_tree_conflict): Pass NULL.

* subversion/tests/libsvn_wc/conflict-data-test.c

(test_read_write_tree_conflicts): Pass NULL.

(test_serialize_tree_conflict): Pass and retrieve new path.

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

(layered_moved_to): New XFail test.

(test_funcs): Mark move_replace as PASS, add new test.

  1. … 14 more files in changeset.
Since file moves now start introducing 'update induced' conflicts on WORKING

nodes the assumption that the location can be read from BASE is no longer

valid. So start recording the full repository location in the conflict skel.

This avoid something the update_move handling calls the 'scan dance'.

* subversion/libsvn_wc/conflicts.c

(svn_wc__conflict_skel_set_op_update,

svn_wc__conflict_skel_set_op_switch): Store additional location.

(setup_tree_conflict_desc): Assume the location is there, or a legacy (1.7)

conflict.

* subversion/libsvn_wc/conflicts.h

(svn_wc__conflict_skel_set_op_update,

svn_wc__conflict_skel_set_op_switch): Add argument.

* subversion/libsvn_wc/update_editor.c

(complete_conflict): Receive target location info.

(delete_entry,

add_directory,

open_directory,

close_directory,

add_file,

open_file): Update caller.

* subversion/libsvn_wc/upgrade.c

(svn_wc__upgrade_conflict_skel_from_raw): Update caller.

* subversion/libsvn_wc/wc_db_update_move.c

(check_tree_conflict,

mark_unversioned_add_conflict,

create_conflict_markers): Update caller.

(get_tc_info): Remove the scan dance.

* subversion/tests/libsvn_wc/conflict-data-test.c

(test_serialize_prop_conflict,

test_serialize_tree_conflict): Update caller.

  1. … 5 more files in changeset.
Teach some WC and client 'add' functions to take the properties as a

parameter so that the whole addition including any properties can be done

all at once. This makes 'svn add' into a single DB operation per node and

makes the APIs ready for similar usage by code such as merge and patch.

* subversion/libsvn_client/add.c

(add_file): Simplify greatly by passing the props to svn_wc_add_from_disk()

instead of adding them one by one afterwards and trying to revert the

add if that fails. Delegate sending the notification too.

(add_dir_recursive, add): Track the API changes.

* subversion/libsvn_client/patch.c

(create_missing_parents,

install_patched_target,

install_patched_prop_targets): Track the API changes.

* subversion/include/svn_wc.h

(svn_wc_add_from_disk2): New revision of svn_wc_add_from_disk(), taking a

'props' parameter.

(svn_wc_add_from_disk): Deprecate.

* subversion/libsvn_wc/adm_ops.c

(add_from_disk): Take a 'props' parameter, pass them on, and install and

run a work queue item if necessary to set the on-disk executable and

read-only bits.

(svn_wc_add4): Track the API changes.

(svn_wc_add_from_disk2): Rename from 'svn_wc_add_from_disk'. Take a new

'props' parameter, check and canonicalize the props, and pass them on.

Adjust the notification to include the value of any mime-type property,

as that is what libsvn_client used to do.

* subversion/libsvn_wc/deprecated.c

(svn_wc_add_from_disk): New function, wrapping svn_wc_add_from_disk2().

* subversion/libsvn_wc/props.h

(svn_wc__canonicalize_props): New function.

* subversion/libsvn_wc/props.c

(ensure_prop_is_regular_kind, svn_wc__canonicalize_props): New functions.

* subversion/libsvn_wc/wc_db.h,

subversion/libsvn_wc/wc_db.c

(svn_wc__db_op_add_directory,

svn_wc__db_op_add_file,

svn_wc__db_op_add_symlink): Take a 'props' parameter and pass it on.

* subversion/tests/libsvn_wc/conflict-data-test.c

(test_read_write_tree_conflicts): Track the API changes.

* subversion/tests/libsvn_wc/utils.c

(sbox_wc_add): Track the API changes.

  1. … 10 more files in changeset.
Fix a number of deprecated function calls. They all require only simple

parameter adaptations.

* subversion/libsvn_ra/compat.c

(svn_ra__get_inherited_props_walk): call svn_property_kind2

instead of svn_property_kind

* subversion/libsvn_subr/path.c

(svn_path_url_add_component2): call internal, non-deprecated function

* subversion/libsvn_wc/tree_conflicts.c

(read_node_version_info): call svn_wc_conflict_version_create2 instead

of svn_wc_conflict_version_create

* subversion/tests/libsvn_wc/conflict-data-test.c

(tree_conflict_create): ditto

* tools/dev/svnraisetreeconflict/main.c

(raise_tree_conflict): ditto

* subversion/svnrdump/svnrdump.c

(init_client_context): call svn_client_create_context2 instead of

svn_client_create_context

* subversion/tests/libsvn_wc/utils.c

(create_repos_and_wc): ditto

* tools/client-side/svn-bench/main.c

(sub_main): ditto

  1. … 7 more files in changeset.
* everywhere: Add missing SVN_ERR() wraps.

(This is a semiautomated commit: I added 'warn_unused_result' attributes,

compiled, then used a macro to add the SVN_ERR() wraps.)

  1. … 12 more files in changeset.