Checkout Tools
  • last updated 8 hours ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
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/revert-cmd.c

(svn_cl__revert): Use the revved API svn_client_revert4(), following r1822534.

As we are revving svn_client_revert() for 1.9 anyway, now is the time to

give it a 'metadata_only' flag, like we have on copy and move.

This helps gui clients that should record changes after they occured, who

don't want to revert local changes just to re-apply them using the Subversion

function. (And thereby avoiding file lock challenges on Windows)

Note that some of the refactoring in this patch is preparation for a

followup performance patch for reverting huge trees (like entire WC).

* subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp

(Java_org_apache_subversion_javahl_SVNClient_revert): Add another boolean.

* subversion/bindings/javahl/native/SVNClient.cpp

(SVNClient::revert): Forward metadata_only.

* subversion/bindings/javahl/native/SVNClient.h

(SVNClient::revert): Add metadata_only boolean.

* subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java

(revert): Add and document argument.

* subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java

(revert): Add argument (3*)

* subversion/include/svn_client.h

(svn_client_revert3): Add and document argument.

(svn_client_revert2): Document behavior of new argument.

* subversion/include/svn_wc.h

(svn_wc_revert5): Add and document argument.

(svn_wc_revert4): Document behavior of new argument.

* subversion/libsvn_client/deprecated.c

(svn_client_revert2): Update caller.

* subversion/libsvn_client/revert.c

(revert_with_write_lock_baton): Add flag.

(revert): Update caller. Pass error to notify.

(svn_client_revert3): Add argument. Properly use iterpool.

Update caller.

* subversion/libsvn_wc/deprecated.c

(svn_wc_revert4): Update caller.

* subversion/libsvn_wc/revert.c

(revert_wc_data): Add prototype.

(revert_restore): Add argument. Extract the non metadata work

code to revert_wc_data.

(revert_wc_data): New function. Placed below revert_restore to

minimize changes to this file in this patch.

* subversion/svn/revert-cmd.c

(svn_cl__revert): Update caller.

* subversion/tests/libsvn_wc/utils.c

(sbox_wc_revert): Update caller.

  1. … 12 more files in changeset.
* subversion/svn/revert-cmd.c

(svn_cl__revert): Following up on r1568635, resolve deprecation warning.

Factor out a function. This slightly changes the error message seen when a

commit target is a URL; svn will now show two lines:

Commit targets must be local paths

'file:///foo' is not a local path

instead of this previous single line (which already differed from 1.6.x):

'file:///foo' is a URL, but URLs cannot be commit targets

All other subcommands that report this kind of error continue to print just

'file:///foo' is not a local path

* subversion/svn/cl.h,

subversion/svn/util.c

(svn_cl__check_targets_are_local_paths): New function.

* subversion/svn/add-cmd.c (svn_cl__add),

* subversion/svn/changelist-cmd.c (svn_cl__changelist),

* subversion/svn/cleanup-cmd.c (svn_cl__cleanup),

* subversion/svn/commit-cmd.c (svn_cl__commit),

* subversion/svn/resolve-cmd.c (svn_cl__resolve),

* subversion/svn/resolved-cmd.c (svn_cl__resolved),

* subversion/svn/revert-cmd.c (svn_cl__revert),

* subversion/svn/status-cmd.c (svn_cl__status),

* subversion/svn/update-cmd.c (svn_cl__update),

* subversion/svn/upgrade-cmd.c (svn_cl__upgrade):

Use it instead of in-line code.

  1. … 11 more files in changeset.
Rename the 'svn_error_return' macro to 'svn_error_trace'.

See email thread "[RFC] Rename 'svn_error_return' to 'svn_error_trace'?" on

2011-06-23, <http://svn.haxx.se/dev/archive-2011-06/0708.shtml>.

* subversion/include/svn_error.h

(svn_error_return): Rename to svn_error_trace.

(SVN_ERR, svn_error_purge_tracing): Track the rename.

* [everywhere]: Track the rename.

  1. … 120 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.
Remove redundant svn_error_return() wrapper.

* subversion/svn/add-cmd.c,

subversion/svn/changelist-cmd.c,

subversion/svn/cleanup-cmd.c,

subversion/svn/export-cmd.c,

subversion/svn/import-cmd.c,

subversion/svn/log-cmd.c,

subversion/svn/patch-cmd.c,

subversion/svn/resolve-cmd.c,

subversion/svn/resolved-cmd.c,

subversion/svn/revert-cmd.c,

subversion/svn/status-cmd.c,

subversion/svn/upgrade-cmd.c,

subversion/libsvn_client/add.c,

subversion/libsvn_client/changelist.c,

subversion/libsvn_client/cleanup.c,

subversion/libsvn_client/commit.c,

subversion/libsvn_client/export.c,

subversion/libsvn_client/log.c,

subversion/libsvn_client/merge.c,

subversion/libsvn_client/patch.c,

subversion/libsvn_client/resolved.c,

subversion/libsvn_client/revert.c,

subversion/libsvn_client/status.c

(svn_cl__add, svn_cl__changelist, svn_cl__cleanup, svn_cl__export,

svn_cl__import, svn_cl__log, svn_cl__patch, svn_cl__resolve,

svn_cl__resolved, svn_cl__revert, svn_cl__status, svn_cl__upgrade,

svn_client_add4, svn_client_add_to_changelist,

svn_client_remove_from_changelists, svn_client_cleanup,

svn_client_commit5, svn_client_export5, svn_client_log5,

svn_client_merge4, svn_client_patch, svn_client_resolve,

svn_client_revert2, svn_client_status5):

Remove redundant svn_error_return() wrapper. Also add blank line

before/after 'if' block where ever required.

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

  1. … 22 more files in changeset.
Make 'svn revert' verify that none of its targets are URLs.

* subversion/libsvn_client/revert.c,

subversion/svn/revert-cmd.c

(svn_client_revert2, svn_cl__revert): Raise an error if any targets

look like URLs.

* subversion/tests/cmdline/input_validation_tests.py

(invalid_revert_targets, test_list): New test.

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

  1. … 2 more files in changeset.
Fix revert_tests.py 21 by making svn_wc_revert4 check if a revert is

possible with only impact at the specified depth.

Before WC-NG libsvn_client didn't take a recursive lock if the specified

depth was less than infinity and some revert operations then failed on

not having a lock. But this didn't fix that you could do a depth empty

revert on a directory which then removes an added (child-of-copy) file.

As far as I can see there is no sane way to keep the original behavior or

reimplement the old behavior inside one of the deprecated wrappers.

svn_wc_revert3 receives an access baton and a depth and failed the revert

if the lock in the access baton wasn't deep enough. (Not on a depth value).

svn_client_revert2 doesn't document it's error behavior, so I think it is

safe to return a different error here, but this might need a later update

to wrap the error with SVN_ERR_WC_NOT_LOCKED to fix clients that handle

this error like we did in svn before this patch.

See also

http://svn.haxx.se/dev/archive-2010-08/0763.shtml

* subversion/include/svn_error_codes.h

(SVN_ERR_WC_INVALID_OPERATION_DEPTH): New error code.

* subversion/libsvn_wc/adm_ops.c

(verify_revert_depth): New function.

(revert_internal): Add depth verification step.

* subversion/svn/revert-cmd.c

(svn_cl__revert): Update error code check.

* subversion/tests/cmdline/revert_tests.py

(test_list): Remove XFail marking from revert_added_tree.

  1. … 3 more files in changeset.
Instead of fetching a notifier in each of the client subcommands, just

fetch it once in main().

* subversion/svn/*.c:

Remove calls to set up the notifier.

* subversion/svn/main.c:

Set up the notifier universally, for all subcommands (if under appropriate

conditions).

  1. … 24 more files in changeset.
Remove a couple of arguments from the notifier retriever in the client, and

replace them with functions which can set the same parameters (in rare cases).

* subversion/svn/cl.h

(svn_cl__get_notifier): Remove params, update docstring.

(svn_cl__notifier_mark_checkout, svn_cl__notifier_mark_export): New.

* subversion/svn/notify.c

(svn_cl__get_notifier): Remove params, and set defaults.

(svn_cl__notifier_mark_checkout, svn_cl__notifier_mark_export): New.

* subversion/svn/patch-cmd.c,

subversion/svn/merge-cmd.c,

subversion/svn/propdel-cmd.c,

subversion/svn/checkout-cmd.c,

subversion/svn/move-cmd.c,

subversion/svn/mkdir-cmd.c,

subversion/svn/revert-cmd.c,

subversion/svn/copy-cmd.c,

subversion/svn/changelist-cmd.c,

subversion/svn/log-cmd.c,

subversion/svn/update-cmd.c,

subversion/svn/resolved-cmd.c,

subversion/svn/upgrade-cmd.c,

subversion/svn/commit-cmd.c,

subversion/svn/add-cmd.c,

subversion/svn/propset-cmd.c,

subversion/svn/switch-cmd.c,

subversion/svn/delete-cmd.c,

subversion/svn/import-cmd.c,

subversion/svn/resolve-cmd.c,

subversion/svn/export-cmd.c,

subversion/svn/status-cmd.c,

subversion/svn/lock-cmd.c,

subversion/svn/unlock-cmd.c:

Update callers.

  1. … 25 more files in changeset.
Remove svn_opt_eat_peg_revisions() from the public API name space, making it

a private function in the 'svn' client, named accordingly. It was

introduced in 1.6.x with a private double-underscore name and has not yet

gone public in 1.7, so we can do this.

The idea of introducing and using this function was to allow arguments that

do not take a peg revision to nevertheless be written with peg revision

syntax (i.e. a trailing "@" sign can be given to "escape" any preceding "@"

sign. However, this particular API is not a good one to make public because

the caller is unable to detect if an inappropriate peg specifier was given.

* subversion/include/svn_opt.h

(svn_opt_eat_peg_revisions): Move and rename to ...

* subversionsvn/cl.h

(svn_cl__eat_peg_revisions) ... here.

* subversion/libsvn_subr/opt.c

(svn_opt__eat_peg_revisions): Remove this wrapper, as compatibility for

1.6 for svn executable is not required.

(svn_opt_eat_peg_revisions): ... move and rename to ...

* subversion/svn/util.c

(svn_cl__eat_peg_revisions) ... here.

* subversion/svn/add-cmd.c

* subversion/svn/changelist-cmd.c

* subversion/svn/cleanup-cmd.c

* subversion/svn/commit-cmd.c

* subversion/svn/copy-cmd.c

* subversion/svn/delete-cmd.c

* subversion/svn/lock-cmd.c

* subversion/svn/mkdir-cmd.c

* subversion/svn/move-cmd.c

* subversion/svn/patch-cmd.c

* subversion/svn/propdel-cmd.c

* subversion/svn/propedit-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/unlock-cmd.c

* subversion/svn/update-cmd.c

* subversion/svn/upgrade-cmd.c

Adjust callers.

  1. … 23 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.
Following up on r37880 and to fix issue #3523, make sure the current path used for

trimming notifications is properly encoded and canonicalized.

apr_filepath_get() returns paths in a platform dependant format which

happens to be utf-8 on MacOS and Windows, but is locale dependant on other

systems. Instead of fixing the encoding and then canonicalizing I use the

shortcut of making the "" path absolute with the dirent api.

* subversion/svn/cl.h

(svn_cl__get_notifier): Update prototype to return error.

* subversion/svn/notify.c

(svn_cl__get_notifier): Use svn_dirent_get_absolute() to retrieve the current

working directory.

* subversion/svn/add-cmd.c

* subversion/svn/changelist-cmd.c

* subversion/svn/checkout-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/lock-cmd.c

* subversion/svn/log-cmd.c

* subversion/svn/merge-cmd.c

* subversion/svn/mkdir-cmd.c

* subversion/svn/move-cmd.c

* subversion/svn/patch-cmd.c

* subversion/svn/propdel-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

* subversion/svn/update-cmd.c

* subversion/svn/upgrade-cmd.c

(svn_cl__*): Update caller.

  1. … 25 more files in changeset.
Continue my crusade on pool usage in the commandline client. This primarily

renames the pool parameter of various commandline functions to 'scratch_pool'.

This change also uses the name 'iterpool' more consistently in place of

'subpool'.

* subversion/svn/revert-cmd.c,

subversion/svn/update-cmd.c,

subversion/svn/resolved-cmd.c,

subversion/svn/upgrade-cmd.c,

subversion/svn/propset-cmd.c,

subversion/svn/switch-cmd.c,

subversion/svn/proplist-cmd.c,

subversion/svn/resolve-cmd.c,

subversion/svn/status-cmd.c,

subversion/svn/unlock-cmd.c:

Perform the above.

  1. … 9 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.
Fix issue #3416, "Cannot add or commit 'dir/@file.txt'".

Make every subcommand parse peg revisions which previously didn't

parse them. The Book documents this behaviour as follows:

After all, how does svn know whether news@11 is the name of a

directory in my tree or just a syntax for “revision 11 of news”?

Thankfully, while svn will always assume the latter, [...]

Regrettably, svn didn't always assume the latter.

We only ever parsed peg revisions for commands where they make sense.

Escaping '@' characters in filenames was impossible for subcommands

which didn't parse peg revisions. Subversion would always interpret

'abc@abc' as a complete filename for those commands, instead of

as the nonsense 'revision abc of abc' it is.

Even our unit tests didn't agree with The Book, and were merrily

adding and committing 'abc@abc' without escaping.

To add insult to injury, when splitting peg revisions from target

paths we never ensured that the target path still had a non-zero

length after the split. The code then went on to form a canonicalised

target path with attached peg revision by canonicalising the empty

path and then concatenating the empty canonicalisation result and

the peg revision.

This led to confusing behaviour were 'svn add @file' ('@file' is an

actual filename) was accidentally working, but 'svn add @file@' was

not -- it resulted in "svn add: Warning: '@file@' not found"

In the former situation we now throw an error, because as far as svn

can tell only a peg revision was specified, but no target path.

'svn add @file@' is the correct way to add a file called @file, and

because 'svn add' will now parse and discard the peg revision specifier,

this now works.

This problem didn't just affect add, but every subcommand which

didn't interpret peg revisions (commit, lock, etc.)

* subversion/libsvn_subr/opt.c

(svn_opt__split_arg_at_peg_revision): Require target path to have

a non-zero length after splitting a peg revision from it.

Allow callers to pass NULL for the parsed peg revision, so they can

easily discard the parsed peg revision if they don't need it.

(svn_opt_eat_peg_revisions): New function. Returns a copy of a list

of targets with all peg revision specifiers removed.

* subversion/tests/cmdline/basic_tests.py

(basic_peg_revision): Consistently escape '@' characters in filenames,

and check for regression into issue #3416.

* subversion/svn/patch-cmd.c, subversion/svn/propdel-cmd.c,

subversion/svn/mkdir-cmd.c, subversion/svn/move-cmd.c,

subversion/svn/revert-cmd.c, subversion/svn/changelist-cmd.c,

subversion/svn/update-cmd.c, subversion/svn/resolved-cmd.c,

subversion/svn/upgrade-cmd.c, subversion/svn/cleanup-cmd.c,

subversion/svn/commit-cmd.c, subversion/svn/add-cmd.c,

subversion/svn/propset-cmd.c, subversion/svn/delete-cmd.c,

subversion/svn/resolve-cmd.c, subversion/svn/status-cmd.c,

subversion/svn/propedit-cmd.c, subversion/svn/lock-cmd.c,

subversion/svn/unlock-cmd.c

(svn_cl__patch, svn_cl__propdel, svn_cl__mkdir, svn_cl__move,

svn_cl__revert, svn_cl__changelist, svn_cl__update, svn_cl__resolved,

svn_cl__upgrade, svn_cl__cleanup, svn_cl__commit, svn_cl__add,

svn_cl__propset, svn_cl__delete, svn_cl__resolve, svn_cl__status,

svn_cl__propedit, svn_cl__lock, svn_cl__unlock): Remove peg revision

specifiers from all targets before passing them to the client library,

using the new function svn_opt_eat_peg_revisions().

* subversion/include/private/svn_opt_private.h

(svn_opt__split_arg_at_peg_revision): Document changes in behaviour

described above (see entry for subversion/libsvn_subr/opt.c).

* subversion/include/svn_opt.h

(svn_opt_parse_path): Document a few additional examples of how peg

revisions are parsed, all pertaining to issue #3416.

(svn_opt_eat_peg_revisions): Declare.

  1. … 22 more files in changeset.
Do some error trace chaining in the command line client.

Note: this just looks at places we return an intermediate error pointer,

not where we return from a function directly.

* subversion/svn/merge-cmd.c,

subversion/svn/move-cmd.c,

subversion/svn/mkdir-cmd.c,

subversion/svn/revert-cmd.c,

subversion/svn/copy-cmd.c,

subversion/svn/util.c,

subversion/svn/blame-cmd.c,

subversion/svn/delete-cmd.c,

subversion/svn/conflict-callbacks.c,

subversion/svn/export-cmd.c,

subversion/svn/propedit-cmd.c,

subversion/svn/info-cmd.c:

Use svn_error_return() to add stack tracing in a few places.

  1. … 11 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.
Finish the 'svn revert' portion of the --changelist feature revamp.

* subversion/include/svn_client.h

(svn_client_revert2): Add 'changelists' parameter.

(svn_client_revert): Update docstring.

* subversion/libsvn_client/revert.c

(revert): Add 'changelists' parameter, now passed off to svn_wc_revert3().

(svn_client_revert2): Add 'changelists' parameter. Update call to revert().

(svn_client_revert): Update call to svn_client_revert2().

* subversion/svn/revert-cmd.c

(svn_cl__revert): Update call to svn_client_revert2(), and lose

changelist crawl. While here, recommend "--depth infinity"

instead of "--recursive" in certain failure cases.

* subversion/tests/cmdline/changelist_tests.py

(revert_with_changelists): New test.

(test_list): Add reference to new test.

* subversion/notes/changelist-design.txt

Update status of the feature revamp.

  1. … 4 more files in changeset.
More changes in changelist land, genericizing a helper function and

removing changelist support from the 'lock', 'unlock' and 'log'

subcommands. These changes (or various slices thereof) might be

temporary ... we'll see.

* subversion/svn/cl.h

(svn_cl__changelist_paths): Was svn_cl__get_changelist. Add 'depth'

parameter; replace 'path' with 'targets'; replace 'changelist'

list of 'changelists'.

* subversion/svn/util.c

(svn_cl__changelist_paths): Was svn_cl__get_changelist. Add 'depth'

parameter, passed to svn_client_get_changelists(). Replace 'path'

with list of 'targets'. Replace single 'changelist' with a whole

list of 'changelists'.

* subversion/libsvn_client/changelist.c

(found_an_entry): Use SVN_WC__CL_MATCH() instead of duplicate logic.

* subversion/svn/main.c

(svn_cl__cmd_table): Remove --changelist support from 'lock', 'log',

and 'unlock'.

* subversion/notes/changelist-design.txt

Update some status.

* subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout

Update test expectations.

Tweaked these functions to call the new svn_cl__changelist_paths() on

the original subcommand arguments.

* subversion/svn/changelist-cmd.c (svn_cl__changelist)

* subversion/svn/propdel-cmd.c (svn_cl__propdel)

* subversion/svn/propget-cmd.c (svn_cl__propget)

* subversion/svn/proplist-cmd.c (svn_cl__proplist)

* subversion/svn/propset-cmd.c (svn_cl__propset)

* subversion/svn/revert-cmd.c (svn_cl__revert)

* subversion/svn/status-cmd.c (svn_cl__status)

* subversion/svn/update-cmd.c (svn_cl__update)

Removed changelist support altogether from these functions.

* subversion/svn/lock-cmd.c (svn_cl__lock)

* subversion/svn/log-cmd.c (svn_cl__log)

* subversion/svn/unlock-cmd.c (svn_cl__unlock)

  1. … 16 more files in changeset.
Lose the non-streamy svn_client_get_changelist() API, as it is

redudandant with the streamy from and de-streamifying is so incredibly

easy for API consumers to do for themselves.

* subversion/include/svn_client.h

(svn_client_get_changelist): Removed. (No sense in maintaining two

APIs that do the same thing.)

(svn_changelist_receiver_t): Add 'pool' argument, in case

implementors need a temporary pool.

* subversion/libsvn_client/changelist.c

(struct fe_baton): Lose 'store_paths' and 'paths_list' as unused.

(found_an_entry): Lose path storage logic, simplify the rest, and

pass a temporary pool to the callback function.

(svn_client_get_changelist): Removed.

(svn_client_get_changelist_streamy): Don't populate now-missing

fe_baton members.

* subversion/svn/cl.h,

* subversion/svn/util.c

(svn_cl__get_changelist): New.

* subversion/svn/propdel-cmd.c,

* subversion/svn/revert-cmd.c,

* subversion/svn/diff-cmd.c,

* subversion/svn/propget-cmd.c,

* subversion/svn/changelist-cmd.c,

* subversion/svn/log-cmd.c,

* subversion/svn/update-cmd.c,

* subversion/svn/propset-cmd.c,

* subversion/svn/proplist-cmd.c,

* subversion/svn/status-cmd.c,

* subversion/svn/lock-cmd.c,

* subversion/svn/unlock-cmd.c,

* subversion/svn/info-cmd.c

Replace all calls to svn_client_get_changelist() with calls to

svn_cl__get_changelist() instead.

  1. … 16 more files in changeset.
Housekeeping: In the spirit of r26317, remove trailing whitespace in our

repository.

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

enumerate here.)

  1. … 93 more files in changeset.
Fix a comment to use the function name that the code actually uses.

* subversion/svn/changelist-cmd.c,

* subversion/svn/diff-cmd.c,

* subversion/svn/info-cmd.c,

* subversion/svn/lock-cmd.c,

* subversion/svn/log-cmd.c,

* subversion/svn/propdel-cmd.c,

* subversion/svn/propget-cmd.c,

* subversion/svn/proplist-cmd.c,

* subversion/svn/propset-cmd.c,

* subversion/svn/revert-cmd.c,

* subversion/svn/status-cmd.c,

* subversion/svn/unlock-cmd.c,

* subversion/svn/update-cmd.c:

Replace

Before allowing svn_opt_args_to_target_array() to canonicalize

with

Before allowing svn_opt_args_to_target_array2() to canonicalize

  1. … 12 more files in changeset.
Change names of depth<->recurse conversion macros, update documentation.

Part of issue #2951.

* subversion/include/svn_types.h

(SVN_DEPTH_INFINITY_OR_FILES,

SVN_DEPTH_INFINITY_OR_EMPTY,

SVN_DEPTH_INFINITY_OR_IMMEDIATES,

SVN_DEPTH_IS_RECURSIVE): Replace SVN_DEPTH_FROM_RECURSE,

SVN_DEPTH_FROM_RECURSE_STATUS,

SVN_DEPTH_TO_RECURSE,

or inline code...

...everywhere, as appropriate.

* subversion/include/svn_ra.h

(svn_ra_do_update, svn_ra_do_switch, svn_ra_do_status, svn_ra_do_diff2):

Document previously undocumented conversion of recurse to depth,

mainly so it's clear that 'status' is exceptional.

* subversion/include/svn_client.h

(svn_client_status2, svn_client_info, svn_client_propset2,

svn_client_propget3): Fix documentation of how recurse converts to depth.

* subversion/include/svn_wc.h

(svn_wc_get_status_editor2): Same.

  1. … 34 more files in changeset.
A follow-up to issue r26841, leveraging the new error code for unknown

changelists, and making the corresponding error message consistent

with the new standard.

* subversion/svn/propdel-cmd.c

* subversion/svn/revert-cmd.c

* subversion/svn/diff-cmd.c

* subversion/svn/propget-cmd.c

* subversion/svn/changelist-cmd.c

* subversion/svn/update-cmd.c

* subversion/svn/proplist-cmd.c

* subversion/svn/status-cmd.c

* subversion/svn/lock-cmd.c

* subversion/svn/info-cmd.c

* subversion/svn/unlock-cmd.c

Correct/update copyright dates. Replace use of

SVN_ERR_CL_ARG_PARSING_ERROR with SVN_ERR_UNKNOWN_CHANGELIST, and

update error message.

Suggested by: epg

  1. … 10 more files in changeset.
Make the 'svn revert' interface depthy.

This addresses parts of issue #2847 and issue #2844.

* subversion/include/svn_client.h

(svn_client_revert2, svn_client_revert): Do the deprecation dance.

* subversion/libsvn_client/revert.c

(svn_client_revert2, svn_client_revert): Same. All callers changed.

(revert): Take depth instead of recursive, call svn_wc_revert3().

* subversion/include/svn_wc.h

(svn_wc_revert3, svn_wc_revert2): Do the deprecation dance.

* subversion/libsvn_wc/adm_ops.c

(svn_wc_revert3, svn_wc_revert2): Same. All callers changed.

* subversion/svn/revert-cmd.c

(svn_cl__revert): Adjust accordingly.

* subversion/svn/main.c

(main): Map -N to svn_depth_empty.

  1. … 5 more files in changeset.