Checkout Tools
  • last updated 58 mins 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. … 9 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. … 7 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. … 3 more files 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. … 3 more files in changeset.
Make JavaHL native code compile with a C++11 compiler.

The C++11 language introduces a feature called user-defined literals

(see: http://en.cppreference.com/w/cpp/language/user_literal). The

effect of this in JavaHL is that string literal concatenation where

there is no space between the literals no longer works as in C or older

versions of C++; the C++11 compiler interprets them as a user-defined

literal instaed of concatenated string literals.

The solution is to always put spaces between string literals where

concatenation is intended. JavaHL uses string literal concatenation

in many places to construct JNI class and argument type names.

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

(JAVAHL_PACKAGE): Renamed from JAVA_PACKAGE.

(JAVAHL_CLASS, JAVAHL_ARG): New.

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

(build_keywords_common): Add a space between "%" and APR_UINT64_T_FMT.

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

subversion/bindings/javahl/native/BlameCallback.cpp,

subversion/bindings/javahl/native/ChangelistCallback.cpp,

subversion/bindings/javahl/native/ClientContext.cpp,

subversion/bindings/javahl/native/CommitCallback.cpp,

subversion/bindings/javahl/native/CommitEditor.cpp,

subversion/bindings/javahl/native/CommitMessage.cpp,

subversion/bindings/javahl/native/CopySources.cpp,

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

subversion/bindings/javahl/native/Credential.cpp,

subversion/bindings/javahl/native/DiffSummaryReceiver.cpp,

subversion/bindings/javahl/native/EditorCallbacks.cpp,

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

subversion/bindings/javahl/native/EnumMapper.cpp,

subversion/bindings/javahl/native/ExternalItem.cpp,

subversion/bindings/javahl/native/ImportFilterCallback.cpp,

subversion/bindings/javahl/native/InfoCallback.cpp,

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

subversion/bindings/javahl/native/JNIUtil.h,

subversion/bindings/javahl/native/ListCallback.cpp,

subversion/bindings/javahl/native/LockTokenTable.cpp,

subversion/bindings/javahl/native/LogMessageCallback.cpp,

subversion/bindings/javahl/native/MessageReceiver.cpp,

subversion/bindings/javahl/native/NativeStream.cpp,

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

subversion/bindings/javahl/native/PatchCallback.cpp,

subversion/bindings/javahl/native/PropertyTable.cpp,

subversion/bindings/javahl/native/ProplistCallback.cpp,

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

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

subversion/bindings/javahl/native/ReposFreezeAction.cpp,

subversion/bindings/javahl/native/ReposNotifyCallback.cpp,

subversion/bindings/javahl/native/Revision.cpp,

subversion/bindings/javahl/native/RevisionRange.cpp,

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

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

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

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

subversion/bindings/javahl/native/StatusCallback.cpp,

subversion/bindings/javahl/native/SubversionException.cpp,

subversion/bindings/javahl/native/VersionExtended.cpp,

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

Replace all uses of JAVA_PACKAGE with either JAVAHL_CLASS or JAVAHL_ARG, as appropriate.

  1. … 42 more files in changeset.
In JavaHL: Properly wrap Java exceptions as svn_error_t * when returning from

many callbacks and add the wrapped exception (when not cleared by Subversion)

as cause to the returned exception.

This avoids keeping the JVM in the semi-broken 'exception' state until we

somehow return and also makes it possible to do things in further callbacks

(which we previously skipped by just returning an SVN_NO_ERROR on the still

pending exceptions).

Before this patch a status call that returned an exception in the first

callback would continue the entire status walk and only after returning

it would return the exception, potentially breaking the api contract

of the function.

After this patch an error is returned in Subversion... which builds

the usual error chain in subversion.... Then when the call returns

in JavaHL the cause of the ClientException is set to the originally

raised exception in the callback and intermediate errors are added

if necessary.

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

(BlameCallback::singleLine): Update exit handling.

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

(CommitCallback::commitInfo): Update exit handling.

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

(CommitMessage::getCommitMessage): Return svn_error_t * on error instead of

trying the commit with no log message.

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

(DiffSummaryReceiver::onSummary): Update exit handling.

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

(InfoCallback::singleInfo): Update exit handling.

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

(SVN_ERR_JAVAHL_WRAPPED): New constant.

(assemble_error_message): Don't try to write standard text for

SVN_ERR_JAVAHL_WRAPPED.

(JNIUtil::wrappedHandleSVNError): If there is no jcause passed, check if we

have a Java exception we can use stored in the error.

(WrapExceptionTag): New variable.

(WrappedException): New class.

(JNIUtil::wrapJavaException,

JNIUtil::unwrapJavaException): New functions.

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

(JNIUtil::wrapJavaException,

JNIUtil::unwrapJavaException): New functions.

(POP_AND_RETURN_EXCEPTION_AS_SVNERROR): New define.

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

(ListCallback::doList): Update exit handling.

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

(LogMessageCallback::singleMessage): Update exit handling.

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

(StatusCallback::doStatus): Update exit handling.

* subversion/bindings/javahl/tests/org/apache/subversion/javahl/ExceptionTests.java

New file.

* subversion/bindings/javahl/tests/org/apache/subversion/javahl/RunTests.java

(SVNTestSuite.suite): Add ExceptionTests.

  1. … 11 more files in changeset.
Some JavaHL infrastructure refactoring.

[in subversion/bindings/javahl/native]

* CreateJ.h (CreateJ::PropertyMap): Accept optional scratch_pool argument.

(CreateJ::FillPropertyMap): Require a scratch pool for hash iteration.

(CreateJ::Mergeinfo): New.

* CreateJ.cpp

(CreateJ::PropertyMap, CreateJ::FillPropertyMap): Update prototypes.

(CreateJ::Mergeinfo): Hoist implementation from SVNClient::getMergeinfo.

* SVNClient.cpp (SVNClient::getMergeinfo): Use CreateJ::Mergeinfo.

* BlameCallback.cpp, EditorProxy.cpp, LogMessageCallback.cpp,

ProplistCallback.cpp, RemoteSession.cpp: Pass available pools to invocations

of CreateJ::PropertyMap and CreateJ::FillPropertyMap.

  1. … 7 more files in changeset.
JavaHL: Update many C-style casts to use the C++ static cast.

* subversion/bindings/javahl/native:

<everywhere>: Update casts to use static_cast<>(Foo *) where appropriate.

  1. … 17 more files in changeset.
JavaHL: Remove some unneeded pool parameters when constructing Java objects.

* subversion/bindings/javahl/native/ReposNotifyCallback.cpp:

subversion/bindings/javahl/native/ProplistCallback.cpp,

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

subversion/bindings/javahl/native/LogMessageCallback.cpp,

subversion/bindings/javahl/native/ClientContext.cpp,

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

Update callers.

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

subversion/bindings/javahl/native/CreateJ.h

(ClientNotifyInformation, ReposNotifyInformation, PropertyMap): Remove

pool parameters.

  1. … 7 more files in changeset.
Following up on r955895, update javahl handler to accept the start end

end revision of the blame to fix compilation.

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

(BlameCallback::callback, BlameCallback::singleLine):

Accept start and end revision.

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

(BlameCallback::callback, BlameCallback::singleLine):

Accept start and end revision.

  1. … 1 more file in changeset.
JavaHL: Add some more uses of PushLocalFrame/PopLocalFrame for managing

local object references in JNI.

[ in subversion/bindings/javahl/ ]

* native/DiffSummaryReceiver.cpp

(onSummary),

* native/ProplistCallback.cpp

(singlePath),

* native/LogMessageCallback.cpp

(single_message),

* native/ListCallback.cpp

(doList),

* native/BlameCallback.cpp

(singleLine):

Apply the Push/Pop reference frame technique to ensure our local references

aren't leaked.

* native/CreateJ.cpp

(LOCAL_FRAME_SIZE, POP_AND_RETURN_NULL): Remove.

* native/JNIUtil.h

(LOCAL_FRAME_SIZE, POP_AND_RETURN, POP_AND_RETURN_NULL): New.

  1. … 6 more files in changeset.
JavaHL: Shuffle one of the native functions into a more appropriate home.

[ in subversion/bindings/javahl/ ]

* native/ProplistCallback.h,

native/ProplistCallback.cpp

(makeMapFromHash): Remove.

* native/CreateJ.cpp,

native/CreateJ.h

(PropertyMap): New, copied from ProplistCallback.

* native/SVNClient.cpp,

native/BlameCallback.cpp,

native/LogMessageCallback.cpp:

Update all references.

  1. … 6 more files in changeset.
JavaHL: Reset the backward-compat number on an interface.

[ in subversion/bindings/javahl/ ]

* native/BlameCallback.cpp,

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

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

src/org/apache/subversion/javahl/BlameCallbackImpl.java:

Update references to the interface.

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

...from here.

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

...to here.

  1. … 5 more files in changeset.
JavaHL: Migrate the JavaHL client class to be a wrapper around the class

in the apache package.

Note: 'make check-javahl' still works, though 'make check-javahl-compat'

crashes the jvm.

(And sorry 'bout the power plant of a patch. There really wasn't a way to

chop this sucker up :( )

* Makefile.in:

(javahl): Depend on the javahl-compat targets.

* build.conf

(libsvnjavahl): Depend on the javahl-compat headers.

[ in subversion/bindings/javahl/ ]

* native/ChangelistCallback.cpp,

native/DiffSummaryReceiver.cpp,

native/CreateJ.cpp,

native/ProplistCallback.cpp,

native/LogMessageCallback.cpp,

native/StatusCallback.cpp,

native/InfoCallback.cpp,

native/ListCallback.cpp,

native/BlameCallback.cpp,

native/ConflictResolverCallback.cpp:

Update package location for the new package.

* native/Notify2.h:

Move from this...

* native/NotifyCallback.h:

...to this.

* native/org_tigris_subversion_javahl_SVNClient.cpp:

Move from this...

* native/org_apache_subversion_javahl_SVNClient.cpp:

...to this.

* native/Notify2.cpp:

Move this...

* native/NotifyCallback.cpp:

...to this.

* native/SVNClient.h,

native/SVNClient.cpp:

Change Notify2 to NotifyCallback.

* native/org_tigris_subversion_javahl_NativeResources.cpp:

Remove.

* native/Outputer.cpp,

native/Inputer.cpp:

Use the new Interface name throughout.

* native/JNIUtil.h

(JAVA_PACKAGE): Redefine to use the new package name.

* src/org/tigris/subversion/javahl/ConflictVersion.java,

src/org/tigris/subversion/javahl/Version.java,

src/org/tigris/subversion/javahl/ChangePath.java,

src/org/tigris/subversion/javahl/CommitItem.java,

src/org/tigris/subversion/javahl/DirEntry.java,

src/org/tigris/subversion/javahl/Info2.java,

src/org/tigris/subversion/javahl/Info.java,

src/org/tigris/subversion/javahl/PropertyData.java,

src/org/tigris/subversion/javahl/CopySource.java,

src/org/tigris/subversion/javahl/RevisionRange.java,

src/org/tigris/subversion/javahl/ProgressEvent.java,

src/org/tigris/subversion/javahl/ConflictDescriptor.java,

src/org/tigris/subversion/javahl/DiffSummary.java,

src/org/tigris/subversion/javahl/ConflictResult.java,

src/org/tigris/subversion/javahl/Status.java,

src/org/tigris/subversion/javahl/NotifyInformation.java,

src/org/tigris/subversion/javahl/Mergeinfo.java:

Add a backward compat constructor.

* src/org/tigris/subversion/javahl/Revision.java

(createFromApache): A new backward-compat wrapper.

* src/org/tigris/subversion/javahl/SVNClient.java:

The power plant. Implement this class as a wrapper around a surrogate

object from the apache package.

* src/org/tigris/subversion/javahl/SVNAdmin.java

(getVersion): Use the NativeResources class from the new package.

* src/org/tigris/subversion/javahl/NativeResources.java:

Remove.

* src/org/tigris/subversion/javahl/Lock.java:

Only duplicate fields which are non-null.

* src/org/tigris/subversion/javahl/PromptUserPassword.java,

src/org/tigris/subversion/javahl/ProplistCallback.java,

src/org/tigris/subversion/javahl/ChangelistCallback.java,

src/org/tigris/subversion/javahl/Notify.java:

Implement this wrapper by extending the apache-packaged class.

* src/org/apache/subversion/javahl/NotifyStatus.java,

src/org/apache/subversion/javahl/Info.java,

src/org/apache/subversion/javahl/Notify.java:

New, copied from the old package.

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

(getCppAddr): New function, useful for backward-compat.

(finalize): Make public for backward-compat.

(getLastPath, notification, info): Needed functions for backward compat.

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

Publicize for backward-compat.

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

(fromException): Make public for backward compat.

  1. … 55 more files in changeset.
JavaHL: Update the blame APIs to be current with libsvn_client.

[ in subversion/bindings/javahl/ ]

* native/SVNClient.cpp

(blame): Bump the API version.

* native/BlameCallback.h

(callback, singleLine): Update to the new callback interface.

* native/BlameCallback.cpp

(callback, singleLine): Update to the new callback interface, and use

the new Java blame callback to push the data back to the caller.

* src/org/tigris/subversion/javahl/SVNClientSynchronized.java,

src/org/tigris/subversion/javahl/SVNClientInterface.java

(blame): Rev the blame interface and it's implementors.

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

(blame): Same, and also add a wrapper for backward compat.

(BlameCallback2Wrapper): New.

* src/org/tigris/subversion/javahl/BlameCallback3.java:

New.

  1. … 6 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.
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 JavaHL compilation by updating the blame callback interface and propagating

the mergePath parameter back to Java.

[ in subversion/bindings/javahl/ ]

* native/BlameCallback.h,

native/BlameCallback.cpp

(callback): Add merged_path parameter.

(singleLine): Add merged_path parameter, and pass it back to Java. Destory

temporary variables.

* src/org/tigris/subversion/javahl/BlameCallback2.java

(singleLine): Update docstring and add merged_path parameter.

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

(BlameCallbackWrapper): Update to the new interface.

  1. … 3 more files in changeset.
Merge the merge-sensitive-blame branch to trunk. This implements

'svn blame -g'.

For additional logs and history, please see the branch.

  1. … 33 more files in changeset.
* subversion/bindings/javahl/native/*.cpp:

De-bracify single-line blocks.

  1. … 13 more files in changeset.
* subversion/bindings/javahl/native/*.{h,cpp}:

Reindent the JavaHL bindings C++ code to match the Subversion

indentation standard used in the C code. See the thread

http://svn.haxx.se/dev/archive-2007-04/0103.shtml .

This was done in XEmacs using tools/svn-dev.el, manually going into

C mode for each file and using indent-region on the whole file.

Running a 'svn diff --diff-cmd diff -x -uw' shows no differences.

  1. … 63 more files in changeset.
* subversion/bindings/javahl/native/*.{h,cpp}:

Formatting cleanup.

  1. … 22 more files in changeset.
* subversion/bindings/javahl/native/*.{h,cpp}:

Use consistent capitalization for the word Java.

$ perl -w -p -i -e 's/ java / Java /g' *h

  1. … 35 more files in changeset.
[ in subversion/bindings/javahl ]

* native/StatusCallback.h,

* native/BlameCallback.cpp

Capitalization and whitespace removal.

  1. … 1 more file in changeset.