Checkout Tools
  • last updated 1 hour ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
JavaHL: Make status() callback-based. This better encapsulates some of the

underlying C++ code, and also lets the Java interface better mirror the

C API.

[ in subversion/bindings/java/javahl/ ]

* native/org_tigris_subversion_javahl_SVNClient.cpp

(Java_org_tigris_subversion_javahl_SVNClient_status):

Update method return type to be void, and update call to SVNClient::status().

* native/SVNClient.h,

native/SVNClient.cpp

(status): Cut out the extra functionality which is not longer needed because

we are using a callback object.

(statusReceiver): Remove.

(status_entry): Remove.

(status_baton): Remove.

(createJavaStatus): Move to StatusCallback.

* native/StatusCallback.h,

native/StatusCallback.cpp

(StatusCallback): A new class to represent a callback for svn_client_status().

The class also contains helper functions moved from SVNClient.

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

(status): Update definition to take a callback parameter.

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

(status): Implement the old status() in terms of the new one.

(status): New native status implementation.

(MyStatusCallback): A callback class to be used for implementing a thin wrapper

around the new status implementation.

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

(status): Update the definition to take a callback parameter.

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

(StatusCallback): New callback interface.

    • ?
    ./native/org_tigris_subversion_javahl_SVNClient.cpp
JavaHL: Debracify.

[ in subversion/bindings/java/javahl/ ]

* native/*.cpp:

Remove extraneous braces, and add some vertical whitespace.

JavaHL: Cleanup the C++ InfoCallback class. Followup to r24349.

Suggested by: dlr

[ in subversion/bindings/java/javahl/ ]

* native/InfoCallback.cpp

(InfoCallback): De-java-doc-ify the comments.

(~InfoCallback): Fix a copy-paste typo.

(singleInfo): Whitespace fix, and comment cleanup. Also, unreference a

no-longer-needed Java object.

JavaHL: Cleanups to a couple of wrapper callback classes. Follow up to r24349.

Inspired by: dlr

[ in subversion/bindings/java/javahl/ ]

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

(MyLogMessageCallback, MyInfoCallback): Use an ArrayList in favor of a Vector

for the private data, as this does not need to be thread-safe. Document this

fact in the Java docs. Simplify the data retrieval functions.

JavaHL: Cleanup for the commit() API.

[ in subversion/bindings/java/javahl/ ]

* native/native/SVNClient.cpp

(commit): Use SVN_INVALID_REVNUM instead of the magic number "-1".

Tweak whitespace usage.

JavaHL: Make info2() callback-based. This better encapsulates some of the

underlying C++ code, and also lets the Java interface better mirror the

C API.

[ in subversion/bindings/java/javahl/ ]

* native/org_tigris_subversion_javahl_SVNClient.cpp

(Java_org_tigris_subversion_javahl_SVNClient_info2):

Update method return type to be void, and update call to SVNClient::info().

* native/SVNClient.h,

native/SVNClient.cpp

(info): Cut out the extra functionality which is not longer needed because

we are using a callback object.

(infoReceiver): Remove.

(createJavaInfo2): Move to InfoCallback.

* native/InfoCallback.h,

native/InfoCallback.cpp

(InfoCallback): A new class to represent a callback for svn_client_info().

The class also contains helper functions moved from SVNClient.

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

(info2): Add the new info2() method.

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

(info2): Implement the old info2() in terms of the new one.

(info2): New native info2 implementation.

(MyInfoCallback): A callback class to be used for implementing a thin wrapper

around the new info implementation.

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

(info2): New callback-based info implementation.

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

(InfoCallback): New callback interface.

    • ?
    ./native/org_tigris_subversion_javahl_SVNClient.cpp
JavaHL: A follow-up to r24318, improving the tests for the new

SVNClientInterface.getMergeInfo() API.

[ in subversion/bindings/java/javahl/ ]

* src/org/tigris/subversion/javahl/tests/BasicTests.java

(testMergeInfoRetrieval): Enhance the test for the getMergeInfo()

API to test both uncommitted merge info inherited from higher in

the WC, and committed merge info inherited from higher in the

repository's tree.

(acquireMergeInfoAndAssertEquals): Add a helper method factored out

of testMergeInfoRetrieval().

JavaHL: Improve JavaDoc for commit() APIs.

[ in subversion/bindings/java/javahl/ ]

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

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

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

(commit): Improve @return JavaDoc and add missing @since tag on

interface. Change JavaDoc to @see on implementations.

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

De-tabify.

JavaHL: Remove extraneous API.

[ in subversion/bindings/java/javahl/ ]

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

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

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

(getMergeInfoProperty): Remove API, obviated by the getMergeInfo()

and propertyGet() APIs.

JavaHL: Add SVNClientInterface.getMergeInfo() API.

[ in subversion/bindings/java/javahl/ ]

* notes/merge-tracking.txt

Remove task.

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

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

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

(getMergeInfo): Add new method.

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

(RevisionRange): Add new constructor called by native library.

* native/SVNClient.h

* native/SVNClient.cpp

(getMergeInfo): Add new method.

* native/org_tigris_subversion_javahl_SVNClient.cpp

(Java_org_tigris_subversion_javahl_SVNClient_getMergeInfo): Add

native implementation of Java method.

* src/org/tigris/subversion/javahl/tests/BasicTests.java

Import java.util.List.

(testMergeInfoRetrieval): Add test for new getMergeInfo() API.

(testBasicMerge): Call setupAndPerformMerge().

(setupAndPerformMerge): Test and WC setup factored out of testBasicMerge().

    • ?
    ./native/org_tigris_subversion_javahl_SVNClient.cpp
  1. … 1 more file in changeset.
JavaHL: Move the one-line implementation of the blame receiver from the

SVNClient class to the BlameCallback class.

[ in subversion/bindings/java/javahl/ ]

* native/BlameCallback.h,

native/BlameCallback.cpp

(callback): A new static function which is used as a receiver for

svn_client_blame3(). It then dispatches to the actual receiver provided to

an instance of BlameCallback.

(singleLine): The old callback() function, now protected, which is called

by the new callback() function.

* native/SVNClient.cpp

(blame_receiver): Removed. Functionality moved into BlameCallback.

(blame): Use the moved receiver when calling svn_client_blame3().

JavaHL: Move the one-line implementation of the log message receiver from the

SVNClient class to the LogMessageCallback class.

[ in subversion/bindings/java/javahl/ ]

* native/LogMessageCallback.h,

native/LogMessageCallback.cpp

(callback): A new static function which is used as a receiver for

svn_client_log3(). It then dispatches to the actual receiver provided to

an instance of LogMessageCallback.

(singleMessage): The old callback() function, now protected, which is called

by the new callback() function.

* native/SVNClient.cpp

(log_message_receiver): Removed. Functionality moved into LogMessageCallback.

JavaHL: Fix compilation warning.

[ in subversion/bindings/java/javahl/ ]

* native/ProplistCallback.cpp

(makeMapFromHash): Remove unused local variable "count".

JavaHL: More work on the info() and info2() interface. Followup to r24274.

This commit removes duplicate implementations of info() and info2() at the C++

layer in favor of a thin wrapper at the Java layer. Because info() has a flags

from the wc entry which info2() doesn't, we still get to fetch the entry in the

receiver. In the case of the receiver being called by a repository crawl, we

also have to make sure we cache the wc root path beforehand, so we can

reconstruct the absolute path to fetch the entry correctly.

The alternative to this convoluted double-entry fetching is to add a couple of

fields to svn_info_t, but this impacts *every* call to svn_client_info(), not

just when using JavaHL.

(Note: The approach proved fruitless, and most of the work done here was

reverted in r24531.)

[ in subversion/bindings/java/javahl/ ]

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

(info): Reimplement as a wrapper around info2().

* native/SVNClient.h,

native/SVNClient.cpp

(info_baton): Add a wcPath member.

(info2, info, info): Consolidate the info implementations into a single

function.

(infoReceiver): Update the receiver to use store the information retrieved

locally from the wc entry.

* native/org_tigris_subversion_javahl_SVNClient.cpp

(Java_org_tigris_subversion_javahl_SVNClient_info): Remove.

(Java_org_tigris_subversion_javahl_SVNClient_info2): Use the new combined

info() implementation.

    • ?
    ./native/org_tigris_subversion_javahl_SVNClient.cpp
[ in subversion/bindings/java/javahl/ ]

* native/CopySources.h

* native/CopySources.cpp

(makeJCopySource): Add API for creating a Java CopySource object.

[ in subversion/bindings/java/javahl/ ]

* native/Revision.h

* native/Revision.cpp

(makeJRevision): Add API for creating a Java Revision object.

JavaHL: Improve and consolidate info() and info2() APIs.

The idea here being that we can extend Info2 from Info, and then just generate

an array of Info2 objects. For the old implementation of info(), we just take

the first object of that array, which is still an Info object, and return it.

(Note: The approach proved fruitless, and most of the work done here was

reverted in r24531.)

[ in subversion/bindings/java/javahl/ ]

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

(Info2): Extend this class from Info, removing duplicate data elements and

methods. Due to the complete lack of consistency between the two classes,

implement several of Info2's mis-named methods as wrappers to Info.

(Info2.<init>): Update the arguments of the constructor to accept some

parameters required by Info.

* native/SVNClient.h,

native/SVNClient.cpp

(info): New private function which is the actual implementation of both

info and info2 functions.

(info): Reimplement in terms of the private function. Extract and return

the first, and hopefully only, element in the resulting array.

(info2): Reimplement in terms of the private function.

(createJavaInfo): Remove.

(info_entry): Add additional flags for Info.

(info_baton): Add a version number variable for internal use.

(createJavaInfo2): Add additional parameters required by Info.

JavaHL: Whitespace cleanup.

[ in subversion/bindings/java/javahl/ ]

* native/ProplistCallback.cpp

Extraneous brace removal.

JavaHL: Move the one-line implementation of a proplist receiver from SVNClient

to the ProplistCallback class. This is similar in implementation to the

DiffSummaryReceiver class.

[ in subversion/bindings/java/javahl/ ]

* native/ProplistCallback.h,

native/ProplistCallback.cpp

(callback): A new static function which is used as a receiver to then dispatch

the actual receiver to the provided instance.

(singlePath): The old callback() function, now protected, and called by the

new callback() function.

* native/SVNClient.cpp

(proplist_receiver): Removed. Functionality moved into ProplistCallback.

[ in subversion/bindings/java/javahl/ ]

* native/DiffSummaryReceiver.cpp

(onSummary): Remove an unnecessary "return" statement.

JavaHL: Whitespace cleanup.

[ in subversion/bindings/java/javahl/ ]

* native/DiffSummaryReceiver.cpp:

Extraneous brace removal.

JavaHL: Make a couple of local receiver methods static.

[ in subversion/bindings/java/javahl/ ]

* native/SVNClient.cpp

(log_message_receiver, proplist_receiver): Make static.

* subversion/bindings/java/javahl/src/org/tigris/subversion/javahl/Depth.java:

Add some vertical whitespace.

* INSTALL: Point to subversion/bindings/java/javahl/README, not

subversion/bindings/java/README.

* subversion/bindings/java/README: Delete.

* subversion/bindings/java/javahl/README: Merge in non-redundant content from

above deleted file.

  1. … 2 more files in changeset.
JavaHL: Add depth parameters to APIs which use them. This removes all usage of

the SVN_DEPTH_FROM_RECURSE() in the C++ layer, and pushs the parameter up to

the Java layer.

[ in subversion/bindings/java/javahl/ ]

* native/SVNClient.h,

native/SVNClient.cpp

(status, checkout, update, doExport, doSwitch, merge, merge, diff, diff,

diff, diffSummarize, diffSummarize):

Change the 'recurse' parameter to 'depth', and update calls to the relevant

C APIs.

* org_tigris_subversion_javahl_SVNClient.cpp

(Java_org_tigris_subversion_javahl_SVNClient_status,

Java_org_tigris_subversion_javahl_SVNClient_checkout,

Java_org_tigris_subversion_javahl_SVNClient_update,

Java_org_tigris_subversion_javahl_SVNClient_doExport,

Java_org_tigris_subversion_javahl_SVNClient_doSwitch):

Update parameters from boolean recurse values to integer depth values.

Update calls to SVNClient member functions.

(Java_org_tigris_subversion_javahl_SVNClient_merge__Ljava_lang_String_2Lorg_tigris_subversion_javahl_Revision_2Ljava_lang_String_2Lorg_tigris_subversion_javahl_Revision_2Ljava_lang_String_2ZZZZ):

Rename from this...

(Java_org_tigris_subversion_javahl_SVNClient_merge__Ljava_lang_String_2Lorg_tigris_subversion_javahl_Revision_2Ljava_lang_String_2Lorg_tigris_subversion_javahl_Revision_2Ljava_lang_String_2ZIZZ):

...to this. Update parameters.

(Java_org_tigris_subversion_javahl_SVNClient_merge__Ljava_lang_String_2Lorg_tigris_subversion_javahl_Revision_2Lorg_tigris_subversion_javahl_Revision_2Lorg_tigris_subversion_javahl_Revision_2Ljava_lang_String_2ZZZZ):

Rename from this...

(Java_org_tigris_subversion_javahl_SVNClient_merge__Ljava_lang_String_2Lorg_tigris_subversion_javahl_Revision_2Lorg_tigris_subversion_javahl_Revision_2Lorg_tigris_subversion_javahl_Revision_2Ljava_lang_String_2ZIZZ):

...to this. Update parameters.

(Java_org_tigris_subversion_javahl_SVNClient_diff__Ljava_lang_String_2Lorg_tigris_subversion_javahl_Revision_2Ljava_lang_String_2Lorg_tigris_subversion_javahl_Revision_2Ljava_lang_String_2ZZZZ):

Rename from this...

(Java_org_tigris_subversion_javahl_SVNClient_diff__Ljava_lang_String_2Lorg_tigris_subversion_javahl_Revision_2Ljava_lang_String_2Lorg_tigris_subversion_javahl_Revision_2Ljava_lang_String_2IZZZ):

...to this. Update parameters.

(Java_org_tigris_subversion_javahl_SVNClient_diff__Ljava_lang_String_2Lorg_tigris_subversion_javahl_Revision_2Lorg_tigris_subversion_javahl_Revision_2Lorg_tigris_subversion_javahl_Revision_2Ljava_lang_String_2ZZZZ):

Rename from this...

(Java_org_tigris_subversion_javahl_SVNClient_diff__Ljava_lang_String_2Lorg_tigris_subversion_javahl_Revision_2Lorg_tigris_subversion_javahl_Revision_2Lorg_tigris_subversion_javahl_Revision_2Ljava_lang_String_2IZZZ):

...to this. Update parameters.

(Java_org_tigris_subversion_javahl_SVNClient_diffSummarize__Ljava_lang_String_2Lorg_tigris_subversion_javahl_Revision_2Ljava_lang_String_2Lorg_tigris_subversion_javahl_Revision_2ZZLorg_tigris_subversion_javahl_DiffSummaryReceiver_2):

Rename from this...

(Java_org_tigris_subversion_javahl_SVNClient_diffSummarize__Ljava_lang_String_2Lorg_tigris_subversion_javahl_Revision_2Ljava_lang_String_2Lorg_tigris_subversion_javahl_Revision_2IZLorg_tigris_subversion_javahl_DiffSummaryReceiver_2):

...to this. Update parameters.

(Java_org_tigris_subversion_javahl_SVNClient_diffSummarize__Ljava_lang_String_2Lorg_tigris_subversion_javahl_Revision_2Lorg_tigris_subversion_javahl_Revision_2Lorg_tigris_subversion_javahl_Revision_2ZZLorg_tigris_subversion_javahl_DiffSummaryReceiver_2):

Rename from this...

(Java_org_tigris_subversion_javahl_SVNClient_diffSummarize__Ljava_lang_String_2Lorg_tigris_subversion_javahl_Revision_2Lorg_tigris_subversion_javahl_Revision_2Lorg_tigris_subversion_javahl_Revision_2IZLorg_tigris_subversion_javahl_DiffSummaryReceiver_2):

...to this. Update parameters.

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

(Depth): New final class for representing the different types of depth.

(fromRecurse): A Java implementation of the SVN_DEPTH_FROM_RECURSE() macro.

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

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

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

(status, doExport, merge, merge, diff, diff): New APIs with the depth

parameter.

(checkout, update, update, doSwitch, merge, diffSummarize, diffSummarize):

Update these existing new APIs to use the depth parameter.

* src/org/tigris/subversion/javahl/tests/BasicTests.java:

Update current users of the new APIs to pass a Depth parameter.

    • ?
    ./src/org/tigris/subversion/javahl/Depth.java
    • ?
    ./native/org_tigris_subversion_javahl_SVNClient.cpp
JavaHL: Improve exception thrown when an invalid (negative) revision

number is provided to construct a Revision object.

[ in subversion/bindings/java/javahl/ ]

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

(Number.Number): Include invalid revision number in the exception text.

JavaHL: Add native library line numbers (from svn_error_t *'s) to

exception output.

[ in subversion/bindings/java/javahl/ ]

* native/JNIUtil.h

(throwNativeException): Improve doc string. Rename "fileName"

parameter to "source".

* native/JNIUtil.cpp

(throwNativeException): Rename "fileName" parameter to "source".

(handleSVNError): Assemble and use a "source" value of "file:line".

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

(source): Clarify JavaDoc.

[ in subversion/bindings/java/javahl/ ]

* native/JNIUtil.cpp

(JNIUtil::makeJString): Remove local variable "js" in favor of

immediate "return", and clean up formatting.

* subversion/bindings/java/**/*{.cpp,.h,.java}:

Trim trailing whitespace.

    • ?
    ./native/org_tigris_subversion_javahl_SVNClient.cpp
  1. … 39 more files in changeset.