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

Changeset 1171713 is being indexed.

Make the client diff output streamy, rather than requiring an APR file.

(Our own consumer of this API just uses stdout, so this doesn't have much

effect there.)

* subversion/include/svn_client.h

(svn_client_diff6): New.

(svn_client_diff5): Deprecate.

(svn_client_diff_peg6): New.

(svn_client_diff_peg5): Deprecate.

* subversion/svn/diff-cmd.c

(svn_cl__diff): Update callers.

* subversion/libsvn_client/deprecated.c

(svn_client_diff5, svn_client_diff_peg5): New deprecation wrappers.

* subversion/libsvn_client/diff.c

(file_printf_from_utf8): Remove.

(display_mergeinfo_diff, display_prop_diffs): Accept and use a stream

instead of a file.

(diff_cmd_baton): Change file handles to streams.

(diff_content_changed): Use streams, and create a temp file for interfacing

with an external diff tool.

(diff_file_deleted): Update params.

(svn_client_diff6): Renamed and updated from svn_client_diff5().

(svn_client_diff_peg6): Renamed and updated from svn_client_diff_peg5().

  1. … 3 more files in changeset.
The semi-annual trailing whitespace cleansing ritual.

* everywhere:

for extsn in c h cpp java py pl rb; do

sed -i -e 's/[ \t]*$//' `find . -name "*.$extsn" | xargs grep '[ \t]$' -l`

done

  1. … 144 more files in changeset.
Fix issue #3702 'Unable to perform case-only rename on windows' by adding a

new flag to svn_client_args_to_target_array (revving it in the process), so

it can perform specialized case-canonicalization behavior for supporting

case-only renames.

* subversion/tests/cmdline/copy_tests.py

(case_only_rename): Remove XFail marker. Fix issue description according

to the changed summary of issue #3702.

* subversion/include/svn_client.h

(svn_client_args_to_target_array): Deprecate, succeeded by ...

(svn_client_args_to_target_array2): ... new function, carrying a new

argument KEEP_LAST_ORIGPATH_ON_TRUEPATH_COLLISION.

* subversion/libsvn_client/cmdline.c

(svn_client_args_to_target_array2): Make use of new flag

KEEP_LAST_ORIGPATH_ON_TRUEPATH_COLLISION to undo truepath-conversion of

the last of 2 targets if they both have the same 'truepath'.

* subversion/libsvn_client/deprecated.c

(svn_client_args_to_target_array): Implement deprecated wrapper.

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

(test_args_to_target_array): Adjust caller, passing FALSE for

KEEP_LAST_ORIGPATH_ON_TRUEPATH_COLLISION.

[in subversion/svn]

* add-cmd.c, blame-cmd.c, cat-cmd.c, changelist-cmd.c, checkout-cmd.c,

cleanup-cmd.c, commit-cmd.c, copy-cmd.c, delete-cmd.c, diff-cmd.c,

export-cmd.c, import-cmd.c, info-cmd.c, list-cmd.c, lock-cmd.c, log-cmd.c,

merge-cmd.c, mergeinfo-cmd.c, mkdir-cmd.c, patch-cmd.c, propdel-cmd.c,

propedit-cmd.c, propget-cmd.c, proplist-cmd.c, propset-cmd.c,

relocate-cmd.c, resolve-cmd.c, resolved-cmd.c, revert-cmd.c, status-cmd.c,

switch-cmd.c, unlock-cmd.c, update-cmd.c, upgrade-cmd.c:

Adjust callers, passing FALSE for KEEP_LAST_ORIGPATH_ON_TRUEPATH_COLLISION.

* move-cmd.c: Adjust caller, passing TRUE for

KEEP_LAST_ORIGPATH_ON_TRUEPATH_COLLISION.

* cl.h

(svn_cl__args_to_target_array_print_reserved): Add new parameter

KEEP_LAST_ORIGPATH_ON_TRUEPATH_COLLISION.

* util.c

(svn_cl__args_to_target_array_print_reserved): Add new parameter

KEEP_LAST_ORIGPATH_ON_TRUEPATH_COLLISION, passing it to

svn_client_args_to_target_array2.

  1. … 41 more files in changeset.
Fix issue #3826 ("`svn diff local_absolutepath` from inside a local

working copy is broken").

* subversion/svn/diff-cmd.c

(svn_cl__diff): Only convert a user-provided target path to a

relpath when we're about to tack it onto a base URL; absolute

paths make fine local targets.

* subversion/tests/cmdline/diff_tests.py

(diff_abs_localpath_from_wc_folder): Remove XFail() decorator.

  1. … 1 more file in changeset.
Follow-up to r1064436:

Fix a copy-pasto that caused an assertion failure with

"svn diff --old=. --new=^/subversion/trunk":

assertion "svn_dirent_is_canonical(base, pool)" failed: file \

"subversion/libsvn_subr/dirent_uri.c", line 1010, function "svn_dirent_join"

* subversion/svn/diff-cmd.c

(svn_cl__diff): We want to check if the new target is a URL. We've already

checked the old one.

Reintegrate the 'uris-as-urls' branch into trunk.

(Merged /subversion/branches/uris-as-urls:r1060426-1064427.)

This should wrap up issue #2028.

  1. … 73 more files in changeset.
Make use of a new function for checking whether all targets are the same

type. A follow-up to r1044028.

* subversion/svn/diff-cmd.c

(svn_cl__diff): Make use of new function

svn_cl__assert_homogeneous_target_type(). Tweak existing logic which

checks to see whether working copy path is present in targets.

Patch by: Noorul Islam K M <noorul{_AT_}collab.net>

(tweaked by me)

* subversion/tests/cmdline/input_validation_tests.py

(invalid_diff_targets): New test, verifying that svn diff copes well

with invalid target combinations.

* subversion/svn/diff-cmd.c

(svn_cl__diff): For consistency with other sub-commands, raise the

SVN_ERR_CL_ARG_PARSING_ERROR if both working copy paths and URLs are

passed, and use the same error message also used elsewhere.

  1. … 1 more file in changeset.
Introduce a new flag --git-diff for svn diff, specifying that we want to use

git's extended diff format.

With the diff format, a delete, copy or move may be described with only a

header. Non-git-aware patch applications can not process such a patch, thus

the need for a flag to stay backward compatible with our old diff format.

With the flag there is no need for the SVN_EXPERIMENTAL_PATCH ifdefs.

Note: We don't yet create diff headers for copied or moved paths.

* subversion/svn/cl.h

(svn_cl__opt_state_t): Add USE_GIT_DIFF_FORMAT member.

* subversion/svn/main.c

(svn_cl__longopt_t): Add OPT_USE_GIT_DIFF_FORMAT.

(svn_cl__options): Add and document the new --git-diff option.

(svn_cl__cmd_table): Make svn diff accept the --git-diff option.

(main): Handle --git-diff options.

* subversion/include/svn_client.h

(svn_client_diff5,

svn_client_diff_peg5): Add USE_GIT_DIFF_FORMAT parameter.

(svn_client_diff4,

svn_client_diff_peg4): Mention in the doc string that

USE_GIT_DIFF_FORMAT defaults to FALSE.

* subversion/libsvn_client/diff.c

(diff_parameters): Add USE_GIT_DIFF_FORMAT member.

(print_git_diff_header_added,

print_git_diff_header_modified,

print_git_diff_header_deleted,

print_git_diff_header_copied,

print_git_diff_header_moved): Remove SVN_EXPERIMENTAL_PATCH ifdefs

(diff_content_changed): Check for USE_GIT_DIFF_FORMAT instead of

having the parts dealing with git diffs inside SVN_EXPERIMENTAL

ifdefs.

(svn_client_diff5,

svn_client_diff_peg5): TODO

* subversion/libsvn_client/deprecated.c

(svn_client_diff4,

svn_client_diff_peg4): Call the new functions with USE_GIT_DIFF_FORMAT

set to FALSE.

* subversion/svn/diff-cmd.c

(svn_cl__diff): Adjust calls to include USE_GIT_DIFF_FORMAT.

* subversion/svn/log-cmd.c

(log_entry_reciever): Adjust callers of svn_client_diff5() and

svn_client_diff_peg5().

  1. … 6 more files in changeset.
Allow overriding the default value of the --extensions option from the

client configuration file.

* subversion/include/svn_client.h

(svn_client_diff5): Document that the diff_options argument is now

allowed to be NULL. This allows clients to say "I have no default

arguments for diff" in an unambiguous way (before this commit,

the CLI client passed an array with zero elements, and other

clients probably do the same).

* subversion/include/svn_config.h

(SVN_CONFIG_OPTION_DIFF_EXTENSIONS): New.

* subversion/libsvn_subr/config_file.c

(svn_config_ensure): Document the new diff-extensions option.

* subversion/libsvn_client/diff.c

(set_up_diff_cmd_and_options): If no diff options are provided, check the

configuration for diff options. If that fails, initialise the options

to an empty array (the client used to initialise this array but is no

longer required to do so).

* subversion/svn/log-cmd.c,

subversion/svn/diff-cmd.c

(log_entry_receiver, svn_cl__diff): Pass NULL diff_options if none were

provided on the command line.

  1. … 5 more files in changeset.
Follow up r948785.

Solve issue #3071 with simple and cleaner approach without revving the

diff APIs.

* subversion/include/svn_client.h

(svn_client_diff5, svn_client_diff_peg5): Remove the parameter added

for --force-internal-diff

* subversion/svn/diff-cmd.c

(svn_cl__diff): Adjust for above change.

* subversion/svn/log-cmd.c

(log_entry_receiver): Adjust for above change.

* subversion/svn/main.c

(main): Set config option of diff command to NULL if the user wants

to force internal diff.

* subversion/libsvn_client/deprecated.c

(svn_client_diff4, svn_client_diff_peg4): Do not pass the extra

argument for diff APIs.

* subversion/libsvn_client/diff.c

(set_up_diff_cmd_and_options): Remove the extra argument and related

logic.

(svn_client_diff5, svn_client_diff_peg5): Remove the extra argument.

Suggested by: rhuijben

  1. … 5 more files in changeset.
Fix issue #3071.

Request enhancement to svn diff to indicate that an external diff-cmd

should NOT be used

* subversion/svn/cl.h

(svn_cl__opt_state_t): Add force internal diff boolean.

* subversion/include/svn_client.h

(svn_client_diff5, svn_client_diff_peg5): Add new parameter to the

function prototype in order to support the new option

--force-internal-diff

* subversion/svn/diff-cmd.c

(svn_cl__diff): Pass new parameter to the diff APIs in order to force

internal diff command.

* subversion/svn/log-cmd.c

(log_entry_receiver): Pass FALSE for force internal diff parameter

to the diff APIs in order preserve old behavior.

* subversion/svn/main.c

(svn_cl__longopt_t): Add new option force internal diff.

(svn_cl__options): Add description for the new diff option.

(svn_cl__cmd_table): Add new option force internal diff to the diff

command.

(main): Enable force internal diff option based on user input and

check for mutually exclusive options '--diff-cmd' and

'--force-internal-diff'

* subversion/libsvn_client/deprecated.c

(svn_client_diff4, svn_client_diff_peg4): Pass FALSE for force

internal diff paramater to get the old behavior.

* subversion/libsvn_client/diff.c

(set_up_diff_cmd_and_options): Check for force internal diff option

and get rid of external diff command if required.

(svn_client_diff5, svn_client_diff_peg5): Add support for the new

option --force-internal-diff

  1. … 6 more files in changeset.
Avoid casting away "const" in a few places.

* subversion/include/private/svn_skel.h,

subversion/libsvn_subr/skel.c

(svn_skel__append): Remove "const" from the skel parameter, because, even

though it is not *modified* by this function, it must be *modifiable* in

order to be part of the list. Thus, no longer cast away "const" in the

implementation.

* subversion/libsvn_fs_base/revs-txns.c

(txn_body_cleanup_txn_copy, txn_body_cleanup_txn_changes,

txn_body_delete_txn): Dereference the "baton" parameter instead of

type-casting it to get the desired "const char *" pointer ...

(svn_fs_base__purge_txn): ... and here, in the only caller, take the

address of the "const char *" variable instead of casting away "const"

to convert it to a "void *" baton.

* subversion/libsvn_wc/wc_db.c

(svn_wc__db_read_conflict_victims): Use an intermediate variable to avoid

casting away "const".

* subversion/svn/diff-cmd.c

(summarize_xml, summarize_regular): Dereference the "baton" parameter

instead of type-casting it to get the desired "const char *" pointer ...

(svn_cl__diff): ... and here, in the only caller, take the address of the

"const char *" variable instead of casting away "const" to convert it to

a "void *" baton.

  1. … 4 more files in changeset.
Test out my new and fancy ASF commit priviledges by changing the copyright

wording in our license headers to reflect ownership by the ASF.

* NOTICE:

Change terminology to ASF, and update a link.

* subversion/libsvn_subr/opt.c

(svn_opt__print_version_info): Note that the product as a whole is

copyrighted by the ASF, and update the project website.

* everywhere:

Change license text to reflect ASF ownership.

  1. … 891 more files in changeset.
Replace deprecated svn_path_join().

* subversion/svn/cl.h

(svn_cl__path_join): New.

* subversion/svn/util.c

(svn_cl__path_join): Wrap svn_path_join().

* subversion/svn/diff-cmd.c

(svn_cl__diff, summarize_xml, summarize_regular): Replace svn_path_join()

with svn_cl__path_join() since the resulting path is allowed to be both

uri and dirent.

Patch by: Daniel Näslund <daniel{_AT_}longitudo.com>

Suggested by: julianfoad

  1. … 2 more files in changeset.
More work on issue #2543 "Inconsistent svn diff after rename".

Overloading the meaning of --notice-ancestry was not a good idea.

Instead, add a new option called --show-copies-as-adds (option name

suggested by danielsh), and pass the new flag through libsvn_client

and libsvn_wc APIs. This also changes the default behaviour of svn diff

back to what it was before r39680: svn diff now compares copies to their

source again by default.

The new option works for the WC->WC case only for now, so re-adjust

some tests which were already expecting other cases to work.

* subversion/include/svn_client.h

(svn_client_diff5, svn_client_diff_peg5): New parameter show_copies_as_adds,

API bump to version 5.

(svn_client_diff4, svn_client_diff_peg4): Deprecate.

* subversion/include/svn_wc.h

(svn_wc_get_diff_editor6, svn_wc_diff6): New parameter show_copies_as_adds.

(svn_wc_get_diff_editor5, svn_wc_diff5): Update docstrings.

* subversion/libsvn_client/deprecated.c

(svn_client_diff4, svn_client_diff_peg4): Wrappers around the version 5

functions.

* subversion/libsvn_client/diff.c

(diff_parameters): New show_copies_as_adds member.

(diff_wc_wc): New show_copies_as_adds parameter, pass it on to svn_wc_diff6().

(diff_repos_wc): Revert ancestry-heeding changes made in r39720, so that

this function resolves peg revisions by default again.

Pass show_copies_as_adds=FALSE to svn_wc_get_diff_editor6() for now.

(do_diff): Pass show_copies_as_adds parameter to diff_wc_wc().

(svn_client_diff4, svn_client_diff_peg4): Rename to ...

(svn_client_diff5, svn_client_diff_peg5): ... these, and propagate

show_copies_as_adds paramter into diff_params.

* subversion/libsvn_wc/deprecated.c

(svn_wc_get_diff_editor5, svn_wc_diff5): Pass FALSE for show_copies_as_adds.

* subversion/libsvn_wc/diff.c

(edit_baton): Add show_copies_as_adds member, tweak doc string of

ignore_ancestry member.

(make_edit_baton): New parameter show_copies_as_adds, store its value in

created baton.

(file_diff): Treat copies as schedule-normal files if eb->show_copies_as_adds

is FALSE. Don't use the eb->ignore_ancestry for this purpose.

(svn_wc_get_diff_editor6, svn_wc_diff6): New parameter show_copies_as_adds,

pass it on to make_edit_baton().

* subversion/svn/cl.h

(svn_cl__opt_state_t): New member show_copies_as_adds.

* subversion/svn/diff-cmd.c

(svn_cl__diff): Call svn_client_diff5() and svn_client_diff_peg5().

Remove unnecessary warning about "--notice-ancestry" option.

* subversion/svn/main.c

(svn_cl__longopt_t): New member opt_show_copies_as_adds,

(svn_cl__options): Add "--show-copies-as-adds" option.

(svn_cl__cmd_table): Make "svn diff" accept "--show-copies-as-adds".

(main): Set opt_state.show_copies_as_adds depending on the new option.

* subversion/tests/cmdline/diff_tests.py

(diff_renamed_file), diff_base_repos_moved: Adjust to new behaviour.

Add tests for cases which should work eventually but don't work yet,

all commented out.

(diff_within_renamed_dir, diff_nonrecursive_checkout_deleted_dir):

Adjust to new behaviour.

* subversion/tests/cmdline/merge_tests.py

(merge_in_new_file_and_diff): Pass "--show-copies-as-adds" so that

this test passes with the expected test output as modified in r39680.

  1. … 10 more files in changeset.
Follow-up to r39680:

Continue work on issue #2543 "Inconsistent svn diff after rename"

Make repository->WC diff consistent with WC->WC diff, by diffing

files added-with-history against the empty file by default.

As with WC->WC diffs, the --notice-ancestry option now triggers the

old behaviour of diffing against the copyfrom source.

* subversion/libsvn_client/diff.c

(diff_repos_wc): When doing a pegged diff, if ignoring ancestry,

just use the target's URL as retrieved from the entry unchanged.

Else, determine the pegged target's URL under consideration of history

as before. While here, add a missing svn_error_return().

* subversion/svn/diff-cmd.c

(svn_cl__diff): If a pegged diff fails because a path could not be found,

suggest trying the --notice-ancestry option. This should help users

migrating to the new default behaviour, which might yield 'path not found'

errors during commands such as 'svn diff -r42 foo' if foo did not exist

under the name 'foo' in revision 42.

* subversion/tests/cmdline/diff_tests.py

(diff_renamed_file, diff_within_renamed_dir,

diff_base_repos_moved): Test the Repos->WC diff case both with and

without ancestry, now that we support both.

(diff_nonrecursive_checkout_deleted_dir): Pass --notice-ancestry to avoid

a 'path not found' error making the test fail.

  1. … 2 more files in changeset.
Entirely remove support for SVNPATCH blocks in patches from 'svn patch',

as merged to trunk in r36404. Only support for unidiff application remains.

This shaves about 5000 lines of code from Subversion.

For related discussion, see:

Date: Wed, 26 Aug 2009 16:24:54 +0100

From: Stefan Sperling <stsp@elego.de>

To: dev@subversion.tigris.org

Subject: reducing code bloat by removing svnpatch? (except unidiff)

Message-ID: <20090826152453.GH11667@jack.stsp.name>

http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2387601

* subversion/libsvn_subr/patch.c,

subversion/libsvn_wc/patch.c,

subversion/include/private/svn_patch.h: Remove.

* subversion/tests/cmdline/diff_tests.py

(): Remove now unused imports.

(diff_svnpatch): Remove this test.

(test_list): Track removed test.

* subversion/tests/cmdline/patch_tests.py

(svn_patch_encode, patch_basic, patch_copy_and_move): Remove

(test_list): Track removed tests.

* subversion/svn/patch-cmd.c

(svn_cl__patch): Track removed arguments of svn_client_patch().

* subversion/svn/cl.h

(svn_cl__opt_state_t): Remove svnpatch member.

* subversion/svn/diff-cmd.c

(svn_cl__diff): Track removed member of svn_cl__opt_state_t.

Call svn_client_diff4() instead of svn_client_diff5()

and svn_client_diff_peg4() instead of svn_client_diff_peg5().

* subversion/svn/main.c

(svn_cl__longopt_t): Remove opt_svnpatch_format and opt_from_source members,

the latter of which was added as part of r36404 but never used anywhere.

(svn_cl__options, svn_cl__cmd_table, main): Remove the --svnpatch command

line option. Update the help output for 'svn patch'.

* subversion/libsvn_wc/deprecated.c

(svn_wc_get_diff_editor5): Track removed arguments of svn_wc_get_diff_editor6.

(svn_wc_diff5): Track removed arguments of svn_wc_diff6.

* subversion/include/svn_wc.h,

subversion/libsvn_wc/diff.c

(): Don't include now unused headers.

(edit_baton): Remove svnpatch_stream, diff_targets, diff_editor,

and next_token members.

(dir_baton): Remove token member.

(file_baton): Remove dir_baton and token members.

(make_editor_baton, make_dir_baton, make_file_baton, file_diff,

directory_elements_diff, report_wc_file_as_added,

report_wc_directory_as_added, open_root, delete_entry, add_directory,

open_directory, close_directory, add_file, open_file, close_file,

close_edit, svn_wc_get_diff_editor6, svn_wc_diff6): Remove code related

exclusively to svnpatch, and track removed members and changed arguments.

(make_token, dir_diff, transmit_svndiff, transmit_prop_deltas,

svnpatch_open_root, svnpatch_open_directory, svnpatch_close_directory,

svnpatch_add_directory, svnpatch_change_dir_prop, svnpatch_open_file,

svnpatch_add_file, svnpatch_close_file, svnpatch_change_file_prop,

svnpatch_delete_entry, svndiff_write_handler, svndiff_close_handler,

svnpatch_apply_textdelta, svnpatch_close_edit, get_svnpatch_diff_editor,

path_driver_cb_baton, path_driver_cb_func): Remove.

* subversion/libsvn_client/deprecated.c

(svn_client_diff4, svn_client_diff_peg4): Remove, have been un-deprecated.

* subversion/libsvn_client/repos_diff.c

(SAVEPOINT_RELEASED): Remove.

(edit_baton): Remove svnpatch_file, svnpatch_stream, savepoint,

svnpatch_editor, and next_token members.

(dir_baton): Remove token and savepoint members.

(file_baton): Remove dir_baton, token, and savepoint members.

(make_token): Remove.

(make_editor_baton, make_dir_baton, close_edit, open_root,

delete_entry, add_directory, open_directory, add_file, open_file,

close_file, close_directory, change_file_prop, change_dir_prop,

close_edit, svn_client__get_diff_editor): Remove code related

exclusively to svnpatch, and track removed members and changed arguments.

(make_token, svnpatch_savepoint svnpatch_release_savepoint, svnpatch_rollback,

svnpatch_close_directory, svnpatch_change_dir_prop, svnpatch_close_file,

svnpatch_change_file_prop, svnpatch_delete_entry, svndiff_write_handler,

svndiff_close_handler, svnpatch_apply_textdelta, svnpatch_close_edit,

transmit_svndiff, get_svnpatch_editor): Remove.

* subversion/libsvn_client/client.h

(SVN_CLIENT_SVNPATCH_VERSION): Remove.

(svn_client__get_diff_editor): Remove svnpatch_file argument.

* subversion/libsvn_client/merge.c

(drive_merge_report_editor): Track argument removed from

svn_client__get_diff_editor.

(do_file_merge): Remove a useless XXX comment, the API is now in trunk.

* subversion/libsvn_client/patch.c

(SVNPATCH_DELETE_WHEN, equal_string, ENSURE_VALID_REVISION_KINDS,

patch_cmd_baton, dry_run_deleted_p, merge_props_changed, merge_file_changed,

merge_file_added, merge_file_deleted, merge_dir_added,

merge_delete_notify_baton_t, merge_delete_notify_func, merge_dir_deleted,

patch_callbacks, edit_baton, dir_baton, file_baton, make_dir_baton,

make_file_baton, create_empty_file, get_path_access, get_parent_access,

get_empty_file, dry_run_deletions_hash, open_root, delete_entry,

add_directory, open_directory, add_file, open_file, window_handler,

apply_textdelta, close_file, close_directory, change_file_prop,

change_dir_prop, close_edit, make_editor_baton, extract_svnpatch): Remove.

(svn_client__patch): Remove now unused force argument, and anything

related to svnpatch.

* subversion/include/svn_client.h,

subversion/libsvn_client/diff.c

(): Don't include now unused headers.

(SVNPATCH_DELETE_WHEN): Remove.

(diff_cmd_baton): Remove svnpatch_file member.

(dump_svnpatch): Remove.

(diff_wc_wc): Track removed argument of svn_wc_diff6.

(diff_repos_repos, diff_repos_wc): Track removed argument of

svn_client__get_diff_editor.

(do_diff): Remove call to dump_svnpatch.

(svn_client_diff5): Rename to ...

(svn_client_diff4): ... this, and revert the parameter addition that

caused it to be bumped, and remove any code related to svnpatch.

(svn_client_diff_peg5): Rename to ...

(svn_client_diff_peg4): ... this, and as above.

  1. … 18 more files in changeset.
Relicense Subversion under the Apache License, Version 2.0.

* NOTICE: New.

* LICENSE: New.

* COPYING,

subversion/LICENSE: Remove.

* subversion/libsvn_subr/opt.c

(svn_opt__print_version_info): Note that the product as a whole is

copyrighted by the SVN Corp, and that it contains contributions from

many people, as referenced in NOTICE.

* subversion/bindings/swig/python/LICENSE_FOR_PYTHON_BINDINGS:

Relicense the SVN parts under Apache 2.0.

* everywhere:

Change copyright notices in file headers to reflect the Apache 2.0 license.

  1. … 882 more files in changeset.
Remove some deprecate path function usage in the command line client.

* subversion/svn/diff-cmd.c,

subversion/svn/util.c,

subversion/svn/propget-cmd.c,

subversion/svn/blame-cmd.c,

subversion/svn/notify.c,

subversion/svn/proplist-cmd.c,

subversion/svn/main.c,

subversion/svn/status-cmd.c,

subversion/svn/propedit-cmd.c,

subversion/svn/info-cmd.c:

Update deprecated style translation functions.

  1. … 9 more files in changeset.
Fix an assertion noticed when I fat-fingered an 'svn diff' command:

svn diff --old http://svn.collab.net/repos/svn/branches/1.6.x \

^/trunk \

subversion/libsvn_ra_neon

(Notice the missing "--new" before "^/trunk".)

* subversion/svn/diff-cmd.c

(svn_cl__diff): Return a graceful error *before* trying to join one

fully qualified URL to another one.

Merge the 'svnpatch-diff' branch to trunk.

  1. … 28 more files in changeset.
Replace the expressions "? TRUE : FALSE" and "? FALSE : TRUE", which are ugly

and redundant or almost redundant, with more direct ways to express the

boolean test that is meant, throughout the C code base. No functional change.

The changes are similar to these:

boolean ? TRUE : FALSE => boolean

boolean ? FALSE : TRUE => ! (boolean)

x == y ? FALSE : TRUE => x != y

pointer ? TRUE : FALSE => pointer != NULL

integer ? FALSE : TRUE => integer != 0

etc.

  1. … 36 more files in changeset.
Merge the tc_url_rev branch to trunk.

This stores and reports the URL@REV and similar information of the conflicting

versions of a node in a tree conflict.

  1. … 18 more files in changeset.
Cosmetic change of svn commandline output.

* subversion/svn/diff-cmd.c (summarize_regular): Add another space to

summarizing diff output to make it similar to `svn status', because

the tree-conflicts (seventh) column has been added in the meantime.

Directly return some errors, removing superfluous invocations of SVN_ERR().

This only handles the commandline client. See r33043 for more discussion about

the general idea.

* subversion/svn/diff-cmd.c,

subversion/svn/list-cmd.c,

subversion/svn/changelist-cmd.c,

subversion/svn/log-cmd.c,

subversion/svn/update-cmd.c,

subversion/svn/status.c,

subversion/svn/switch-cmd.c,

subversion/svn/proplist-cmd.c,

subversion/svn/conflict-callbacks.c,

subversion/svn/export-cmd.c,

subversion/svn/lock-cmd.c,

subversion/svn/info-cmd.c,

subversion/svn/unlock-cmd.c:

Directly return errors from some called functions.

  1. … 12 more files in changeset.
Housekeeping: In the spirit of r27598, remove trailing whitespace in

our repository.

for extsn in c h cpp java py pl rb; do

find . -name "*.$extsn" | xargs perl -pi.bak -e 'next if /^\f$/; s/\s+$/\n/'

done

(This touches files in various and sundry parts of the tree, which I shan't

enumerate here.)

  1. … 175 more files in changeset.
Implement repository root relative url support for the svn command-line

client. This allows the user to use '^/' in front of any target to

mean the repository root url. The repository root url is determined by

checking the other arguments' root urls (if they exist) and using that common

url. If none is found the root url of the current directory is used. If no

common repository root url can be found, an error is generated.

Patch by: Troy Curtis Jr <troycurtisjr@gmail.com>

(minor tweaks by me)

* subversion/include/private/svn_opt_private.h

New file to hold inter-library svn_opt functions.

(svn_opt__arg_canonicalize_url): New function prototype.

(svn_opt__arg_canonicalize_path): New function prototype.

* subversion/include/svn_opt.h

(svn_opt_args_to_target_array3): Change doc string to reflect deprecated

status.

* subversion/libsvn_subr/opt.c

(svn_opt__arg_canonicalize_url): New function to canonicalize user input

urls.

(svn_opt__arg_canonicalize_path): New function to canonicalize user input

paths.

(svn_opt_args_to_target_array3): Replace the inline canonicalization code

with calls to the new svn_opt__arg_canonicalize_* functions.

* subversion/include/svn_client.h

(svn_client_args_to_target_array): New function prototype.

* subversion/libsvn_client/cmdline.c

New file for client library commandline processing functionality.

(arg_is_repos_relative_url,

resolve_repos_relative_url,

check_root_url_of_target): New functions to support

svn_client_args_to_target_array.

(svn_client_args_to_target_array): New client function to parse user

arguments into a target array. Replaces use of

svn_opt_args_to_target_array3(). Remove the replicated knowledge of

admin directory names, and, as a side effect, don't skip path names

of "_svn" on systems that don't use that name for the admin dir.

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

(test_args_to_target_array): New test function.

(test_funcs): Run new test function.

* subversion/tests/cmdline/special_tests.py

(warn_on_reserved_name): Modify test to work right with the new

svn_client_args_to_target_array().

* subversion/tests/cmdline/basic_tests.py

(basic_relative_url_multi_repo,

basic_relative_url_using_other_targets,

basic_relative_url_using_current_dir): New test functions.

(test_list): Run new test functions.

* subversion/svn/cl.h

(svn_cl__args_to_target_array_print_reserved): Add client context parameter.

* subversion/svn/util.c

(svn_cl__args_to_target_array_print_reserved): Replace call to

svn_opt_args_to_target_array3() with svn_client_args_to_target_array().

* subversion/svn/update-cmd.c

(svn_cl__update): Replace svn_opt_args_to_target_array3() with

svn_cl__args_to_target_array_print_reserved() for consistency with the other

command line functions.

* subversion/svn/diff-cmd.c

(svn_cl__diff): Create a client context variable and use it in the

svn_cl__args_to_target_array_print_reserved() function along with

everywhere else it is needed.

* subversion/svn/add-cmd.c,

subversion/svn/blame-cmd.c,

subversion/svn/cat-cmd.c,

subversion/svn/changelist-cmd.c,

subversion/svn/checkout-cmd.c,

subversion/svn/cleanup-cmd.c,

subversion/svn/commit-cmd.c,

subversion/svn/copy-cmd.c,

subversion/svn/delete-cmd.c,

subversion/svn/export-cmd.c,

subversion/svn/import-cmd.c,

subversion/svn/info-cmd.c,

subversion/svn/list-cmd.c,

subversion/svn/lock-cmd.c,

subversion/svn/log-cmd.c,

subversion/svn/merge-cmd.c,

subversion/svn/mergeinfo-cmd.c,

subversion/svn/mkdir-cmd.c,

subversion/svn/move-cmd.c,

subversion/svn/propdel-cmd.c,

subversion/svn/propedit-cmd.c,

subversion/svn/propget-cmd.c,

subversion/svn/proplist-cmd.c,

subversion/svn/propset-cmd.c,

subversion/svn/resolve-cmd.c,

subversion/svn/resolved-cmd.c,

subversion/svn/revert-cmd.c,

subversion/svn/status-cmd.c,

subversion/svn/switch-cmd.c,

subversion/svn/unlock-cmd.c

Add client context variable to all the calls to

svn_cl__args_to_target_array_print_reserved().

  1. … 41 more files in changeset.
Fix issue #3026: _svn and .svn are silently ignored as file arguments.

Patch by: Augie Fackler: <durin42@gmail.com>

(Test by me.)

First, create some new infrastructure:

* subversion/include/svn_error_codes.h

(SVN_ERR_RESERVED_FILENAME_SPECIFIED): New error code for when reserved file

arguments are encountered.

* subversion/libsvn_wc/adm_files.c:

(svn_wc_set_adm_dir): Updated comment to reflect the change of location for

the other code block.

* subversion/include/svn_opt.h:

(svn_opt_args_to_target_array3): New function prototype.

* subversion/libsvn_subr/opt.c:

(svn_opt_args_to_target_array3): New function. Behaves like

svn_opt_args_to_target_array2 except this one returns errors instead of

silently ignoring reserved file names.

(svn_opt_args_to_target_array2): Reimplemented to wrap

svn_opt_args_to_target_array2 but filter out any error about reserved

filenames.

* subversion/svn/cl.h:

(svn_cl__args_to_target_array_print_reserved): New function prototype.

* subversion/svn/util.c:

(svn_cl__args_to_target_array_print_reserved): New function. Convenience

function to wrap svn_opt_args_to_target_array3 and print any errors about

reserved filenames to stderr before returning.

* subversion/bindings/swig/core.i:

(svn_opt_args_to_target_array3): Ignore this function as well.

Then update all the relevant callers:

* subversion/svn/update-cmd.c:

(svn_cl__propdel): Use svn_opt_args_to_target_array3 instead of

svn_opt_args_to_target_array2 so that reserved filenames exit with error.

* subversion/svn/merge-cmd.c:

(svn_cl__merge): Use svn_cl__args_to_target_array_print_reserved instead of

svn_opt_args_to_target_array2 so that reserved filenames aren't silently

ignored.

* subversion/svn/propdel-cmd.c:

(svn_cl__propdel): Same.

* subversion/svn/checkout-cmd.c:

(svn_cl__checkout): Same.

* subversion/svn/move-cmd.c:

(svn_cl__move): Same.

* subversion/svn/mkdir-cmd.c:

(svn_cl__mkdir): Same.

* subversion/svn/cat-cmd.c:

(svn_cl__cat): Same.

* subversion/svn/revert-cmd.c:

(svn_cl__revert): Same.

* subversion/svn/diff-cmd.c:

(svn_cl__diff): Same.

* subversion/svn/copy-cmd.c:

(svn_cl__copy): Same.

* subversion/svn/mergeinfo-cmd.c:

(svn_cl__mergeinfo): Same.

* subversion/svn/list-cmd.c:

(svn_cl__list): Same.

* subversion/svn/blame-cmd.c:

(svn_cl__blame): Same.

* subversion/svn/propget-cmd.c:

(svn_cl__propget): Same.

* subversion/svn/changelist-cmd.c:

(svn_cl__changelist): Same.

* subversion/svn/propdel-cmd.c:

(svn_cl__propdel): Same.

* subversion/svn/log-cmd.c:

(svn_cl__log): Same.

* subversion/svn/resolved-cmd.c:

(svn_cl__resloved): Same.

* subversion/svn/cleanup-cmd.c:

(svn_cl__cleanup): Same.

* subversion/svn/commit-cmd.c:

(svn_cl__commit): Same.

* subversion/svn/add-cmd.c:

(svn_cl__add): Same.

* subversion/svn/propset-cmd.c:

(svn_cl__propset): Same.

* subversion/svn/switch-cmd.c:

(svn_cl__switch): Same.

* subversion/svn/delete-cmd.c:

(svn_cl__delete): Same.

* subversion/svn/import-cmd.c:

(svn_cl__import): Same.

* subversion/svn/proplist-cmd.c:

(svn_cl__proplist): Same.

* subversion/svn/export-cmd.c:

(svn_cl__export): Same.

* subversion/svn/propdel-cmd.c:

(svn_cl__propdel): Same.

* subversion/svn/status-cmd.c:

(svn_cl__status): Same.

* subversion/svn/propedit-cmd.c:

(svn_cl__propdel): Same.

* subversion/svn/lock-cmd.c:

(svn_cl__lock): Same.

* subversion/svn/info-cmd.c:

(svn_cl__info): Same.

* subversion/svn/unlock-cmd.c:

(svn_cl__unlock): Same.

Finally, add a test:

* subversion/tests/cmdline/special_tests.py

(warn_on_reserved_name): New test.

(test_list): Run it.

  1. … 38 more files in changeset.
In theory, "restore" changelist support to 'svn diff --summarize'.

Though, since it seems that 'svn diff --summarize' only works when

invoked on two URLs, a scenario in which changelists don't play

anyway. This completes the overhaul of 'svn diff' with respect to the

new changelist paradigm.

* subversion/include/svn_client.h,

* subversion/libsvn_client/diff.c

(svn_client_diff_summarize2, svn_client_diff_summarize_peg2): Add

'changelists' parameter.

(svn_client_diff_summarize, svn_client_diff_summarize_peg): Update

calls to revved functions.

* subversion/svn/diff-cmd.c

(svn_cl__diff): Update calls to svn_client_diff_summarize2() and

svn_client_diff_summarize_peg2().

* subversion/notes/changelist-design.txt

Note completed task.

  1. … 3 more files in changeset.