Checkout Tools
  • last updated 5 hours ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Expose the output arguments of svn_client_blame6 in JavaHL.

[in subversion/bindings/javahl/src/org/apache/subversion]

* callback/BlameRangeCallback.java: New callback for ISVNClient.blame.

* callback/BlameLineCallback.java: Remove unused import.

* ISVNClient.java

(ISVNClient.blame): Add range callback parameter. Update docstring.

* SVNClient.java

(SVNClient.blame): Update wrapper and native method declaration.

[in subversion/bindings/javahl/native]

* BlameCallback.h

(BlameCallback::BlameCallback): Change constructor signature.

(BlameCallback::get_start_revnum_p, BlameCallback::get_end_revnum_p): New.

(BlameCallback::setRange): New.

(BlameCallback::m_start_revnum, BlameCallback::m_start_revnum,

BlameCallback::m_range_callback_invoked, BlameCallback::m_range_callback): New.

(BlameCallback::m_line_callback): Renamed from m_callback.

* BlameCallback.cpp: Include svn_private_config.h.

(BlameCallback::BlameCallback): Update constructor implementation.

(BlameCallback::callback): Update static callback implementation.

(BlameCallback::setRange): Implement.

(BlameCallback::singleLine): Notice changed member variable name.

* SVNClient.cpp

(SVNClient::blame): Set blame output arguments from the callback.

* org_apache_subversion_javahl_SVNClient.cpp

(Java_org_apache_subversion_javahl_SVNClient_blame): Update native method.

[in subversion/bindings/javahl/tests/org/apache/subversion/javahl]

* BasicTests.java

(BlameRangeCallbackImpl): New helper class.

(testBinaryBlame): Also test the returned revision range.

* ExceptionTests.java

(testBlameCallback): Check that a null range callback doesn't cause exceptions.

  1. … 6 more files in changeset.
Follow up to r1851268: our coding guidelines say that output parameters

should come first in the function argument list.

* subversion/include/svn_client.h

(svn_client_blame6): Move start_revnum_p and end_revnum_p to the

beginning of the argument list and update the docstring to say that

either of these may be NULL.

* subversion/libsvn_client/blame.c

(svn_client_blame6): Update signature.

* subversion/svn/blame-cmd.c (svn_cl__blame),

subversion/libsvn_client/deprecated.c (svn_client_blame5),

subversion/bindings/javahl/native/SVNClient.cpp (SVNClient::blame):

Update all callers.

  1. … 4 more files in changeset.
Fix issue #4801: Make JavaHL blame return byte[] file contents in the

blame callback instead of assuming they can be converted to String.

[in subversion/bindings/javahl/src/org/apache/subversion/javahl]

* ISVNClient.java

(ISVNClient.blame): Add a new overload that uses the new BlameLineCallback.

Deprecate the other two overloads that use BlameCallback.

* SVNClient.java

(SVNClient.blame): Implement new native overload and deprecate the old ones.

(SVNClient.BlameCallbackAdapter): New helper class.

* callback/BlameCallback.java

(BlameCallback): Deprecated.

* callback/BlameLineCallback.java

(BlameLineCallback): New, replaces BlameCallback.

[in subversion/bindings/javahl/tests/org/apache/subversion/javahl]

* BasicTests.java

(testBasicBlame, testBlameWithDiffOptions): Suppress deprecation warnings

as these tests use the old API, and should continue to do so in order to

test the callback adapter.

(testBinaryBlame): New test case.

(collectBlameLines, BlameCallbackImpl): Suppress deprecation warnings.

(BlameLineCallbackImpl): New helper class.

* ExceptionTests.java

(testBlameCallback): Use the new API in this test case.

[in subversion/bindings/javahl/native]

* org_apache_subversion_javahl_SVNClient.cpp

(Java_org_apache_subversion_javahl_SVNClient_blame): Update parameter order.

* BlameCallback.cpp

(BlameCallback::singleLine): Use BlameLineCallback instead of BlameCallback.

  1. … 6 more files in changeset.
Move misplaced parameters out of the blame callback.

The svn_client_blame_receiver4_t parameters "start_revnum" and "end_revnum"

do not really belong here because they are not per-line data. They are the

"resolved" versions of the input revnums to svn_client_blame6(). This patch

moves them to svn_client_blame6() output parameters.

* subversion/bindings/javahl/native/BlameCallback.h,

subversion/bindings/javahl/native/BlameCallback.cpp

(callback,

singleLine): Drop the start/end parameters.

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

(blame): Adjust the call to svn_client_blame6(). Don't provide access to

the start/end parameters here, as we weren't providing access to them

through the callback. We could add them later.

* subversion/svn/blame-cmd.c

(blame_receiver_xml,

blame_receiver): Don't expect and process start/end revnums here.

(svn_cl__blame): Handle them here instead.

  1. … 1 more file in changeset.
Update callers to use the newly revved svn_client_blame6() API.

* subversion/bindings/javahl/native/BlameCallback.h,

subversion/bindings/javahl/native/BlameCallback.cpp

(callback,

singleLine): Expect 'svn_string_t *' instead of 'char *'.

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

(blame): Update the call to use svn_client_blame6.

* subversion/svn/blame-cmd.c

(blame_receiver_xml,

blame_receiver): Expect 'line' to be an svn_string_t.

(svn_cl__blame): Update to use svn_client_blame6 and

svn_client_blame_receiver4_t.

  1. … 1 more file in changeset.
Follow up to r1849080: move a private function out of a public header.

* subversion/include/svn_dirent_uri.h: Update file-level docstrin.

(svn_relpath__internal_style): Removed.

* subversion/include/private/svn_dirent_uri_private.h: New file.

(svn_relpath__make_internal): Renamed from svn_relpath__internal_style.

* subversion/libsvn_subr/dirent_uri.c,

subversion/svndumpfilter/svndumpfilter.c,

subversion/tests/libsvn_subr/dirent_uri-test.c,

subversion/bindings/javahl/native/Path.cpp:

Include private/svn_dirent_uri_private.h and use svn_relpath__make_internal

instead of svn_relpath__internal_style.

* subversion/bindings/swig/python/svn/core.py

(__all__): Remove mention of svn_relpath__internal_style from the comment.

  1. … 6 more files in changeset.
Fix various warnings in javahl

[in subversion/bindings/javahl]

* src/org/apache/subversion/javahl/types/RevisionRange.java,

tests/org/apache/subversion/javahl/BasicTests.java,

tests/org/apache/subversion/javahl/SVNRemoteTests.java:

Use "Long.valueOf(long)" instead of deprecated "new Long(long)"

* native/RemoteSession.cpp, native/RemoteSession.h,

native/org_apache_subversion_javahl_remote_RemoteSession.cpp,

native/org_apache_subversion_javahl_util_ConfigImpl_Category.cpp,

native/org_apache_subversion_javahl_util_PropLib.cpp: Rename "jvalue"

variables to fix -Wshadow warnings for jvalue symbol in jni.h

    • ?
    ./org_apache_subversion_javahl_remote_RemoteSession.cpp
    • ?
    ./org_apache_subversion_javahl_util_ConfigImpl_Category.cpp
  1. … 3 more files in changeset.
Make JavaHL use std::unique_ptr when compiled as C++11 and later instead

of the deprecated (and removed in C++17) std::auto_ptr.

* subversion/bindings/javahl/native/CxxCompat.hpp: New.

(JavaHL::cxx::owned_ptr): New; alias for std::unique_ptr or std::auto_ptr.

(JavaHL::cxx::move): New; aliased or faked std::move.

* subversion/bindings/javahl/native/EditorProxy.cpp,

* subversion/bindings/javahl/native/EditorProxy.h,

* subversion/bindings/javahl/native/OperationContext.cpp,

* subversion/bindings/javahl/native/OperationContext.h,

* subversion/bindings/javahl/native/Prompter.cpp,

* subversion/bindings/javahl/native/Prompter.h,

* subversion/bindings/javahl/native/RemoteSession.cpp,

* subversion/bindings/javahl/native/RemoteSessionContext.cpp,

* subversion/bindings/javahl/native/RemoteSessionContext.h,

* subversion/bindings/javahl/native/StateReporter.cpp,

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

* subversion/bindings/javahl/native/org_apache_subversion_javahl_util_SubstLib.cpp,

* subversion/bindings/javahl/native/jniwrapper/jni_class_cache.cpp,

* subversion/bindings/javahl/native/jniwrapper/jni_io_stream.cpp:

Replace std::auto_ptr with JavaHL::cxx:owned_ptr, using JavaHL::cxx::move()

where nedessary to make stuff work when we're actually using std::unique_ptr.

Switch default C++ language level to C++11 on Unix.

- "Modern" C++ (C++11 and later) has become ubiquitous.

- We already need C++11 to compile the KWallet plugin.

- JavaHL compiles in C++11 mode, otherwise it would not build on Windows

with newer versions of MSVC.

- Our core code is not affected at all.

* configure.ac: Display the C and C++ language level flags.

* build/ac-macros/compiler.m4

(SVN_CXX_MODE_SETUP): Switch to C++11.

(SVN_CXX_MODE_SETUP11): Remove; it's now obsolete.

* build/ac-macros/kwallet.m4

(SVN_LIB_KWALLET): Remove reference to SVN_CXX_MODE_SETUP11.

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

(compare_c_strings::operator()): Make this method const to avoid a warning.

  1. … 3 more files in changeset.
Change a private function's signature to prevent potential assertions.

* subversion/include/svn_dirent_uri.h

(svn_relpath__internal_style): Change prototype so that the function can

return an error instead of aborting if anything goes wrong.

* subversion/libsvn_subr/dirent_uri.c

(svn_relpath__internal_style): Update the implementation.

* subversion/bindings/javahl/native/Path.cpp (Relpath::initfunc),

* subversion/svndumpfilter/svndumpfilter.c (sub_main),

* subversion/tests/libsvn_subr/dirent_uri-test.c (test_relpath_internal_style):

Updated all callers.

  1. … 4 more files in changeset.
Prevent some coredumps when using JavaHL SVNClient::diff().

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

(SVNClient::diff): Replace NULL stderr stream in calls to

svn_client_diff_peg6() and svn_client_diff6() with

calls to svn_stream_empty().

Patch by: Matthew Burt

Fix a potential crash in JavaHL.

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

(JNIUtil::wrappedCreateClientException): Don't store an invalid pointer to

out-of-scope std::streambuf contents.

Found by: David Binderman

Fixes #4764

Fix a local refs capacity warning when unparsing externals.

* subversion/bindings/javahl/native/jniwrapper/jni_list.hpp

(ImmutableList::for_each): Use a local frame to avoid acccumulating

local refs from constructors.

Fix deprecation warning in JavaHL's SVNRepos API.

[in subversion/bindings/javahl]

* src/org/apache/subversion/javahl/ISVNRepos.java (ISVNRepos.load):

Add new overload that includes the normalizeProps parameter.

* src/org/apache/subversion/javahl/SVNRepos.java (SVNRepos.load):

Update native method signature and add compatibility wrapper.

* native/org_apache_subversion_javahl_SVNRepos.cpp

(Java_org_apache_subversion_javahl_SVNRepos_load): Update native method.

* native/SVNRepos.h (SVNRepos::load): Update signature.

* native/SVNRepos.cpp (SVNRepos::load): Update implementation.

  1. … 2 more files in changeset.
Fix a JavaHL bug in the prompting for SSL server trust: attempting to

temporarily accept failures would lead to reject behaviour.

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

(Prompter::dispatch_ssl_server_trust_prompt): Always set accepted_failures

in returned credentials, this matches the behaviour of the standard

svn_cmdline_auth_ssl_server_trust_prompt().

* tools/examples/ExampleAuthn.java

(ExampleAuthn.sslServerTrustPrompt): Basic r/t implementation.

  1. … 1 more file in changeset.
Unbreak the JavaHL bindings after 'svnadmin dump include/exclude'.

(This does not yet expose the new capability.)

A follow-up to r1811992.

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

(dump): Supply null arguments for the new 'filter' parameters.

Add exception checks to some of the JavaHL native code to avoid JVM

warnings about JNI problems of the form:

WARNING in native method: JNI call made without checking exceptions when required to

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

(Array::init): Add exception check.

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

(CreateJ::Mergeinfo): Add exception check.

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

(init_iterator, Iterator::next): Add exception check.

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

(OperationContext::closeTunnel): Add exception check.

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

(build_string_array, long_iterable_to_revnum_array,

location_hash_to_map): Add exception check.

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

(RevisionRangeList::RevisionRangeList): Add exception check.

Fix a bug in JavaHL that caused the RA connect logic to ignore redirects.

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

(RemoteSession::RemoteSession): Follow redirects during connect.

Found by: Marc Strapetz

Expose svn_client_list4() in JavaHL.

[in subversion/bindings/javahl]

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

(ISVNClient.list): Add new overload and deprecate the old variant.

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

(SVNClient.list): Update the native method signature and reimplement

the old overloaded variant as a wrapper for the new native method.

* src/org/apache/subversion/javahl/callback/ListItemCallback.java:

New callback interface for ISVNClient.list.

* native/org_apache_subversion_javahl_SVNClient.cpp

(Java_org_apache_subversion_javahl_SVNClient_list): Update native method.

* native/SVNClient.h (SVNClient::list): Update method prototype.

* native/SVNClient.cpp (SVNClient::list): Update implementation.

* native/ListCallback.h (ListCallback::doList): Update prototype.

* native/ListCallback.cpp

(ListCallback::doList): Update implementation.

(ListCallback::callback): Pass externals info to doList.

  1. … 3 more files in changeset.
Make JavaHL's native StringArray container nullable.

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

(Array::isNull): New method.

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

(StringArray::isNull): New method.

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

(StringArray::StringArray): Leave the contents of the container empty if

the underlying Java object is null.

(StringArray::array): Return a null APR array if the Java object is null.

Add an overload to JavaHL's ISVNClient.logMessages() that allows

the API user to retreive all revision properties with each log message.

[in subversion/bindings/javahl/]

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

(ISVNClient.logMessages): Add new overload for 1.10.

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

(ISVNClient.logMessages): Update native signature. Implement the old,

deprecated method.

* native/org_apache_subversion_javahl_SVNClient.cpp

(Java_org_apache_subversion_javahl_SVNClient_logMessages):

Update implementation of native method.

* native/SVNClient.h (SVNClient::logMessages): Update signature.

* native/SVNClient.cpp (SVNClient::logMessages): Update implementation.

* tests/org/apache/subversion/javahl/BasicTests.java,

tests/org/apache/subversion/javahl/ExceptionTests.java: Use the new overload.

  1. … 4 more files in changeset.
Fix temporarily accepting ssl certificate not working in javahl.

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

(accept certificate temporarily): set the accepted failures to the

identified failures in the temporarily accepted section.

Patch by: Doros Agathangelou <doros{_AT_}triadiktyo.com>

(slightly reformatted by me)

Allow svn_client_vacuum and svn_client_cleanup2 to accept non-absolute

paths and convert to absolute, rather than asserting that the passed

paths are absolute. This makes the functions behave like other client

functions.

* subversion/include/svn_client.h

(svn_client_vacuum, svn_client_cleanup2): Rename parameter.

* subversion/libsvn_client/cleanup.c

(svn_client_vacuum, svn_client_cleanup2): Rename parameter, convert

to abspath.

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

(SVNClient::vacuum): Add Path checking to parameter.

[libsvn_client part reverted in r1710290.]

  1. … 2 more files in changeset.
Fix an ABI compatibility bug in the JavaHL library initialization.

[in subversion/bindings/javahl]

* native/org_apache_subversion_javahl_NativeResources.cpp: Resurrect.

(Java_org_apache_subversion_javahl_NativeResources_initNativeLibrary)

Implement this as a no-op.

* src/org/apache/subversion/javahl/NativeResources.java

(initNativeLibrary): Restore the native function declarationt that

was removed in 1.9.

(init): Call initNativeLibrary which is require to make 1.8 and older

JavaHL JNI libraries initialized far enough to make the version

check work.

    • ?
    ./org_apache_subversion_javahl_NativeResources.cpp
  1. … 1 more file in changeset.
Correct some JNIEntry method names.

[in subversion/bindings/javahl/native]

* org_apache_subversion_javahl_SVNClient.cpp

(Java_org_apache_subversion_javahl_SVNClient_setTunnelAgent,

Java_org_apache_subversion_javahl_SVNClient_propertySetRemote,

Java_org_apache_subversion_javahl_SVNClient_propertySetLocal,

Java_org_apache_subversion_javahl_SVNClient_vacuum,

Java_org_apache_subversion_javahl_SVNClient_nativeOpenRemoteSession):

Correct JNIEntry method names.

* org_apache_subversion_javahl_remote_RemoteSession.cpp

(Java_org_apache_subversion_javahl_remote_RemoteSession_reparent,

Java_org_apache_subversion_javahl_remote_RemoteSession_getSessionRelativePath,

Java_org_apache_subversion_javahl_remote_RemoteSession_getReposRelativePath,

Java_org_apache_subversion_javahl_remote_RemoteSession_getReposUUID,

Java_org_apache_subversion_javahl_remote_RemoteSession_getReposRootUrl,

Java_org_apache_subversion_javahl_remote_RemoteSession_getRevisionByTimestamp):

Correct JNIEntry method names.

* org_apache_subversion_javahl_remote_StateReporter.cpp

(Java_org_apache_subversion_javahl_remote_StateReporter_nativeDispose):

Correct JNIEntry method name.

* org_apache_subversion_javahl_util_ConfigImpl_Category.cpp

(Java_org_apache_subversion_javahl_util_ConfigImpl_00024Category_enumerate):

Correct JNIEntry method name.

    • ?
    ./org_apache_subversion_javahl_remote_RemoteSession.cpp
    • ?
    ./org_apache_subversion_javahl_remote_StateReporter.cpp
    • ?
    ./org_apache_subversion_javahl_util_ConfigImpl_Category.cpp
Add svn:eol-style on a few files that should have had them.

* subversion/bindings/javahl/native/jniwrapper/jni_channel.hpp

* subversion/libsvn_fs_x/dag_cache.h

* subversion/libsvn_subr/cache-null.c

Set svn:eol-style.

  1. … 2 more files in changeset.
Implement the new 'svnadmin dump-revprops' sub-command.

The implementation uses a bumped version of svn_repos_dump_fs that can now

be told what kind of information to include in the dump. These new flags

are "positive" and non-restrictive, e.g. INCLUDE_REVPROPS instead of

REVPROPS_ONLY. That way, future revisions may easily extend this scheme.

* subversion/include/svn_repos.h

(svn_repos_dump_fs4): Declared API revision.

(svn_repos_dump_fs3): Deprecate the old one.

* subversion/libsvn_repos/dump.c

(write_revision_record): Make dumping revprops an option.

(svn_repos_dump_fs3): Replaced by ...

(svn_repos_dump_fs4): ... the new API revision. Dump contents depending on

the two new flag parameters.

* subversion/libsvn_repos/deprecated.c

(svn_repos_dump_fs3): Implement here now as forwarding to the latest API.

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

(dump): Call latest API version.

* subversion/tests/libsvn_repos/dump-load-test.c

(test_dump_bad_props): Same.

* subversion/svnadmin/svnadmin.c

(svn_opt_subcommand_t): Declare new sub-command.

(cmd_table): Define its UI.

(get_dump_range): Factored out from ...

(subcommand_dump): ... this.

(subcommand_dump_revprops): Implement new sub-command. Code taken from

subcommand_dump.

  1. … 5 more files in changeset.
Follow up to r1688273:

Minor spelling and documentation fixes, no functional change.

[in subversion/bindings/javahl]

* src/org/apache/subversion/javahl/callback/ReposVerifyCallback.java

(ReposVerifyCallback.onVerifyError): Fix typo in docstring.

* native/ReposVerifyCallback.h

(ReposVerifyCallback::m_jverify_cb): Renamed from m_verify_cb.

(ReposVerifyCallback::ReposVerifyCallback): Add docstring and rename parameter.

(ReposVerifyCallback::callback): Fix docstring.

* native/ReposVerifyCallback.cpp

(ReposVerifyCallback::ReposVerifyCallback): Remove docstring. Rename variables.

(ReposVerifyCallback::onVerifyError): Rename variables.

* tests/org/apache/subversion/javahl/SVNReposTests.java

(SVNReposTests.VerifyCallback.onVerifyError): Add braces to compound conditional.

(SVNReposTests.tryToBreakRepo): Renamed from trytobreakrepo. Update callers.

(SVNReposTests.testVerifyBrokenRepo,

SVNReposTests.testVerifyBrokenRepo_KeepGoing): Make the test setup more explicit.

  1. … 2 more files in changeset.
Follow up to r1687769: Implement semantics equivalent to the new

svn_repos_verify_fs3 in JavaHL.

[in subversion/bindings/javahl]

* src/org/apache/subversion/javahl/callback/ReposVerifyCallback.java

(ReposVerifyCallback): New callback interface.

* src/org/apache/subversion/javahl/ISVNRepos.java

(ISVNRepos.verify): Add the verification callback and update the

documentation of both versions of this method.

* src/org/apache/subversion/javahl/SVNRepos.java

(ISVNRepos.verify): Update native method signature and wrapper

method implementation.

* src/org/apache/subversion/javahl/ReposNotifyInformation.java

(ReposNotifyInformation): Update serial version UID after 1.9 API change.

* native/ReposVerifyCallback.h,

native/ReposVerifyCallback.cpp: New files.

* native/JNIUtil.h

(JNIUtil::createClientException): New.

(JNIUtil::wrappedCreateClientException): Renamed from wrappedHandleSVNError

and changed the the return type.

* native/JNIUtil.cpp

(JNIUtil::wrappedCreateClientException): Return the created exception

instead of throwing it.

(JNIUtil::createClientException): Implement.

(JNIUtil::handleSVNError): Reimplement to call createClientException.

* native/SVNRepos.h: Include ReposVerifyCallback.h.

(SVNRepos::Verify): Add the repository verification callback.

* native/SVNRepos.cpp: Do not include ReposNotifyCallback.h.

(SVNRepos::Verify): Use the repository verification callback.

* native/org_apache_subversion_javahl_SVNRepos.cpp

(Java_org_apache_subversion_javahl_SVNRepos_verify): Add the

repository verification callback and update the implementation.

* tests/org/apache/subversion/javahl/SVNReposTests.java

(SVNReposTests.testVerify): Tweak repository creation.

(SVNReposTests.VerifyCallback, SVNReposTests.trytobreakrepo): New helpers.

(SVNReposTests.testVerifyBrokenRepo,

SVNReposTests.testVerifyBrokenRepo_KeepGoing): New test cases.

  1. … 5 more files in changeset.
Reimplement svn_repos_verify_fs3() to support an arbitrary callback that

receives the information about an encountered problem and lets the caller

decide on what happens next. This supersedes the keep_going argument for

this API. A callback is optional; the behavior of this API if the callback

is not provided is equivalent to how svn_repos_verify_fs2() deals with

encountered errors. This allows seamless migration to the new API, if the

callback is not necessary. The idea is partly taken from how our existing

svn_fs_lock_many() API works with a svn_fs_lock_callback_t and passes error

information to the caller.

Immediately use the new API to provide an alternative solution for the

encountered problem with 'svnadmin verify --keep-going -q' (see r1684940)

being useless in terms that it was only giving an indication of whether a

particular repository passes the verification or not, without providing a

root cause (details) of what's wrong.

Discussion can be found in http://svn.haxx.se/dev/archive-2015-05/0141.shtml

(Subject: "Possible incompatibility of svn_repos_verify_fs2() in 1.9.0-rc1")

* subversion/include/svn_error_codes.h

(SVN_ERR_REPOS_VERIFY_FAILED): Remove this error code, as we no longer

need to send a specific error from within svn_repos_verify_fs3().

(SVN_ERR_CL_REPOS_VERIFY_FAILED): New.

* subversion/include/svn_repos.h

(svn_repos_notify_action_t): Remove svn_repos_notify_failure.

(svn_repos_notify_t): Remove 'err' field, as it is no longer needed.

(svn_repos_verify_callback_t): New optional callback type to be used with

svn_repos_verify_fs3().

(svn_repos_verify_fs3): Drop 'keep_going' argument in favor of accepting a

svn_repos_verify_callback_t. Update the docstring accordingly.

(svn_repos_verify_fs2): Update the docstring for this deprecated function.

* subversion/libsvn_repos/deprecated.c

(svn_repos_verify_fs2): Update the call to svn_repos_verify_fs3() in this

compatibility wrapper. Don't pass the verify callback.

* subversion/libsvn_repos/dump.c

(notify_verification_error): Remove; this function is no longer required.

(report_error): New helper function.

(svn_repos_verify_fs3): In case we've got a svn_repos_verify_callback_t,

call it upon receiving an FS-specific structure failure or a revision

verification failure. Delegate this action to the new report_error()

helper function. Doing so makes the caller responsible for what's going

to happen with the error. The caller can choose to store the error,

ignore it or use it in any other necessary way. If a callback returns an

error, stop the verification process and immediately return that error.

If no callback is provided, mimic the behavior of svn_repos_verify_fs2()

and return the first encountered error. Drop the logic related to error

formatting, as we no longer need it at this layer. We are going to make

a simpler replacement for it is the UI code (svnadmin.c), where it is

supposed to live.

* subversion/svnadmin/svnadmin.c

(struct repos_verify_callback_baton): New. Contains the fields that are

required to track the --keep-going errors taken from ...

(struct repos_notify_handler_baton): ...this baton. After the previous

step, this baton only contains the 'feedback_stream' field, so inline it

into every calling site.

(repos_notify_handler): Baton is now simply an svn_stream_t. Remove the

boolean-based filtering logic from this handler and drop the handling of

svn_repos_notify_failure. The latter is moved, with a bit of tweaking,

into ...

(repos_verify_callback): ...this new function, that implements a callback

for svn_repos_verify_fs3(). Depending on whether we are in --keep-going

mode or not, either dump the failure details to stderr and track them to

produce a summary, or immediately return it through the callback, thus

ending the verification process. Remember all errors in the --keep-going

mode, not only those that are associated with a particular revision.

Prior to handling the error itself, tell that we failed to verify the

revision or metadata by writing corresponding messages to stderr.

(subcommand_dump, subcommand_load, subcommand_recover, subcommand_upgrade,

subcommand_hotcopy, subcommand_pack): Inline repos_notify_handler_baton

here, as it now contains a single svn_stream_t field.

(subcommand_verify): Inline repos_notify_handler_baton here, as it now

contains a single svn_stream_t field. Avoid manipulations with boolean

fields like b->silent_errors and b->silent_running, because we no longer

need them, and the fields themselves are gone. Create a feedback stream

only in non-quiet mode, as we do in other subcommand implementations.

Create a baton for repos_verify_callback() and adjust the calling site of

svn_repos_verify_fs3(), that now needs a callback. Adjust --keep-going

summary printing to the new approach with the verification callback.

Finally, provide a simple error if we encountered at least one failure

in the --keep-going mode.

* subversion/tests/cmdline/svnadmin_tests.py

(verify_keep_going, verify_keep_going_quiet, verify_invalid_path_changes):

Adjust the expectations, because now errors go straight to stderr in both

--keep-going and ordinary modes. Where possible, make the expectations a

bit stricter by extending the lines that we check with RegexListOutput().

* subversion/tests/libsvn_fs_fs/fs-fs-private-test.c

(load_index, load_index_keep_going): Squash two tests into one; basically,

undo the corresponding hunk from r1683311. As we no longer have separate

keep_going mode in svn_repos_verify_fs3(), and the caller decides if the

verification continues or not, we don't have to check two different

scenarios.

(test_funcs): Track the test changes.

* subversion/tests/libsvn_fs_fs/fs-fs-fuzzy-test.c

(fuzzing_1_byte_1_rev): Adjust the call to svn_repos_verify_fs3().

[in subversion/bindings]

* javahl/src/org/apache/subversion/javahl/ReposNotifyInformation.java

(ReposNotifyInformation.Action): Remove value that used to correspond

to svn_repos_notify_failure.

* javahl/src/org/apache/subversion/javahl/ISVNRepos.java

(ISVNRepos.verify): Remove 'keepGoing' argument from the newest overload

of this method and update the docstring. This patch does not expose

the ability to have control over verification failures through a custom

callback in JavaHL bindings, but we're going to address this separately.

* javahl/src/org/apache/subversion/javahl/SVNRepos.java

(SVNRepos.verify): Adjust two overloads of this method in the ISVNRepos

interface implementation.

* javahl/native/SVNRepos.h

(SVNRepos::verify): Remove 'keepGoing' argument from declaration.

* javahl/native/SVNRepos.cpp

(SVNRepos::verify): Remove 'keepGoing' argument. Do not pass a verify

callback when calling svn_repos_verify_fs3().

* javahl/native/org_apache_subversion_javahl_SVNRepos.cpp

(Java_org_apache_subversion_javahl_SVNRepos_verify): Remove 'jkeepGoing'

argument from this JNI wrapper.

  1. … 11 more files in changeset.