Merge (lightweight) branch tc-merge-notify to trunk.
Implement per-victim tree-conflicts notification during merge. Use newly implemented notification style in merge operations (as done for update/switch recently).
Do not show `Skipped' messages within newly tree-conflicted directories. Pass a boolean SKIP down the item batons and completely skip *all* action in the editor if SKIP is TRUE (i.e. don't even call diff callbacks). Since the diff callbacks don't have an item baton to fill, I solved it by skipping child nodes already in the general editor that calls the diff callbacks. But it would probably do this code good to move to a standard editor implementation altogether, like `update/switch' does it.
* subversion/include/svn_wc.h (svn_wc_diff_callbacks3_t): Add a svn_boolean_t *TREE_CONFLICTED argument to all of the callbacks functions, which returns whether the callback wants this node to be notified as tree-conflicted. Returning TRUE in *TREE_CONFLICTED makes a repos diff (and consequently a merge) skip any child nodes.
* subversion/libsvn_wc/diff.c (file_diff, directory_elements_diff, report_wc_file_as_added, report_wc_directory_as_added, delete_entry, close_directory, close_file): Pass NULL for new *TREE_CONFLICTED parameter upon calling the svn_wc_diff_callbacks3_t callback functions. Currently, handling tree-conflicts notifications here is not needed, since there is no code using it. Note that this variant of diff will also not skip child nodes of a tree-conflicted item for the same reason.
* subversion/libsvn_client/repos_diff.c (dir_baton, file_baton): Add two booleans TREE_CONFLICTED and SKIPPED. (make_dir_baton, make_file_baton): Default TREE_CONFLICTED to FALSE. Default SKIPPED to FALSE. (delete_entry, add_directory, open_directory, close_file, close_directory): Pass the tree-conflict state through to the notify_func, and change some of the logic around the notify action to not show tree-conflicts as skipped paths. (delete_entry, add_directory, open_directory, add_file, open_file): Skip *all* action if the parent node is SKIPped or TREE_CONFLICTED. Propagate the SKIP flag to child batons where necessary. (window_handler, apply_textdelta, close_file, close_directory, change_file_prop, change_dir_prop): Skip *all* action if this node's SKIP flag is TRUE. (kind_action_state_t): Add a boolean TREE_CONFLICTED field (breaking the name kind_action_state_t which says "it has a kind, an action and a state") used for notification of deleted nodes. (absent_directory, absent_file): Add a question comment.
* subversion/libsvn_client/merge.c (merge_props_changed, merge_file_changed, merge_file_added, merge_file_deleted, merge_dir_added, merge_dir_deleted, merge_dir_opened, merge_dir_closed, single_file_merge_notify, do_file_merge): Apply addition of new callbacks argument called *TREE_CONFLICTED and use it. (merge_cmd_baton_t): Remove obsoleted field TREE_CONFLICTED_DIRS which used to list all dirs that contain tree-conflicts. (add_parent_to_tree_conflicted_dirs, is_tree_conflicted_dir_p): Remove obsoleted functions related to TREE_CONFLICTED_DIRS. (do_merge, tree_conflict): Remove use of TREE_CONFLICTED_DIRS.
* subversion/libsvn_client/diff.c (diff_props_changed, diff_file_changed, diff_file_added, diff_file_deleted_with_diff, diff_file_deleted_no_diff, diff_dir_added, diff_dir_deleted, diff_dir_opened, diff_dir_closed): Apply addition of callbacks parameter *TREE_CONFLICTED and ignore it. These are the callbacks for a plain diff, they don't cause tree-conflicts by definition.
* subversion/tests/cmdline/merge_tests.py (delete_file_and_dir, merge_catches_nonexistent_target, merge_tree_deleted_in_target, merge_added_dir_to_deleted_in_target, three_way_merge_add_of_existing_binary_file, del_differing_file, tree_conflicts_and_obstructions, tree_conflicts_on_merge_local_ci_4_1, tree_conflicts_on_merge_local_ci_4_2, tree_conflicts_on_merge_local_ci_5_1, tree_conflicts_on_merge_local_ci_5_2, tree_conflicts_on_merge_local_ci_6, tree_conflicts_on_merge_no_local_ci_4_1, tree_conflicts_on_merge_no_local_ci_4_2, tree_conflicts_on_merge_no_local_ci_5_1, tree_conflicts_on_merge_no_local_ci_5_2, tree_conflicts_on_merge_no_local_ci_6): Fix up some tests. Intentionally leaving some merge tests unfixed for now. Their common problem shall be fixed on trunk, since update/switch/checkout are also affected.
Update/switch output is improved: tree conflict notifications now appear in their own column.
Merge uses a different set of callbacks, which we haven't touched yet, but calls the same notify() function. To be fixed separately.
The detection of existing tree conflicts and the skipping of all updates while inside a conflicted tree are only partly done. Also, several callbacks include more-or-less duplicate error handling for obstructions and missing/absent items, which ought to be handled by check_tree_conflict().
* subversion/svn/notify.c (notify): Print 'C' in the new fourth column for a tree conflict victim. Don't print 'C' in the first column for the victim's parent. Adjust summary code to count tree conflicts directly.
* subversion/include/svn_wc.h (svn_wc_notify_t): Rename is_tree_conflict_victim to tree_conflicted. Remove tree_conflict_action and tree_conflict_reason fields. (svn_wc_conflicted_p2): New args: adm_access instead of entry; path instead of parent path. Rewrite comment.
* subversion/libsvn_wc/util.c (svn_wc_create_notify): Track changes to svn_wc_notify_t.
* subversion/libsvn_wc/questions.c (svn_wc_conflicted_p2): Allow any result pointer to be NULL. Use parent's adm_access instead of requiring an entry for the target item. Expect path arg to include target's name. (svn_wc_conflicted_p): Rewrite using snippets of its successor.
* subversion/libsvn_wc/update_editor.c (check_tree_conflict): Avoid a false tree conflict when checking out a file external. (do_entry_deletion, add_directory, close_directory, add_file, close_file): If check_tree_conflict() says we're in a freshly discovered tree conflict, skip any updates to the victim. Include tree conflict status in user notifications. (open_directory, open_file): Store tree conflict status in baton for user notification later. (dir_baton, file_baton): Add boolean field tree_conflicted. (make_dir_baton, make_file_baton): Initialize the new field. (tree_has_local_mods): Note in comment that the target path does not have to exist.
* subversion/libsvn_client/commit_util.c (harvest_committables): Track changes to svn_wc_conflicted_p2.
* subversion/libsvn_client/externals.c (switch_file_external): Track changes to svn_wc_conflicted_p2. Also, we no longer have to resolve a bogus tree conflict on the new external's parent dir!
* subversion/libsvn_wc/adm_ops.c (resolve_conflict_on_entry): Track changes to svn_wc_conflicted_p2.
* subversion/libsvn_wc/status.c (assemble_status): Track changes to svn_wc_conflicted_p2.
* subversion/tests/cmdline/update_tests.py (update_delete_modified_files, prop_update_on_scheduled_delete, another_hudson_problem, tree_conflicts_on_update_1_1, tree_conflicts_on_update_1_2, tree_conflicts_on_update_2_1, tree_conflicts_on_update_2_2, tree_conflicts_on_update_3): Fix up to track current behavior.
* subversion/tests/cmdline/switch_tests.py (forced_switch_failures): Add expected status, disk, and output in place of an expected error message. Currently for subtest 3 only. (switch_with_obstructing_local_adds): Add a couple of tree conflicts to the expected status. (tree_conflicts_on_switch_1_1, tree_conflicts_on_switch_1_2, tree_conflicts_on_switch_2_1, tree_conflicts_on_switch_2_2, tree_conflicts_on_switch_3): Fix up to reflect the current state of the tree conflict detection code. (test_list): Remove XFail() from the tests mentioned above.