Provide a way for svnserve's 'get-deleted-rev' API to return 'not deleted'.
Previously the answer 'not deleted' was indistinguishable from an error when using the svnserve protocol.
The standard 'svn' client software does not appear to invoke this case, but it is meant to be a valid answer and is supported by the other repository access protocols.
To work around the problem without changing the protocol, we re-purpose the obsolete error code 'SVN_ERR_ENTRY_MISSING_REVISION' to communicate this 'not deleted' reply to the client.
(Re-purposing an old error code was not essential. An alternative would be to create a new error code which would become part of the public API in the next minor release, but would be deemed non-public when backported to older release lines.)
- With a new client against a new server, such queries are now handled correctly.
- With an old client against a new server, the client will report a more informative error message.
- With a new client against an old server, there is no improvement.
* subversion/svnserve/serve.c (get_deleted_rev): If the answer is SVN_INVALID_REVNUM, return a SVN_ERR_ENTRY_MISSING_REVISION error to the client.
* subversion/libsvn_ra_svn/client.c (ra_svn_get_deleted_rev): Convert the error SVN_ERR_ENTRY_MISSING_REVISION back to a response of SVN_INVALID_REVNUM.
* subversion/tests/libsvn_ra/ra-test.c (commit_two_changes): New. (test_get_deleted_rev_no_delete, test_get_deleted_rev_errors): New tests. (test_funcs): Run them.
Introduce a warning callback to the authz file parser API.
We need this to warn about the use of empty groups in authz files; this is not an error and doesn't affect the authz file semantics, but it's nice to be able to tell the user about it.
See issues #4794, #4802 and #4803.
* subversion/include/svn_repos.h (svn_repos_authz_warning_func_t): New callback function type. (svn_repos_authz_read4): New; API revision. (svn_repos_authz_read3): Deprecated. (svn_repos_authz_parse2): New; API revision. (svn_repos_authz_parse): Deprecated.
* subversion/libsvn_repos/authz.h (svn_authz__parse): Add warning function and baton parameters. * subversion/libsvn_repos/authz.c (authz_read): Add warning function and baton parameters. Update calls to svn_authz__parse. (svn_repos_authz_read4): Revised from svn_repos_authz_read3. (svn_repos_authz_parse2): Revised from svn_repos_authz_parse. * subversion/libsvn_repos/authz_parse.c (struct ctor_baton_t): Add members warning_func and warning_baton. (create_ctor_baton): Initialise these new members of the constructor baton. (emit_parser_warning): New. (SVN_AUTHZ_PARSE_WARN): New; wrapper macro for the above. (array_insert_ace): Ignore and warn about the use of empty groups. (svn_authz__parse): Update implementation to match prototype. * subversion/libsvn_repos/deprecated.c (svn_repos_authz_read3, svn_repos_authz_parse): Implement deprecated functions.
* subversion/mod_authz_svn/mod_authz_svn.c (log_svn_message): New; replaces log_svn_error so that it's useful for logging warnings as well. (log_svn_error): Reimplement, calling log_svn_message. (struct authz_warning_baton_t): New. (log_authz_warning): New. (get_access_conf): Set up an authz warning handler and baton, and call svn_repos_authz_read4 instead of svn_repos_authz_read3.
* subversion/svnserve/logger.h (logger__log_error): Make the 'err' parameter a pointer-to-const. Update the docstring to say that the error is not cleared. (logger__log_warning): New. * subversion/svnserve/logger.c (log_message): New; common base for logger__log_error and logger__log_message. Also *do not* allocate 8k on the stack, use the logger pool, which gets cleared at the end of the function. (logger__log_error): Reimplement. (logger__log_warning): Implement. * subversion/svnserve/serve.c (log_error): Make the error parameter const. Fix the docstring. (log_warning): New. (load_authz_config): Add warning function and baton parameters and fix pool handling. Now calls svn_repos_authz_read4 instead of svn_repos_authz_read3. (find_repos): Add warning function and baton parameters for load_authz_config. (handle_authz_warning): New. (construct_server_baton): Pass an authz warning handler and baton to find_repos.
* subversion/tests/cmdline/authz_tests.py (group_member_empty_string): Fix docstring. (empty_group): New test case. (test_list): Run it. * subversion/tests/cmdline/svnauthz_tests.py (svnauthz_empty_group_test): Extend the @Issues decorator. Add a check for the expected warning on stderr.