Checkout Tools
  • last updated 5 hours ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates

Changeset 1659395 is being indexed.

Merge the pin-externals branch to trunk.

The discussion thread start in this post:

http://mail-archives.apache.org/mod_mbox/subversion-dev/201501.mbox/%3C20150128095434.GM26869%40ted.stsp.name%3E

has come to a consensus that the branch can be merged and additional

development of this feature can happen on trunk.

This merge adds a '--pin-externals' option to 'svn copy'.

This option enables automated pinning of URLs in svn:externals properties

during copy operations (issue #1258).

--pin-externals : pin externals with no explicit revision to their

last-changed revision (recommended when tagging)

This feature makes the svncopy.pl contrib script unnecessary.

Externals are "pinned" by adding a peg revision to the external's source URL.

For example, the external definition:

^/foo/bar ext_bar

might become:

^/foo/bar@400 ext_bar

This table shows which revision is used for pinning:

copy source: working copy (WC) REPOS

------------+------------------------+---------------------------+

copy WC | external's WC BASE rev | external's repos HEAD rev |

dest: |------------------------+---------------------------+

REPOS | external's WC BASE rev | external's repos HEAD rev |

------------+------------------------+---------------------------+

An external that is already pinned is left as-is.

Please see the branch log for details about these changes.

  1. … 22 more files in changeset.
For non-interactive mode, allow fine-grained control over which SSL

certificate failures are considered fatal and which may be ignored.

The --trust-server-cert option only accepts certificates signed by an

unknown CA, and rejects certificates which fail for other reasons.

However, in practice, people run into broken SSL configurations that

trigger other failure conditions such as hostname/CN mismatch, expired

certs, etc. Sometimes they are not in a position to fix the problem themselves

and can't get work done (writing scripts) since SVN refuses to operate.

This topic is one of the most discussed issues in the #svn IRC channel.

Somewhat less so on the users@ mailing lists, though it also occurs there.

There is no real reason to prefer one kind of failure condition over

any other. An invalid cert is an invalid cert, regardless of why it fails

validation. Ultimately, it is up to users to waive trust in SSL when it

gets in the way in a particular situation. We should not be making this

decision for them.

Deprecate the --trust-server-cert option and add the following new options

to 'svn', exposing all possible failure modes the underlying API can handle:

--trust-unknown-ca : with --non-interactive, accept SSL server

certificates from unknown certificate authorities

--trust-cn-mismatch : with --non-interactive, accept SSL server

certificates even if the server hostname does not

match the certificate's common name attribute

--trust-expired : with --non-interactive, accept expired SSL server

certificates

--trust-not-yet-valid : with --non-interactive, accept SSL server

certificates from the future

--trust-other-failure : with --non-interactive, accept SSL server

certificates with failures other than the above

* subversion/include/svn_cmdline.h

(svn_cmdline_create_auth_baton2): Declare and document new parameters.

(svn_cmdline_create_auth_baton): Deprecate.

* subversion/libsvn_subr/cmdline.c

(trust_server_cert_non_interactive_baton): New baton.

(ssl_trust_unknown_server_cert): Rename to ...

(trust_server_cert_non_interactive): .. this and implement generic

validation failure checks according to flags passed in baton.

(svn_cmdline_create_auth_baton): Move to libsvn_subr/deprecated.c.

(svn_cmdline_create_auth_baton2): Implement new revision of this API with

new options trust_server_cert_unknown_ca, trust_server_cert_cn_mismatch,

trust_server_cert_expired, trust_server_cert_not_yet_valid, and

trust_server_cert_other_failure.

* subversion/libsvn_subr/deprecated.c

(svn_cmdline_create_auth_baton): Implement as wrapper around

svn_cmdline_create_auth_baton2.

* subversion/svn/cl.h

(svn_cl__opt_state_t): Add new options trust_server_cert_unknown_ca,

trust_server_cert_cn_mismatch, trust_server_cert_expired,

trust_server_cert_not_yet_valid, and trust_server_cert_other_failure.

.

* subversion/svn/svn.c

(svn_cl__longopt_t): Add new options opt_trust_server_cert_unknown_ca,

opt_trust_server_cert_cn_mismatch, opt_trust_server_cert_expired,

opt_trust_server_cert_not_yet_valid, opt_trust_server_cert_other_failure.

(svn_cl__options): Add options and help text for --trust-unknown-ca,

--trust-cn-mismatch, --trust-expired, --trust-not-yet-valid, and

--trust-other-failure.

(svn_cl__global_options): Add the new options here.

(sub_main): Process new options and use svn_cmdline_create_auth_baton2().

* subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout:

Adjust expected output.

  1. … 5 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.
Use svn_wc_conflict_description3_t throughout the 'svn' command line client.

* 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

svn_wc_conflict_description3_t instead of svn_wc_conflict_description2_t.

* 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): Update declarations to use

svn_wc_conflict_description3_t.

* subversion/svn/cl.h

(svn_cl__conflict_func_interactive): Update declaration to use

svn_wc_conflict_description3_t.

* subversion/svn/conflict-callbacks.c

(show_diff, show_conflicts, merge_prop_conflict, show_prop_conflict,

edit_prop_conflict, handle_tree_conflict, handle_prop_conflict,

handle_tree_conflict, handle_obstructed_add, conflict_func_interactive):

Use svn_wc_conflict_description3_t instead of svn_wc_conflict_description2_t.

In handle_prop_conflict() we can drop a workaround that was necessary with

the old conflict descriptor.

* subversion/svn/info-cmd.c

(print_info_xml, print_info): Use svn_wc_conflict_description3_t instead of

svn_wc_conflict_description2_t.

* subversion/svn/status.c

(print_status): Update caller.

  1. … 5 more files in changeset.
Cleanup unused code related move heuristic detection from command line

client.

* subversion/svn/cl.h

(svn_cl__opt_state_t): Remove auto_moves member.

* subversion/svn/svn.c

(svn_cl__longopt_t): Remove opt_auto_moves.

(svn_cl__options): Remove "--auto-moves" command line option.

(sub_main): Do not handle opt_auto_moves.

  1. … 1 more file in changeset.
Implement cancellation in a bit of libsvn_client diff/merge handling to avoid

using deprecated functions... and to allow cancelling.

* subversion/svn/cl.h

(svn_cl__merge_file): Add cancel arguments and move single output argument

to the start of the argument list.

* subversion/svn/conflict-callbacks.c

(show_diff): Add cancel arguments. Update caller.

(handle_text_conflict): Update caller.

* subversion/svn/file-merge.c

(svn_cl__merge_file): Add cancel arguments. Move output argument.

Update caller.

  1. … 2 more files in changeset.
Introduce 'svn auth', a subcommand for managing the authentication cache

which supersedes the 'svnauth' tool. Currently, cached credentials can be

listed and removed. In the future, this subcommand could also provide a

mechanism to add credentials to the cache.

* subversion/svn/auth-cmd.c: New file based on subversion/svnauth/svnauth.c.

* subversion/svn/cl.h

(svn_cl__opt_state_t): Add 'show_passwords' option.

(svn_cl__auth): Declare.

* subversion/svn/svn.c

(svn_cl__longopt_t): Add 'opt_show_passwords'.

(svn_cl__options): The --remove option is also used by 'svn auth'.

Adjust its documentation accordingly. Add a --show-passwords option

for use by 'svn auth'.

(svn_cl__cmd_table): Add 'svn auth' subcommand.

(sub_main): Handle new --show-passwords option.

* subversion/tests/cmdline/getopt_tests_data/svn--help_stdout,

subversion/tests/cmdline/getopt_tests_data/svn_help_stdout:

Adjust expected output.

  1. … 4 more files in changeset.
Source code tidying. Tweak the calls to svn_cl__try: the argument list

sentinel value should be 0 (or alternatively APR_SUCCESS) rather than

SVN_NO_ERROR, since the latter is nominally of type pointer-to-svn_error_t,

although currently defined as plain 0.

* subversion/svn/cl.h,

tools/client-side/svn-bench/cl.h

(svn_cl__try): Adjust the doc string.

* subversion/svn/add-cmd.c

(svn_cl__add): Use 0 for the sentinel argument to svn_cl__try.

* subversion/svn/cat-cmd.c

(svn_cl__cat): Same.

* subversion/svn/changelist-cmd.c

(svn_cl__changelist): Same.

* subversion/svn/proplist-cmd.c

(svn_cl__proplist): Same.

* subversion/svn/status-cmd.c

(svn_cl__status): Same.

  1. … 6 more files in changeset.
[Reverted in r1597989]

Use the latest log client API in our command line client to make it actually

display moves as such.

This also adds the "--auto-moves" CL option and enables it for 'svn log'.

There is no option to force 1.8-style move behavior. If necessary, we can

easily add that in the future.

* subversion/svn/cl.h

(svn_cl__opt_state_t): add auto_moves flag for the new CL option

* subversion/svn/log-cmd.c

(svn_cl__log): select move behavior option based on new flag;

call updated API

* subversion/svn/svn.c

(svn_cl__longopt_t,

svn_cl__option): declare new option

(svn_cl__cmd_table): enable new option to 'svn log'

(sub_main): handle new CL option

* subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout

(): update expected --help output

  1. … 3 more files in changeset.
Fix issue 4398, relative path handling in status.

* subversion/svn/cl.h

(svn_cl__print_status, svn_cl__print_status_xml): Replace cwd parameter

with two target parameters.

* subversion/svn/status-cmd.c

(struct status_baton): Replace cwd member with two target members.

(struct status_cache): Add two target members.

(print_status_normal_or_xml): Pass new parameters.

(print_status): Cache target parameters.

(svn_cl__status): Store target rather than cwd, use cached target

parameters.

* subversion/svn/status.c

(make_relpath): Replace relative parameter with two target parameters.

(print_status): Pass new parameters.

(svn_cl__print_status, svn_cl__print_status_xml): Replace cwd parameter

with two target parameters.

* subversion/tests/cmdline/stat_tests.py

(status_path_handling): Remove XFAIL.

  1. … 3 more files in changeset.
Finish issue #4299 ("Remote version of 'svnlook youngest'") by

introducing 'svn youngest'.

* subversion/svn/cl.h

(svn_cl__opt_state_t): Add no_newline member.

(): Add svn_cl__youngest to the command procedure list.

* subversion/svn/svn.c

(svn_cl__options): Add --new-line option.

(svn_cl__longopt_t): Add opt_no_newline to svn_cl__longopt_t.

(svn_cl__cmd_table): Add 'youngest' entry.

(sub_main): Add handler for opt_no_newline.

* subversion/svn/youngest-cmd.c

(svn_cl__youngest): implement the 'youngest' sub command handler.

* subversion/tests/cmdline/basic_tests.py

(basic_youngest): New test.

(test_list): Add reference to new test.

Patch by: Masaru Tsuchiyama <m.tmatma{_AT_}gmail.com>

(Tweaked be me.)

  1. … 3 more files in changeset.
Add a new --remove-ignored option to 'svn cleanup', replacing --no-ignore.

Previously, --no-ignore was only valid with --remove-unversioned. The new

--remove-ignored option allows removing ignored items separately from

non-ignored unversioned items.

Suggested by: gstein

* subversion/include/svn_client.h

(svn_client_cleanup2): Rename 'no_ignore' parameter to

'remove_ignored_children'.

* subversion/libsvn_client/cleanup.c

(remove_unversioned_items_baton): Add 'remove_unversioned_items' member.

(remove_unversioned_items): Only remove unversioned items if the

'remove_unversioned_items' is set in the baton.

(svn_client_cleanup2): Account for renamed parameter and new baton member.

Run the delete-items status walk if either unversioned or ignored items

are to be removed, not just for unversioned items.

* subversion/svn/cl.h

(svn_cl__opt_state_t): Add remove_ignored.

* subversion/svn/cleanup-cmd.c

(svn_cl__cleanup): Replace handling of --no-ignore with --remove-ignored.

* subversion/svn/svn.c

(svn_cl__longopt_t): Add opt_remove_ignored.

(svn_cl__options): Add --remove-ignored.

(svn_cl__cmd_table): Adjust 'svn help cleanup' output.

(sub_main): Handle --remove-ignored.

* subversion/tests/cmdline/wc_tests.py

(cleanup_unversioned_items): Replace --no-ignore with --remove-ignored.

  1. … 5 more files in changeset.
Allow 'svn cleanup' to remove unversioned items from the working copy.

This should address the feature request from issue #3549.

Add two new options to 'svn cleanup', --remove-unversioned and --no-ignore.

The former causes unversioned files and directories to be removed after

successful cleanup. The latter causes ignored items to be removed as well.

One remaining question is what to do with externals. Right now, 'svn cleanup'

never recurses into externals. Should it recurse into externals if the

--remove-unversioned option is given? Should we change it to always recurse

into externals by default? I'm not quite sure.

* subversion/include/svn_client.h

(svn_client_cleanup2): Declare.

(svn_client_cleanup): Deprecate.

* subversion/libsvn_client/cleanup.c

(remove_unversioned_items): New helper function.

(svn_client_cleanup2): Implement as an extension of svn_client_cleanup(),

which can optionally remove unversioned items after all other cleanup

actions, via a status walk.

* subversion/libsvn_client/deprecated.c

(svn_client_cleanup): Implement as a wrapper around svn_client_cleanup2().

* subversion/svn/cl.h

(svn_cl__opt_state_t): Add new 'remove_unversioned' option.

* subversion/svn/cleanup-cmd.c

(svn_cl__cleanup): Run svn_client_cleanup2() to support removal of

unversioned items. Reject --no-ignore option without --remove-unversioned.

* subversion/svn/svn.c

(svn_cl__longopt_t): Add opt_remove_unversioned.

(svn_cl__options): Add --remove-unversioned option.

(svn_cl__cmd_table): Extend help text of 'svn cleanup'.

(sub_main): Handle --remove-unversioned option.

* subversion/tests/cmdline/wc_tests.py

(cleanup_unversioned_items, test_list): New test.

  1. … 6 more files in changeset.
Follow-up to 1489203: Remove unnecessary check for branches ancestry from

command line client. All required checks are performed in libsvn_client.

* subversion/svn/cl.h

* subversion/svn/util.c

(svn_cl__check_related_source_and_target): Remove

* subversion/svn/merge-cmd.c

* subversion/svn/mergeinfo-cmd.c

(run_merge, svn_cl__mergeinfo): Remove call to

svn_cl__check_related_source_and_target().

  1. … 3 more files in changeset.
Implement '--log' option for 'svn mergeinfo --show-revs' subcommand to print

revisions log message, author and date.

Suggested by: lgo

* subversion/svn/cl.h

(svn_cl__opt_state_t): Add mergeinfo_log member.

* subversion/svn/mergeinfo-cmd.c

(): Include svn_compat.h and svn_props.h.

(SEP_STRING, print_log_details): New.

(mergeinfo_log): New, mostly extracted from svn_cl__mergeinfo().

(svn_cl__mergeinfo): Call mergeinfo_log().

* subversion/svn/svn.c

(svn_cl__longopt_t): Add opt_mergeinfo_log.

(svn_cl__options): Add description for '--log' option.

(svn_cl__cmd_table): Add opt_mergeinfo_log to mergeinfo subcommand.

(sub_main): Handle '--log' option.

* subversion/tests/cmdline/mergeinfo_tests.py

(mergeinfo_log): New test.

(test_list): Add mergeinfo_log.

  1. … 3 more files in changeset.
Fix non-ASCII character handling in several 'svn' command-line options, when

using a non-UTF-8 locale. In roughly decreasing order of importance:

--old, --new:

It did not convert the path to UTF-8. It would fail to find a non-ASCII

path, or conceivably could find the wrong path.

--search, --search-and:

It did not convert the search term to UTF-8. It would fail to match a

non-ASCII search term, or conceivably could find a wrong match.

--file:

The check for accidentally specifying a versioned file used the

unconverted path, and so a non-ASCII path would (most likely) not

trigger the check when it should.

--limit, --accept, --show-revs, --strip, --change:

It did not convert the value to UTF-8 before parsing it. Valid values

would work properly, but the error message displayed for an invalid

value would display the invalid value wrongly.

--native-eol

Conversion to UTF-8 has been moved before comparison against fixed ASCII

strings like 'CRLF'. This will only make a difference if there are

character encodings in use that are not compatible with ASCII; otherwise

it is just for consistency of coding style.

* subversion/svn/svn.c

(sub_main): Convert option arguments to UTF-8 before using them, in most

cases where we weren't already doing so.

* subversion/svn/cl.h

(svn_cl__opt_state_t): Document which fields are *not* converted to UTF-8,

instead of the previous incomplete annotation of which ones are. Remove

the unused 'changelist' field (which was long ago superseded by the

'changelists' array.

  1. … 1 more file in changeset.
Make 'svn' print a summary of conflicts before starting interactive

conflict resolution, as well as after resolution is finished, to give the

user an idea of how much resolution work will be needed.

Addresses issue #3497, "auto merge as much as can; then print summary, then

go into conflict resolution".

* subversion/svn/cl.h,

subversion/svn/notify.c

(svn_cl__notifier_print_conflict_stats): Rewrite as a wrapper ...

(svn_cl__print_conflict_stats): ... around this new function.

* subversion/svn/conflict-callbacks.c

(svn_cl__interactive_conflict_baton): Add a flag to remember whether we

have printed the summary yet.

(svn_cl__get_conflict_func_interactive_baton): Initialize that flag.

(conflict_func_interactive): Print a summary of conflicts before starting

interactive resolution.

  1. … 2 more files in changeset.
Fix a bug in the Summary of Conflicts when using interactive conflict

resolution. Marking a text conflict as resolved but leaving a prop conflict

unresolved on the same file, or vice versa, would decrement both the text

and prop conflict summary stats.

Found by: Mattias Engdegård <mattiase{_AT_}bredband.net>

* subversion/svn/cl.h

(svn_cl__conflict_stats_t): New structure type.

(svn_cl__conflict_stats_create,

svn_cl__conflict_stats_resolved): New functions.

(svn_cl__get_conflict_func_interactive_baton,

svn_cl__get_notifier): Take 'conflict_stats' as a parameter.

* subversion/svn/conflict-callbacks.c

(svn_cl__interactive_conflict_baton_t): Add a 'conflict_stats' field.

(svn_cl__get_conflict_func_interactive_baton): Initialize the new field.

(conflict_func_interactive): New function, containing what was the

body of svn_cl__conflict_func_interactive().

(svn_cl__conflict_func_interactive): Re-write as a wrapper, and adjust

the conflict stats if conflict_func_interactive() returns a value that

means the conflict will be marked as resolved.

* subversion/svn/notify.c

(notify_baton): Replace the separate conflict stats fields with a

pointer to a conflict stats structure.

(svn_cl__conflict_stats_t): New structure definition.

(store_path,

svn_cl__notifier_print_conflict_stats): Adjust for the extra level of

indirection in notify_baton.

(notify): The same, and don't adjust the conflict stats when handling

a 'resolved' notification.

(svn_cl__get_notifier): Adjust to take the conflict stats as a parameter

instead of initializing the stats here.

* subversion/svn/svn.c

(sub_main): Create a conflict stats structure here and pass it along when

getting the notifier and when getting the conflict resolver callback.

  1. … 3 more files in changeset.
Remove some unused code in 'svn'.

* subversion/svn/cl.h,

subversion/svn/notify.c

(svn_cl__notifier_reset_conflict_stats): Delete this unused function.

* subversion/svn/resolve-cmd.c

(svn_cl__resolve): Don't re-install the conflict resolver callback, since

the one and only callback is already installed.

  1. … 2 more files in changeset.
Improve error messages on propset and propedit when an svn: property

is misspelled.

* subversion/svn/cl.h (svn_cl__prop_use_t): New enumeration.

(svn_cl__check_svn_prop_name): Add prop_use parameter.

* subversion/svn/props.c (force_prop_option_message, wrong_prop_error_message):

Two new helper functions that return a customized error message based

on svn_cl__prop_use_t property use discriminator.

(svn_cl__check_svn_prop_name): Update prototype with prop_use.

Call the helpers to generate customized error messages based on the

given property use.

* subversion/svn/propset-cmd.c (svn_cl__propset): Set property usage.

* subversion/svn/propedit-cmd.c (svn_cl__propedit): Set property usage.

  1. … 3 more files in changeset.
Make the command client use a wrapper function when calling a deprecated

function to avoid a compiler warning.

* subversion/svn/cl.h

(svn_cl__deprecated_merge_reintegrate): New.

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

* subversion/svn/merge-cmd.c

(run_merge): Use wrapper.

  1. … 2 more files in changeset.
Make 'update' and 'switch' libsvn_client APIs delay calling the conflict

resolver for each conflicted path until the whole update is complete, like

r1459012 did for merge. Previously, the APIs called the callback as soon as

each conflict is raised, and 'svn' used a work-around.

Rationale:

- Avoids the possibility of a network timeout if the resolver callback

takes a long time, for example when doing interactive resolution.

- Means that all changes have been received. This is important when

resolving a tree conflict that involves a copy or move, because the

resolver (code or human) may need to look at or modify another path.

- Makes all subcommands work the same way. Eliminates the code in

'svn' that implements a 'postpone' callback.

- Makes this way of working available to all clients. Makes no difference

to a client that does not want to use it, such as a GUI.

This changes the notifications printed by 'svn' in the case of pre-specified

resolution (--accept=xxx), in the same way as described in r1459012 for

'merge'. It now prints a notification with status 'C' for each conflicted

path, and then later a 'Resolved ...' line for each conflicted path. The

Summary of Conflicts now reports both the number of remaining conflicts and

the number of resolved conflicts.

* subversion/libsvn_client/client.h

subversion/libsvn_client/resolved.c

(svn_client__resolve_conflicts): New function, moved and renamed from

resolve_conflicts() in merge.c, with the list-of-paths parameter changed

to a simple hash and the 'resolved' output made optional.

* subversion/libsvn_client/merge.c

(resolve_conflicts): Move to resolved.c: svn_client__resolve_conflicts().

(do_merge): Track the change of resolve_conflicts().

* subversion/libsvn_client/update.c

(record_conflict): New function.

(update_internal): Don't use the resolver callback in the client context,

but instead use a local one that just remembers the conflicted paths.

(svn_client__update_internal): Call the resolver on the conflicted paths

before returning.

* subversion/libsvn_client/switch.c

(record_conflict,

switch_internal,

svn_client__switch_internal): Same as in update.c.

* subversion/svn/cl.h,

subversion/svn/conflict-callbacks.c

(svn_cl__conflict_func_postpone,

svn_cl__get_conflict_func_postpone_baton,

get_postponed_conflicted_paths,

svn_cl__resolve_postponed_conflicts): Delete.

* subversion/svn/svn.c

(sub_main): Install the proper conflict handler instead of the 'postpone'

handler.

* subversion/svn/merge-cmd.c

(svn_cl__merge): Don't install the conflict handler here, as we've now

done it in 'svn'.

* subversion/svn/update-cmd.c

(svn_cl__update): Remove a comment that said we were using the 'postpone'

handler. Don't resolve conflicts after the operation.

* subversion/svn/switch-cmd.c

(svn_cl__switch): Same.

* subversion/tests/cmdline/update_tests.py

(update_output_with_conflicts,

update_output_with_conflicts_resolved): Adjust to expect the new

placement of the 'Resolved conflicts ...' line and the new form of the

summary of conflicts.

  1. … 11 more files in changeset.
Align comments for easier reading.

*subversion/svn/cl.h:

(svn_cl__opt_state_t): Align comments.

Approved by: danielsh

* subversion/svn/cl.h,

subversion/svn/conflict-callbacks.c

(svn_cl__conflict_func_interactive): Move all of the documentation to the

declaration.

  1. … 1 more file in changeset.
Let svn_cl__resolve_postponed_conflicts() tell the caller whether it

resolved all the conflicts. We don't use that yet, but we will soon. And

some other small tweaks the 'svn' conflict notification code.

* subversion/svn/cl.h,

(svn_cl__resolve_postponed_conflicts): Return a flag indicating whether

all conflicts were resolved.

(svn_cl__notifier_reset_conflict_stats): New function.

(svn_cl__print_conflict_stats): Rename to

svn_cl__notifier_print_conflict_stats() and s/pool/scratch_pool/ and

s/notify_baton/baton/ (the last being a follow-up to r1446746.

* subversion/svn/conflict-callbacks.c

(get_postponed_conflicted_paths): Simplify: remove a special-case return.

(svn_cl__resolve_postponed_conflicts): Implement the extra parameter, and

remove the special-case return.

* subversion/svn/notify.c

(svn_cl__notifier_reset_conflict_stats): New function.

(svn_cl__print_conflict_stats): Rename to

svn_cl__notifier_print_conflict_stats() and s/pool/scratch_pool/.

* subversion/svn/merge-cmd.c

(svn_cl__merge): Update calls to svn_cl__print_conflict_stats().

* subversion/svn/patch-cmd.c

(svn_cl__patch): Same.

* subversion/svn/switch-cmd.c

(svn_cl__switch): Same.

* subversion/svn/update-cmd.c

(svn_cl__update): Same.

  1. … 6 more files in changeset.
Remove the 'depth' parameter from svn_cl__resolve_postponed_conflicts(), as

it was mis-used and unnecessary (and undocumented).

The function resolves the conflicts on a pre-selected set of specific paths.

It was resolving to the specified depth within each such path, but the

callers were mistakenly passing the depth of the overall merge/update/switch

operation.

* subversion/svn/cl.h,

subversion/svn/conflict-callbacks.c

(svn_cl__resolve_postponed_conflicts): Remove the 'depth' parameter.

* subversion/svn/merge-cmd.c

(svn_cl__merge): Adjust caller.

* subversion/svn/switch-cmd.c

(svn_cl__switch): Adjust caller.

* subversion/svn/update-cmd.c

(svn_cl__update): Adjust caller.

  1. … 4 more files in changeset.
When a binary mime-type is set on a file that looks like a text file,

make the 'svn' client print a warning about potential future problems

with operations such as diff, merge, and blame.

This is only done during local propset for now, because the file needs

to be present on disk to detect its mime-type.

See for related discussion: http://mail-archives.apache.org/mod_mbox/subversion-dev/201301.mbox/%3C20130131185725.GA13721%40ted.stsp.name%3E

* subversion/svn/cl.h

(svn_cl__propset_print_binary_mime_type_warning): Declare.

* subversion/svn/propedit-cmd.c

(svn_cl__propedit): Warn when a binary svn:mime-type property value is

set on a local file that looks like text.

* subversion/svn/propset-cmd.c

(svn_cl__propset): Warn when a binary svn:mime-type property value is

set on a local file that looks like text.

* subversion/svn/util.c

(svn_cl__propset_print_binary_mime_type_warning): New helper function.

* subversion/tests/cmdline/blame_tests.py

(blame_binary): Adjust text expectations.

* subversion/tests/cmdline/commit_tests.py

(commit_one_new_binary_file): Adjust test expectations.

* subversion/tests/cmdline/diff_tests.py

(diff_force, diff_mime_type_changes):

* subversion/tests/cmdline/info_tests.py

(binary_tree_conflict): Adjust test expectations.

* subversion/tests/cmdline/merge_tests.py

(merge_change_to_file_with_executable,

merge_binary_file_with_keywords): Adjust test expectations.

* subversion/tests/cmdline/prop_tests.py

(binary_mime_type_on_text_file_warning): New constant.

(inappropriate_props): Adjust test expectations.

* subversion/tests/cmdline/svnlook_tests.py

(diff_binary): Adjust test expectations.

  1. … 10 more files in changeset.
Improve doc strings for some conflict resolution functions.

* subversion/svn/cl.h

(svn_cl__get_conflict_func_postpone_baton,

svn_cl__conflict_func_postpone,

svn_cl__resolve_postponed_conflicts): Better doc strings.

* subversion/svn/conflict-callbacks.c

(svn_cl__conflict_func_postpone): Remove doc string from here since it is

in the header file.

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

(svn_cl__accept_t): Remove obsolete comments.

To finally close issue #3009, and for similarity with 'svnlook diff', add a

--no-diff-added output filtering argument to 'svn diff'.

* subversion/include/svn_client.h

(svn_client_diff6,

svn_client_diff_peg6): Update arguments.

* subversion/libsvn_client/deprecated.c

(svn_client_diff5,

svn_client_diff_peg5): Update caller.

* subversion/libsvn_client/diff.c

(diff_cmd_baton): Add variable.

(diff_file_added): Filter diff if requested.

(svn_client_diff6,

svn_client_diff_peg6): Set value in baton.

* subversion/svn/cl.h

(svn_cl__opt_state_t.diff): Add variable.

* subversion/svn/diff-cmd.c

(svn_cl__diff): Update caller.

* subversion/svn/log-cmd.c

(svn_cl__log): Update caller.

* subversion/svn/svn.c

(svn_cl__longopt_t): Add value.

(svn_cl__options): Add argument.

(svn_cl__cmd_table): Declare --no-diff-added for diff.

(sub_main): Parse argument.

  1. … 6 more files in changeset.