Make the working copy status reporter always report tree conflicts; even if the node with the tree conflict is shadowed by a file, somewhere up the tree.
Usually the status walker doesn't descend below files that used to be directories, but after this patch it will descend if there are tree conflicts below this file.
This fixes the ugly case that currently the tree conflict resolver doesn't even see these tree conflicts, unless it just created them. So it certainly wouldn't have resolved them properly.
* subversion/libsvn_wc/status.c (svn_wc__internal_status_t): New struct. (edit_baton): Update status type. (internal_status, assemble_status, assemble_unversioned): Produce svn_wc__internal_status_t instead of svn_wc_status3_t. (send_status_structure, send_unversioned_item): Update caller.,
(one_child_status): Update has descendants check. (hash_stash): Copy private values. (tweak_status_hash): Update init. (find_dir_repos_relpath): Update usage. (make_dir_baton): Update has descendants check. (is_sendable_status): Update type. (handle_statii): Update has descendants check. (close_directory): Update caller. (svn_wc__internal_walk_status): Update has descendants check. (internal_status): Update output type. (svn_wc_status3): Update caller. (svn_wc_dup_status3): Create svn_wc__internal_status_t, but duplicate only svn_wc_status3_t.
* subversion/libsvn_wc/wc-queries.sql (STMT_FIND_CONFLICT_DESCENDANT): New query.
* subversion/libsvn_wc/wc_db.c (find_conflict_descendants): New function. (read_children_info): Set has_descendants on a node if it is a directory in WORKING/ACTUAL or it was a directory at some layer, and has actual descendants. (read_single_info): Set has_descendants.
Fix another misreported reason in the update editor, and the resolver to handle this change without affecting features.
As part of this fix a few TODO's in the move-update conflict resolver code, by combining the group of functions that handled breaking moves, and creating moved_away conflicts to just two functions, that can handle the direct move and descendant cases alike, and with proper op-depth handling.
Combining the functions uncovered yet another op-depth bug where the break moves operation was applied to the wrong layer.
* subversion/libsvn_wc/conflicts.c (resolve_tree_conflict_on_node): Update caller. (conflict_status_walker_baton): Add boolean. (conflict_status_walker): Set value in baton if we resolved something. (svn_wc__resolve_conflicts): Continue as long as we resolved something in the previous batch. Handle depth filtering in second pass. Use the resolved_one boolean.
* subversion/libsvn_wc/update_editor.c (check_tree_conflict): Report local replacements as replacements, even when whatever was there was moved to make the conflict resolver pick the right strategy.
* subversion/libsvn_wc/wc-queries.sql (STMT_SELECT_MOVED_DESCENDANTS_SHD): Remove now unused query.
* subversion/libsvn_wc/wc_db_update_move.c (find_src_op_depth): Return a more generic error, as this function is used in more places than inside the conflict resolver. (get_tc_info): Remove function. (fetch_conflict_details): New function, partially based on get_tc_info. (svn_wc__db_op_raise_moved_away_internal): Update argument. Fetch true delete depth for created conflicts.
(svn_wc__db_resolve_delete_raise_moved_away): Rename to... (svn_wc__db_op_raise_moved_away): ... this. Use SVN_WC__DB_WITH_TXN4() to obtain everything inside a transaction. Mark conflict resolved before installing new tree conflicts.
(break_moved_away_children): Rename to... (break_moved_away): ... this and handle both cases in a single function. (svn_wc__db_resolve_break_moved_away): Rename to... (svn_wc__db_op_break_moved_away): ... this. Update caller. Use SVN_WC__DB_WITH_TXN4() to calculate values inside txn.
* subversion/tests/libsvn_wc/op-depth-test.c (FILE_EXTERNAL): New macro. (print_row): Handle a few more cases with C compatible output. (del4_update_edit_AAA, move4_update_delself_AAA): Update expected results.