Checkout Tools
  • last updated 5 hours ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Fix conflict resolver bug where local and incoming edits got swapped.

When auto-resolving an incoming file move vs local file edit tree

conflict after an update or switch operation, text conflicts were

created with the incoming changes (theirs) and local changes (mine)

swapped within text conflict markers. When such a text conflict was

then resolved with the --accept mf/mc/tf/tc options the result was

the opposite of what it should have been.

Reported by: Jonathan Guy

* subversion/libsvn_client/conflicts.c

(resolve_incoming_move_file_text_merge): After update/switch, run the

text merge in a way that makes local and incoming changes properly

land on their respective sides of a text conflict.

Add resolver support for moved-file vs moved-file upon update.

The resolver now supports move vs move tree conflicts for files after

an update operation.

Two new resolution operations are available:

(m) - override incoming move and merge incoming changes from 'alpha-moved'

to 'alpha-also-moved'

(M) - accept incoming move and merge local changes from 'alpha-also-moved'

to 'alpha-moved'

Where the file was originally called 'alpha', was renamed to 'alpha-moved'

in the repository, and renamed to 'alpha-also-moved' in the working copy.

Because the local move is broken during the update operation when the

delete-half of the move is updated, the resolver only has the copied half

move available in the working copy. To find the local move destination the

resolver queries the working copy database for nodes which are copies of

the conflict victim's repository path. This can of course lead to ambiguous

results in case a node is first copied and then moved, in which case the

resolver offers the user a choice of local move targets in the usual way.

* subversion/include/private/svn_wc_private.h

(svn_wc__find_copies_of_repos_path): Declare.

* subversion/libsvn_client/conflicts.c

(conflict_tree_update_local_moved_away_details): New conflict details struct.

(resolve_both_moved_file_update_keep_local_move,

resolve_both_moved_file_update_keep_incoming_move): New resolution handlers.

(conflict_tree_get_details_update_local_moved_away): New details fetcher

which locates copied nodes corresponding to the local move.

(get_both_moved_file_paths): New helper function.

(conflict_tree_get_description_update_both_moved_file_merge,

conflict_tree_get_description_update_both_moved_file_move_merge): New

functions which describe incoming move vs local move conflicts flagged

during updates of files.

(configure_option_both_moved_file_merge): Hook up the new options.

(svn_client_conflict_option_get_moved_to_abspath_candidates2,

svn_client_conflict_option_set_moved_to_abspath2,

conflict_type_specific_setup): Support the newly added conflict options.

* subversion/libsvn_wc/node.c

(svn_wc__find_copies_of_repos_path): New.

* subversion/libsvn_wc/wc-queries.sql

(STMT_SELECT_COPIES_OF_REPOS_RELPATH): New query which locates copies of a

particular repository relpath with a particular node kind in working copy.

* subversion/libsvn_wc/wc_db.c

(svn_wc__db_find_copies_of_repos_path): New wc_db API to execute above query.

* subversion/libsvn_wc/wc_db.h

(svn_wc__db_find_copies_of_repos_path): Declare.

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

(create_file_move_vs_file_move_update_conflict): New helper function.

(test_update_file_move_vs_file_move,

test_update_file_move_vs_file_move_accept_move, test_funcs): New tests

which exercise both of the newly added conflict resolution options.

  1. … 6 more files in changeset.
Only enable the 'incoming_move_file_merge' resolution option if the

local change is a file edit.

This resolution option was introduced in r1747727 and accidentally enabled

for any local change vs an incoming deletion. So while this resolution

handler only supports local edits, it was enabled even for other conflicts,

such as those involving locally moved-away files.

In that case Subversion was pretending to resolve the conflict when in fact

it did not resolve it. The resolution handler in libsvn_client internally

failed with a "path not found" error which was masked by 'svn resolve' (since

this error is sometimes legitimate) and the conflict marker was still in

place after Subversion proudly proclaimed:

"Applying recommended resolution 'Move and merge'"

Subversion now tells the truth instead:

"Subversion is not smart enough to resolve this tree conflict automatically!"

* subversion/libsvn_client/conflicts.c

(configure_option_incoming_move_file_merge): Only configure this option if

the local change is an 'edit'.

Remove a useless common ancestor search from the conflict resolver.

* subversion/libsvn_client/conflicts.c

(resolve_incoming_move_dir_merge): Stop searching a YCA and then using it

as the left-side of the merge source when merging into the move target.

Doing so is wrong because it could lead to dubious conflicts since we will

end up ignoring mergeinfo. Use the 'incoming old' path and revision as the

left-merge side instead, which is properly bound by merge-tracking done

during the merge which recorded the conflict.

Problem found by code inspection while working on r1851913.

Follow-up to r1851913:

* subversion/libsvn_client/conflicts.c

(resolve_both_moved_dir_merge): Fix docstring of this function.

Add two resolver options for 'dir move vs dir move upon merge' conflicts.

These new options work similar to their existing counterparts for files.

* subversion/include/svn_client.h

(svn_client_conflict_option_both_moved_dir_merge,

svn_client_conflict_option_both_moved_dir_move_merge): Declare.

* subversion/libsvn_client/conflicts.c

(resolve_both_moved_dir_merge,

resolve_both_moved_dir_move_merge): New resolution option handlers.

(svn_client_conflict_tree_get_resolution_options,

configure_option_both_moved_dir_merge): Enable new options on applicable

tree conflicts.

(svn_client_conflict_option_get_moved_to_repos_relpath_candidates2,

svn_client_conflict_option_set_moved_to_repos_relpath2,

svn_client_conflict_option_get_moved_to_abspath_candidates2,

svn_client_conflict_option_set_moved_to_abspath2): Handle new options.

* subversion/svn/conflict-callbacks.c

(builtin_resolver_options): Assign resolver menu keys to the new options.

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

(test_merge_dir_move_vs_dir_move,

test_merge_dir_move_vs_dir_move_accept_move, test_funcs): Add new tests.

(create_dir_move_vs_dir_move_merge_conflict): New helper for above tests.

  1. … 3 more files in changeset.
* subversion/libsvn_client/conflicts.c

(resolve_incoming_move_dir_merge): Don't forget to unlock the working copy

again if the revert operation fails.

Let repository-to-WC copies go through the WC editor.

For issue #4786 "Create a WC working-mods editor".

Similar to the patch committed in r1848892 and reverted in r1848897, except

that attempt failed on Windows because it created the copy target root

directory twice.

* subversion/include/private/svn_client_private.h

(svn_client__repos_to_wc_copy): Rename to

'svn_client__repos_to_wc_copy_internal'.

(svn_client__repos_to_wc_copy_by_editor): New.

* subversion/libsvn_client/conflicts.c

(merge_incoming_added_dir_replace): Update to use

'svn_client__repos_to_wc_copy_by_editor'.

* subversion/libsvn_client/copy.c

(copy_foreign_dir): Remove 'depth' parameter: not needed and was wrongly

implemented anyway.

(svn_client__repos_to_wc_copy_dir): Adjust caller.

(is_same_repository): New, moved from 'wc_editor.c'.

(svn_client__repos_to_wc_copy_by_editor): New.

(svn_client__repos_to_wc_copy,

repos_to_wc_copy_single): Determine same-repository here and here...

(repos_to_wc_copy_locked): ... instead of here.

* subversion/libsvn_client/wc_editor.c

(is_same_repository): Delete; moved to 'copy.c'.

(dir_add,

file_add): Don't determine same-repository here. Do set the 'created' flag.

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

(test_foreign_repos_copy): Update caller.

  1. … 4 more files in changeset.
Revert r1848892 as it fails on Windows.

  1. … 4 more files in changeset.
Let repository-to-WC copies go through the WC editor.

For issue #4786 "Create a WC working-mods editor".

* subversion/include/private/svn_client_private.h

(svn_client__repos_to_wc_copy): Rename to

'svn_client__repos_to_wc_copy_internal'.

(svn_client__repos_to_wc_copy_by_editor): New.

* subversion/libsvn_client/conflicts.c

(merge_incoming_added_dir_replace): Update to use

'svn_client__repos_to_wc_copy_by_editor'.

* subversion/libsvn_client/copy.c

(copy_foreign_dir): Remove 'depth' parameter: not needed and was wrongly

implemented anyway.

(svn_client__repos_to_wc_copy_dir): Adjust caller.

(is_same_repository): New, moved from 'wc_editor.c'.

(svn_client__repos_to_wc_copy_by_editor): New.

(svn_client__repos_to_wc_copy,

repos_to_wc_copy_single): Determine same-repository here and here...

(repos_to_wc_copy_locked): ... instead of here.

* subversion/libsvn_client/wc_editor.c

(is_same_repository): Delete; moved to 'copy.c'.

(dir_add,

file_add): Don't determine same-repository here. Do set the 'created' flag.

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

(test_foreign_repos_copy): Update caller.

  1. … 4 more files in changeset.
Unify how 'copy' processes externals with and without pinning.

For issue #4786 "Create a WC working-mods editor".

Remove the optional 'externals' processing from inside the

'repos_to_wc_copy' API. Previously, externals were fetched outside the

'copy' API if and only if some externals were to be pinned. Now we always

use that code path.

As a side effect, this makes the notifications consistent between the two

cases.

* subversion/include/private/svn_client_private.h

(svn_client__repos_to_wc_copy): Remove 'externals' options.

* subversion/libsvn_client/copy.c

(svn_client__repos_to_wc_copy_dir,

svn_client__repos_to_wc_copy): Remove 'externals' option.

(repos_to_wc_copy_single): Always fetch externals after the copy.

* subversion/libsvn_client/conflicts.c

(merge_incoming_added_dir_replace): Trivially update this caller.

* subversion/libsvn_client/wc_editor.c

(dir_add,

file_add): Trivially update these callers.

* subversion/tests/cmdline/externals_tests.py

(url_to_wc_copy_of_externals): Revert the changes to the expected

notifications that were introduced by r1847206.

  1. … 4 more files in changeset.
For issue #4786 "Create a WC working-mods editor": combine dir and file

versions of a copy API, in the interest of unifying file and dir operations

as much as possible to simplify callers.

* subversion/include/private/svn_client_private.h

(svn_client__repos_to_wc_copy): New.

(svn_client__repos_to_wc_copy_dir,

svn_client__repos_to_wc_copy_file): Delete.

* subversion/libsvn_client/copy.c

(verify_wc_srcs): Add a simple doc string.

(svn_client__repos_to_wc_copy_dir,

svn_client__repos_to_wc_copy_file): Make static.

(svn_client__repos_to_wc_copy): New.

(repos_to_wc_copy_single): Update callers.

* subversion/libsvn_client/conflicts.c

(merge_incoming_added_dir_replace): Update callers.

* subversion/libsvn_client/wc_editor.c

(dir_add,

file_add): Update callers.

  1. … 3 more files in changeset.
Follow-up to r1846851:

* subversion/libsvn_client/conflicts.c

(resolve_incoming_move_file_text_merge): Don't forget to remove the

conflict marker after the 'local missing' conflict has been resolved.

Support copies, for issue SVN-4786: Create a WC working-mods editor.

* subversion/include/private/svn_client_private.h

(svn_client__repos_to_wc_copy_dir): Also support copies from a foreign

repository. Take a resolved URL and revision instead of URL:peg:op-rev.

(svn_client__repos_to_wc_copy_file): New.

(svn_client__wc_editor,

svn_client__wc_editor_internal): To support copies, take an RA session.

* subversion/libsvn_client/conflicts.c

(merge_incoming_added_dir_replace): Adjust the call to

svn_client__repos_to_wc_copy_dir().

* subversion/libsvn_client/copy.c

(svn_client__repos_to_wc_copy_dir): As above.

(svn_client__repos_to_wc_copy_file): New, extracted ...

(repos_to_wc_copy_single): ... from here.

* subversion/libsvn_client/copy_foreign.c

(copy_foreign_dir): Adjust the call to svn_client__wc_editor_internal().

* subversion/libsvn_client/wc_editor.c

(edit_baton_t): Add an RA session.

(is_same_repository): New.

(dir_add): Adjust to support copying from same repo or foreign repo.

(file_add): Add support for copying from same repo or foreign repo.

(svn_client__wc_editor_internal,

svn_client__wc_editor): Accept an RA session.

  1. … 4 more files in changeset.
* subversion/libsvn_client/conflicts.c

(resolve_both_moved_file_text_merge): Remove an unused variable.

Add resolver support for incoming move vs local move of files during merges.

Add two new resolution options for move vs move conflicts with files

after a merge operation:

(m) - apply changes to 'file-target' and revert addition of 'file-source'

(M) - move 'file-target' to 'file-source' and merge

where 'file-branch' is the path the file has on the merge target branch,

and 'file-source' is the path the file has on the merge source branch.

The 'm' option applies textual changes only and leaves the tree structure

of the merge target as it is. The 'M' option changes the file's location in

the merge target to match that of the merge source before merging changes.

I have not written related tests yet, but some manual testing was done.

Proper tests will follow as soon.

* subversion/include/svn_client.h

(svn_client_conflict_option_both_moved_file_merge,

svn_client_conflict_option_both_moved_file_move_merge): Declare new options.

* subversion/libsvn_client/conflicts.c

(follow_move_chains): Check for local candidates along all moves in the

chain, not just for the final move in the chain.

(resolve_incoming_move_file_text_merge): Implement support for the

svn_client_conflict_option_both_moved_file_move_merge option. This case

is similar enough to make sharing code written for other cases possible.

(resolve_both_moved_file_text_merge): New resolution handler for the

svn_client_conflict_option_both_moved_file_merge option.

(configure_option_incoming_delete_ignore): Don't match move-vs-move cases.

This causes the 'ignore deletion' option to show up in actual delete vs.

delete conflict cases as a side-effect.

(configure_option_incoming_delete_accept): Don't match move-vs-move cases.

(describe_incoming_move_merge_conflict_option): Change 'details' parameter

to a move target path, so this function can also be used for the new

svn_client_conflict_option_both_moved_file_move_merge option.

(configure_option_incoming_move_file_merge,

configure_option_incoming_dir_merge): Update callers.

(configure_option_both_moved_file_merge): Configure new options.

(svn_client_conflict_option_get_moved_to_repos_relpaths,

svn_client_conflict_option_set_moved_to_repos_relpaths

svn_client_conflict_option_get_moved_to_abspath_candidates,

svn_client_conflict_option_set_moved_to_abspath2): Accept new options and

update calls to describe_incoming_move_merge_conflict_option().

(svn_client_conflict_tree_get_resolution_options): Enable new options.

* subversion/libsvn_wc/conflicts.c

(svn_wc__guess_incoming_move_target_nodes): Handle the case where the

conflict victim is a 'local missing' victim. Needed for new options.

* subversion/svn/conflict-callbacks.c

(builtin_resolver_options): Set menu key bindings for new options.

  1. … 3 more files in changeset.
Fix SVN-4717 "tree conflict message ends a sentence with a colon".

* subversion/libsvn_client/conflicts.c

(describe_incoming_edit_list_modified_revs): Explicitly state when no

revisions are found.

Factor out repos-to-WC copy code.

* subversion/include/private/svn_client_private.h

(svn_client__repos_to_wc_copy_dir): New.

* subversion/libsvn_client/copy.c

(svn_client__repos_to_wc_copy_dir): New, factored out from conflicts.c...

(repos_to_wc_copy_single): ... and from here.

* subversion/libsvn_client/conflicts.c

(notification_adjust_baton,

notification_adjust_func): Remove.

(merge_incoming_added_dir_replace): Use svn_client__repos_to_wc_copy_dir.

  1. … 2 more files in changeset.
Add resolver support for unversioned directories during update/switch.

The resolver now offers the 'merge directories' option when it encounters

a conflict for an incoming added directory vs an unversioned directory

after an update or switch.

* subversion/libsvn_client/conflicts.c

(resolve_update_incoming_added_dir_merge): Add support for unversioned

directories. Resolution is implemented as a meta-data only revert.

(configure_option_incoming_added_dir_merge): Enable this option for

added vs. unversioned directories during update/switch.

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

(create_unversioned_dir, resolve_added_dir_vs_unversioned_dir): New helpers.

(test_update_dir_add_vs_unversioned_dir,

test_switch_dir_add_vs_unversioned_dir, test_funcs): Add new tests.

  1. … 1 more file in changeset.
Add resolver support for 'added file vs unversioned file' with update/switch.

Make the conflict resolver handle conflicts recorded during update and switch

operations where a newly added file was obstructed by an unversioned file.

The resolver will now offer the 'incoming_added_file_text_merge' option

in this case, allowing users to merge unversioned files with incoming

newly added files.

Because 'merge' currently skips unversioned files and does not even record

a conflict for them, this change only affects 'update' and 'switch'.

Supporting unversioned file conflicts during merges can be revisited later.

Suggested by: Ace Olszowka

* subversion/libsvn_client/conflicts.c

(resolve_merge_incoming_added_file_text_update): Handle unversioned files

in addition to versioned files.

(configure_option_incoming_added_file_text_merge): Enable this option

for the case where the local file is unversioned.

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

(new_file_content): Declare.

(test_update_file_add_vs_unversiond_file,

test_switch_file_add_vs_unversiond_file, test_funcs): New tests.

  1. … 1 more file in changeset.
* subversion/libsvn_client/conflicts.c

(svn_client_conflict_option_get_moved_to_abspath_candidates2):

No functional change; fix indentation to avoid gcc 8.x warning:

subversion/libsvn_client/conflicts.c: In function 'svn_client_conflict_option_get_moved_to_abspath_candidates2':

subversion/libsvn_client/conflicts.c:10855:7: warning: this 'if' clause does not guard... [-Wmisleading-indentation]

if (details == NULL ||

^~

subversion/libsvn_client/conflicts.c:10864:8: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'

*possible_moved_to_abspaths = apr_array_make(result_pool, 1,

^

Fix an assertion failure in the conflict resolver.

* subversion/libsvn_client/conflicts.c

(conflict_tree_get_details_local_missing): We do not yet support the case

where the parent directory of the conflict victim is not part of the

repository-side tree which is checked out. Do not try to figure out

conflict details in this case yet.

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

(test_file_vs_dir_move_merge_assertion_failure): Remove code under #if 0

which I committed by accident in r1841753. Align test expectations with

the current behaviour of the conflict resolver.

(test_funcs): Mark test_file_vs_dir_move_merge_assertion_failure as PASS.

  1. … 1 more file in changeset.
Add resolver support for 'local missing' conflicts involving directories.

* subversion/libsvn_client/conflicts.c

(conflict_tree_get_details_local_missing): Don't hard-code svn_node_file.

Recommend an option for local missing merge targets in case there is

no ambiguity.

(resolve_sibling_move_dir_merge): Rename to...

(resolve_local_move_dir_merge): ... this, and support both local moves

(i.e. moves in the history of the merge target) and sibling moves (i.e.

moves in the history of the merge source).

(configure_option_local_move_file_merge): Rename to...

(configure_option_local_move_file_or_dir_merge): ... this, and add support

for directories.

(configure_option_sibling_move_merge,

configure_option_local_move_file_or_dir_merge): Track renamed functions.

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

(test_local_missing_abiguous_moves_dir): Fix an error in a path probed

by this test.

(test_funcs): Mark test_local_missing_abiguous_moves_dir as PASS.

  1. … 1 more file in changeset.
Fix an endless loop in the interactive conflict resolver.

The problem was that the library returned SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE,

and this error code makes 'svn' retry resolution under the assumption that a

resolution option could not be executed successfully for some reason.

In this case the error was due to a buggy consistency check which ensures

that the client has already fetched details from the repository.

This check should only trigger during SVN client development, never during

regular usage. And, in fact, 'svn' had already fetched the details, but the

consistency check inside the library didn't look at all the relevant data.

Fix the consistency check in the library and add a regression test.

* subversion/libsvn_client/conflicts.c

(svn_client_conflict_option_get_moved_to_repos_relpath_candidates2): Fix

the check which ensures that details have already been fetched from

the repository. Details for a 'local missing' conflict may contain

no information about moves but still contain information about working

copy siblings. Working copy siblings are not a valid result from this

function, so return a NULL repository path array in this case.

* subversion/tests/cmdline/tree_conflict_tests.py

(local_missing_dir_endless_loop): New test. This test will trigger an

endless loop if the above bug is not yet fixed. I believe this is the

first Python test which uses the interactive resolver, so it may also

serve as an example of how the resolver can be used from Python tests.

(test_list): Add test.

  1. … 1 more file in changeset.
Improve the semantics of four public API resolver functions.

In all cases, the old APIs would raise an assertion failure if an unexpected

option was passed. This is bad API design since it forces clients to maintain

a static copy of the list of valid options. Furthermore, because we're

adding support for new options in future releases, we require API users

to keep this list updated when they update to a newer version of SVN.

The new versions of these APIs return NULL instead of asserting valid input.

This allows clients to simply pass in any option and check if that gives

a valid result.

Do not bother emulating the old behaviour; code written against the

guarantees of the old API will just keep working.

Make use of the new API versions in 'svn', which also serves as an

example of new API semantics are more friendly to API users.

Improve the API docstrings a little while here.

I am declaring the APIs added here as "New in 1.11" in hope that this

change will be backported to the recently created 1.11.x branch.

* subversion/include/svn_client.h

(svn_client_conflict_option_get_moved_to_repos_relpath_candidates2,

svn_client_conflict_option_set_moved_to_repos_relpath2): New.

(svn_client_conflict_option_get_moved_to_repos_relpath_candidates,

svn_client_conflict_option_set_moved_to_repos_relpath): Deprecate.

(svn_client_conflict_option_get_moved_to_abspath_candidates2,

svn_client_conflict_option_set_moved_to_abspath2): New.

(svn_client_conflict_option_get_moved_to_abspath_candidates,

svn_client_conflict_option_set_moved_to_abspath): Deprecate.

* subversion/libsvn_client/conflicts.c

(svn_client_conflict_option_get_moved_to_repos_relpath_candidates2,

svn_client_conflict_option_set_moved_to_repos_relpath2): New.

(svn_client_conflict_option_get_moved_to_repos_relpath_candidates,

svn_client_conflict_option_set_moved_to_repos_relpath): Implement

as a wrapper around the new API.

(svn_client_conflict_option_get_moved_to_abspath_candidates2,

svn_client_conflict_option_set_moved_to_abspath2): New.

(svn_client_conflict_option_get_moved_to_abspath_candidates,

svn_client_conflict_option_set_moved_to_abspath): Implement as a

wrapper around the new API.

* subversion/svn/conflict-callbacks.c

(build_tree_conflict_options): Remove a large list of options which are

acceptable to old APIs. Call the new API and check its result instead.

(find_conflict_option_with_repos_move_targets,

find_conflict_option_with_working_copy_move_targets): New helper functions.

(handle_tree_conflict): Simplify support of ambiguous moves by using new APIs.

  1. … 2 more files in changeset.
Implement support for ambiguous moves for 'local missing' conflicts.

* subversion/libsvn_client/conflicts.c

(conflict_tree_local_missing_details): Replace the single 'moved_to_abspath'

with appropriate data structures for supporting ambiguous moves: A map

of repository-side move targets and corresponding working copy paths.

The new data structures are similar to those used for 'incoming delete'

style conflicts.

(follow_move_chains): Move upwards in the file so it can be used earlier.

(conflict_tree_get_details_local_missing): Initialize the new map of

repository-side move targets. Again, this is similar to what the

corresponding 'get details' function for 'incoming delete' conflicts does.

(resolve_local_move_file_merge): Replace use of 'merge_target_abspath' with

use of the new move target map.

(configure_option_local_move_file_merge): Stop initializing move information

in conflict details here. This is now done earlier, when the details are

actually fetched from the repository. Doing this here is the wrong place

for the task, since we would clobber move target selections the user may

have already made. And again, the 'incoming delete' case works similar to

this new implementation for 'local missing'.

(get_repos_relpath_candidates): New helper function factored out from...

(svn_client_conflict_option_get_moved_to_repos_relpath_candidates): ...here.

Support selection of repository move targets with the new 'local missing'

details data structures.

(svn_client_conflict_option_set_moved_to_repos_relpath: Add support for

'local missing' conflicts to this function.

(set_wc_move_target): New helper function, factored out from...

(svn_client_conflict_option_get_moved_to_abspath_candidates): ...here.

Support the new move data structures used for 'local missing' conflicts.

* subversion/svn/conflict-callbacks.c

(build_tree_conflict_options): Obtain the list of working copy move targets

for 'local missing' options as well as 'incoming delete' style options.

(handle_tree_conflict): Allow choosing ambiguous move targets for

'local missing' style options.

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

(test_local_missing_abiguous_moves, test_funcs): New test.

  1. … 2 more files in changeset.
Prevent an out-of-bounds array access in the conflict resolver.

* subversion/libsvn_client/conflicts.c

(svn_client_conflict_option_set_moved_to_repos_relpath): Reset our index into

the array of candidate working copy paths when a new repository-side move

target path is selected. We could be switching from a repository-side move

target with many corresponding working copy paths to one with fewer

corresponding working copy paths. If the array index isn't reset then we

crash if the user next tries to view an updated option description, because

the description includes the currently selected working copy candidate path

which is obtained by indexing the array.

* subversion/libsvn_client/conflicts.c

(svn_client_conflict_text_get_resolution_options): Use more precise wording

in option descriptions.

Don't scan for moves for 'local missing' conflicts unless a YCA is known.

Prevent the resolver from embarking on an endless search in case of

a 'incoming edit vs. local missing' conflict where no YCA can be

found which would cap our search through history.

Reported by: Dag-Erling Smørgrav <des{_AT_}des.no>

https://svn.haxx.se/users/archive-2018-08/0038.shtml

* subversion/libsvn_client/conflicts.c

(find_deleted_rev): Account for a NULL moves-table.

(find_operative_moves, find_revision_for_suspected_deletion): Make search

for moves optional. The caller can now pass a NULL moves array to indicate

that moves should not be searched for.

(conflict_tree_get_details_local_missing): Only ask for move information if

a YCA was found.

Follow-up to r1839342:

Make test_merge_incoming_edit_file_moved_away pass again after r1839342.

I should have committed both changes in the same revision.

* subversion/libsvn_client/conflicts.c

(svn_client_conflict_option_get_moved_to_abspath_candidates):

Return the 'moved to abspath' stored in 'local missing' conflict details.