Checkout Tools
  • last updated 8 hours ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Implement an experimental 'x-wc-copy-mods' command.

This can be used to comprehensively test the WC editor (issue #4786).

* subversion/include/private/svn_client_private.h,

subversion/libsvn_client/wc_editor.c

(svn_client__wc_copy_mods): New.

* subversion/svn/svn.c

(svn_cl__cmd_table): Add 'x-wc-copy-mods' command.

* subversion/svn/cl.h

(svn_opt_subcommand_t): Declare 'svn_cl__wc_copy_mods'.

* subversion/svn/shelf-cmd.c

(svn_cl__wc_copy_mods): New.

  1. … 4 more files in changeset.
Implement issue 4798 "revert: option to remove added items from disk".

But the the API doesn't currently work for items found by recursion, so the

last part of the test fails.

* subversion/svn/cl.h

(svn_cl__opt_state_t): Add a new flag, 'remove_added'.

* subversion/svn/revert-cmd.c

(svn_cl__revert): Pass that flag on to the API.

* subversion/svn/svn.c

(svn_cl__longopt_t,

svn_cl__options,

svn_cl__cmd_table,

sub_main): Add a new option, 'opt_remove_added', to the 'revert' command.

  1. … 2 more files in changeset.
* subversion/svn/cl.h: Fix typos in comments. No functional change.

Consolidate file size formatting for 'svn info' and 'svn list'.

* subversion/svn/cl.h

(svn_cl__size_unit_t): Renamed and extended from svn_cl__unit_base_t.

(svn_cl__opt_state_t): New field 'file_size_unit' replaces the

'human_readable' flag. All users updated.

(svn_cl__format_file_size): Renamed from svn_cl__get_unit_file_size.

* subversion/svn/filesize.c

(get_base2_unit_file_size, get_base10_unit_file_size): Tweak some comments.

(svn_cl__format_file_size): Renamed from svn_cl__get_unit_file_size.

Also handle formatting for XML and for normal output.

* subversion/svn/info-cmd.c

(print_info_baton_t): 'file_size_unit' replaces the 'human_readable' flag.

(print_info_xml): Use svn_cl__format_file_size() in XML mode.

(print_info): Use only svn_cl__format_file_size() for file sizes.

(print_info_item): Likewise.

(svn_cl__info): Allow unit-based file size output with --show-item.

* subversion/svn/list-cmd.c

(print_baton): 'file_size_unit' replaces the 'human_readable' flag.

(print_dirent): Use only svn_cl__format_file_size() for file sizes.

(print_dirent_xml): Use svn_cl__format_file_size() in XML mode.

(svn_cl__list): Update for changes to svn_cl__opt_state_t.

* subversion/svn/svn.c

(sub_main): Handle the new file_size_unit field in svn_cl__opt_state_t.

* subversion/tests/cmdline/info_tests.py

(info_item_size_repos): Add two new test modes.

  1. … 5 more files in changeset.
Combine base-2 and base-10 unit file size conversion into a single API,

with a common implementation for the identical bits.

* subversion/svn/cl.h

(svn_cl__unit_base_t): New enumeration.

(svn_cl__get_base2_unit_file_size,

svn_cl__get_base10_unit_file_size): Removed. Replaced by ...

(svn_cl__get_unit_file_size): ... this new function.

* subversion/svn/filesize.c

(filesize_order_t): New common struct.

(get_order_index, format_size): New; refactored common code.

(get_base2_unit_file_size): Reworked from svn_cl__get_base2_unit_file_size.

(get_base10_unit_file_size): Reworked from svn_cl__get_base10_unit_file_size.

(svn_cl__get_unit_file_size): Implement.

* subversion/svn/info-cmd.c (print_info): Use svn_cl__get_unit_file_size().

* subversion/svn/list-cmd.c (print_dirent): Likewise.

  1. … 3 more files in changeset.
Add a function for converting file sizes to base-10 units for display.

* subversion/svn/cl.h (svn_cl__get_base10_unit_file_size): New prototype.

* subversion/svn/filesize.c (svn_cl__get_base10_unit_file_size): Implement it.

  1. … 1 more file in changeset.
Teach 'svn info' to show human-readable file sizes.

* subversion/svn/cl.h (svn_cl__get_base2_unit_file_size): New prototype.

* subversion/svn/filesize.c: New file.

(svn_cl__get_base2_unit_file_size): Implement. Moved here from list-cmd.c.

* subversion/svn/list-cmd.c: Remove unused includes.

(get_human_readable_size): Remove. Implementation moved to filesize.c.

(print_dirent): Use svn_cl__get_base2_unit_file_size().

* subversion/svn/info-cmd.c

(print_info_baton_t): New member 'human_readable'.

(print_info): Optionally print human-readable file sizes.

(svn_cl__info): Handle option --human-readable.

* subversion/svn/svn.c (svn_cl__cmd_table): Add -H to 'svn info'.

  1. … 4 more files in changeset.
Make the 'svn list -v' output more human-friendly.

This change introduces two new mini-features:

- The -H, --human-readable option, which makes 'svn list -v' display

file sizes in base-2 units;

- Automatic adjustment of the width of the 'author' field in the

verbose output, within a set of limits, so that long author names

are truncated less often.

In --human-readable form, the 'size' field is narrower, so the initial

and maximum widths of the 'author' field are adjusted to maintain

the same overall width of the 'svn list -v' output.

* subversion/svn/cl.h (svn_cl__opt_state_t): Add flag 'human_readable'.

* subversion/svn/svn.c

(svn_cl__options): New option; -H, --human-readable.

(svn_cl__cmd_table): Add the -H option to the 'list' command description.

(sub_main): Handle the -H option.

* subversion/svn/list-cmd.c

(struct print_baton): Add fields 'human_readable', 'author_width'

and 'max_author_width; and moved 'ctx' to the start of the struct.

(initial_author_width, initial_human_readable_author_width,

maximum_author_width, maximum_human_readable_author_width,

normal_size_width, human_readable_size_width): New static constants.

(get_human_readable_size): New.

(print_dirent): Auto-adjust the width of the author field and select

plain or human-friendly display for the size field.

(svn_cl__list): Initialize the new fields in the print_baton structure.

  1. … 2 more files in changeset.
'svn info --x-viewspec': Expose both output backends.

* subversion/svn/cl.h

(svn_cl__opt_state_t::viewspec): Change from boolean to three-valued enum.

* subversion/svn/svn.c

(svn_cl__options."x-viewspec": Update arity and docstring.

(viewspec_from_word): New.

(sub_main): Parse new argument.

* subversion/svn/info-cmd.c

(cl_layout_list): Update signature. Add docstring.

(svn_cl__info): Percolate new argument.

  1. … 2 more files in changeset.
Shelving: implement shelf diff summary mode.

"svn shelf-diff --summarize"

* subversion/include/private/svn_client_private.h,

subversion/libsvn_client/client.h,

subversion/libsvn_client/diff_summarize.c

(svn_client__get_diff_summarize_callbacks): Move from a private to a

semi-public header file. Remove 'const' from the output parameter.

* subversion/libsvn_client/diff.c

(svn_client_diff_summarize2,

svn_client_diff_summarize_peg2): Tweak to match that 'const' change.

* subversion/svn/cl.h,

subversion/svn/diff-cmd.c

(svn_cl__get_diff_summarize): Newly exposed API.

(svn_cl__diff): Use it.

* subversion/svn/shelf-cmd.c

(shelf_diff): Implement summary mode.

* subversion/svn/svn.c

(svn_cl__cmd_table): Add '--summarize' option to shelf-diff.

* subversion/tests/cmdline/shelf_tests.py

(shelf_diff_simple): Extend to test summary mode.

* tools/client-side/bash_completion

(_svn): Add '--summarize' option to shelf-diff.

  1. … 9 more files in changeset.
Viewspec: Add an experimental viewspec output command.

Part of issue SVN-4753 "SVN viewspec feature".

This reports the current layout of the working copy, in terms of switched

URLs, mixed revisions, and mixed depths.

The current CLI command is:

svn info --viewspec [PATH]

The current output is in the form of a series of 'svn' commands which can

be used as command-line input to recreate the layout, although the behaviour

when doing so is not optimal.

Patch by: rhuijben

(tweaked by me)

* subversion/include/svn_client.h

(svn_client_layout_func_t,

svn_client_layout_list): New.

* subversion/libsvn_client/layout.c

New file.

* subversion/svn/cl.h

(svn_cl__opt_state_t): Add a 'viewspec' option.

* subversion/svn/info-cmd.c

(layout_list_baton_t,

layout_func,

cl_layout_list): New.

(svn_cl__info): Call it.

* subversion/svn/svn.c

(svn_cl__longopt_t,

svn_cl__options): Add a 'viewspec' option.

(svn_cl__cmd_table): Let the 'info' command take the option.

(sub_main): Parse the option.

  1. … 4 more files in changeset.
Allow splitting long help strings into paragraphs to ease translation.

Issue SVN-4724.

This patch revises the help string definition format that is used in 'svn'

and most of the other command-line tools to svn_opt_subcommand_desc3_t

(introduced in r1826328).

This patch does not split each long string into paragrpahs, it only adds the

mechanism for doing so.

  1. … 16 more files in changeset.
Shelving: new 'shelf-list-by-paths' command.

* subversion/svn/cl.h

(svn_cl__shelf_list_by_paths): New.

* subversion/svn/shelf-cmd.c

(targets_relative_to_wcs,

targets_relative_to_a_wc,

shelf_list_by_paths,

svn_cl__shelf_list_by_paths): New.

* subversion/svn/svn.c

(svn_cl__cmd_table): Describe the new command.

* tools/client-side/bash_completion

(_svn): Add the new command.

  1. … 3 more files in changeset.
Shelving: add 'svn unshelve --drop' option.

* subversion/svn/cl.h

(svn_cl__opt_state_t): Add new 'drop' flag.

* subversion/svn/shelf-cmd.c

(svn_cl__shelf_unshelve): Drop after shelving, if successful.

* subversion/svn/svn.c

(svn_cl__longopt_t,

svn_cl__options,

svn_cl__cmd_table,

sub_main): Add new 'drop' option.

* tools/client-side/bash_completion

(_svn): Add new 'drop' option.

  1. … 3 more files in changeset.
* subversion/svn/cl.h

(svn_cl__opt_state_t): Remove unused 'list' field. A follow-up to r1825050.

Shelving: remove shelving v1 from trunk.

* subversion/include/svn_client.h,

subversion/svn/shelf-cmd.c

subversion/svn/cl.h:

Remove shelving v1.

* subversion/libsvn_client/shelve.c,

subversion/svn/shelve-cmd.c:

Delete these files.

  1. … 4 more files in changeset.
Copy the main part of Shelving v2 (that is, with checkpointing) into trunk

from the 'shelve-checkpoint' branch.

Leave Shelving v1 active, add the new APIs, disable the new CLI using

'#ifdef WITH_SHELVE_V1', and don't update the tests and Bash-completion yet.

* subversion/include/svn_client.h

(svn_client_shelf_t,

svn_client_shelf_version_t,

svn_client_shelf_open,

svn_client_shelf_close,

svn_client_shelf_delete,

svn_client_shelf_save_new_version,

svn_client_shelf_set_current_version,

svn_client_shelf_version_open,

svn_client_shelf_apply,

svn_client_shelf_unapply,

svn_client_shelf_get_patch_abspath,

svn_client_shelf_export_patch,

svn_client_shelf_paths_changed,

svn_client_shelf_set_log_message,

svn_client_shelf_get_log_message,

svn_client_shelf_info_t,

svn_client_shelf_list): New.

* subversion/libsvn_client/client.h

(svn_client__shelf_revprop_set,

svn_client__shelf_revprop_get,

svn_client__shelf_revprop_list): New.

* subversion/libsvn_client/shelf.c

subversion/svn/shelf-cmd.c

New files.

* subversion/svn/cl.h

(svn_cl__shelf_diff,

svn_cl__shelf_drop,

svn_cl__shelf_list,

svn_cl__shelf_log,

svn_cl__shelf_save,

svn_cl__shelf_shelve,

svn_cl__shelf_unshelve): New declarations.

* subversion/svn/svn.c

(WITH_SHELVE_V1): New.

(svn_cl__options, svn_cl__cmd_table, sub_main):

Add the new CLI. Switch between old and new based on WITH_SHELVE_V1.

  1. … 5 more files in changeset.
Introduce a new global option: --password-from-stdin

This new option makes Subversion's command line applications read a password

from standard input. It can be used as an alternative to the --password option

in order to provide passwords without leaking them to argv, which on Unix-like

systems can be viewed by anyone with tools such as ps(1).

Patch by: William Orr <will@worrbase.com>

* subversion/include/svn_io.h

(svn_io_stdin_readline): Declare.

* subversion/libsvn_subr/io.c

(svn_io_stdin_readline): New public API which reads a line of input from

standard input.

* subversion/svn/cl.h

(svn_cl__opt_state_t): Declare auth_password_from_stdin option.

* subversion/svn/svn.c,

subversion/svnbench/svnbench.c

(svn_cl__longopt_t): Add opt_auth_password_from_stdin.

(svn_cl__options): Add --password-from-stdin.

(svn_cl__global_options): Add opt_auth_password_from_stdin.

(sub_main): Handle the new option.

* subversion/svnmucc/svnmucc.c

(help): Add --password-from-stdin option to help text.

(sub_main): Handle the new option.

* subversion/svnrdump/svnrdump.c

(svn_svnrdump__longopt_t): Add opt_auth_password_from_stdin.

(svnrdump__options, opt_baton_t): Add --password-from-stdin and --dumpfile.

(opt_baton_t, replay_revisions, dump_cmp, load_cmd, sub_main): Add support

for the new options. Since svnrdump has historically been reading dump file

data from stdin the --password-from-stdin option requires --dumpfile.

* subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout:

Adjust exected output.

* tools/client-side/svn-mergeinfo-normalizer/svn-mergeinfo-normalizer.c

(svn_min__longopt_t, svn_min__options): Add opt_auth_password_from_stdin.

(svn_min__options): Add --password-from-stdin.

(sub_main): Support the new options.

* tools/client-side/svnconflict/svnconflict.c

(svnconflict_cmd_baton_t, global_options): Add opt_auth_password_from_stdin.

(svnconflict_options): Add --password-from-stdin.

(sub_main): Support the new options.

  1. … 10 more files in changeset.
Merge the 'shelve' branch to trunk (dropping BRANCH-README).
  1. … 11 more files in changeset.
Add a new --accept recommended option to 'svn'.

--accept recommended works like --accept postpone, except that tree

conflicts for which a recommended resolution option exists are

automatically resolved.

* subversion/svn/cl.h

(SVN_CL__ACCEPT_RECOMMENDED): Declare (as string: "recommended").

* subversion/svn/conflict-callbacks.c

(svn_cl__accept_from_word): Handle SVN_CL__ACCEPT_RECOMMENDED and provide

the shorthand form 'r'.

* subversion/svn/svn.c

(svn_cl__options): Update --accept option help text.

* subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout:

Update expected help output.

  1. … 3 more files in changeset.
Make svn --non-interactive use recommended tree conflict resolution

options by default. Previously, it would postpone such conflicts.

This mode is not yet exposed as a separate --accept option argument.

Perhaps we will do that later.

* subversion/svn/cl.h

(svn_cl__accept_recommended): Declare.

* subversion/svn/conflict-callbacks.c

(svn_cl__resolve_conflict): Add support for svn_cl__accept_recommended.

* subversion/svn/merge-cmd.c

(conflict_func_merge_cmd): Add svn_cl__accept_recommended to the switch

statement (as an invalid option to use in this context).

* subversion/svn/svn.c

(sub_main): Default to svn_cl__accept_recommended if --non-interactive.

  1. … 3 more files in changeset.
Add a new --vacuum-pristines option to 'svn cleanup'.

This option toggles the 'vacuum_pristines' API flag of svn_client_vacuum()

and allows cleaning up the pristine store with a working copy lock held.

It avoids a risk of working copy corruption due to concurrent access by

multiple clients. Because 'svn cleanup' ignores and removes any locks in

its default mode, using that mode to clean up pristines is subtly unsafe.

Adding this feature is cheap since the libsvn_client API already provides it.

The command line client just didn't expose it yet.

* subversion/svn/cl.h

(svn_cl__opt_state_t): Declare vacuum_pristines flag.

* subversion/svn/cleanup-cmd.c

(svn_cl__cleanup): Pass the vacuum_pristines flag to svn_client_vacuum().

* subversion/svn/svn.c

(svn_cl__longopt_t): Add opt_vacuum_pristines.

(svn_cl__opt_state_t): Document --vacuum-pristines.

  1. … 2 more files in changeset.
Reintroduce the svn_client_conflict_walk() API.

This new implementation is based on the conflict walk we implemented in

the 'svn' command line client. The command line client now relies on the

client library to walk conflicts in the working copy.

This avoids forcing other clients to reimplement the status walk logic which

is rather complex since it needs to handle new tree conflicts which may appear

when another tree conflict gets resolved. It should make the transtion to the

new conflict API easier for third party clients since the new resolver can now

be invoked in a similar way to the old libsvn_wc conflict handler.

Suggested by: ivan

(during the October 2016 hackathon in Berlin)

* subversion/include/svn_client.h

(svn_client_conflict_walk_func_t, svn_client_conflict_walk): Declare.

* subversion/libsvn_client/conflicts.c

(conflict_status_walker_baton, tree_conflict_collector,

handle_tree_conflict_resolution_failure, conflict_status_walker,

svn_client_conflict_walk): New implementation of a conflict status walker.

Based on, and very similar to, code from svn/resolve-cmd.c.

* subversion/svn/cl.h,

subversion/svn/conflict-callbacks.c

(svn_cl__resolve_conflict): Remove now unused output paramer 'resolved',

and redundant parameter config (ctx->config can be used instead).

* subversion/svn/resolve-cmd.c

(conflict_status_walker_baton): Replace with...

(conflict_walker_baton): ... this, which contains only a subset of the fields.

(tree_conflict_collector, handle_tree_conflict_resolution_failure,

conflict_status_walker, walk_conflicts): Remove.

(conflict_walker): A callback for the new conflict walker.

(svn_cl__walk_conflicts): Use the new conflict walker provided by the

libsvn_client library instead of the previous inline implementation.

  1. … 4 more files in changeset.
Remove two hacks from the conflict resolver API that were added to

allow handling --accept=mine-conflict | working for tree conflicts

and --accept=working for binary text conflicts.

This patch makes the command-line client fully responsible for choosing

the appropriate conflict option id, and keeps the various new APIs

such as svn_client_conflict_text_resolve_by_id() simple and doing

just what they were told to do.

Discussed in https://lists.apache.org/thread.html/de7fc6bdbd100ad2fa89d04e336fd64f8d77f66730ae2806ded1293b@%3Cdev.subversion.apache.org%3E

* subversion/libsvn_client/conflicts.c

(svn_client_conflict_text_resolve_by_id,

svn_client_conflict_tree_resolve_by_id): Remove hacks from these

functions.

* subversion/svn/conflict-callbacks.c

(resolve_conflict_by_accept_option): Inline parts of this function that

handle svn_cl__accept_edit and svn_cl__accept_launch ...

(svn_cl__resolve_conflict): ...here. Accept svn_cl__accept_t by value,

drop the option id argument. Pick the appropriate option id based on

the passed-in svn_cl__accept_t argument. Prompt the user if there is

no option or if the option did not apply.

* subversion/svn/resolve-cmd.c

(svn_cl__resolve): Handle unsupported --accept [--non-interactive] cases

in this function.

(svn_cl__walk_conflicts): Remove the is_resolve_cmd argument. Don't

map the --accept option to option id here, as we will do it in the

svn_cl__resolve_conflict() function. Adjust calls to walk_conflicts()

and svn_cl__resolve_conflict().

(walk_conflicts): Remove option_id argument, accept svn_cl__accept_t

by value.

(conflict_status_walker): Adjust call to svn_cl__resolve_conflict().

(conflict_status_walker_baton): Remove option_id field, store

accept_which field by value.

* subversion/svn/merge-cmd.c

(svn_cl__merge): Adjust call to svn_cl__walk_conflicts().

* subversion/svn/switch-cmd.c

(svn_cl__switch): Adjust call to svn_cl__walk_conflicts().

* subversion/svn/update-cmd.c

(svn_cl__update): Adjust call to svn_cl__walk_conflicts().

* subversion/svn/cl.h

(svn_cl__resolve_conflict, svn_cl__walk_conflicts): Update declarations.

  1. … 6 more files in changeset.
Make 'svn update' treat incoming add vs. local add as a tree conflict again.

Back in r862331 the update editor was taught to automatically merge local

additions with incoming additions. This was the default behaviour until now.

I expect the conflict resolver to offer better support for this eventually.

To prepare for that, disable this automatic merge during updates by default.

This is easy to do since svn_client_update() provides a flag for it.

Add a new command line option to enable the old behaviour, mainly to keep

testing the old behaviour in our test suite. The old behaviour must not be

broken, according to our API compatibility guarantees.

'svn switch' was changed similarly in r862331, but has already been changed

to flag a tree conflict by default long ago.

* subversion/svn/cl.h

(adds_as_modification): Add new option flag.

(svn_cl__longopt_t): Add opt_adds_as_modification.

(svn_cl__options): Define '--adds-as-modification'.

(svn_cl__cmd_table): Add '--adds-as-modification' to 'svn update'.

(sub_main): Handle '--adds-as-modification' option.

* subversion/svn/update-cmd.c

(svn_cl__update): Pass new 'adds_as_modification' flag to svn_client_update().

* subversion/tests/cmdline/update_tests.py

(update_with_obstructing_additions, update_conflict_details): Pass

'--adds-as-modification' to 'svn update' to keep testing the old behaviour.

* subversion/tests/cmdline/upgrade_tests.py

(upgrade_not_present_replaced): Adjust expected output and status for an

update which now raises an 'add vs add' tree conflict.

  1. … 4 more files in changeset.
Move signal handling and cancellation code to libsvn_subr to avoid

duplication in multiple programs.

* subversion/include/private/svn_cmdline_private.h

(svn_cmdline__setup_cancellation_handler,

svn_cmdline__disable_cancellation_handler,

svn_cmdline__get_cancellation_signal): New.

* subversion/libsvn_subr/cmdline.c

(signal_handler, check_cancel,

svn_cmdline__setup_cancellation_handler,

svn_cmdline__disable_cancellation_handler,

svn_cmdline__get_cancellation_signal): New, code from svn.c and svnadmin.c.

* subversion/svn/cl.h

(svn_cl__check_cancel): Change type to pointer.

* subversion/svn/svn.c

(svn_cl__check_cancel): Change type to pointer.

(signal_handler): Remove.

(sub_main, main): Call new functions.

* subversion/svnadmin/svnadmin.c

(check_cancel): Change type to pointer.

(signal_handler, setup_cancellation_signalsl): Remove.

(repos_notify_handler, subcommand_recover, subcommand_upgrade,

sub_main, main): Call new functions.

* subversion/svnbench/cl.h

(svn_cl__check_cancel): Change type to pointer.

* subversion/svnbench/svnbench.c

(svn_cl__check_cancel): Change type to pointer.

(signal_handler): Remove.

(sub_main, main): Call new functions.

* subversion/svnfsfs/svnfsfs.h

(check_cancel): Change type to pointer.

* subversion/svnfsfs/svnfsfs.c

(check_cancel): Change type to pointer.

(signal_handler, setup_cancellation_signals): Remove.

(sub_main, main): Call new functions.

* subversion/svnlook/svnlook.c

(check_cancel): Change type to pointer.

(signal_handler): Remove.

(sub_main, main): Call new functions.

* subversion/svnrdump/svnrdump.c

(check_cancel): Change type to pointer.

(signal_handler): Remove.

(sub_main, main): Call new functions.

* subversion/svnsync/svnsync.c

(check_cancel): Change type to pointer.

(signal_handler): Remove.

(sub_main, main): Call new functions.

  1. … 11 more files in changeset.
Remove the svn_cl__conflict_func_interactive() callback.

The command line client will now start the conflict resolver by itself if

an update, merge, or switch operation flags conflicts in the working copy.

Before this commit it was relying on the libraries to do so. This finally

gives full control over conflict resolution to the client and paves the

way for future enhancements of the conflict resolver.

Only one use case of the libsvn_wc conflict callback remains. This is

required for supporting 'svn merge --accept' during merges which perform

multiple editor drives. A better solution would be changing the

svn_client_merge API to allow the client to get away without the conflict

callback. I've left this for future work.

* subversion/svn/cl.h

(svn_cl__conflict_stats_get_paths): Declare this new function which is

involved in keeping existing conflict resolution behaviour intact.

The client already records newly conflicted paths as part of conflict

accounting. We use this list of paths to run the conflict resolver on

the newly conflicted paths only, rather than running it over the entire

working copy as 'svn resolve' would do.

(svn_cl__get_conflict_func_interactive_baton,

svn_cl__conflict_func_interactive): Remove declaration. Now unused.

(svn_cl__walk_conflicts): Declare this new function which makes the

working copy walker logic of 'svn resolve' available to subcommands

which now need it as well.

* subversion/svn/conflict-callbacks.c

(svn_cl__get_conflict_func_interactive_baton,

svn_cl__conflict_func_interactive): Remove.

* subversion/svn/merge-cmd.c

(conflict_func_merge_cmd_baton, conflict_func_merge_cmd): Add this

temporary implementation of svn_wc_conflict_resolver_func2_t to

avoid breaking 'svn merge --accept'. Note that we cannot support the

'edit' and 'launch' accept options anymore, so these now map to 'postpone'.

This is a small CLI interface change relative to 1.9.

(svn_cl__merge): Install the above conflict callback if necessary.

Invoke the interactive conflict resolver if necessary.

* subversion/svn/notify.c

(svn_cl__conflict_stats_get_paths): Implement.

* subversion/svn/resolve-cmd.c

(svn_cl__walk_conflicts): Implement. Partly split out of svn_cl__resolve().

* subversion/svn/svn.c

(sub_main): Do not install a libsvn_wc conflict callback by default.

* subversion/svn/switch-cmd.c

(svn_cl__switch): Invoke the interactive conflict resolver if necessary.

* subversion/svn/update-cmd.c

(svn_cl__update): Invoke the interactive conflict resolver if necessary.

  1. … 7 more files in changeset.
Continue removing svn_cl__interactive_conflict_baton_t from 'svn' conflict code.

Make svn_cl__resolve_conflict() accept new parameters instead of grabbing the

same data from the client context's conflict callback baton.

* subversion/svn/cl.h

(svn_cl__conflict_stats_t): Move typedef upwards so svn_cl__cmd_baton_t

can use it.

(svn_cl__cmd_baton_t): Add 'conflict_stats' here so we can pass it to

subcommands without relying on the conflict callback baton.

(svn_cl__resolve_conflict): Update declaration.

* subversion/svn/conflict-callbacks.c

(svn_cl__resolve_conflict): Add output arguments 'accept_which', 'quit',

'external_failed', and 'printed_summary'. Add parameters 'editor_cmd',

'config', 'path_prefix', 'pb', and 'conflict_stats'. Use these parameters

instead of accessing the conflict callback baton in the client context.

* subversion/svn/resolve-cmd.c

(conflict_status_walker_baton): Add new fields 'accept_which', 'quit',

'external_failed', 'printed_summary', 'editor_cmd', 'config',

'path_prefix', 'pb', and 'conflict_stats'.

(conflict_status_walker): Update this caller of svn_cl__resolve_conflict().

(walk_conflicts): Add new parameters 'accept_which', 'quit',

'external_failed', 'printed_summary', 'editor_cmd', 'config',

'path_prefix', 'pb', and 'conflict_stats'.

Initialize the conflict walker baton with this data.

(svn_cl__resolve): Get conflict stats from subcommand baton.

Allocate and provide new arguments for svn_cl__resolve_conflict()

and walk_conflicts().

* subversion/svn/svn.c

(sub_main): Store a pointer to conflicts stats in command_baton.

  1. … 3 more files in changeset.
Convert more of the 'svn' client to new svn_client_conflict APIs.

Replace use of svn_wc_conflict_choice_t with svn_client_conflict_option_id_t.

* subversion/svn/cl.h

(svn_cl__resolve_conflict): Use conflict option ID. Swap parameters so

that client context comes after other parameters.

* subversion/svn/conflict-callbacks.c

(svn_cl__resolve_conflict): Use conflict option ID. Convert to the old

libsvn_wc type where calling a libsvn_wc function.

* subversion/svn/resolve-cmd.c

(conflict_status_walker_baton, conflict_status_walker, walk_conflicts,

svn_cl__resolve): Use conflict option IDs.

  1. … 2 more files in changeset.
Implement a conflict walker directly in the 'svn' client.

This is needed to keep moving the client over to the new svn_client_conflict

API, and as a result keep improving this API.

Before this change, the 'svn' client was forced to resolve conflicts by

passing a legacy conflict result back to libsvn_wc, since the resolution

process was driven from within libsvn_wc.

Now, the client drives the resolution process without using the conflict

callback. It relies on 'status' and some private libsvn_wc APIs for this

purpose. Use of private APIs will go away once more use of the public

svn_client_conflict API is implemented.

There may be some fallout in interactive conflict resolution mode since it

cannot be automatically tested. However, the regression test suite passes.

If you're using a trunk client and run into problems during interactive

conflict resolution, please let me know.

* subversion/svn/cl.h

(svn_cl__resolve_conflict): Declare. No docstring yet since I'm not sure

whether this is going to stay around very long.

* subversion/svn/conflict-callbacks.c

(svn_cl__resolve_conflict): Implement.

* subversion/svn/resolve-cmd.c

(conflict_status_walker_baton, tree_conflict_collector,

conflict_status_walker, walk_conflicts): Implement a conflict walker based

on similar code in libsvn_wc.

(svn_cl__resolve): Use the new conflict APIs instead of svn_client_resolve().

  1. … 2 more files in changeset.