Checkout Tools
  • last updated 2 hours 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.

    • ?
    ./tigris/subversion/javahl/StatusCallback.java
  1. … 5 more files in changeset.
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: 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.

    • ?
    ./tigris/subversion/javahl/InfoCallback.java
  1. … 5 more files in changeset.
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.

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().

  1. … 4 more files in changeset.
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.

  1. … 3 more files in changeset.
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.

  1. … 2 more files in changeset.
* subversion/bindings/java/javahl/src/org/tigris/subversion/javahl/Depth.java:

Add some vertical whitespace.

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.

    • ?
    ./tigris/subversion/javahl/Depth.java
  1. … 3 more files in changeset.
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.

  1. … 2 more files in changeset.
* subversion/bindings/java/**/*{.cpp,.h,.java}:

Trim trailing whitespace.

  1. … 40 more files in changeset.
[ 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

(getCopySource): Add Revision parameter.

[ in subversion/bindings/java/javahl/ ]

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

(testMergeInfoParser): Tweak formatting, and add @since tag to JavaDoc.

JavaHL: Follow up r24248. Set svn:eol-style and adjust copyright years.

[ in subversion/bindings/java/javahl/ ]

* native/LogMessageCallback.h,

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

Set svn:eol-style to native.

* native/LogMessageCallback.cpp:

Set svn:eol-style to native, and adjust copyright year.

  1. … 2 more files in changeset.
JavaHL: Make the logMessages api callback-based, to more closely mirror the

actual client API.

[ in subversion/bindings/java/javahl/ ]

* native/SVNClient.cpp

(logMessages): Use the user provided callback, instead of one implemented as

part of the SVNClient class in the call to svn_client_log3().

(log_message_receiver): New receiver function to wrap the LogMessageCallback

class.

(messageReceiver): Remove.

* native/org_tigris_subversion_javahl_SVNClient.cpp

(Java_org_tigris_subversion_javahl_SVNClient_logMessages):

Update parameters to receive a callback, and use that callback when calling

SVNClient::logMessages().

* native/LogMessageCallback.h,

native/LogMessageCallback.cpp

(LogMessageCallback): New class. A wrapper around the Java callback. Most

of the functionality has been moved from SVNClient::messageReceiver().

* native/SVNClient.h

(logMessages): Update parameters to receive a LogMessageCallback object.

(messageReceiver): Remove.

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

(LogMessageCallback): New interface.

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

(logMessages): Update docstring, arguments and return type.

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

(LogMessage): Update the order of the constructor arguments to match

the order of the log message arguments used elsewhere in the bindings.

Also, update the docstring to note that instead of being called from JNI,

the constructor is now called from the thin wrapper.

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

(logMessages): Update docstring, arguments, and call to worker.

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

(logMessages): Use the private callback class to implement the thin wrapper.

(logMessages): Update parameters to accept a LogMessageCallback object.

Change the return type to void.

(MyLogMessageCallback): New private class used to implement wrappers.

    • ?
    ./tigris/subversion/javahl/LogMessageCallback.java
  1. … 5 more files in changeset.
[ in subversion/bindings/java/javahl/ ]

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

Handle revision List more efficiently

(setRevisionList): New private method to set Map object.

(addRevisions): Use setRevisionList method to store object.

(addRevisionRange): Use setRevisionList method to store

object. This allows us to remove exception handling.

(parseRevisions): Add objects to List more efficiently and use

setRevisionList method to save the List.

[ in subversion/bindings/java/javahl/ ]

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

Improve class JavaDoc.

(mergeSources): Rename from info, and add JavaDoc.

(MergeInfo): Drop implicit call to super-class ctor.

(MergeInfo, loadFromMergeInfoProperty): Improve JavaDoc. Rename

propertyValue parameter to mergeInfo.

(addRevisions): Improve JavaDoc. Use "instanceof" check. Drop

period from end of exception text.

(addRevisionRange): Improve JavaDoc. Instead of completing

supressing an unlikely SubversionException, re-throw it as

RuntimeException to guard against bitrot.

(getPaths, getRevisions, getRevisionRange): Improve JavaDoc. Tweak

formatting.

(parseMergeInfoLine, parseRevisions): Improve JavaDoc. Tweak

whitespace.

JavaHL: Added MergeInfo class to represent the contents of svn:mergeinfo

* subversion/bindings/java/javahl/src/org/tigris/subversion/javahl/MergeInfo.java

Initial implementation

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

(constructor): Added a constructor that accepts a revision string and parses it

into a from/to revision range.

* subversion/bindings/java/javahl/src/org/tigris/subversion/javahl/test/BasicTests.java

(testMergeInfoParser): Added a test to test the MergeInfo and RevisionRange

parsing capabilities.

    • ?
    ./tigris/subversion/javahl/MergeInfo.java
* subversion/bindings/java/javahl/src/org/tigris/subversion/javahl/SVNClient.java:

Whitespace cleanup.

JavaHL: Remove near-duplicate C++ implementation of propertySet in favor of

a thin Java wrapper.

[ in subversion/bindings/java/javahl ]

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

(propertySet): Implement as a thin wrapper instead of a native function.

* org_tigris_subversion_javahl_SVNClient.cpp

(Java_org_tigris_subversion_javahl_SVNClient_propertySet__Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2ZZ):

Rename from this...

(Java_org_tigris_subversion_javahl_SVNClient_propertySet): ...to this.

(Java_org_tigris_subversion_javahl_SVNClient_propertySet__Ljava_lang_String_2Ljava_lang_String_2_3BZZ):

Remove.

  1. … 1 more file in changeset.
* subversion/bindings/java/**/*{.cpp,.java}:

Whitespace cleanup.

  1. … 1 more file in changeset.
JavaHL: Add support for the svn_client_proplist3() API.

[ in subversion/bindings/java/javahl/ ]

* native/ProplistCallback.h,

native/ProplistCallback.cpp

(ProplistCallback): New C++ wrapper class for Java callbacks.

* native/SVNClient.h,

native/SVNClient.cpp

(proplist_receiver): New wrapper around the callback.

(properties): Change the signature to reflect the operation of proplist3(),

and update to call svn_client_proplist3().

* native/org_tigris_subversion_javahl_SVNClient.cpp

(Java_org_tigris_subversion_javahl_SVNClient_properties): Add recurse and

callback parameters. Update call to worker function.

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

(PropertyData): New constructor to be used by thin wrappers.

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

(testBasicProperties): Expand to use the new properties API.

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

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

org/tigris/subversion/javahl/SVNClientSynchronized.java

(properties): New overloaded method which uses a callback object to return the

properties. Update wrappers appropriately.

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

(ProplistCallbackImpl): New class which implements ProplistCallback. Used for

implementating wrappers, as well as testing.

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

(ProplistCallback): Java proplist callback interface.

    • ?
    ./tigris/subversion/javahl/ProplistCallback.java
    • ?
    ./tigris/subversion/javahl/ProplistCallbackImpl.java
  1. … 5 more files in changeset.
[ in subversion/bindings/java/javahl/ ]

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

(getCopySource): Improve JavaDoc. Change return type to CopySource,

and throws declaration to the more generic SubversionException

(getMergeInfoProperty): Improve JavaDoc, and change throws

declaration to the more generic SubversionException

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

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

(getCopySource, getMergeInfoProperty): Point JavaDoc at interface,

and account for its API changes. In SVNClient.java, change the

method definitions to "native".

[ in subversion/bindings/java/javahl/ ]

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

(toString): Use char data type.

(hashCode, equals, compareTo): Remove pointless, Eclipse-generated

doc string. For equals(), add JavaDoc, rename paramter from "obj"

to "range", and reformat for clarity.

JavaHL: Method stubs for some merge tracking related methods.

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

(merge): new method with RevisionRange object

(getCopySource): new method

(getMergeInfoProperty): new method

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

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

Stub implementations of interface methods.

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

Minor indentation fix.

JavaHL: Initial implementation of a RevisionRange class.

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

Initial implementation.

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

(hashCode): Added implementation of this method

    • ?
    ./tigris/subversion/javahl/RevisionRange.java