You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by br...@apache.org on 2013/06/19 17:05:19 UTC

svn commit: r1494650 - in /subversion/trunk: ./ subversion/bindings/javahl/native/ subversion/bindings/javahl/src/org/apache/subversion/javahl/ subversion/bindings/javahl/src/org/apache/subversion/javahl/remote/ subversion/bindings/javahl/tests/org/apa...

Author: brane
Date: Wed Jun 19 15:05:18 2013
New Revision: 1494650

URL: http://svn.apache.org/r1494650
Log:
Reintegrate javahl-branch to trunk.

The branch history was:
  ------------------------------------------------------------------------
  r1494474 | brane | 2013-06-19 08:50:18 +0200 (Wed, 19 Jun 2013) | 9 lines

  On the javahl-ra branch: Add more test cases.

  [in subversion/bindings/javahl/tests/org/apache/subversion/javahl]
  * SVNRemoteTests.java: Reorder test cases.
    (SVNRemoteTests.testDispose,
     SVNRemoteTests.testGetUrl_viaSVNClientWorkingCopy,
     SVNRemoteTests.testGetCommitEditor,
     SVNRemoteTests.testDisposeCommitEditor): New test cases.

  ------------------------------------------------------------------------
  r1494472 | brane | 2013-06-19 08:47:50 +0200 (Wed, 19 Jun 2013) | 6 lines

  On the javahl-ra branch: Fix a pool-lifetime-related bug.

  * subversion/bindings/javahl/native/SVNClient.cpp
    (SVNClient::openRemoteSession): In the info receiver callback, create a
     local copy of the url and uuid strings.

  ------------------------------------------------------------------------
  r1494471 | brane | 2013-06-19 08:45:08 +0200 (Wed, 19 Jun 2013) | 16 lines

  On the javahl-ra branch:
  Implement commit editor creation and disposal.

  [in subversion/bindings/javahl/src/org/apache/subversion/javahl]
  * ISVNEditor.java (ISVNEditor.dispose): New method.
  * remote/CommitEditor.java (ISVNEditor.dispose): New (boilerplate).
    (CommitEditor.createInstance): New factory method (boilerplate).
  * remote/RemoteSession.java (RemoteSession.editors): New member.
    (RemoteSession.nativeDispose): New native method, replaces dispose().
    (dispose): Remove 'native' qualified and implement here.

  [in subversion/bindings/javahl/native]
  * org_apache_subversion_javahl_remote_RemoteSession.cpp
    (Java_org_apache_subversion_javahl_remote_RemoteSession_nativeDispose):
     Renamed from Java_org_apache_subversion_javahl_remote_RemoteSession_dispose.

  ------------------------------------------------------------------------
  r1494225 | brane | 2013-06-18 19:42:51 +0200 (Tue, 18 Jun 2013) | 17 lines

  On the javahl-ra branch:
  Use plain revision numbers instead of the Revision class in ISVNRemote APIs.

  [in subversion/bindings/javahl/src/org/apache/subversion/javahl]
  * ISVNRemote.java, RemoteSession.java
    (ISVNRemote.getLatestRevision, ISVNRemote.getRevisionByDate,
     ISVNRemote.getRevisionByTimestamp, ISVNRemote.checkPath):
     Replace Revision with long.

  [in subversion/bindings/javahl/native]
  * RemoteSession.h, RemoteSession.cpp,
    org_apache_subversion_javahl_remote_RemoteSession.cpp:
     Update all affected native wrappers.

  [in subversion/bindings/javahl/tests/org/apache/subversion/javahl]
  * SVNRemoteTests.java: Update all affected test cases.

  ------------------------------------------------------------------------
  r1494167 | brane | 2013-06-18 17:11:54 +0200 (Tue, 18 Jun 2013) | 5 lines

  On the javahl-ra branch: Add commit editor boilerplate.

  [in subversion/bindings/javahl/src/org/apache/subversion/javahl]
  * remote/CommitEditor.java: New file.

  ------------------------------------------------------------------------
  r1494164 | brane | 2013-06-18 17:09:54 +0200 (Tue, 18 Jun 2013) | 5 lines

  On the javahl-ra branch:

  [in subversion/bindings/javahl/src/org/apache/subversion/javahl]
  * remote/RemoteSession.java (RemoteSession.ctor): Update comment.

  ------------------------------------------------------------------------
  r1493730 | brane | 2013-06-17 14:25:28 +0200 (Mon, 17 Jun 2013) | 10 lines

  On the javahl-branch:
  Introduce ISVNEditor, the abstract interface to EV2.
  (Doesn't make much sense to expose the delta editor if EV2 will become
  standard; it would only create more wrapper code.)

  [in subversion/bindings/javahl/src/org/apache/subversion/javahl]
  * ISVNEditor.java: New interface definition.
  * ISVNRemote.java (ISVNRemote.getCommitEditor): New method.
  * remote/RemoteSession.java (ISVNRemote.getCommitEditor): Dummy implementation.

  ------------------------------------------------------------------------
  r1493649 | brane | 2013-06-17 08:22:39 +0200 (Mon, 17 Jun 2013) | 22 lines

  On the javahl-ra branch:
  Implement ISVNRemote.getSessionRelativePath and ISVNRemote.getReposRelativePath.

  [in subversion/bindings/javahl/src/org/apache/subversion/javahl]
  * ISVNRemote.java (ISVNRemote.getReposRelativePath):
     Renamed from getRepositoryRelativePath.
  * remote/RemoteSession.java
    (ISVNRemote.getReposRelativePath, ISVNRemote.getSessionRelativePath):
     Declare native methods.
    (thrownotimplemented): Remove.

  [in subversion/bindings/javahl/tests/org/apache/subversion/javahl]
  * SVNRemoteTests.java (SVNRemoteTests.testGetRelativePath): New test case.

  [in subversion/bindings/javahl/native]
  * RemoteSession.h, RemoteSession.cpp
    (RemoteSession::getReposRelativePath, RemoteSession::getSessionRelativePath)
     New methods.
  * org_apache_subversion_javahl_remote_RemoteSession.cpp
    (Java_org_apache_subversion_javahl_remote_RemoteSession_getSessionRelativePath):
     Implement native methods.

  ------------------------------------------------------------------------
  r1493646 | brane | 2013-06-17 07:42:21 +0200 (Mon, 17 Jun 2013) | 15 lines

  On the javahl-ra branch: Implement ISVNRemote.reparent.

  [in subversion/bindings/javahl/src/org/apache/subversion/javahl]
  * remote/RemoteSession.java (ISVNRemote.reparent): Declare native method.

  [in subversion/bindings/javahl/tests/org/apache/subversion/javahl]
  * SVNRemoteTests.java (SVNRemoteTests.testReparent): New test case.
    (SVNRemoteTests.getSession): Do not throw a checked exception.

  [in subversion/bindings/javahl/native]
  * RemoteSession.h, RemoteSession.cpp (RemoteSession::reparent): New.
  * org_apache_subversion_javahl_remote_RemoteSession.cpp
    (Java_org_apache_subversion_javahl_remote_RemoteSession_reparent):
     Implement native method.

  ------------------------------------------------------------------------
  r1493619 | brane | 2013-06-17 02:47:20 +0200 (Mon, 17 Jun 2013) | 13 lines

  On the javahl-ra branch:
  Throw different exceptions for redirect cycles and too many redirects,
  so that the API consumer can easily tell the difference.

  [in subversion/bindings/javahl/src/org/apache/subversion/javahl]
  * remote/RetryOpenSession.java: New exception class.
  * remote/RemoteFactory.java, ISVNClient.java (openRemoteSession):
     Update docs about when remote.RetryOpenSession is thrown.

  [in subversion/bindings/javahl/native]
  * RemoteSession.cpp (RemoteSession::RemoteSession): Throw RetryOpenSession
     if there were too many redirects but no cycle was detected.

  ------------------------------------------------------------------------
  r1493616 | brane | 2013-06-17 02:08:16 +0200 (Mon, 17 Jun 2013) | 16 lines

  On the javahl-ra branch:
  Add support for retry-on-redirect to the remote session factory methods.

  [in subversion/bindings/javahl/src/org/apache/subversion/javahl]
  * ISVNClient.java, SVNClient.java, remote/RemoteFactory.java:
     Add overloads of openRemoteSession that accept a retry count.
  * SVNClient.java (nativeOpenRemoteSession): New native implementation.

  [in subversion/bindings/javahl/native]
  * RemoteSession.h (RemoteSession::open): Accept a retry count
     and add an overload that accepts native-type parameters.
    (RemoteSession::RemoteSession): Accept retry count and make private.
  * RemoteSession.h (RemoteSession::open): Update implementaitons.
    (RemoteSession::RemoteSession): Try to follow redirect for the given
     number of retries, or until a cycle was detected.

  ------------------------------------------------------------------------
  r1493536 | brane | 2013-06-16 19:15:51 +0200 (Sun, 16 Jun 2013) | 13 lines

  On the javahl-ra branch:
  Implement the RA session's cancelOperation method.

  [in subversion/bindings/javahl/src/org/apache/subversion/javahl]
  * remote/RemoteSession.java (ISVNRemoteSession.cancelOperation):
     Change to native method declaration.

  [in subversion/bindings/javahl/native]
  * RemoteSession.h (RemoteSession::cancelOperation): New inline method.
  * org_apache_subversion_javahl_remote_RemoteSession.cpp
    (Java_org_apache_subversion_javahl_remote_RemoteSession_cancelOperation):
     New JNI method wrapper.

  ------------------------------------------------------------------------
  r1493499 | brane | 2013-06-16 13:12:10 +0200 (Sun, 16 Jun 2013) | 23 lines

  On the javahl-ra branch:
  Rename and extend the ISVNRepos interface methods and documentation.

  [in subversion/bindings/javahl/src/org/apache/subversion/javahl]
  * ISVNRemote.java, remote/RemoteSession.java:
    (ISVNRemote.getSessionRelativePath, ISVNRemote.getRepositoryRelativePath ,
     ISVNRemote.cancelOperstion, ISVNRemote.reparent): New methods.
    (ISVNRemote.getSessionUrl): Renamed from ISVNRemote.getUrl.
    (ISVNRemote.getReposUUID): Renamed from ISVNRemote.getUUID.
    (ISVNRemote.getLatestRevision): Returns a Revision object instead of a long.
    (ISVNRemote.getRevisionByDate): Renamed from getDatedRevision;
     returns a Revision object instead of a long.
    (ISVNRemote.getRevisionByTimestamp): Renamed from getDatedRevision;
     returns a Revision object instead of a long.

  [in subversion/bindings/javahl/native):
  * RemoteSession.h, RemoteSession.cpp,
    org_apache_subversion_javahl_remote_RemoteSession.cpp: Update JNI
     implementation and native wrappers to match the ISVNRemote interface.

  [in subversion/bindings/javahl/tests/org/apache/subversion/javahl]
  * SVNRemoteTests.java: Update test cases to match the ISVNRemote interface.

  ------------------------------------------------------------------------
  r1493369 | brane | 2013-06-15 16:32:22 +0200 (Sat, 15 Jun 2013) | 5 lines

  On the javahl-ra branch:

  * subversion/bindings/javahl/tests/org/apache/subversion/javahl/SVNRemoteTests.java
    (SVNRemoteTests.testGetSession_ConfigConstructor): New test case.

  ------------------------------------------------------------------------
  r1493368 | brane | 2013-06-15 16:31:13 +0200 (Sat, 15 Jun 2013) | 5 lines

  On the javahl-ra branch:

  * subversion/bindings/javahl/native/SVNClient.cpp
    (SVNClient::openRemoteSession): Handle failed prompter allocation.

  ------------------------------------------------------------------------
  r1492954 | brane | 2013-06-14 06:58:03 +0200 (Fri, 14 Jun 2013) | 6 lines

  On the javahl-ra branch:

  [in subversion/bindings/javahl/src]
  * org/apache/subversion/javahl/native/SVNClient.cpp
    (SVNClient::openRemoteSession): Add comments to clarify object ownership.

  ------------------------------------------------------------------------
  r1492940 | brane | 2013-06-14 05:02:54 +0200 (Fri, 14 Jun 2013) | 24 lines

  On the javahl_ra branch:
  Implement the SVNClient.openRemoteSession factory method.

  [in subversion/bindings/javahl/native]
  * OperationContext.h, OperationContext.cpp
    (OperationContext::getSelf, OperationContext::getUsername,
     OperationContext::getPassword, OperationContext::getPrompter):
     Add accessor methods for the configuration parameters so that
     the native code can use them directly.

  * SVNClient.h, SVNClient.cpp (SVNClient::openRemoteSession): New.
  * org_apache_subversion_javahl_SVNClient.cpp
    (Java_org_apache_subversion_javahl_SVNClient_openRemoteSession):
     Implement native wrapper.

  * RemoteSession.cpp (RemoteSession::open): Check returned pointer.
  * org_apache_subversion_javahl_remote_RemoteFactory.cpp
    (Java_org_apache_subversion_javahl_remote_RemoteFactory_open):
     Do not delete the session object on failure; RemoteSession::open does that.

  [in subversion/bindings/javahl/tests/org/apache/subversion/javahl]
  * SVNRemoteTests.java (SVNRemoteTests.testGetUrl_viaSVNClient):
     Add a test case for SVNClient.openRemoteSession.

  ------------------------------------------------------------------------
  r1492924 | brane | 2013-06-14 03:28:11 +0200 (Fri, 14 Jun 2013) | 36 lines

  On the javahl-ra branch:
  Refactor the remote session framework so that SVNClient object can create
  RemoteSession instances that inherit the SVNClient's configuration.

  [in subversion/bindings/javahl/native]

  * RemoteSession.h (RemoteSession::open): New; factory method that accepts
     parameters as JNI object references, converting them for the constructor.
    (RemoteSession::RemoteSession): Change parameters from JNI object
     references to native types, so that the constructor can be more easily
     called from other native code.
  * RemoteSession.cpp (RemoteSession::open): Implement.
    (RemoteSession::RemoteSession): Rewrite to new prototype.
     Move RA layer initialisation here out of the RemoteFactory JNI wrapper.

  * RemoteSessionContext.h (RemoteSessionContext::RemoteSessionContext):
     Change constructor to accept native typed parameters instead of
     JNI object references.
  * RemoteSessionContext.cpp (RemoteSessionContext::RemoteSessionContext):
     rewrite to new prototype.

  * Prompter.cpp (Prompter::Prompter): Don't leave a member uninitialised.

  * org_apache_subversion_javahl_remote_RemoteFactory.cpp
    (Java_org_apache_subversion_javahl_remote_RemoteFactory_open):
     Call RemoteSession::open instead of constructing the object directly,
     and remove the RA layer initialisation since it has moved elsewhere.

  * org_apache_subversion_javahl_SVNClient.cpp
    (Java_org_apache_subversion_javahl_SVNClient_openRemoteSession):
     New; native implementation of SVNClient.openRemoteSession.

  [in subversion/bindings/javahl/src/org/apache/subversion/javahl]
  * ISVNClient.java, SVNClient.java (ISVNClient.openRemoteSession):
     New RemoteSession factory method.

  ------------------------------------------------------------------------
  r1492590 | brane | 2013-06-13 11:17:02 +0200 (Thu, 13 Jun 2013) | 32 lines

  On the javahl-ra branch:

  Changed how the remote-access initialization works, putting the session
  configuration defaults into the factory class instead of having to
  juggle with a separate configuration object.

  Also moved and renamed packages and classes, so that the common bits
  don't have RA-specific names, and use 'Remote instead of 'Ra' as the
  package and class base name.

  Renamed classes and interfaces (within org.apache.subversion.javahl):

      RaSharedContext -> OperationContext

      ra.ISVNRa       -> ISVNRemote

      ra.SVNRa        -> remote.RemoteSession
      ra.SVNRaFactory -> remote.RemoteFactory
      ra.RaContext    -> remote.RemoteSession$RemoteSessionContext

      SVNRATests      -> SVNRemoteTests

  Removedclasses and interfaces (within org.apache.subversion.javahl):

      ra.ISVNRaConfig
      ra.SVNRaConfigDefault

  This change also affects:

  * SVNClient.java: Base class of ClientContext renamed.
  * RunTests.java: Name of remote-access test class changed.

  ------------------------------------------------------------------------
  r1492039 | brane | 2013-06-12 05:40:42 +0200 (Wed, 12 Jun 2013) | 4 lines

  On the javahl-ra branch:

  Remove spurious whitespace changes compared to trunk; no functional change.

  ------------------------------------------------------------------------
  r1353380 | vmpn | 2012-06-25 03:40:28 +0200 (Mon, 25 Jun 2012) | 26 lines

  On the javahl-ra branch:

  JavaHL: Add support for the svn_ra_get_session_url() function

  [ in subversion/bindings/javahl/native ]

  * org_apache_subversion_javahl_ra_SVNRa.cpp
    (Java_org_apache_subversion_javahl_ra_SVNRa_getUrl): New

  * SVNRa.h,
    SVNRa.cpp
    (getUrl): New

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

  * ISVNRa.java,
    SVNRa.java
    (getUrl): New

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

  * SVNRATests.java
    (getSession, getTestRepoUrl): New function for obtaining URL of the test
      repository
    (testGetUrl): New test for getUrl()

  ------------------------------------------------------------------------
  r1353377 | vmpn | 2012-06-25 03:25:18 +0200 (Mon, 25 Jun 2012) | 23 lines

  On the javahl-ra branch:

  JavaHL: Add support for the svn_ra_get_uuid2() function

  [ in subversion/bindings/javahl/native ]

  * org_apache_subversion_javahl_ra_SVNRa.cpp
    (Java_org_apache_subversion_javahl_ra_SVNRa_getUUID): New

  * SVNRa.h,
    SVNRa.cpp
    (getUUID): New

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

  * ISVNRa.java,
    SVNRa.java
    (getUUID): New

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

  * SVNRATests.java
    (testGetUUID): New test for getUUID()
  ------------------------------------------------------------------------
  r1353376 | vmpn | 2012-06-25 03:18:45 +0200 (Mon, 25 Jun 2012) | 23 lines

  On the javahl-ra branch:

  Pass timestamp (nano seconds) rather than date (milli seconds) to avoid
  precison loss (issue #2359)

  [ in subversion/bindings/javahl/native ]

  * org_apache_subversion_javahl_ra_SVNRa.cpp
    (Java_org_apache_subversion_javahl_ra_SVNRa_getDatedRevision): Switch from
      Date to long as means of passing the timestamp

  * SVNRa.h,
    SVNRa.cpp
    (getDatedRev): Switch from Date to long as means of passing the timestamp

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

  * ISVNRa.java,
    SVNRa.java
    (getDatedRevision): Switch from Date to long as means of passing the
     timestamp and provide backwards compatible function accepting Date
     as the parameter

  ------------------------------------------------------------------------
  r1353373 | vmpn | 2012-06-25 03:10:50 +0200 (Mon, 25 Jun 2012) | 17 lines

  On the javahl-ra branch:

  Move logic from the JNI functions into their C++ counterpart classes for
  consistency with the rest of the code

  [ in subversion/bindings/javahl/native ]

  * org_apache_subversion_javahl_ra_SVNRa.cpp
    (Java_org_apache_subversion_javahl_ra_SVNRa_getDatedRevision,
     Java_org_apache_subversion_javahl_ra_SVNRa_getLocks,
     Java_org_apache_subversion_javahl_ra_SVNRa_checkPath):
      Move logic into SVNRa class

  * SVNRa.h,
    SVNRa.cpp
    (getDatedRev, getLocks, checkPath): Move logic from SVNRa JNI functions

  ------------------------------------------------------------------------
  r1352751 | vmpn | 2012-06-22 03:58:24 +0200 (Fri, 22 Jun 2012) | 4 lines

  On the javahl-ra branch:

  * BRANCH-README: Updated to reflect the latest changes

  ------------------------------------------------------------------------
  r1352742 | vmpn | 2012-06-22 03:41:24 +0200 (Fri, 22 Jun 2012) | 8 lines

  On the javahl-ra branch:

  JavaHL: Update whitespace to be compliant with project standards

  [ in subversion/bindings/javahl/src/org/tigris/subversion/javahl/ra ]

  * ISVNRa.java,
    SVNRa.java
  ------------------------------------------------------------------------
  r1352737 | vmpn | 2012-06-22 03:38:50 +0200 (Fri, 22 Jun 2012) | 47 lines

  On the javahl-ra branch:

  JavaHL: Merge two SVN RA session implementations into one

  [ in subversion/bindings/javahl/native ]

  * org_apache_subversion_javahl_SVNReposAccess.cpp
    (Java_org_apache_subversion_javahl_SVNReposAccess_ctNative,
     Java_org_apache_subversion_javahl_SVNReposAccess_dispose
     Java_org_apache_subversion_javahl_SVNReposAccess_finalize
     Java_org_apache_subversion_javahl_SVNReposAccess_getDatedRevision
     Java_org_apache_subversion_javahl_SVNReposAccess_getLocks
     Java_org_apache_subversion_javahl_SVNReposAccess_checkPath):
      Functionality merged into org_apache_subversion_javahl_ra_SVNRa

  * org_apache_subversion_javahl_ra_SVNRa.cpp
   (Java_org_apache_subversion_javahl_ra_SVNRa_getDatedRevision,
    Java_org_apache_subversion_javahl_ra_SVNRa_getLocks,
    Java_org_apache_subversion_javahl_ra_SVNRa_checkPath): Functionality merged
     from org_apache_subversion_javahl_SVNReposAccess.cpp

  * SVNReposAccess.h,
    SVNReposAccess.cpp,
    SVNRa.h,
    SVNRa.cpp
    (getDatedRev, getLocks, checkPath): Functionality merged from
      SVNReposAccess into SVNRa class

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

  * ISVNReposAccess.java,
    SVNReposAccess.java
    (getDatedRevision, getLocks, checkPath) Functionality
      merged from SVNReposAccess into SVNRa

  [ in subversion/bindings/javahl/src/org/tigris/subversion/javahl/ra ]

  * SVNRa.java,
    ISVNRa.java
    (getDatedRevision, getLocks, checkPath) Functionality
      merged into SVNRa from SVNReposAccess

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

  * SVNRATests.java
    (testDatedRev, testGetLocks, testCheckPath): Migrate test to use ISVNRa
      interface
  ------------------------------------------------------------------------
  r1352736 | vmpn | 2012-06-22 03:35:05 +0200 (Fri, 22 Jun 2012) | 9 lines

  On the javahl-ra branch:

  JavaHL: Implement a test for getLatestRevision() function

  [ in subversion/bindings/javahl/src/org/tigris/subversion/javahl/ra ]

  * SVNRATests.java
    (getSession): New support functions for RA testing
    (testGetLatestRevision): New test for the getLatestRevision function
  ------------------------------------------------------------------------
  r1352734 | vmpn | 2012-06-22 02:11:49 +0200 (Fri, 22 Jun 2012) | 17 lines

  On the javahl-ra branch:

  JavaHL: Update whitespace to be compliant with project standards

  [ in subversion/bindings/javahl/native ]

  * org_apache_subversion_javahl_ra_SVNRa.cpp,
    org_apache_subversion_javahl_ra_SVNRaFactory.cpp,
    RaContext.h,
    RaContext.cpp,
    SVNRa.h,
    SVNRa.cpp

  [ in subversion/bindings/javahl/src/org/tigris/subversion/javahl/ra/ ]

  * RaContext.java,
    SVNRaFactory.java
  ------------------------------------------------------------------------
  r1352729 | vmpn | 2012-06-22 01:53:35 +0200 (Fri, 22 Jun 2012) | 6 lines

  On the javahl-ra branch:
  JavaHL: Declare cppAddr immutable as per Blair Zajac suggestion

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

  * JNIObject.java (cppAddr): Declare that cppAddr is an immutable value
  ------------------------------------------------------------------------
  r1352727 | vmpn | 2012-06-22 01:48:44 +0200 (Fri, 22 Jun 2012) | 12 lines

  On the javahl-ra branch:

  JavaHL: Update whitespace to be compliant with project standards

  [ in subversion/bindings/javahl/native ]

  * SVNBase.cpp,
    SVNBase.h

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

  * JNIObject.java

  ------------------------------------------------------------------------
  r1352419 | vmpn | 2012-06-21 08:03:20 +0200 (Thu, 21 Jun 2012) | 55 lines

  On the javahl-ra branch:

  JavaHL: Implement getLatestRevision function using the factory based approach
  to the SVN remote access layer implementation

  * build.conf
    (options): Don't try to find new jni header files before they are generated
    (javahl-java): compile classes in the src/org/apache/subversion/javahl/ra
     directory
    (javahl-ra-javah): new section for generating jni header files for the Ra
     classes
    (libsvnjavahl): make the javahl library depend on the ra jni files

  [ in subversion/bindings/javahl/native ]

  * org_apache_subversion_javahl_ra_SVNRaFactory.cpp
     (Java_org_apache_subversion_javahl_ra_SVNRaFactory_createRaSession): New JNI
       method to create SVNRa session

  * org_apache_subversion_javahl_ra_SVNRa.cpp
     (Java_org_apache_subversion_javahl_ra_SVNRa_finalize,
      Java_org_apache_subversion_javahl_ra_SVNRa_dispose): Implement lifecycle
       JNI methods for the SVNRa session
     (Java_org_apache_subversion_javahl_ra_SVNRa_getLatestRevision): Implement
       the JNI wrapper around SVNRa::getLatestRevision function

  * SVNRa.h,
    SVNRa.cpp
    (SVNRa, ~SVNRa, dispose): Implement lifecycle methods for the SVNRa session
    (getLatestRevision): Implement the wrapper around svn_ra_get_latest_revnum

  * RaContext.h,
    RaContext.cpp
    (RaContext, getCallbackBaton, getCallbacks): Implement JNI wrapper around
      svn_ra_create_callbacks function

  [ in subversion/bindings/javahl/src/org/tigris/subversion/javahl/ra ]

  * SVNRaFactory.java
    (<static>): Implement library initialization and version check
    (createRaSession): New method to obtain ISVNRa ra session implementation

  * SVNRa.java,
    ISVNRa.java
    (SVNRa, finalize, dispose): Implement lifecycle methods
    (getLatestRevision): Implement the java wrapper around JNI getLatestRevision
      function

  * RaContext.java: Marker class for Ra context

  * ISVNRaConfig.java,
    SVNRaConfigDefault.java
    (getUsername, getPassword, getPrompt, getConfigDirectory): New functions to
      specify setting to be used in creating of RA session

  ------------------------------------------------------------------------
  r1352403 | vmpn | 2012-06-21 06:06:11 +0200 (Thu, 21 Jun 2012) | 8 lines

  On the javahl-ra branch:

  JavaHL: Factor out common context to be shared between SVNClient and SVNRa
  classes

  [ in subversion/bindings/javahl/native ]

  * RaSharedContext.cpp: Update whitespace to be compliant with project standards
  ------------------------------------------------------------------------
  r1352402 | vmpn | 2012-06-21 06:02:04 +0200 (Thu, 21 Jun 2012) | 26 lines

  On the javahl-ra branch:

  JavaHL: Factor out common context to be shared between SVNClient and SVNRa
  classes

  [ in subversion/bindings/javahl/native ]

  * RaSharedContext.cpp,
    RaSharedContext.h,
    ClientContext.cpp,
    ClientContext.h
    (username, password, getConfigDirectory, setConfigDirectory, setPrompt,
     cancelOperation, progress): Move from ClientContext to RaSharedContext

  * RaSharedContext.cpp,
    RaSharedContext.h
    (attachJavaObject): New function to hold common logic of attaching to the
      java CommonContext class used for callbacks
    (getConfigData, getAuthBaton): Split getContext into separate configuration
      data setup and authentication data setup to better reflect their different life cycles
    (getClientName): New function providing client name to be used in callbacks

  * ClientContext.cpp,
    ClientContext.h
    (ClientContext, getContext): Use the factored out RaSharedContext member
      variables and functions
  ------------------------------------------------------------------------
  r1352401 | vmpn | 2012-06-21 05:51:02 +0200 (Thu, 21 Jun 2012) | 11 lines

  On the javahl-ra branch:

  JavaHL: Factor out common context to be shared between SVNClient and SVNRa
  classes

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

  * RaSharedContext.java,
    CommonContext.java,
    SVNClient.java: Rename CommonContext to RaSharedContext as it better
     describes the purpose of the class
  ------------------------------------------------------------------------
  r1352400 | vmpn | 2012-06-21 05:34:05 +0200 (Thu, 21 Jun 2012) | 15 lines

  On the javahl-ra branch:

  JavaHL: New method for creating java objects linked to their C++ counterpart

  [ in subversion/bindings/javahl/native ]

  * SVNBase.cpp,
    SVNBase.h
    (createCppBoundObject): New method for creating java objects linked to their
      C++ counterpart

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

  * JNIObject.java: Base class for JNI linked java objects

  ------------------------------------------------------------------------
  r1347345 | vmpn | 2012-06-07 05:07:50 +0200 (Thu, 07 Jun 2012) | 9 lines

  On the javahl-ra branch:

  JavaHL: Replace tabs introduced by mistake in the r1343452 with spaces

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

  * CommonContext.java
    (getListener, setListener): Replace tabs with spaces

  ------------------------------------------------------------------------
  r1344977 | vmpn | 2012-06-01 05:10:46 +0200 (Fri, 01 Jun 2012) | 10 lines

  JavaHL: Added CPPADDR_NULL_PTR macro to reduce amount of duplicate code
  checking C++ pointer extracted from the java object

  [ in subversion/bindings/javahl/native ]

  * JNIUtil.h
    (CPPADDR_NULL_PTR): New macro to test for NULL pointer and raise java
      exception if necessary

  Approved by: gstein
  ------------------------------------------------------------------------
  r1343456 | vmpn | 2012-05-29 04:57:05 +0200 (Tue, 29 May 2012) | 12 lines

  On the javahl-ra branch:

  JavaHL: Support returning non const, empty rather than NULL hash as required
  by (svn_ra_get_commit_editor3) apr_hash_t *revprop_table parameter

  [ in subversion/bindings/javahl/native ]

  * RevpropTable.cpp,
    RevpropTable.h
    (hash): Removed const qualifier and added bool nullIfEmpty parameter to
      specify whether empty hash or NULL should be returned

  ------------------------------------------------------------------------
  r1343452 | vmpn | 2012-05-29 04:51:12 +0200 (Tue, 29 May 2012) | 11 lines

  On the javahl-ra branch:

  JavaHL: Factored out common context for later use by the SVNRa class

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

  * CommonContext.java,
    SVNClient.java
    (ClientContext): Move the progress listener into CommonContext for later
      sharing with the new SVNRa class

  ------------------------------------------------------------------------
  r1343450 | vmpn | 2012-05-29 03:48:55 +0200 (Tue, 29 May 2012) | 18 lines

  On the javahl-ra branch:

  Merge r1342810 from trunk and bring SVNReposAccess up to date with it.

  JavaHL: Explicitly pass jobject jthis when processing dispose() call rather
  than stashing a reference in the SVNBase class where it can be missused later

  [ in subversion/bindings/javahl/native ]

  * SVNReposAccess.cpp,
    SVNReposAccess.h
    (dispose): Accept object jthis as explicit parameter and pass it to
      SVNBase::dispose

  * org_apache_subversion_javahl_SVNReposAccess.cpp
    (Java_org_apache_subversion_javahl_SVNReposAccess_dispose): Pass object jthis
      as explicit parameter and pass it to the C++ wrapper class

  ------------------------------------------------------------------------
  r1342682 | vmpn | 2012-05-25 17:19:21 +0200 (Fri, 25 May 2012) | 9 lines

  On the javahl-ra branch:

  JavaHL: Changed return value from the java svn_stream_t read function to be
   compatible with the txdelta_next_window function

  [ in subversion/bindings/javahl/native ]

  * InputStream.cpp
    (read): Return 0 instead of -1 as expected by the txdelta_next_window function
  ------------------------------------------------------------------------
  r1342676 | vmpn | 2012-05-25 17:12:56 +0200 (Fri, 25 May 2012) | 22 lines

  On the javahl-ra branch:

  Brought RA implementation up to date with changes merged from trunk in r1329205

  [in subversion/bindings/javahl/native]

     * SVNReposAccess.cpp
        (SVNReposAccess): Drop the global pool mutex as it is not necessary, as
           per r1154119
        (getDatedRev, getLocks, checkPath): Use getPool() instead of pool as per
           r1154155

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

     * ISVNReposAccess.java,
       SVNReposAccess.java: Added imports for org.apache.subversion.javahl.types.*
          because classes moved from the org.apache.subversion.javahl package

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

     * SVNRATests.java: Added imports for org.apache.subversion.javahl.types.*
          because classes moved from the org.apache.subversion.javahl package

  ------------------------------------------------------------------------
  r993544 | hwright | 2010-09-08 00:00:57 +0200 (Wed, 08 Sep 2010) | 22 lines

  On the javahl-ra branch:
  Implement the checkPath() RA method for JavaHL.

  [ in subversion/bindings/javahl/ ]
  * tests/org/apache/subversion/javahl/SVNRATests.java
    (testCheckPath): New.

  * native/SVNReposAccess.h
    (checkPath): New.

  * native/SVNReposAccess.cpp
    (checkPath): New.

  * native/org_apache_subversion_javahl_SVNReposAccess.cpp
    (Java_org_apache_subversion_javahl_SVNReposAccess_checkPath): New.

  * src/org/apache/subversion/javahl/ISVNReposAccess.java
    (checkPath): New.

  * src/org/apache/subversion/javahl/SVNReposAccess.java
    (checkPath): New.

  ------------------------------------------------------------------------
  r993495 | hwright | 2010-09-07 21:39:41 +0200 (Tue, 07 Sep 2010) | 6 lines

  On the javahl-ra branch:
  Make a function private which has no need of publicity.

  * subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNReposAccess.java
    (getCppAddr): Privatize.

  ------------------------------------------------------------------------
  r993494 | hwright | 2010-09-07 21:38:09 +0200 (Tue, 07 Sep 2010) | 8 lines

  On the javahl-ra branch:
  Ensure we inform callers that we may well throw SubversionExceptions.

  [ in subversion/bindings/javahl/ ]
  * src/org/apache/subversion/javahl/ISVNReposAccess.java,
    src/org/apache/subversion/javahl/SVNReposAccess.java
    (getDatedRevision, getLocks): Add throws SubversionException clause.

  ------------------------------------------------------------------------
  r993493 | hwright | 2010-09-07 21:32:23 +0200 (Tue, 07 Sep 2010) | 29 lines

  On the javahl-ra branch:
  Implement the getLocks() ra API in JavaHL.

  [ in subversion/bindings/javahl/ ]
  * tests/org/apache/subversion/javahl/SVNRATests.java
    (setUp): Create a working copy, because it will be useful for out tests.
    (testGetLocks): New.

  * native/CreateJ.cpp
    (LockMap): New.

  * native/SVNReposAccess.h
    (getLocks): New.

  * native/SVNReposAccess.cpp
    (getLocks): New.

  * native/org_apache_subversion_javahl_SVNReposAccess.cpp
    (Java_org_apache_subversion_javahl_SVNReposAccess_getLocks): New.

  * native/CreateJ.h
    (LockMap): New.

  * src/org/apache/subversion/javahl/ISVNReposAccess.java
    (getLocks): New.

  * src/org/apache/subversion/javahl/SVNReposAccess.java
    (getLocks): New.

  ------------------------------------------------------------------------
  r993427 | hwright | 2010-09-07 19:00:27 +0200 (Tue, 07 Sep 2010) | 35 lines

  On the javahl-ra branch:
  Expose the getDatedRevision() RA API through Java.

  [ in subversion/bindings/javahl/ ]
  * tests/org/apache/subversion/javahl/SVNRATests.java
    (testDatedRev): New.

  * native/SVNReposAccess.h
    (getDatedRev, m_sess_pool, m_ra_session): New.
    (SVNReposAccess): Add repos url param.

  * native/JNIUtil.cpp
    (getDate): New.

  * native/SVNReposAccess.cpp
    (SVNReposAccess): Add repos url param, and create an ra_session.
    (~SVNReposAccess): Destroy the session pool.
    (getDatedRev): New.

  * native/JNIUtil.h
    (getDate): New.

  * native/org_apache_subversion_javahl_SVNReposAccess.cpp
    (Java_org_apache_subversion_javahl_SVNReposAccess_ctNative):
      Construct the C++ peer with the repos url.
    (Java_org_apache_subversion_javahl_SVNReposAccess_getDatedRevision): New.

  * src/org/apache/subversion/javahl/ISVNReposAccess.java
    (getDatedRevision): New.

  * src/org/apache/subversion/javahl/SVNReposAccess.java
    (SVNReposAccess): Pass the reposURI to the native constructor.
    (ctNative): Accept the repos URI.
    (getDatedRevision): New.

  ------------------------------------------------------------------------
  r992125 | hwright | 2010-09-02 23:45:15 +0200 (Thu, 02 Sep 2010) | 17 lines

  On the javahl-ra branch:
  Add the plumbing to start wrapping the ra layer in JavaHL.  This doesn't
  actually *do* anything yet, but it does create the initial interface and
  test classes.

  [ in subversion/bindings/javahl/ ]
  * tests/org/apache/subversion/javahl/RunTests.java
    (suite): Add the new RA test suite.

  * tests/org/apache/subversion/javahl/SVNRATests.java,
    src/org/apache/subversion/javahl/ISVNReposAccess.java,
    src/org/apache/subversion/javahl/SVNReposAccess.java,
    native/SVNReposAccess.h,
    native/SVNReposAccess.cpp,
    native/org_apache_subversion_javahl_SVNReposAccess.cpp:
    New.

  ------------------------------------------------------------------------
  r991978 | hwright | 2010-09-02 17:21:08 +0200 (Thu, 02 Sep 2010) | 3 lines

  Create javahl-ra branch, to experiment with exposing some bits of the RA
  library over JavaHL.

Added:
    subversion/trunk/subversion/bindings/javahl/native/OperationContext.cpp
      - copied unchanged from r1494640, subversion/branches/javahl-ra/subversion/bindings/javahl/native/OperationContext.cpp
    subversion/trunk/subversion/bindings/javahl/native/OperationContext.h
      - copied unchanged from r1494640, subversion/branches/javahl-ra/subversion/bindings/javahl/native/OperationContext.h
    subversion/trunk/subversion/bindings/javahl/native/RemoteSession.cpp
      - copied unchanged from r1494640, subversion/branches/javahl-ra/subversion/bindings/javahl/native/RemoteSession.cpp
    subversion/trunk/subversion/bindings/javahl/native/RemoteSession.h
      - copied unchanged from r1494640, subversion/branches/javahl-ra/subversion/bindings/javahl/native/RemoteSession.h
    subversion/trunk/subversion/bindings/javahl/native/RemoteSessionContext.cpp
      - copied unchanged from r1494640, subversion/branches/javahl-ra/subversion/bindings/javahl/native/RemoteSessionContext.cpp
    subversion/trunk/subversion/bindings/javahl/native/RemoteSessionContext.h
      - copied unchanged from r1494640, subversion/branches/javahl-ra/subversion/bindings/javahl/native/RemoteSessionContext.h
    subversion/trunk/subversion/bindings/javahl/native/org_apache_subversion_javahl_remote_RemoteFactory.cpp
      - copied unchanged from r1494640, subversion/branches/javahl-ra/subversion/bindings/javahl/native/org_apache_subversion_javahl_remote_RemoteFactory.cpp
    subversion/trunk/subversion/bindings/javahl/native/org_apache_subversion_javahl_remote_RemoteSession.cpp
      - copied unchanged from r1494640, subversion/branches/javahl-ra/subversion/bindings/javahl/native/org_apache_subversion_javahl_remote_RemoteSession.cpp
    subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNEditor.java
      - copied unchanged from r1494640, subversion/branches/javahl-ra/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNEditor.java
    subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNRemote.java
      - copied unchanged from r1494640, subversion/branches/javahl-ra/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNRemote.java
    subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/JNIObject.java
      - copied unchanged from r1494640, subversion/branches/javahl-ra/subversion/bindings/javahl/src/org/apache/subversion/javahl/JNIObject.java
    subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/OperationContext.java
      - copied unchanged from r1494640, subversion/branches/javahl-ra/subversion/bindings/javahl/src/org/apache/subversion/javahl/OperationContext.java
    subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/remote/
      - copied from r1494640, subversion/branches/javahl-ra/subversion/bindings/javahl/src/org/apache/subversion/javahl/remote/
    subversion/trunk/subversion/bindings/javahl/tests/org/apache/subversion/javahl/SVNRemoteTests.java
      - copied unchanged from r1494640, subversion/branches/javahl-ra/subversion/bindings/javahl/tests/org/apache/subversion/javahl/SVNRemoteTests.java
Modified:
    subversion/trunk/   (props changed)
    subversion/trunk/build.conf
    subversion/trunk/subversion/bindings/javahl/native/ClientContext.cpp
    subversion/trunk/subversion/bindings/javahl/native/ClientContext.h
    subversion/trunk/subversion/bindings/javahl/native/CreateJ.cpp
    subversion/trunk/subversion/bindings/javahl/native/CreateJ.h
    subversion/trunk/subversion/bindings/javahl/native/JNIUtil.cpp
    subversion/trunk/subversion/bindings/javahl/native/JNIUtil.h
    subversion/trunk/subversion/bindings/javahl/native/Prompter.cpp
    subversion/trunk/subversion/bindings/javahl/native/RevpropTable.cpp
    subversion/trunk/subversion/bindings/javahl/native/RevpropTable.h
    subversion/trunk/subversion/bindings/javahl/native/SVNBase.cpp
    subversion/trunk/subversion/bindings/javahl/native/SVNBase.h
    subversion/trunk/subversion/bindings/javahl/native/SVNClient.cpp
    subversion/trunk/subversion/bindings/javahl/native/SVNClient.h
    subversion/trunk/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp
    subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java
    subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java
    subversion/trunk/subversion/bindings/javahl/tests/org/apache/subversion/javahl/RunTests.java
    subversion/trunk/tools/dist/make-deps-tarball.sh   (props changed)

Propchange: subversion/trunk/
------------------------------------------------------------------------------
  Merged /subversion/branches/javahl-ra:r991978-1342681,1342683-1344976,1344978-1494640

Modified: subversion/trunk/build.conf
URL: http://svn.apache.org/viewvc/subversion/trunk/build.conf?rev=1494650&r1=1494649&r2=1494650&view=diff
==============================================================================
--- subversion/trunk/build.conf (original)
+++ subversion/trunk/build.conf Wed Jun 19 15:05:18 2013
@@ -67,6 +67,8 @@ private-built-includes =
         subversion/bindings/javahl/include/org_apache_subversion_javahl_types_VersionExtended_LoadedLibIterator.h
         subversion/bindings/javahl/include/org_apache_subversion_javahl_types_Revision.h
         subversion/bindings/javahl/include/org_apache_subversion_javahl_callback_UserPasswordCallback.h
+        subversion/bindings/javahl/include/org_apache_subversion_javahl_remote_RemoteSession.h
+        subversion/bindings/javahl/include/org_apache_subversion_javahl_remote_RemoteFactory.h
 
 
 test-scripts =
@@ -542,6 +544,7 @@ type = java
 path = subversion/bindings/javahl/src/org/apache/subversion/javahl
   subversion/bindings/javahl/src/org/apache/subversion/javahl/callback
   subversion/bindings/javahl/src/org/apache/subversion/javahl/types
+  subversion/bindings/javahl/src/org/apache/subversion/javahl/remote
 src-root = subversion/bindings/javahl/src
 sources = *.java
 install = javahl-java
@@ -596,6 +599,17 @@ add-deps = $(javahl_java_DEPS)
 install = javahl-javah
 link-cmd = $(COMPILE_JAVAHL_JAVAH) -force
 
+[javahl-remote-javah]
+type = javah 
+path = subversion/bindings/javahl/src/org/apache/subversion/javahl/remote
+classes = subversion/bindings/javahl/classes
+headers = subversion/bindings/javahl/include
+package = org.apache.subversion.javahl.remote
+sources = *.java
+add-deps = $(javahl_java_DEPS)
+install = javahl-javah
+link-cmd = $(COMPILE_JAVAHL_JAVAH) -force
+
 [javahl-callback-javah]
 type = javah 
 path = subversion/bindings/javahl/src/org/apache/subversion/javahl/callback
@@ -625,7 +639,7 @@ path = subversion/bindings/javahl/native
 libs = libsvn_repos libsvn_client libsvn_wc libsvn_ra libsvn_delta libsvn_diff 
        libsvn_subr libsvn_fs aprutil apriconv apr
 sources = *.cpp *.c
-add-deps = $(javahl_javah_DEPS) $(javahl_java_DEPS) $(javahl_callback_javah_DEPS) $(javahl_types_javah_DEPS)
+add-deps = $(javahl_javah_DEPS) $(javahl_java_DEPS) $(javahl_callback_javah_DEPS) $(javahl_types_javah_DEPS) $(javahl_remote_javah_DEPS)
 install = javahl-lib
 # need special build rule to include -I$(JDK)/include/jni.h
 compile-cmd = $(COMPILE_JAVAHL_CXX)

Modified: subversion/trunk/subversion/bindings/javahl/native/ClientContext.cpp
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/native/ClientContext.cpp?rev=1494650&r1=1494649&r2=1494650&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/javahl/native/ClientContext.cpp (original)
+++ subversion/trunk/subversion/bindings/javahl/native/ClientContext.cpp Wed Jun 19 15:05:18 2013
@@ -39,37 +39,10 @@
 
 
 ClientContext::ClientContext(jobject jsvnclient, SVN::Pool &pool)
-    : m_prompter(NULL),
-      m_cancelOperation(false)
+    : OperationContext(pool)
 {
-    JNIEnv *env = JNIUtil::getEnv();
-
-    /* Grab a global reference to the Java object embedded in the parent Java
-       object. */
     static jfieldID ctxFieldID = 0;
-    if (ctxFieldID == 0)
-    {
-        jclass clazz = env->GetObjectClass(jsvnclient);
-        if (JNIUtil::isJavaExceptionThrown())
-            return;
-
-        ctxFieldID = env->GetFieldID(clazz, "clientContext",
-                                "L"JAVA_PACKAGE"/SVNClient$ClientContext;");
-        if (JNIUtil::isJavaExceptionThrown() || ctxFieldID == 0)
-            return;
-
-        env->DeleteLocalRef(clazz);
-    }
-
-    jobject jctx = env->GetObjectField(jsvnclient, ctxFieldID);
-    if (JNIUtil::isJavaExceptionThrown())
-        return;
-
-    m_jctx = env->NewGlobalRef(jctx);
-    if (JNIUtil::isJavaExceptionThrown())
-        return;
-
-    env->DeleteLocalRef(jctx);
+    attachJavaObject(jsvnclient, "L"JAVA_PACKAGE"/SVNClient$ClientContext;", "clientContext", &ctxFieldID);
 
     SVN_JNI_ERR(svn_client_create_context2(&m_context, NULL,
                                            pool.getPool()),
@@ -96,16 +69,11 @@ ClientContext::ClientContext(jobject jsv
     m_context->conflict_func2 = resolve;
     m_context->conflict_baton2 = m_jctx;
 
-    m_context->client_name = "javahl";
-    m_pool = &pool;
+    m_context->client_name = getClientName();
 }
 
 ClientContext::~ClientContext()
 {
-    delete m_prompter;
-
-    JNIEnv *env = JNIUtil::getEnv();
-    env->DeleteGlobalRef(m_jctx);
 }
 
 
@@ -140,7 +108,6 @@ svn_client_ctx_t *
 ClientContext::getContext(CommitMessage *message, SVN::Pool &in_pool)
 {
     apr_pool_t *pool = in_pool.getPool();
-    svn_auth_baton_t *ab;
     svn_client_ctx_t *ctx = m_context;
 
     /* Make a temporary copy of ctx to restore at pool cleanup to avoid
@@ -157,122 +124,17 @@ ClientContext::getContext(CommitMessage 
     apr_pool_cleanup_register(in_pool.getPool(), bt, clear_ctx_ptrs,
                               clear_ctx_ptrs);
 
-
     if (!ctx->config)
       {
-        const char *configDir = m_configDir.c_str();
-        if (m_configDir.empty())
-            configDir = NULL;
-        SVN_JNI_ERR(svn_config_get_config(&(ctx->config), configDir,
-                                          m_pool->getPool()),
-                    NULL);
+        apr_hash_t * configData = getConfigData();
 
+        ctx->config = configData;
         bt->backup->config = ctx->config;
       }
-    svn_config_t *config =
-        reinterpret_cast<svn_config_t *>(apr_hash_get(ctx->config,
-                                                      SVN_CONFIG_CATEGORY_CONFIG,
-                                                      APR_HASH_KEY_STRING));
-
 
-    /* The whole list of registered providers */
-    apr_array_header_t *providers;
-
-    /* Populate the registered providers with the platform-specific providers */
-    SVN_JNI_ERR(svn_auth_get_platform_specific_client_providers(&providers,
-                                                                config,
-                                                                pool),
-                NULL);
-
-    /* Use the prompter (if available) to prompt for password and cert
-     * caching. */
-    svn_auth_plaintext_prompt_func_t plaintext_prompt_func = NULL;
-    void *plaintext_prompt_baton = NULL;
-    svn_auth_plaintext_passphrase_prompt_func_t plaintext_passphrase_prompt_func;
-    void *plaintext_passphrase_prompt_baton = NULL;
-
-    if (m_prompter != NULL)
-    {
-        plaintext_prompt_func = Prompter::plaintext_prompt;
-        plaintext_prompt_baton = m_prompter;
-        plaintext_passphrase_prompt_func = Prompter::plaintext_passphrase_prompt;
-        plaintext_passphrase_prompt_baton = m_prompter;
-    }
-
-    /* The main disk-caching auth providers, for both
-     * 'username/password' creds and 'username' creds.  */
-    svn_auth_provider_object_t *provider;
-
-    svn_auth_get_simple_provider2(&provider, plaintext_prompt_func,
-                                  plaintext_prompt_baton, pool);
-    APR_ARRAY_PUSH(providers, svn_auth_provider_object_t *) = provider;
-
-    svn_auth_get_username_provider(&provider, pool);
-    APR_ARRAY_PUSH(providers, svn_auth_provider_object_t *) = provider;
-
-    /* The server-cert, client-cert, and client-cert-password providers. */
-    SVN_JNI_ERR(svn_auth_get_platform_specific_provider(&provider,
-                                                        "windows",
-                                                        "ssl_server_trust",
-                                                        pool),
-                NULL);
-
-    if (provider)
-        APR_ARRAY_PUSH(providers, svn_auth_provider_object_t *) = provider;
-
-    svn_auth_get_ssl_server_trust_file_provider(&provider, pool);
-    APR_ARRAY_PUSH(providers, svn_auth_provider_object_t *) = provider;
-    svn_auth_get_ssl_client_cert_file_provider(&provider, pool);
-    APR_ARRAY_PUSH(providers, svn_auth_provider_object_t *) = provider;
-    svn_auth_get_ssl_client_cert_pw_file_provider2(&provider,
-                        plaintext_passphrase_prompt_func,
-                        plaintext_passphrase_prompt_baton, pool);
-    APR_ARRAY_PUSH(providers, svn_auth_provider_object_t *) = provider;
-
-    if (m_prompter != NULL)
-    {
-        /* Two basic prompt providers: username/password, and just username.*/
-        provider = m_prompter->getProviderSimple(in_pool);
-
-        APR_ARRAY_PUSH(providers, svn_auth_provider_object_t *) = provider;
-
-        provider = m_prompter->getProviderUsername(in_pool);
-        APR_ARRAY_PUSH(providers, svn_auth_provider_object_t *) = provider;
-
-        /* Three ssl prompt providers, for server-certs, client-certs,
-         * and client-cert-passphrases.  */
-        provider = m_prompter->getProviderServerSSLTrust(in_pool);
-        APR_ARRAY_PUSH(providers, svn_auth_provider_object_t *) = provider;
-
-        provider = m_prompter->getProviderClientSSL(in_pool);
-        APR_ARRAY_PUSH(providers, svn_auth_provider_object_t *) = provider;
-
-        provider = m_prompter->getProviderClientSSLPassword(in_pool);
-        APR_ARRAY_PUSH(providers, svn_auth_provider_object_t *) = provider;
-    }
-
-    /* Build an authentication baton to give to libsvn_client. */
-    svn_auth_open(&ab, providers, pool);
-
-    /* Place any default --username or --password credentials into the
-     * auth_baton's run-time parameter hash.  ### Same with --no-auth-cache? */
-    if (!m_userName.empty())
-        svn_auth_set_parameter(ab, SVN_AUTH_PARAM_DEFAULT_USERNAME,
-                               apr_pstrdup(in_pool.getPool(),
-                                           m_userName.c_str()));
-    if (!m_passWord.empty())
-        svn_auth_set_parameter(ab, SVN_AUTH_PARAM_DEFAULT_PASSWORD,
-                               apr_pstrdup(in_pool.getPool(),
-                                           m_passWord.c_str()));
-    /* Store where to retrieve authentication data? */
-    if (!m_configDir.empty())
-        svn_auth_set_parameter(ab, SVN_AUTH_PARAM_CONFIG_DIR,
-                               apr_pstrdup(in_pool.getPool(),
-                                           m_configDir.c_str()));
-
-    ctx->auth_baton = ab;
+    ctx->auth_baton = getAuthBaton(in_pool);
     ctx->log_msg_baton3 = message;
-    m_cancelOperation = false;
+    resetCancelRequest();
 
     SVN_JNI_ERR(svn_wc_context_create(&ctx->wc_ctx, NULL,
                                       in_pool.getPool(), in_pool.getPool()),
@@ -282,60 +144,6 @@ ClientContext::getContext(CommitMessage 
 }
 
 void
-ClientContext::username(const char *pi_username)
-{
-    m_userName = (pi_username == NULL ? "" : pi_username);
-}
-
-void
-ClientContext::password(const char *pi_password)
-{
-    m_passWord = (pi_password == NULL ? "" : pi_password);
-}
-
-void
-ClientContext::setPrompt(Prompter *prompter)
-{
-    delete m_prompter;
-    m_prompter = prompter;
-}
-
-void
-ClientContext::setConfigDirectory(const char *configDir)
-{
-    // A change to the config directory may necessitate creation of
-    // the config templates.
-    SVN::Pool requestPool;
-    SVN_JNI_ERR(svn_config_ensure(configDir, requestPool.getPool()), );
-
-    m_configDir = (configDir == NULL ? "" : configDir);
-    m_context->config = NULL;
-}
-
-const char *
-ClientContext::getConfigDirectory() const
-{
-    return m_configDir.c_str();
-}
-
-void
-ClientContext::cancelOperation()
-{
-    m_cancelOperation = true;
-}
-
-svn_error_t *
-ClientContext::checkCancel(void *cancelBaton)
-{
-    ClientContext *that = static_cast<ClientContext *>(cancelBaton);
-    if (that->m_cancelOperation)
-        return svn_error_create(SVN_ERR_CANCELLED, NULL,
-                                _("Operation cancelled"));
-    else
-        return SVN_NO_ERROR;
-}
-
-void
 ClientContext::notify(void *baton,
                       const svn_wc_notify_t *notify,
                       apr_pool_t *pool)
@@ -369,54 +177,6 @@ ClientContext::notify(void *baton,
   env->DeleteLocalRef(jInfo);
 }
 
-void
-ClientContext::progress(apr_off_t progressVal, apr_off_t total,
-                        void *baton, apr_pool_t *pool)
-{
-  jobject jctx = (jobject) baton;
-  JNIEnv *env = JNIUtil::getEnv();
-
-  // Create a local frame for our references
-  env->PushLocalFrame(LOCAL_FRAME_SIZE);
-  if (JNIUtil::isJavaExceptionThrown())
-    return;
-
-  static jmethodID mid = 0;
-  if (mid == 0)
-    {
-      jclass clazz = env->GetObjectClass(jctx);
-      if (JNIUtil::isJavaExceptionThrown())
-        POP_AND_RETURN_NOTHING();
-
-      mid = env->GetMethodID(clazz, "onProgress",
-                             "(L"JAVA_PACKAGE"/ProgressEvent;)V");
-      if (JNIUtil::isJavaExceptionThrown() || mid == 0)
-        POP_AND_RETURN_NOTHING();
-    }
-
-  static jmethodID midCT = 0;
-  jclass clazz = env->FindClass(JAVA_PACKAGE"/ProgressEvent");
-  if (JNIUtil::isJavaExceptionThrown())
-    POP_AND_RETURN_NOTHING();
-
-  if (midCT == 0)
-    {
-      midCT = env->GetMethodID(clazz, "<init>", "(JJ)V");
-      if (JNIUtil::isJavaExceptionThrown() || midCT == 0)
-        POP_AND_RETURN_NOTHING();
-    }
-
-  // Call the Java method.
-  jobject jevent = env->NewObject(clazz, midCT,
-                                  (jlong) progressVal, (jlong) total);
-  if (JNIUtil::isJavaExceptionThrown())
-    POP_AND_RETURN_NOTHING();
-
-  env->CallVoidMethod(jctx, mid, jevent);
-
-  POP_AND_RETURN_NOTHING();
-}
-
 svn_error_t *
 ClientContext::resolve(svn_wc_conflict_result_t **result,
                        const svn_wc_conflict_description2_t *desc,

Modified: subversion/trunk/subversion/bindings/javahl/native/ClientContext.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/native/ClientContext.h?rev=1494650&r1=1494649&r2=1494650&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/javahl/native/ClientContext.h (original)
+++ subversion/trunk/subversion/bindings/javahl/native/ClientContext.h Wed Jun 19 15:05:18 2013
@@ -29,6 +29,8 @@
 
 #include <string>
 
+#include "OperationContext.h"
+
 #include "svn_types.h"
 #include "svn_client.h"
 
@@ -36,7 +38,6 @@
 #include "Pool.h"
 #include "JNIStringHolder.h"
 
-class Prompter;
 class CommitMessage;
 
 /**
@@ -44,25 +45,14 @@ class CommitMessage;
  * and implements the functions read & close of svn_stream_t.
  *
  */
-class ClientContext
+class ClientContext : public OperationContext
 {
  private:
   svn_client_ctx_t *m_context;
-  const SVN::Pool *m_pool;
-  jobject m_jctx;
-
-  std::string m_userName;
-  std::string m_passWord;
-  std::string m_configDir;
-
-  Prompter *m_prompter;
-  bool m_cancelOperation;
 
  protected:
   static void notify(void *baton, const svn_wc_notify_t *notify,
                      apr_pool_t *pool);
-  static void progress(apr_off_t progressVal, apr_off_t total,
-                       void *baton, apr_pool_t *pool);
   static svn_error_t *resolve(svn_wc_conflict_result_t **result,
                               const svn_wc_conflict_description2_t *desc,
                               void *baton,
@@ -73,24 +63,9 @@ class ClientContext
 
  public:
   ClientContext(jobject jsvnclient, SVN::Pool &pool);
-  ~ClientContext();
-
-  static svn_error_t *checkCancel(void *cancelBaton);
+  virtual ~ClientContext();
 
   svn_client_ctx_t *getContext(CommitMessage *message, SVN::Pool &in_pool);
-
-  void username(const char *pi_username);
-  void password(const char *pi_password);
-  void setPrompt(Prompter *prompter);
-  void cancelOperation();
-  const char *getConfigDirectory() const;
-
-  /**
-   * Set the configuration directory, taking the usual steps to
-   * ensure that Subversion's config file templates exist in the
-   * specified location.
-   */
-  void setConfigDirectory(const char *configDir);
 };
 
 #endif // CLIENTCONTEXT_H

Modified: subversion/trunk/subversion/bindings/javahl/native/CreateJ.cpp
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/native/CreateJ.cpp?rev=1494650&r1=1494649&r2=1494650&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/javahl/native/CreateJ.cpp (original)
+++ subversion/trunk/subversion/bindings/javahl/native/CreateJ.cpp Wed Jun 19 15:05:18 2013
@@ -423,6 +423,72 @@ CreateJ::Lock(const svn_lock_t *lock)
 }
 
 jobject
+CreateJ::LockMap(const apr_hash_t *locks, apr_pool_t *pool)
+{
+  JNIEnv *env = JNIUtil::getEnv();
+
+  if (locks == NULL)
+    return NULL;
+
+  // Create a local frame for our references
+  env->PushLocalFrame(LOCAL_FRAME_SIZE);
+  if (JNIUtil::isJavaExceptionThrown())
+    return NULL;
+
+  jclass clazz = env->FindClass("java/util/HashMap");
+  if (JNIUtil::isJavaExceptionThrown())
+    POP_AND_RETURN_NULL;
+
+  static jmethodID init_mid = 0;
+  if (init_mid == 0)
+    {
+      init_mid = env->GetMethodID(clazz, "<init>", "()V");
+      if (JNIUtil::isJavaExceptionThrown())
+        POP_AND_RETURN_NULL;
+    }
+
+  static jmethodID put_mid = 0;
+  if (put_mid == 0)
+    {
+      put_mid = env->GetMethodID(clazz, "put",
+                                 "(Ljava/lang/Object;Ljava/lang/Object;)"
+                                 "Ljava/lang/Object;");
+      if (JNIUtil::isJavaExceptionThrown())
+        POP_AND_RETURN_NULL;
+    }
+
+  jobject map = env->NewObject(clazz, init_mid);
+  if (JNIUtil::isJavaExceptionThrown())
+    POP_AND_RETURN_NULL;
+
+  apr_hash_index_t *hi;
+  int i = 0;
+  for (hi = apr_hash_first(pool, (apr_hash_t *) locks); hi;
+        hi = apr_hash_next(hi), ++i)
+    {
+      const char *key = (const char *) svn__apr_hash_index_key(hi);
+      const svn_lock_t *lock = (const svn_lock_t *) svn__apr_hash_index_val(hi);
+
+      jstring jpath = JNIUtil::makeJString(key);
+      if (JNIUtil::isJavaExceptionThrown())
+        POP_AND_RETURN_NULL;
+
+      jobject jlock = Lock(lock);
+      if (JNIUtil::isJavaExceptionThrown())
+        POP_AND_RETURN_NULL;
+
+      env->CallObjectMethod(map, put_mid, jpath, jlock);
+      if (JNIUtil::isJavaExceptionThrown())
+        POP_AND_RETURN_NULL;
+
+      env->DeleteLocalRef(jpath);
+      env->DeleteLocalRef(jlock);
+    }
+
+  return env->PopLocalFrame(map);
+}
+
+jobject
 CreateJ::ChangedPath(const char *path, svn_log_changed_path2_t *log_item)
 {
   JNIEnv *env = JNIUtil::getEnv();

Modified: subversion/trunk/subversion/bindings/javahl/native/CreateJ.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/native/CreateJ.h?rev=1494650&r1=1494649&r2=1494650&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/javahl/native/CreateJ.h (original)
+++ subversion/trunk/subversion/bindings/javahl/native/CreateJ.h Wed Jun 19 15:05:18 2013
@@ -55,6 +55,9 @@ class CreateJ
   Lock(const svn_lock_t *lock);
 
   static jobject
+  LockMap(const apr_hash_t *locks, apr_pool_t *pool);
+
+  static jobject
   ChangedPath(const char *path, svn_log_changed_path2_t *log_item);
 
   static jobject

Modified: subversion/trunk/subversion/bindings/javahl/native/JNIUtil.cpp
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/native/JNIUtil.cpp?rev=1494650&r1=1494649&r2=1494650&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/javahl/native/JNIUtil.cpp (original)
+++ subversion/trunk/subversion/bindings/javahl/native/JNIUtil.cpp Wed Jun 19 15:05:18 2013
@@ -796,6 +796,31 @@ jobject JNIUtil::createDate(apr_time_t t
   return ret;
 }
 
+apr_time_t
+JNIUtil::getDate(jobject jdate)
+{
+  JNIEnv *env = getEnv();
+  jclass clazz = env->FindClass("java/util/Date");
+  if (isJavaExceptionThrown())
+    return 0;
+
+  static jmethodID mid = 0;
+  if (mid == 0)
+    {
+      mid = env->GetMethodID(clazz, "getTime", "()J");
+      if (isJavaExceptionThrown())
+        return 0;
+    }
+
+  jlong jmillis = env->CallLongMethod(jdate, mid);
+  if (isJavaExceptionThrown())
+    return 0;
+
+  env->DeleteLocalRef(clazz);
+
+  return jmillis * 1000;
+}
+
 /**
  * Create a Java byte array from an array of characters.
  * @param data      the character array

Modified: subversion/trunk/subversion/bindings/javahl/native/JNIUtil.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/native/JNIUtil.h?rev=1494650&r1=1494649&r2=1494650&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/javahl/native/JNIUtil.h (original)
+++ subversion/trunk/subversion/bindings/javahl/native/JNIUtil.h Wed Jun 19 15:05:18 2013
@@ -67,6 +67,7 @@ class JNIUtil
   static jbyteArray makeJByteArray(const void *data, int length);
   static jbyteArray makeJByteArray(const svn_string_t *str);
   static jobject createDate(apr_time_t time);
+  static apr_time_t getDate(jobject jdate);
   static void logMessage(const char *message);
   static int getLogLevel();
   static char *getFormatBuffer();

Modified: subversion/trunk/subversion/bindings/javahl/native/Prompter.cpp
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/native/Prompter.cpp?rev=1494650&r1=1494649&r2=1494650&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/javahl/native/Prompter.cpp (original)
+++ subversion/trunk/subversion/bindings/javahl/native/Prompter.cpp Wed Jun 19 15:05:18 2013
@@ -40,9 +40,9 @@
  * @param jprompter     a global reference to the Java callback object
  */
 Prompter::Prompter(jobject jprompter)
-{
-  m_prompter = jprompter;
-}
+  : m_prompter(jprompter),
+    m_maySave(false)
+{}
 
 Prompter::~Prompter()
 {

Modified: subversion/trunk/subversion/bindings/javahl/native/RevpropTable.cpp
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/native/RevpropTable.cpp?rev=1494650&r1=1494649&r2=1494650&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/javahl/native/RevpropTable.cpp (original)
+++ subversion/trunk/subversion/bindings/javahl/native/RevpropTable.cpp Wed Jun 19 15:05:18 2013
@@ -41,9 +41,9 @@ RevpropTable::~RevpropTable()
     JNIUtil::getEnv()->DeleteLocalRef(m_revpropTable);
 }
 
-const apr_hash_t *RevpropTable::hash(const SVN::Pool &pool)
+apr_hash_t *RevpropTable::hash(const SVN::Pool &pool, bool nullIfEmpty)
 {
-  if (m_revprops.size() == 0)
+  if (m_revprops.size() == 0 && nullIfEmpty)
     return NULL;
 
   apr_hash_t *revprop_table = apr_hash_make(pool.getPool());

Modified: subversion/trunk/subversion/bindings/javahl/native/RevpropTable.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/native/RevpropTable.h?rev=1494650&r1=1494649&r2=1494650&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/javahl/native/RevpropTable.h (original)
+++ subversion/trunk/subversion/bindings/javahl/native/RevpropTable.h Wed Jun 19 15:05:18 2013
@@ -44,7 +44,7 @@ class RevpropTable
  public:
   RevpropTable(jobject jrevpropTable);
   ~RevpropTable();
-  const apr_hash_t *hash(const SVN::Pool &pool);
+  apr_hash_t *hash(const SVN::Pool &pool, bool nullIfEmpty = true);
 };
 
 #endif // REVPROPTABLE_H

Modified: subversion/trunk/subversion/bindings/javahl/native/SVNBase.cpp
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/native/SVNBase.cpp?rev=1494650&r1=1494649&r2=1494650&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/javahl/native/SVNBase.cpp (original)
+++ subversion/trunk/subversion/bindings/javahl/native/SVNBase.cpp Wed Jun 19 15:05:18 2013
@@ -97,3 +97,29 @@ inline void SVNBase::findCppAddrFieldID(
         }
     }
 }
+
+jobject SVNBase::createCppBoundObject(const char *clazzName)
+{
+  JNIEnv *env = JNIUtil::getEnv();
+
+  // Create java session object
+  jclass clazz = env->FindClass(clazzName);
+  if (JNIUtil::isJavaExceptionThrown())
+    return NULL;
+
+  static jmethodID ctor = 0;
+  if (ctor == 0)
+    {
+      ctor = env->GetMethodID(clazz, "<init>", "(J)V");
+      if (JNIUtil::isJavaExceptionThrown())
+        return NULL;
+    }
+
+  jlong cppAddr = this->getCppAddr();
+
+  jobject jself = env->NewObject(clazz, ctor, cppAddr);
+  if (JNIUtil::isJavaExceptionThrown())
+    return NULL;
+
+  return jself;
+}

Modified: subversion/trunk/subversion/bindings/javahl/native/SVNBase.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/native/SVNBase.h?rev=1494650&r1=1494649&r2=1494650&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/javahl/native/SVNBase.h (original)
+++ subversion/trunk/subversion/bindings/javahl/native/SVNBase.h Wed Jun 19 15:05:18 2013
@@ -82,6 +82,11 @@ class SVNBase
    */
   void dispose(jobject jthis, jfieldID *fid, const char *className);
 
+  /**
+   * Instantiates java object attached to this base object
+   */
+  jobject createCppBoundObject(const char *clazzName);
+
  private:
   /**
    * If the value pointed to by @a fid is zero, find the @c jfieldID

Modified: subversion/trunk/subversion/bindings/javahl/native/SVNClient.cpp
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/native/SVNClient.cpp?rev=1494650&r1=1494649&r2=1494650&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/javahl/native/SVNClient.cpp (original)
+++ subversion/trunk/subversion/bindings/javahl/native/SVNClient.cpp Wed Jun 19 15:05:18 2013
@@ -30,6 +30,7 @@
 #include "DiffSummaryReceiver.h"
 #include "ClientContext.h"
 #include "Prompter.h"
+#include "RemoteSession.h"
 #include "Pool.h"
 #include "Targets.h"
 #include "Revision.h"
@@ -70,6 +71,7 @@
 #include <vector>
 #include <iostream>
 #include <sstream>
+#include <string>
 
 
 SVNClient::SVNClient(jobject jthis_in)
@@ -1525,6 +1527,77 @@ SVNClient::patch(const char *patchPath, 
                                  ctx, subPool.getPool()), );
 }
 
+jobject
+SVNClient::openRemoteSession(const char* path, int retryAttempts)
+{
+    static const svn_opt_revision_t HEAD = { svn_opt_revision_head, {0}};
+    static const svn_opt_revision_t NONE = { svn_opt_revision_unspecified, {0}};
+
+    SVN_JNI_NULL_PTR_EX(path, "path", NULL);
+
+    SVN::Pool subPool(pool);
+    svn_client_ctx_t *ctx = context.getContext(NULL, subPool);
+    if (ctx == NULL)
+        return NULL;
+
+    Path checkedPath(path, subPool);
+    SVN_JNI_ERR(checkedPath.error_occurred(), NULL);
+
+    struct PathInfo
+    {
+        std::string url;
+        std::string uuid;
+        static svn_error_t *callback(void *baton,
+                                     const char *,
+                                     const svn_client_info2_t *info,
+                                     apr_pool_t *)
+          {
+              PathInfo* const pi = static_cast<PathInfo*>(baton);
+              pi->url = info->URL;
+              pi->uuid = info->repos_UUID;
+              return SVN_NO_ERROR;
+          }
+    } path_info;
+
+    SVN_JNI_ERR(svn_client_info3(
+                    checkedPath.c_str(), &NONE,
+                    (svn_path_is_url(checkedPath.c_str()) ? &HEAD : &NONE),
+                    svn_depth_empty, FALSE, TRUE, NULL,
+                    PathInfo::callback, &path_info,
+                    ctx, subPool.getPool()),
+                NULL);
+
+    jobject jctx = context.getSelf();
+    if (JNIUtil::isJavaExceptionThrown())
+        return NULL;
+
+    /* Decouple the RemoteSession's context from SVNClient's context
+       by creating a copy of the prompter here. */
+    Prompter* prompter = new Prompter(context.getPrompter());
+    if (!prompter)
+    {
+        /* context.getSelf() created a new global reference. */
+        JNIUtil::getEnv()->DeleteGlobalRef(jctx);
+        JNIUtil::throwNullPointerException("allocating Prompter");
+        return NULL;
+    }
+
+    jobject jremoteSession = RemoteSession::open(
+        retryAttempts, path_info.url.c_str(), path_info.uuid.c_str(),
+        context.getConfigDirectory(),
+        context.getUsername(), context.getPassword(),
+        prompter, jctx);
+    if (JNIUtil::isJavaExceptionThrown())
+    {
+        /* context.getSelf() created a new global reference. */
+        JNIUtil::getEnv()->DeleteGlobalRef(jctx);
+        jremoteSession = NULL;
+        delete prompter;
+    }
+
+    return jremoteSession;
+}
+
 ClientContext &
 SVNClient::getClientContext()
 {

Modified: subversion/trunk/subversion/bindings/javahl/native/SVNClient.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/native/SVNClient.h?rev=1494650&r1=1494649&r2=1494650&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/javahl/native/SVNClient.h (original)
+++ subversion/trunk/subversion/bindings/javahl/native/SVNClient.h Wed Jun 19 15:05:18 2013
@@ -62,6 +62,7 @@ class DiffOptions;
 class SVNClient :public SVNBase
 {
  public:
+  jobject openRemoteSession(const char* path, int);
   void patch(const char *patchPath, const char *targetPath, bool dryRun,
              int stripCount, bool reverse, bool ignoreWhitespace,
              bool removeTempfiles, PatchCallback *callback);

Modified: subversion/trunk/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp?rev=1494650&r1=1494649&r2=1494650&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp (original)
+++ subversion/trunk/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp Wed Jun 19 15:05:18 2013
@@ -1851,3 +1851,22 @@ Java_org_apache_subversion_javahl_SVNCli
             jreverse ? true : false, jignoreWhitespace ? true : false,
             jremoveTempfiles ? true : false, &callback);
 }
+
+JNIEXPORT jobject JNICALL
+Java_org_apache_subversion_javahl_SVNClient_nativeOpenRemoteSession
+(JNIEnv *env, jobject jthis, jstring jpath, jint jretryAttempts)
+{
+  JNIEntry(SVNClient, openRemoteSession);
+  SVNClient *cl = SVNClient::getCppObject(jthis);
+  if (cl == NULL)
+    {
+      JNIUtil::throwError("bad C++ this");
+      return NULL;
+    }
+
+  JNIStringHolder path(jpath);
+  if (JNIUtil::isJavaExceptionThrown())
+    return NULL;
+
+  return cl->openRemoteSession(path, jretryAttempts);
+}

Modified: subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java?rev=1494650&r1=1494649&r2=1494650&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java (original)
+++ subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java Wed Jun 19 15:05:18 2013
@@ -1145,4 +1145,36 @@ public interface ISVNClient
                int stripCount, boolean reverse, boolean ignoreWhitespace,
                boolean removeTempfiles, PatchCallback callback)
             throws ClientException;
+
+    /**
+     * Open a persistent session to a repository.
+     * @param path A path in a working copy from which the
+     *        session URL is derived.
+     * @throws remote.RetryOpenSession If the session URL was redirected
+     * @throws SubversionException If an URL redirect cycle was detected
+     * @throws ClientException
+     * @note The session object inherits the progress callback,
+     *       configuration directory and authentication info.
+     * @since 1.9
+     */
+    ISVNRemote openRemoteSession(String path)
+            throws ClientException, SubversionException;
+
+    /**
+     * Open a persistent session to a repository.
+     * @param path A path in a working copy from which the
+     *        session URL is derived.
+     * @param retryAttempts The number of times to retry the operation
+     *        if the given URL is redirected.
+     * @throws IllegalArgumentException If <code>retryAttempts</code>
+     *         is not positive
+     * @throws remote.RetryOpenSession If the session URL was redirected
+     * @throws SubversionException If an URL redirect cycle was detected
+     * @throws ClientException
+     * @note The session object inherits the progress callback,
+     *       configuration directory and authentication info.
+     * @since 1.9
+     */
+    ISVNRemote openRemoteSession(String path, int retryAttempts)
+            throws ClientException, SubversionException;
 }

Modified: subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java?rev=1494650&r1=1494649&r2=1494650&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java (original)
+++ subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java Wed Jun 19 15:05:18 2013
@@ -151,14 +151,14 @@ public class SVNClient implements ISVNCl
         clientContext.notify = notify;
     }
 
-    public void setConflictResolver(ConflictResolverCallback listener)
+    public void setConflictResolver(ConflictResolverCallback resolver)
     {
-        clientContext.resolver = listener;
+        clientContext.resolver = resolver;
     }
 
-    public void setProgressCallback(ProgressCallback listener)
+    public void setProgressCallback(ProgressCallback progress)
     {
-        clientContext.listener = listener;
+        clientContext.setProgressCallback(progress);
     }
 
     public native void remove(Set<String> paths, boolean force,
@@ -661,16 +661,33 @@ public class SVNClient implements ISVNCl
                              PatchCallback callback)
             throws ClientException;
 
+    public ISVNRemote openRemoteSession(String path)
+            throws ClientException, SubversionException
+    {
+        return nativeOpenRemoteSession(path, 1);
+    }
+
+    public ISVNRemote openRemoteSession(String path, int retryAttempts)
+            throws ClientException, SubversionException
+    {
+        if (retryAttempts <= 0)
+            throw new IllegalArgumentException(
+                "retryAttempts must be positive");
+        return nativeOpenRemoteSession(path, retryAttempts);
+    }
+
+    private native ISVNRemote nativeOpenRemoteSession(
+        String path, int retryAttempts)
+            throws ClientException, SubversionException;
+
     /**
      * A private class to hold the contextual information required to
      * persist in this object, such as notification handlers.
      */
-    private class ClientContext
-        implements ClientNotifyCallback, ProgressCallback,
-            ConflictResolverCallback
+    private class ClientContext extends OperationContext
+        implements ClientNotifyCallback, ConflictResolverCallback
     {
         public ClientNotifyCallback notify = null;
-        public ProgressCallback listener = null;
         public ConflictResolverCallback resolver = null;
 
         public void onNotify(ClientNotifyInformation notifyInfo)
@@ -679,12 +696,6 @@ public class SVNClient implements ISVNCl
                 notify.onNotify(notifyInfo);
         }
 
-        public void onProgress(ProgressEvent event)
-        {
-            if (listener != null)
-                listener.onProgress(event);
-        }
-
         public ConflictResult resolve(ConflictDescriptor conflict)
             throws SubversionException
         {

Modified: subversion/trunk/subversion/bindings/javahl/tests/org/apache/subversion/javahl/RunTests.java
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/tests/org/apache/subversion/javahl/RunTests.java?rev=1494650&r1=1494649&r2=1494650&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/javahl/tests/org/apache/subversion/javahl/RunTests.java (original)
+++ subversion/trunk/subversion/bindings/javahl/tests/org/apache/subversion/javahl/RunTests.java Wed Jun 19 15:05:18 2013
@@ -92,6 +92,7 @@ public class RunTests
             {
                 // Add default test suites.
                 suite.addTestSuite(SVNReposTests.class);
+                suite.addTestSuite(SVNRemoteTests.class);
                 suite.addTestSuite(BasicTests.class);
             }
             else

Propchange: subversion/trunk/tools/dist/make-deps-tarball.sh
------------------------------------------------------------------------------
  Merged /subversion/branches/javahl-ra/tools/dist/make-deps-tarball.sh:r1329209-1494640