You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2013/11/27 08:53:35 UTC

svn commit: r1545955 [2/15] - in /subversion/branches/fsfs-improvements: ./ build/ build/ac-macros/ build/generator/ build/generator/templates/ build/win32/ contrib/server-side/ contrib/server-side/svncutter/ notes/ subversion/bindings/javahl/native/ s...

Modified: subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/CommitEditor.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/CommitEditor.cpp?rev=1545955&r1=1545954&r2=1545955&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/CommitEditor.cpp (original)
+++ subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/CommitEditor.cpp Wed Nov 27 07:53:29 2013
@@ -39,6 +39,10 @@
 #include "private/svn_ra_private.h"
 #include "svn_private_config.h"
 
+#include "EditorCallbacks.hpp"
+#include "jniwrapper/jni_string.hpp"
+#include "jniwrapper/jni_stack.hpp"
+
 CommitEditor*
 CommitEditor::getCppObject(jobject jthis)
 {
@@ -53,14 +57,19 @@ CommitEditor::createInstance(jobject jse
                              jobject jrevprops,
                              jobject jcommit_callback,
                              jobject jlock_tokens,
-                             jboolean jkeep_locks)
+                             jboolean jkeep_locks,
+                             jobject jget_base_cb,
+                             jobject jget_props_cb,
+                             jobject jget_kind_cb)
 {
   RemoteSession* session = RemoteSession::getCppObject(jsession);
   CPPADDR_NULL_PTR(session, 0);
 
   CommitEditor* editor = new CommitEditor(session,
                                           jrevprops, jcommit_callback,
-                                          jlock_tokens, jkeep_locks);
+                                          jlock_tokens, jkeep_locks,
+                                          jget_base_cb, jget_props_cb,
+                                          jget_kind_cb);
   if (JNIUtil::isJavaExceptionThrown())
     {
       delete editor;
@@ -71,11 +80,17 @@ CommitEditor::createInstance(jobject jse
 
 CommitEditor::CommitEditor(RemoteSession* session,
                            jobject jrevprops, jobject jcommit_callback,
-                           jobject jlock_tokens, jboolean jkeep_locks)
+                           jobject jlock_tokens, jboolean jkeep_locks,
+                           jobject jget_base_cb, jobject jget_props_cb,
+                           jobject jget_kind_cb)
+
   : m_valid(false),
     m_callback(jcommit_callback),
     m_session(session),
     m_editor(NULL),
+    m_get_base_cb(Java::Env(), jget_base_cb),
+    m_get_props_cb(Java::Env(), jget_props_cb),
+    m_get_kind_cb(Java::Env(), jget_kind_cb),
     m_callback_session(NULL),
     m_callback_session_url(NULL),
     m_callback_session_uuid(NULL)
@@ -89,7 +104,7 @@ CommitEditor::CommitEditor(RemoteSession
                                &m_callback_session_uuid,
                                pool.getPool()),);
 
-  PropertyTable revprops(jrevprops, true);
+  PropertyTable revprops(jrevprops, true, true);
   if (JNIUtil::isJavaExceptionThrown())
     return;
   LockTokenTable lock_tokens(jlock_tokens);
@@ -100,7 +115,7 @@ CommitEditor::CommitEditor(RemoteSession
   SVN_JNI_ERR(svn_ra__get_commit_ev2(
                   &m_editor,
                   session->m_session,
-                  revprops.hash(subPool, false),
+                  revprops.hash(subPool),
                   m_callback.callback, &m_callback,
                   lock_tokens.hash(subPool, true),
                   bool(jkeep_locks),
@@ -213,7 +228,7 @@ void CommitEditor::addDirectory(jstring 
   Iterator children(jchildren);
   if (JNIUtil::isJavaExceptionThrown())
     return;
-  PropertyTable properties(jproperties, true);
+  PropertyTable properties(jproperties, true, true);
   if (JNIUtil::isJavaExceptionThrown())
     return;
 
@@ -225,7 +240,7 @@ void CommitEditor::addDirectory(jstring 
 
   SVN_JNI_ERR(svn_editor_add_directory(m_editor, relpath.c_str(),
                                        build_children(children, subPool),
-                                       properties.hash(subPool, false),
+                                       properties.hash(subPool),
                                        svn_revnum_t(jreplaces_revision)),);
 }
 
@@ -238,7 +253,7 @@ void CommitEditor::addFile(jstring jrelp
   SVN_JNI_ERR(m_session->m_context->checkCancel(m_session->m_context),);
 
   InputStream contents(jcontents);
-  PropertyTable properties(jproperties, true);
+  PropertyTable properties(jproperties, true, true);
   if (JNIUtil::isJavaExceptionThrown())
     return;
 
@@ -253,7 +268,7 @@ void CommitEditor::addFile(jstring jrelp
     return;
   SVN_JNI_ERR(svn_editor_add_file(m_editor, relpath.c_str(),
                                   &checksum, contents.getStream(subPool),
-                                  properties.hash(subPool, false),
+                                  properties.hash(subPool),
                                   svn_revnum_t(jreplaces_revision)),);
 }
 
@@ -290,7 +305,7 @@ void CommitEditor::alterDirectory(jstrin
   Iterator children(jchildren);
   if (JNIUtil::isJavaExceptionThrown())
     return;
-  PropertyTable properties(jproperties, true);
+  PropertyTable properties(jproperties, true, false);
   if (JNIUtil::isJavaExceptionThrown())
     return;
 
@@ -303,7 +318,7 @@ void CommitEditor::alterDirectory(jstrin
   SVN_JNI_ERR(svn_editor_alter_directory(
                   m_editor, relpath.c_str(), svn_revnum_t(jrevision),
                   (jchildren ? build_children(children, subPool) : NULL),
-                  properties.hash(subPool, true)),);
+                  properties.hash(subPool)),);
 }
 
 void CommitEditor::alterFile(jstring jrelpath, jlong jrevision,
@@ -314,7 +329,7 @@ void CommitEditor::alterFile(jstring jre
   SVN_JNI_ERR(m_session->m_context->checkCancel(m_session->m_context),);
 
   InputStream contents(jcontents);
-  PropertyTable properties(jproperties, true);
+  PropertyTable properties(jproperties, true, false);
   if (JNIUtil::isJavaExceptionThrown())
     return;
 
@@ -331,7 +346,7 @@ void CommitEditor::alterFile(jstring jre
                   m_editor, relpath.c_str(), svn_revnum_t(jrevision),
                   (jcontents ? &checksum : NULL),
                   (jcontents ? contents.getStream(subPool) : NULL),
-                  properties.hash(subPool, true)),);
+                  properties.hash(subPool)),);
 }
 
 void CommitEditor::alterSymlink(jstring jrelpath, jlong jrevision,
@@ -450,6 +465,44 @@ svn_error_t* open_callback_session(svn_r
     }
   return SVN_NO_ERROR;
 }
+
+void
+invoke_get_base_cb(svn_stream_t **contents, svn_revnum_t *revision,
+                   Java::Env env, jobject get_base_cb,
+                   const char *repos_relpath, apr_pool_t *result_pool)
+{
+  Java::String relpath(env, repos_relpath);
+  jobject jrv =
+    JavaHL::ProvideBaseCallback(env, get_base_cb)(relpath.get());
+  JavaHL::ProvideBaseCallback::ReturnValue rv(env, jrv);
+  *contents = rv.get_global_stream(result_pool);
+  *revision = svn_revnum_t(rv.get_revision());
+}
+
+void
+invoke_get_props_cb(apr_hash_t **props, svn_revnum_t *revision,
+                   Java::Env env, jobject get_props_cb,
+                   const char *repos_relpath, apr_pool_t *result_pool)
+{
+  Java::String relpath(env, repos_relpath);
+  jobject jrv =
+    JavaHL::ProvidePropsCallback(env, get_props_cb)(relpath.get());
+  JavaHL::ProvidePropsCallback::ReturnValue rv(env, jrv);
+  *props = rv.get_property_hash(result_pool);
+  *revision = svn_revnum_t(rv.get_revision());
+}
+
+void
+invoke_get_kind_cb(svn_node_kind_t *kind,
+                   Java::Env env, jobject get_kind_cb,
+                   const char *repos_relpath, svn_revnum_t revision)
+{
+  Java::String relpath(env, repos_relpath);
+  jobject jnode_kind =
+    JavaHL::GetNodeKindCallback(env, get_kind_cb)(relpath.get(),
+                                                  jlong(revision));
+  *kind = EnumMapper::toNodeKind(jnode_kind);
+}
 } // anonymous namespace
 
 
@@ -461,8 +514,21 @@ CommitEditor::provide_base_cb(svn_stream
                               apr_pool_t *result_pool,
                               apr_pool_t *scratch_pool)
 {
-  *contents = NULL;
-  *revision = SVN_INVALID_REVNUM;
+  CommitEditor* editor = static_cast<CommitEditor*>(baton);
+  if (editor->m_get_base_cb.get())
+    {
+      const Java::Env env;
+      SVN_JAVAHL_CATCH(env, SVN_ERR_BASE,
+                       invoke_get_base_cb(contents, revision, env,
+                                          editor->m_get_base_cb.get(),
+                                          repos_relpath,
+                                          result_pool));
+    }
+  else
+    {
+      *contents = NULL;
+      *revision = SVN_INVALID_REVNUM;
+    }
   return SVN_NO_ERROR;
 }
 
@@ -475,33 +541,49 @@ CommitEditor::provide_props_cb(apr_hash_
                                apr_pool_t *scratch_pool)
 {
   CommitEditor* editor = static_cast<CommitEditor*>(baton);
-  SVN_ERR(open_callback_session(editor->m_callback_session,
-                                editor->m_callback_session_url,
-                                editor->m_callback_session_uuid,
-                                editor->m_session->m_context,
-                                editor->pool));
-
-  svn_node_kind_t kind = svn_node_unknown;
-  SVN_ERR(svn_ra_check_path(editor->m_callback_session,
-                            repos_relpath, SVN_INVALID_REVNUM, &kind,
-                            scratch_pool));
-
-  // FIXME: Getting properties from the youngest revision is in fact
-  // not such a bright idea, as the path may have been moved or
-  // deleted in the path.
-  if (kind == svn_node_file)
-    return svn_ra_get_file(editor->m_callback_session,
-                           repos_relpath, SVN_INVALID_REVNUM,
-                           NULL, revision, props, scratch_pool);
-  else if (kind == svn_node_dir)
-    return svn_ra_get_dir2(editor->m_callback_session, NULL, revision, props,
-                           repos_relpath, SVN_INVALID_REVNUM, 0, scratch_pool);
+  if (editor->m_get_props_cb.get())
+    {
+      const Java::Env env;
+      SVN_JAVAHL_CATCH(env, SVN_ERR_BASE,
+                       invoke_get_props_cb(props, revision, env,
+                                           editor->m_get_props_cb.get(),
+                                           repos_relpath,
+                                           result_pool));
+    }
   else
-    return svn_error_createf(SVN_ERR_NODE_UNEXPECTED_KIND, NULL,
-                             _("Expected node kind '%s' or '%s' but got '%s'"),
-                             svn_node_kind_to_word(svn_node_file),
-                             svn_node_kind_to_word(svn_node_dir),
-                             svn_node_kind_to_word(kind));
+    {
+      SVN_ERR(open_callback_session(editor->m_callback_session,
+                                    editor->m_callback_session_url,
+                                    editor->m_callback_session_uuid,
+                                    editor->m_session->m_context,
+                                    editor->pool));
+
+      svn_node_kind_t kind = svn_node_unknown;
+      SVN_ERR(svn_ra_check_path(editor->m_callback_session,
+                                repos_relpath, SVN_INVALID_REVNUM, &kind,
+                                scratch_pool));
+
+      // FIXME: Getting properties from the youngest revision is in
+      // fact not such a bright idea, as the path may have been moved
+      // or deleted in the repository. On the other hand, if that
+      // happens, the commit would fail due to a conflict anyway.
+      if (kind == svn_node_file)
+        return svn_ra_get_file(editor->m_callback_session,
+                               repos_relpath, SVN_INVALID_REVNUM,
+                               NULL, revision, props, scratch_pool);
+      else if (kind == svn_node_dir)
+        return svn_ra_get_dir2(editor->m_callback_session, NULL, revision,
+                               props, repos_relpath, SVN_INVALID_REVNUM, 0,
+                               scratch_pool);
+      else
+        return svn_error_createf(
+            SVN_ERR_NODE_UNEXPECTED_KIND, NULL,
+            _("Expected node kind '%s' or '%s' but got '%s'"),
+            svn_node_kind_to_word(svn_node_file),
+            svn_node_kind_to_word(svn_node_dir),
+            svn_node_kind_to_word(kind));
+    }
+  return SVN_NO_ERROR;
 }
 
 svn_error_t*
@@ -511,13 +593,26 @@ CommitEditor::get_copysrc_kind_cb(svn_no
                                   apr_pool_t *scratch_pool)
 {
   CommitEditor* editor = static_cast<CommitEditor*>(baton);
-  SVN_ERR(open_callback_session(editor->m_callback_session,
-                                editor->m_callback_session_url,
-                                editor->m_callback_session_uuid,
-                                editor->m_session->m_context,
-                                editor->pool));
-
-  return svn_ra_check_path(editor->m_callback_session,
-                           repos_relpath, src_revision, kind,
-                           scratch_pool);
+  if (editor->m_get_kind_cb.get())
+    {
+      const Java::Env env;
+      SVN_JAVAHL_CATCH(env, SVN_ERR_BASE,
+                       invoke_get_kind_cb(kind, env,
+                                          editor->m_get_kind_cb.get(),
+                                          repos_relpath,
+                                          src_revision));
+    }
+  else
+    {
+      SVN_ERR(open_callback_session(editor->m_callback_session,
+                                    editor->m_callback_session_url,
+                                    editor->m_callback_session_uuid,
+                                    editor->m_session->m_context,
+                                    editor->pool));
+
+      return svn_ra_check_path(editor->m_callback_session,
+                               repos_relpath, src_revision, kind,
+                               scratch_pool);
+    }
+  return SVN_NO_ERROR;
 }

Modified: subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/CommitEditor.h
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/CommitEditor.h?rev=1545955&r1=1545954&r2=1545955&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/CommitEditor.h (original)
+++ subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/CommitEditor.h Wed Nov 27 07:53:29 2013
@@ -36,6 +36,8 @@
 #include "SVNBase.h"
 #include "CommitCallback.h"
 
+#include "jniwrapper/jni_globalref.hpp"
+
 class RemoteSession;
 
 // Forward-declare the currently private EV2 editor struct.
@@ -52,7 +54,10 @@ public:
                               jobject jrevprops,
                               jobject jcommit_callback,
                               jobject jlock_tokens,
-                              jboolean jkeep_locks);
+                              jboolean jkeep_locks,
+                              jobject jget_base_cb,
+                              jobject jget_props_cb,
+                              jobject jget_kind_cb);
   virtual ~CommitEditor();
 
   virtual void dispose(jobject jthis);
@@ -87,7 +92,9 @@ public:
 private:
   CommitEditor(RemoteSession* session,
                jobject jrevprops, jobject jcommit_callback,
-               jobject jlock_tokens, jboolean jkeep_locks);
+               jobject jlock_tokens, jboolean jkeep_locks,
+               jobject jget_base_cb, jobject jget_props_cb,
+               jobject jget_kind_cb);
 
   // This is our private callbacks for the commit editor.
   static svn_error_t* provide_base_cb(svn_stream_t **contents,
@@ -112,6 +119,10 @@ private:
   RemoteSession* m_session;
   svn_editor_t* m_editor;
 
+  Java::GlobalObject m_get_base_cb;
+  Java::GlobalObject m_get_props_cb;
+  Java::GlobalObject m_get_kind_cb;
+
   // Temporary, while EV2 shims are in place
   svn_ra_session_t* m_callback_session;
   const char* m_callback_session_url;

Modified: subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/CreateJ.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/CreateJ.cpp?rev=1545955&r1=1545954&r2=1545955&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/CreateJ.cpp (original)
+++ subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/CreateJ.cpp Wed Nov 27 07:53:29 2013
@@ -784,6 +784,7 @@ CreateJ::ClientNotifyInformation(const s
                                "L"JAVA_PACKAGE"/ClientNotifyInformation$LockStatus;"
                                "JLjava/lang/String;"
                                "L"JAVA_PACKAGE"/types/RevisionRange;"
+                               "Ljava/lang/String;"
                                "Ljava/lang/String;Ljava/lang/String;"
                                "Ljava/util/Map;JJJJJJI)V");
       if (JNIUtil::isJavaExceptionThrown() || midCT == 0)
@@ -841,6 +842,10 @@ CreateJ::ClientNotifyInformation(const s
         POP_AND_RETURN_NULL;
     }
 
+  jstring jUrl = JNIUtil::makeJString(wcNotify->url);
+  if (JNIUtil::isJavaExceptionThrown())
+    POP_AND_RETURN_NULL;
+
   jstring jpathPrefix = JNIUtil::makeJString(wcNotify->path_prefix);
   if (JNIUtil::isJavaExceptionThrown())
     POP_AND_RETURN_NULL;
@@ -872,7 +877,7 @@ CreateJ::ClientNotifyInformation(const s
                                  jKind, jMimeType, jLock, jErr, jErrStack,
                                  jContentState, jPropState, jLockState,
                                  (jlong) wcNotify->revision, jChangelistName,
-                                 jMergeRange, jpathPrefix, jpropName,
+                                 jMergeRange, jUrl, jpathPrefix, jpropName,
                                  jrevProps, joldRevision,
                                  jhunkOriginalStart, jhunkOriginalLength,
                                  jhunkModifiedStart, jhunkModifiedLength,

Modified: subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/GlobalConfig.h
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/GlobalConfig.h?rev=1545955&r1=1545954&r2=1545955&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/GlobalConfig.h (original)
+++ subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/GlobalConfig.h Wed Nov 27 07:53:29 2013
@@ -33,7 +33,6 @@ class GlobalConfig
 {
  public:
   static bool useNativeCredentialsStore();
-  static jobject getConfigCallback();
 };
 
 #endif  // JAVAHL_GLOBAL_CONFIG_H

Modified: subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/JNIUtil.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/JNIUtil.cpp?rev=1545955&r1=1545954&r2=1545955&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/JNIUtil.cpp (original)
+++ subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/JNIUtil.cpp Wed Nov 27 07:53:29 2013
@@ -64,6 +64,8 @@
 #include "Pool.h"
 
 
+#include "jniwrapper/jni_env.hpp"
+
 // Static members of JNIUtil are allocated here.
 apr_pool_t *JNIUtil::g_pool = NULL;
 std::list<SVNBase*> JNIUtil::g_finalizedObjects;
@@ -76,34 +78,13 @@ JNIEnv *JNIUtil::g_initEnv;
 int JNIUtil::g_logLevel = JNIUtil::noLog;
 std::ofstream JNIUtil::g_logStream;
 
-namespace {
-JavaVM *g_jvm = NULL;
-} // anonymous namespace
-
-extern "C" JNIEXPORT jint JNICALL
-JNI_OnLoad(JavaVM *jvm, void*)
-{
-  g_jvm = jvm;
-  return JNI_VERSION_1_2;
-}
-
-extern "C" JNIEXPORT void JNICALL
-JNI_OnUnload(JavaVM*, void*)
-{}
-
 /**
  * Return the JNI environment to use
  * @return the JNI environment
  */
 JNIEnv *JNIUtil::getEnv()
 {
-  // During init -> look into the global variable.
-  if (g_inInit)
-    return g_initEnv;
-
-  void* penv;
-  g_jvm->GetEnv(&penv, JNI_VERSION_1_2);
-  return static_cast<JNIEnv*>(penv);
+  return Java::Env().get();
 }
 
 /**
@@ -236,24 +217,6 @@ bool JNIUtil::JNIGlobalInit(JNIEnv *env)
   g_initEnv = env;
 
   svn_error_t *err;
-  apr_status_t status;
-
-
-  /* Initialize the APR subsystem, and register an atexit() function
-   * to Uninitialize that subsystem at program exit. */
-  status = apr_initialize();
-  if (status)
-    {
-      if (stderr)
-        {
-          char buf[1024];
-          apr_strerror(status, buf, sizeof(buf) - 1);
-          fprintf(stderr,
-                  "%s: error: cannot initialize APR: %s\n",
-                  "svnjavahl", buf);
-        }
-      return FALSE;
-    }
 
   /* This has to happen before any pools are created. */
   if ((err = svn_dso_initialize2()))
@@ -265,16 +228,8 @@ bool JNIUtil::JNIGlobalInit(JNIEnv *env)
       return FALSE;
     }
 
-  if (0 > atexit(apr_terminate))
-    {
-      if (stderr)
-        fprintf(stderr,
-                "%s: error: atexit registration failed\n",
-                "svnjavahl");
-      return FALSE;
-    }
-
-  /* Create our top-level pool. */
+  /* Create our top-level pool.
+     N.B.: APR was initialized by JNI_OnLoad. */
   g_pool = svn_pool_create(NULL);
 
   apr_allocator_t* allocator = apr_pool_allocator_get(g_pool);
@@ -662,7 +617,7 @@ std::string JNIUtil::makeSVNErrorMessage
   return buffer;
 }
 
-void JNIUtil::wrappedHandleSVNError(svn_error_t *err)
+void JNIUtil::wrappedHandleSVNError(svn_error_t *err, jthrowable jcause)
 {
   jstring jmessage;
   jobject jstack;
@@ -719,12 +674,14 @@ void JNIUtil::wrappedHandleSVNError(svn_
 
   jmethodID mid = env->GetMethodID(clazz, "<init>",
                                    "(Ljava/lang/String;"
+                                   "Ljava/lang/Throwable;"
                                    "Ljava/lang/String;I"
                                    "Ljava/util/List;)V");
   if (isJavaExceptionThrown())
     POP_AND_RETURN_NOTHING();
-  jobject nativeException = env->NewObject(clazz, mid, jmessage, jsource,
-                                           jint(err->apr_err), jstack);
+  jobject nativeException = env->NewObject(clazz, mid, jmessage, jcause,
+                                           jsource, jint(err->apr_err),
+                                           jstack);
   if (isJavaExceptionThrown())
     POP_AND_RETURN_NOTHING();
 
@@ -795,10 +752,10 @@ void JNIUtil::wrappedHandleSVNError(svn_
   env->Throw(static_cast<jthrowable>(env->PopLocalFrame(nativeException)));
 }
 
-void JNIUtil::handleSVNError(svn_error_t *err)
+void JNIUtil::handleSVNError(svn_error_t *err, jthrowable jcause)
 {
   try {
-    wrappedHandleSVNError(err);
+    wrappedHandleSVNError(err, jcause);
   } catch (...) {
     svn_error_clear(err);
     throw;

Modified: subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/JNIUtil.h
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/JNIUtil.h?rev=1545955&r1=1545954&r2=1545955&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/JNIUtil.h (original)
+++ subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/JNIUtil.h Wed Nov 27 07:53:29 2013
@@ -121,7 +121,7 @@ class JNIUtil
    * Throw a Java exception corresponding to err, and run
    * svn_error_clear() on err.
    */
-  static void handleSVNError(svn_error_t *err);
+  static void handleSVNError(svn_error_t *err, jthrowable jcause = NULL);
 
   static std::string makeSVNErrorMessage(svn_error_t *err,
                                          jstring *jerror_message,
@@ -158,7 +158,7 @@ class JNIUtil
   static JNIMutex *g_configMutex;
 
  private:
-  static void wrappedHandleSVNError(svn_error_t *err);
+  static void wrappedHandleSVNError(svn_error_t *err, jthrowable jcause);
   static void putErrorsInTrace(svn_error_t *err,
                                std::vector<jobject> &stackTrace);
 

Modified: subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/OperationContext.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/OperationContext.cpp?rev=1545955&r1=1545954&r2=1545955&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/OperationContext.cpp (original)
+++ subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/OperationContext.cpp Wed Nov 27 07:53:29 2013
@@ -82,10 +82,6 @@ OperationContext::attachJavaObject(
     return;
 
   env->DeleteLocalRef(jctx);
-
-  m_jcfgcb = env->NewGlobalRef(GlobalConfig::getConfigCallback());
-  if (JNIUtil::isJavaExceptionThrown())
-    return;
 }
 
 OperationContext::~OperationContext()
@@ -282,6 +278,26 @@ OperationContext::getConfigDirectory() c
   return (m_configDir.empty() ? NULL : m_configDir.c_str());
 }
 
+void OperationContext::setConfigEventHandler(jobject jcfgcb)
+{
+  JNIEnv *env = JNIUtil::getEnv();
+  if (jcfgcb)
+    {
+      jcfgcb = env->NewGlobalRef(jcfgcb);
+      if (JNIUtil::isJavaExceptionThrown())
+        return;
+    }
+
+  if (m_jcfgcb)
+    env->DeleteGlobalRef(m_jcfgcb);
+  m_jcfgcb = jcfgcb;
+}
+
+jobject OperationContext::getConfigEventHandler() const
+{
+  return m_jcfgcb;
+}
+
 const char *
 OperationContext::getUsername() const
 {

Modified: subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/OperationContext.h
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/OperationContext.h?rev=1545955&r1=1545954&r2=1545955&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/OperationContext.h (original)
+++ subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/OperationContext.h Wed Nov 27 07:53:29 2013
@@ -114,6 +114,9 @@ class OperationContext
    */
   apr_hash_t *getConfigData();
 
+  void setConfigEventHandler(jobject jcfgcb);
+  jobject getConfigEventHandler() const;
+
   static svn_error_t * clientName(void *baton, const char **name, apr_pool_t *pool);
   virtual const char * getClientName() const;
 

Modified: subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/PropertyTable.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/PropertyTable.cpp?rev=1545955&r1=1545954&r2=1545955&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/PropertyTable.cpp (original)
+++ subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/PropertyTable.cpp Wed Nov 27 07:53:29 2013
@@ -42,9 +42,9 @@ PropertyTable::~PropertyTable()
     JNIUtil::getEnv()->DeleteLocalRef(m_revpropTable);
 }
 
-apr_hash_t *PropertyTable::hash(const SVN::Pool &pool, bool nullIfEmpty)
+apr_hash_t *PropertyTable::hash(const SVN::Pool &pool)
 {
-  if (m_revprops.size() == 0 && nullIfEmpty)
+  if (!m_revpropTable && !m_empty_if_null)
     return NULL;
 
   apr_hash_t *revprop_table = apr_hash_make(pool.getPool());
@@ -73,7 +73,10 @@ apr_hash_t *PropertyTable::hash(const SV
   return revprop_table;
 }
 
-PropertyTable::PropertyTable(jobject jrevpropTable, bool bytearray_values)
+PropertyTable::PropertyTable(jobject jrevpropTable, bool bytearray_values,
+                             bool empty_if_null)
+  : m_revpropTable(jrevpropTable),
+    m_empty_if_null(empty_if_null)
 {
   m_revpropTable = jrevpropTable;
 

Modified: subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/PropertyTable.h
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/PropertyTable.h?rev=1545955&r1=1545954&r2=1545955&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/PropertyTable.h (original)
+++ subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/PropertyTable.h Wed Nov 27 07:53:29 2013
@@ -41,10 +41,13 @@ class PropertyTable
  private:
   std::map<std::string, std::string> m_revprops;
   jobject m_revpropTable;
+  bool m_empty_if_null;
  public:
-  PropertyTable(jobject jrevpropTable, bool bytearray_values=false);
+  PropertyTable(jobject jrevpropTable,
+                bool bytearray_values,
+                bool empty_if_null);
   ~PropertyTable();
-  apr_hash_t *hash(const SVN::Pool &pool, bool nullIfEmpty = true);
+  apr_hash_t *hash(const SVN::Pool &pool);
 };
 
 #endif // REVPROPTABLE_H

Modified: subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/RemoteSession.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/RemoteSession.cpp?rev=1545955&r1=1545954&r2=1545955&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/RemoteSession.cpp (original)
+++ subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/RemoteSession.cpp Wed Nov 27 07:53:29 2013
@@ -68,7 +68,8 @@ RemoteSession::open(jint jretryAttempts,
                     jstring jurl, jstring juuid,
                     jstring jconfigDirectory,
                     jstring jusername, jstring jpassword,
-                    jobject jprompter, jobject jprogress, jobject jtunnelcb)
+                    jobject jprompter, jobject jprogress,
+                    jobject jcfgcb, jobject jtunnelcb)
 {
   JNIEnv *env = JNIUtil::getEnv();
 
@@ -111,7 +112,7 @@ RemoteSession::open(jint jretryAttempts,
   jobject jremoteSession = open(
       jretryAttempts, url.c_str(), uuid,
       (jconfigDirectory ? configDirectory.c_str() : NULL),
-      usernameStr, passwordStr, prompter, jprogress, jtunnelcb);
+      usernameStr, passwordStr, prompter, jprogress, jcfgcb, jtunnelcb);
   if (JNIUtil::isExceptionThrown() || !jremoteSession)
     {
       delete prompter;
@@ -125,7 +126,8 @@ RemoteSession::open(jint jretryAttempts,
                     const char* url, const char* uuid,
                     const char* configDirectory,
                     const char*  usernameStr, const char*  passwordStr,
-                    Prompter*& prompter, jobject jprogress, jobject jtunnelcb)
+                    Prompter*& prompter, jobject jprogress,
+                    jobject jcfgcb, jobject jtunnelcb)
 {
   /*
    * Initialize ra layer if we have not done so yet
@@ -139,7 +141,7 @@ RemoteSession::open(jint jretryAttempts,
 
   RemoteSession* session = new RemoteSession(
       jretryAttempts, url, uuid, configDirectory,
-      usernameStr, passwordStr, prompter, jtunnelcb);
+      usernameStr, passwordStr, prompter, jcfgcb, jtunnelcb);
   if (JNIUtil::isJavaExceptionThrown() || !session)
     {
       delete session;
@@ -201,11 +203,12 @@ RemoteSession::RemoteSession(int retryAt
                              const char* url, const char* uuid,
                              const char* configDirectory,
                              const char*  username, const char*  password,
-                             Prompter*& prompter, jobject jtunnelcb)
+                             Prompter*& prompter,
+                             jobject jcfgcb, jobject jtunnelcb)
   : m_session(NULL), m_context(NULL)
 {
   m_context = new RemoteSessionContext(
-      pool, configDirectory, username, password, prompter, jtunnelcb);
+      pool, configDirectory, username, password, prompter, jcfgcb, jtunnelcb);
   if (JNIUtil::isJavaExceptionThrown())
     return;
 

Modified: subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/RemoteSession.h
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/RemoteSession.h?rev=1545955&r1=1545954&r2=1545955&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/RemoteSession.h (original)
+++ subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/RemoteSession.h Wed Nov 27 07:53:29 2013
@@ -49,13 +49,13 @@ class RemoteSession : public SVNBase
                         jstring jconfigDirectory,
                         jstring jusername, jstring jpassword,
                         jobject jprompter, jobject jprogress,
-                        jobject jtunnelcb);
+                        jobject jcfgcb, jobject jtunnelcb);
     static jobject open(jint jretryAttempts,
                         const char* url, const char* uuid,
                         const char* configDirectory,
                         const char* username, const char* password,
                         Prompter*& prompter, jobject jprogress,
-                        jobject jtunnelcb);
+                        jobject jcfgcb, jobject jtunnelcb);
     ~RemoteSession();
 
     void cancelOperation() const { m_context->cancelOperation(); }
@@ -119,7 +119,7 @@ class RemoteSession : public SVNBase
                   const char* url, const char* uuid,
                   const char* configDirectory,
                   const char* username, const char* password,
-                  Prompter*& prompter, jobject jtunnelcb);
+                  Prompter*& prompter, jobject jcfgcb, jobject jtunnelcb);
 
     svn_ra_session_t* m_session;
     RemoteSessionContext* m_context;

Modified: subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/RemoteSessionContext.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/RemoteSessionContext.cpp?rev=1545955&r1=1545954&r2=1545955&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/RemoteSessionContext.cpp (original)
+++ subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/RemoteSessionContext.cpp Wed Nov 27 07:53:29 2013
@@ -33,7 +33,7 @@
 RemoteSessionContext::RemoteSessionContext(
     SVN::Pool &pool, const char* configDirectory,
     const char* usernameStr, const char* passwordStr,
-    Prompter* prompter, jobject jtunnelcb)
+    Prompter* prompter, jobject jcfgcb, jobject jtunnelcb)
   : OperationContext(pool), m_raCallbacks(NULL)
 {
   setConfigDirectory(configDirectory);
@@ -44,6 +44,7 @@ RemoteSessionContext::RemoteSessionConte
     password(passwordStr);
 
   setPrompt(prompter);
+  setConfigEventHandler(jcfgcb);
   setTunnelCallback(jtunnelcb);
 
   /*

Modified: subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/RemoteSessionContext.h
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/RemoteSessionContext.h?rev=1545955&r1=1545954&r2=1545955&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/RemoteSessionContext.h (original)
+++ subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/RemoteSessionContext.h Wed Nov 27 07:53:29 2013
@@ -37,7 +37,8 @@ class RemoteSessionContext : public Oper
     RemoteSessionContext(SVN::Pool &pool,
                          const char* jconfigDirectory,
                          const char* jusername, const char* jpassword,
-                         Prompter* prompter, jobject jtunnelcb);
+                         Prompter* prompter,
+                         jobject jcfgcb, jobject jtunnelcb);
     virtual ~RemoteSessionContext();
     void activate(jobject jremoteSession, jobject jprogress);
     void * getCallbackBaton();

Modified: subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/Revision.h
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/Revision.h?rev=1545955&r1=1545954&r2=1545955&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/Revision.h (original)
+++ subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/Revision.h Wed Nov 27 07:53:29 2013
@@ -50,6 +50,7 @@ class Revision
    * Make a Revision Java object.
    */
   static jobject makeJRevision(svn_revnum_t rev);
+  static jobject makeJRevision(const svn_opt_revision_t& rev);
 };
 
 #endif // REVISION_H

Modified: subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/SVNClient.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/SVNClient.cpp?rev=1545955&r1=1545954&r2=1545955&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/SVNClient.cpp (original)
+++ subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/SVNClient.cpp Wed Nov 27 07:53:29 2013
@@ -449,12 +449,7 @@ void SVNClient::copy(CopySources &copySo
     SVN::Pool subPool(pool);
 
     apr_array_header_t *srcs = copySources.array(subPool);
-    if (srcs == NULL)
-    {
-        JNIUtil::throwNativeException(JAVA_PACKAGE "/ClientException",
-                                      "Invalid copy sources");
-        return;
-    }
+    SVN_JNI_NULL_PTR_EX(srcs, "sources", );
     SVN_JNI_NULL_PTR_EX(destPath, "destPath", );
     Path destinationPath(destPath, subPool);
     SVN_JNI_ERR(destinationPath.error_occurred(), );
@@ -1521,7 +1516,8 @@ SVNClient::openRemoteSession(const char*
         retryAttempts, path_info.url.c_str(), path_info.uuid.c_str(),
         context.getConfigDirectory(),
         context.getUsername(), context.getPassword(),
-        prompter, context.getSelf(), context.getTunnelCallback());
+        prompter, context.getSelf(),
+        context.getConfigEventHandler(), context.getTunnelCallback());
     if (JNIUtil::isJavaExceptionThrown())
       delete prompter;
 

Modified: subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp?rev=1545955&r1=1545954&r2=1545955&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp (original)
+++ subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp Wed Nov 27 07:53:29 2013
@@ -399,7 +399,7 @@ Java_org_apache_subversion_javahl_SVNCli
   if (JNIUtil::isExceptionThrown())
     return;
 
-  PropertyTable revprops(jrevpropTable);
+  PropertyTable revprops(jrevpropTable, false, false);
   if (JNIUtil::isExceptionThrown())
     return;
 
@@ -513,7 +513,7 @@ Java_org_apache_subversion_javahl_SVNCli
   if (JNIUtil::isExceptionThrown())
     return;
 
-  PropertyTable revprops(jrevpropTable);
+  PropertyTable revprops(jrevpropTable, false, false);
   if (JNIUtil::isExceptionThrown())
     return;
 
@@ -554,7 +554,7 @@ Java_org_apache_subversion_javahl_SVNCli
   if (JNIUtil::isExceptionThrown())
     return;
 
-  PropertyTable revprops(jrevpropTable);
+  PropertyTable revprops(jrevpropTable, false, false);
   if (JNIUtil::isExceptionThrown())
     return;
 
@@ -592,7 +592,7 @@ Java_org_apache_subversion_javahl_SVNCli
   if (JNIUtil::isExceptionThrown())
     return;
 
-  PropertyTable revprops(jrevpropTable);
+  PropertyTable revprops(jrevpropTable, false, false);
   if (JNIUtil::isExceptionThrown())
     return;
 
@@ -625,7 +625,7 @@ Java_org_apache_subversion_javahl_SVNCli
   if (JNIUtil::isExceptionThrown())
     return;
 
-  PropertyTable revprops(jrevpropTable);
+  PropertyTable revprops(jrevpropTable, false, false);
   if (JNIUtil::isExceptionThrown())
     return;
 
@@ -776,7 +776,7 @@ Java_org_apache_subversion_javahl_SVNCli
   if (JNIUtil::isExceptionThrown())
     return;
 
-  PropertyTable revprops(jrevpropTable);
+  PropertyTable revprops(jrevpropTable, false, false);
   if (JNIUtil::isExceptionThrown())
     return;
 
@@ -1027,7 +1027,7 @@ Java_org_apache_subversion_javahl_SVNCli
   if (JNIUtil::isExceptionThrown())
     return;
 
-  PropertyTable revprops(jrevpropTable);
+  PropertyTable revprops(jrevpropTable, false, false);
   if (JNIUtil::isExceptionThrown())
     return;
 
@@ -1666,6 +1666,36 @@ Java_org_apache_subversion_javahl_SVNCli
 }
 
 JNIEXPORT void JNICALL
+Java_org_apache_subversion_javahl_SVNClient_setConfigEventHandler(
+    JNIEnv* env, jobject jthis, jobject jcallback)
+{
+  JNIEntry(SVNClient, setConfigEventHandler);
+  SVNClient *cl = SVNClient::getCppObject(jthis);
+  if (cl == NULL)
+    {
+      JNIUtil::throwError(_("bad C++ this"));
+      return;
+    }
+
+  cl->getClientContext().setConfigEventHandler(jcallback);
+}
+
+JNIEXPORT jobject JNICALL
+Java_org_apache_subversion_javahl_SVNClient_getConfigEventHandler(
+    JNIEnv* env, jobject jthis)
+{
+  JNIEntry(SVNClient, getConfigEventHandler);
+  SVNClient *cl = SVNClient::getCppObject(jthis);
+  if (cl == NULL)
+    {
+      JNIUtil::throwError(_("bad C++ this"));
+      return NULL;
+    }
+
+  return cl->getClientContext().getConfigEventHandler();
+}
+
+JNIEXPORT void JNICALL
 Java_org_apache_subversion_javahl_SVNClient_cancelOperation
 (JNIEnv *env, jobject jthis)
 {

Modified: subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/org_apache_subversion_javahl_remote_CommitEditor.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/org_apache_subversion_javahl_remote_CommitEditor.cpp?rev=1545955&r1=1545954&r2=1545955&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/org_apache_subversion_javahl_remote_CommitEditor.cpp (original)
+++ subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/org_apache_subversion_javahl_remote_CommitEditor.cpp Wed Nov 27 07:53:29 2013
@@ -56,13 +56,15 @@ Java_org_apache_subversion_javahl_remote
 JNIEXPORT jlong JNICALL
 Java_org_apache_subversion_javahl_remote_CommitEditor_nativeCreateInstance(
     JNIEnv *env, jclass thisclass, jobject jsession, jobject jrevprops,
-    jobject jcommit_callback, jobject jlock_tokens, jboolean jkeep_locks)
+    jobject jcommit_callback, jobject jlock_tokens, jboolean jkeep_locks,
+    jobject jget_base_cb, jobject jget_props_cb, jobject jget_kind_cb)
 {
   jobject jthis = NULL;         // Placeholder -- this is a static method
   JNIEntry(CommitEditor, nativeCreateInstance);
 
-  return CommitEditor::createInstance(jsession, jrevprops, jcommit_callback,
-                                      jlock_tokens, jkeep_locks);
+  return CommitEditor::createInstance(
+      jsession, jrevprops, jcommit_callback, jlock_tokens, jkeep_locks,
+      jget_base_cb, jget_props_cb, jget_kind_cb);
 }
 
 JNIEXPORT void JNICALL

Modified: subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/org_apache_subversion_javahl_remote_RemoteFactory.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/org_apache_subversion_javahl_remote_RemoteFactory.cpp?rev=1545955&r1=1545954&r2=1545955&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/org_apache_subversion_javahl_remote_RemoteFactory.cpp (original)
+++ subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/org_apache_subversion_javahl_remote_RemoteFactory.cpp Wed Nov 27 07:53:29 2013
@@ -41,7 +41,7 @@ Java_org_apache_subversion_javahl_remote
     jstring jconfigDirectory,
     jstring jusername, jstring jpassword,
     jobject jprompter, jobject jprogress,
-    jobject jtunnelcb)
+    jobject jcfgcb, jobject jtunnelcb)
 {
   //JNI macros need jthis but this is a static call
   JNIEntryStatic(RemoteFactory, open);
@@ -51,7 +51,8 @@ Java_org_apache_subversion_javahl_remote
    */
   jobject jremoteSession = RemoteSession::open(
       jretryAttempts, jurl, juuid,
-      jconfigDirectory, jusername, jpassword, jprompter, jprogress, jtunnelcb);
+      jconfigDirectory, jusername, jpassword, jprompter, jprogress,
+      jcfgcb, jtunnelcb);
   if (JNIUtil::isJavaExceptionThrown())
     return NULL;
 

Modified: subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/org_apache_subversion_javahl_util_ConfigLib.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/org_apache_subversion_javahl_util_ConfigLib.cpp?rev=1545955&r1=1545954&r2=1545955&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/org_apache_subversion_javahl_util_ConfigLib.cpp (original)
+++ subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/org_apache_subversion_javahl_util_ConfigLib.cpp Wed Nov 27 07:53:29 2013
@@ -34,7 +34,6 @@
 
 namespace {
 bool g_ignore_native_credentials = false;
-jobject g_config_callback = NULL;
 } // anonymous callback
 
 bool GlobalConfig::useNativeCredentialsStore()
@@ -43,13 +42,6 @@ bool GlobalConfig::useNativeCredentialsS
   return !g_ignore_native_credentials;
 }
 
-jobject GlobalConfig::getConfigCallback()
-{
-  JNICriticalSection lock(*JNIUtil::g_configMutex);
-  return g_config_callback;
-}
-
-
 JNIEXPORT void JNICALL
 Java_org_apache_subversion_javahl_util_ConfigLib_enableNativeCredentialsStore(
     JNIEnv* env, jobject jthis)
@@ -70,11 +62,6 @@ Java_org_apache_subversion_javahl_util_C
   g_ignore_native_credentials = true;
 }
 
-/*
- * Class:     org_apache_subversion_javahl_util_ConfigLib
- * Method:    isNativeCredentialsStoreEnabled
- * Signature: ()Z
- */
 JNIEXPORT jboolean JNICALL
 Java_org_apache_subversion_javahl_util_ConfigLib_isNativeCredentialsStoreEnabled(
     JNIEnv* env, jobject jthis)
@@ -83,36 +70,3 @@ Java_org_apache_subversion_javahl_util_C
 
   return jboolean(GlobalConfig::useNativeCredentialsStore());
 }
-
-/*
- * Class:     org_apache_subversion_javahl_util_ConfigLib
- * Method:    setConfigEventHandler
- * Signature: (Lorg/apache/subversion/javahl/callback/ConfigEvent;)V
- */
-JNIEXPORT void JNICALL
-Java_org_apache_subversion_javahl_util_ConfigLib_setConfigEventHandler(
-    JNIEnv* env, jobject jthis, jobject jcallback)
-{
-  JNIEntry(ConfigLib, setConfigEventHandler);
-
-  JNICriticalSection lock(*JNIUtil::g_configMutex);
-  if (g_config_callback)
-    {
-      env->DeleteGlobalRef(g_config_callback);
-      g_config_callback = NULL;
-    }
-  if (jcallback)
-    {
-      g_config_callback = env->NewGlobalRef(jcallback);
-      env->DeleteLocalRef(jcallback);
-    }
-}
-
-JNIEXPORT jobject JNICALL
-Java_org_apache_subversion_javahl_util_ConfigLib_getConfigEventHandler(
-    JNIEnv* env, jobject jthis)
-{
-  JNIEntry(ConfigLib, getConfigEventHandler);
-
-  return GlobalConfig::getConfigCallback();
-}

Modified: subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/org_apache_subversion_javahl_util_TunnelChannel.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/org_apache_subversion_javahl_util_TunnelChannel.cpp?rev=1545955&r1=1545954&r2=1545955&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/org_apache_subversion_javahl_util_TunnelChannel.cpp (original)
+++ subversion/branches/fsfs-improvements/subversion/bindings/javahl/native/org_apache_subversion_javahl_util_TunnelChannel.cpp Wed Nov 27 07:53:29 2013
@@ -25,8 +25,6 @@
  *        TunnelChannel, RequestChannel and ResponseChannel
  */
 
-#include <assert.h>             // TEMPORARY until we handle weird byte arrays
-
 #include <string>
 
 #include <apr_file_io.h>
@@ -35,191 +33,142 @@
 #include "../include/org_apache_subversion_javahl_util_RequestChannel.h"
 #include "../include/org_apache_subversion_javahl_util_ResponseChannel.h"
 
-#include "JNIUtil.h"
-#include "JNIStackElement.h"
-#include "JNIByteArray.h"
+#include "jniwrapper/jni_exception.hpp"
+#include "jniwrapper/jni_channel.hpp"
+#include "jniwrapper/jni_stack.hpp"
 
 #include "svn_private_config.h"
 
 namespace {
-apr_file_t* get_file_descriptor(jlong jfd)
+apr_file_t* get_file_descriptor(Java::Env env, jlong jfd)
 {
   apr_file_t* fd = reinterpret_cast<apr_file_t*>(jfd);
   if (!fd)
-    {
-      JNIUtil::throwNullPointerException("nativeChannel");
-      return NULL;
-    }
+    Java::NullPointerException(env).raise("nativeChannel");
   return fd;
 }
 
-void throw_IOException(const char* message, apr_status_t status)
+void throw_IOException(Java::Env env, const char* message,
+                       apr_status_t status)
 {
+  char buf[1024];
   std::string msg(message);
-  if (status)
-    {
-      char buf[1024];
-      apr_strerror(status, buf, sizeof(buf) - 1);
-      msg += ": ";
-      msg += buf;
-    }
-  JNIUtil::raiseThrowable("java/io/IOException", msg.c_str());
+  apr_strerror(status, buf, sizeof(buf) - 1);
+  msg += buf;
+  Java::IOException(env).raise(msg.c_str());
 }
 
-class ByteBufferProxy
+class TunnelReader : public Java::ChannelReader
 {
 public:
-  ByteBufferProxy(jobject buf, JNIEnv* env)
-    : m_buf(buf),
-      m_direct(env->GetDirectBufferAddress(buf)),
-      m_array(m_direct ? NULL : get_array(buf, env)),
-      m_array_offset(m_array ? get_array_offset(buf, env) : 0),
-      m_offset(get_position(buf, env)),
-      m_size(get_remaining(buf, env))
+  explicit TunnelReader(Java::Env env, jlong jnative_channel)
+    : m_fd(get_file_descriptor(env, jnative_channel))
     {}
 
-  jint read(apr_file_t* fd, JNIEnv* env)
+  virtual jint operator()(Java::Env env, void* buffer, jint length)
     {
-      if (!m_size)
+      if (!length)
         return 0;
 
-      JNIByteArray arr(m_array, false, false);
-      apr_size_t bytes_read = m_size;
-      apr_status_t status = apr_file_read(
-          fd, get_base_address(arr), &bytes_read);
+      apr_size_t bytes_read = length;
+      const apr_status_t status = apr_file_read(m_fd, buffer, &bytes_read);
       if (status && !APR_STATUS_IS_EOF(status))
         {
-          throw_IOException(_("Error reading from native file handle"),
-                            status);
-          return 0;
+          throw_IOException(
+              env, _("Error reading from native file handle: "),
+              status);
+          return -1;
         }
-      update_position(bytes_read, env);
+      if (APR_STATUS_IS_EOF(status))
+        return -1;
       return jint(bytes_read);
     }
 
-  jint write(apr_file_t* fd, JNIEnv* env)
+private:
+  apr_file_t* const m_fd;
+};
+
+class TunnelWriter : public Java::ChannelWriter
+{
+public:
+  explicit TunnelWriter(Java::Env env, jlong jnative_channel)
+    : m_fd(get_file_descriptor(env, jnative_channel))
+    {}
+
+  virtual jint operator()(Java::Env env, const void* buffer, jint length)
     {
-      if (!m_size)
+      if (!length)
         return 0;
 
-      JNIByteArray arr(m_array);
       apr_size_t bytes_written;
-      apr_status_t status = apr_file_write_full(
-          fd, get_base_address(arr), m_size, &bytes_written);
+      const apr_status_t status =
+        apr_file_write_full(m_fd, buffer, length, &bytes_written);
       if (status)
         {
-          throw_IOException(_("Error writing to native file handle"),
-                            status);
-          return 0;
+          throw_IOException(
+              env, _("Error writing to native file handle: "),
+              status);
+          return -1;
         }
-      update_position(bytes_written, env);
       return jint(bytes_written);
     }
 
 private:
-  void *get_base_address(JNIByteArray& arr)
-    {
-      void* base = (m_direct ? m_direct
-                    : const_cast<signed char*>(arr.getBytes()));
-      // FIXME: We do not currently support buffers that are nether
-      // direct, nor have an accessible array.
-      assert(base != 0);
-      return static_cast<char*>(base) + m_offset + m_array_offset;
-    }
-
-  void update_position(apr_size_t amount, JNIEnv* env)
-    {
-      jmethodID mid = env->GetMethodID(
-          env->GetObjectClass(m_buf), "position", "(I)Ljava/nio/Buffer;");
-      if (mid)
-        env->CallObjectMethod(m_buf, mid, jint(amount));
-    }
-
-  static jbyteArray get_array(jobject buf, JNIEnv* env)
-    {
-      jclass cls = env->GetObjectClass(buf);
-      jmethodID mid = env->GetMethodID(cls, "hasArray", "()Z");
-      if (!mid)
-        return NULL;
-
-      jboolean has_array = env->CallBooleanMethod(buf, mid);
-      if (!has_array)
-        return NULL;
-
-      mid = env->GetMethodID(cls, "array", "()[B");
-      if (mid)
-        return jbyteArray(env->CallObjectMethod(buf, mid));
-      return NULL;
-    }
-
-  static apr_size_t get_array_offset(jobject buf, JNIEnv* env)
-    {
-      jmethodID mid = env->GetMethodID(
-          env->GetObjectClass(buf), "arrayOffset", "()I");
-      if (mid)
-        return env->CallIntMethod(buf, mid);
-      return 0;
-    }
-
-  static apr_size_t get_position(jobject buf, JNIEnv* env)
-    {
-      jmethodID mid = env->GetMethodID(
-          env->GetObjectClass(buf), "position", "()I");
-      if (mid)
-        return env->CallIntMethod(buf, mid);
-      return 0;
-    }
-
-  static apr_size_t get_remaining(jobject buf, JNIEnv* env)
-    {
-      jmethodID mid = env->GetMethodID(
-          env->GetObjectClass(buf), "remaining", "()I");
-      if (mid)
-        return env->CallIntMethod(buf, mid);
-      return 0;
-    }
-
-  jobject m_buf;
-  void *m_direct;
-  jbyteArray m_array;
-  apr_size_t m_array_offset;
-  apr_size_t m_offset;
-  apr_size_t m_size;
+  apr_file_t* const m_fd;
 };
+
 } // anonymous namespace
 
+
 JNIEXPORT void JNICALL
 Java_org_apache_subversion_javahl_util_TunnelChannel_nativeClose(
-    JNIEnv* env, jclass jclazz, jlong nativeChannel)
+    JNIEnv* jenv, jclass jclazz, jlong jnative_channel)
 {
-  JNIEntryStatic(TunnelChannel, close);
-  apr_file_t* fd = reinterpret_cast<apr_file_t*>(nativeChannel);
-  if (!fd)
-    return;
+  SVN_JAVAHL_JNI_TRY_STATIC(TunnelChannel, close)
+    {
+      const Java::Env env(jenv);
+
+      apr_file_t* const fd = get_file_descriptor(env, jnative_channel);
+      if (!fd)
+        return;
 
-  apr_status_t status = apr_file_close(fd);
-  if (status)
-    throw_IOException(_("Error closing native file handle"), status);
+      const apr_status_t status = apr_file_close(fd);
+      if (status)
+        throw_IOException(
+            env, _("Error closing native file handle: "),
+            status);
+    }
+  SVN_JAVAHL_JNI_CATCH;
 }
 
 JNIEXPORT jint JNICALL
 Java_org_apache_subversion_javahl_util_RequestChannel_nativeRead(
-    JNIEnv* env, jclass jclazz, jlong nativeChannel, jobject dst)
+    JNIEnv* jenv, jclass jclazz, jlong jnative_channel, jobject jdst_buffer)
 {
-  JNIEntryStatic(RequestChannel, read);
-  apr_file_t* fd = get_file_descriptor(nativeChannel);
-  if (fd)
-    return ByteBufferProxy(dst, env).read(fd, env);
+  SVN_JAVAHL_JNI_TRY_STATIC(RequestChannel, read)
+    {
+      const Java::Env env(jenv);
+
+      TunnelReader reader(env, jnative_channel);
+      Java::ReadableByteChannel channel(env, reader);
+      return channel.read(jdst_buffer);
+    }
+  SVN_JAVAHL_JNI_CATCH;
   return -1;
 }
 
 JNIEXPORT jint JNICALL
 Java_org_apache_subversion_javahl_util_ResponseChannel_nativeWrite(
-    JNIEnv* env, jclass jclazz, jlong nativeChannel, jobject src)
+    JNIEnv* jenv, jclass jclazz, jlong jnative_channel, jobject jsrc_buffer)
 {
-  JNIEntryStatic(ResponseChannel, write);
-  apr_file_t* fd = get_file_descriptor(nativeChannel);
-  if (fd)
-    return ByteBufferProxy(src, env).write(fd, env);
+  SVN_JAVAHL_JNI_TRY_STATIC(ResponseChannel, write)
+    {
+      const Java::Env env(jenv);
+
+      TunnelWriter writer(env, jnative_channel);
+      Java::WritableByteChannel channel(env, writer);
+      return channel.write(jsrc_buffer);
+    }
+  SVN_JAVAHL_JNI_CATCH;
   return -1;
 }

Modified: subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/ClientException.java
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/ClientException.java?rev=1545955&r1=1545954&r2=1545955&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/ClientException.java (original)
+++ subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/ClientException.java Wed Nov 27 07:53:29 2013
@@ -30,13 +30,9 @@ import java.util.List;
  */
 public class ClientException extends NativeException
 {
-    // Update the serialVersionUID when there is a incompatible change
-    // made to this class.  See any of the following, depending upon
-    // the Java release.
-    // http://java.sun.com/j2se/1.3/docs/guide/serialization/spec/version.doc7.html
-    // http://java.sun.com/j2se/1.4/pdf/serial-spec.pdf
-    // http://java.sun.com/j2se/1.5.0/docs/guide/serialization/spec/version.html#6678
-    // http://java.sun.com/javase/6/docs/platform/serialization/spec/version.html#6678
+    // Update the serialVersionUID when there is a incompatible change made to
+    // this class.  See the java documentation for when a change is incompatible.
+    // http://java.sun.com/javase/7/docs/platform/serialization/spec/version.html#6678
     private static final long serialVersionUID = 2L;
 
     /**
@@ -79,10 +75,10 @@ public class ClientException extends Nat
      * @param messageStack The whole stack of error messages
      * @since 1.9
      */
-    ClientException(String message, String source, int aprError,
-                    List<ErrorMessage> messageStack)
+    ClientException(String message, Throwable cause, String source,
+                    int aprError, List<ErrorMessage> messageStack)
     {
-        super(message, source, aprError);
+        super(message, source, cause, aprError);
         this.messageStack = messageStack;
     }
 
@@ -96,7 +92,7 @@ public class ClientException extends Nat
      */
     ClientException(String message, String source, int aprError)
     {
-        this(message, source, aprError, null);
+        this(message, null, source, aprError, null);
     }
 
     public List<ErrorMessage> getAllMessages()

Modified: subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/ClientNotifyInformation.java
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/ClientNotifyInformation.java?rev=1545955&r1=1545954&r2=1545955&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/ClientNotifyInformation.java (original)
+++ subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/ClientNotifyInformation.java Wed Nov 27 07:53:29 2013
@@ -36,16 +36,20 @@ import java.util.EventObject;
  */
 public class ClientNotifyInformation extends EventObject
 {
-    // Update the serialVersionUID when there is a incompatible change
-    // made to this class.  See any of the following, depending upon
-    // the Java release.
-    // http://java.sun.com/j2se/1.3/docs/guide/serialization/spec/version.doc7.html
-    // http://java.sun.com/j2se/1.4/pdf/serial-spec.pdf
-    // http://java.sun.com/j2se/1.5.0/docs/guide/serialization/spec/version.html#6678
-    // http://java.sun.com/javase/6/docs/platform/serialization/spec/version.html#6678
+    // Update the serialVersionUID when there is a incompatible change made to
+    // this class.  See the java documentation for when a change is incompatible.
+    // http://java.sun.com/javase/7/docs/platform/serialization/spec/version.html#6678
     private static final long serialVersionUID = 2L;
 
     /**
+     * Path, either absolute or relative to the current working
+     * directory (i.e., not relative to an anchor). <code>path</code>
+     * is <code>null</vode> when the real target is an URL that is
+     * available in {@link #url}.
+     */
+    private String path;
+
+    /**
      * The {@link Action} which triggered this event.
      */
     private Action action;
@@ -107,6 +111,12 @@ public class ClientNotifyInformation ext
     private RevisionRange mergeRange;
 
     /**
+     * Similar to {@link #path}, but when not <code>null</code>, the
+     * notification is about a UR>.
+     */
+    private String url;
+
+    /**
      * A common absolute path prefix that can be subtracted from .path.
      */
     private String pathPrefix;
@@ -147,31 +157,35 @@ public class ClientNotifyInformation ext
      * @param changelistName The name of the changelist.
      * @param mergeRange The range of the merge just beginning to occur.
      * @param pathPrefix A common path prefix.
+     * @since 1.9
      */
     public ClientNotifyInformation(String path, Action action, NodeKind kind,
                              String mimeType, Lock lock, String errMsg,
+                             List<ClientException.ErrorMessage> errMsgStack,
                              Status contentState, Status propState,
                              LockStatus lockState, long revision,
                              String changelistName, RevisionRange mergeRange,
-                             String pathPrefix, String propName,
+                             String url, String pathPrefix, String propName,
                              Map<String, String> revProps, long oldRevision,
                              long hunkOriginalStart, long hunkOriginalLength,
                              long hunkModifiedStart, long hunkModifiedLength,
                              long hunkMatchedLine, int hunkFuzz)
     {
-        super(path == null ? "" : path);
+        super(path != null ? path : (url != null ? url : ""));
+        this.path = path;
         this.action = action;
         this.kind = kind;
         this.mimeType = mimeType;
         this.lock = lock;
         this.errMsg = errMsg;
-        this.errMsgStack = null;
+        this.errMsgStack = errMsgStack;
         this.contentState = contentState;
         this.propState = propState;
         this.lockState = lockState;
         this.revision = revision;
         this.changelistName = changelistName;
         this.mergeRange = mergeRange;
+        this.url = url;
         this.pathPrefix = pathPrefix;
         this.propName = propName;
         this.revProps = revProps;
@@ -185,14 +199,12 @@ public class ClientNotifyInformation ext
     }
 
     /**
-     * This constructor will be called only by the native code.
-     *
-     * In addition to all the other parameters, sets the detailed
-     * message stack.
+     * @deprecated Constructor compatible with teh 1.8 API; uses
+     * <code>null</code> URL and errMsgStack values.
      */
-    protected ClientNotifyInformation(String path, Action action, NodeKind kind,
+    @Deprecated
+    public ClientNotifyInformation(String path, Action action, NodeKind kind,
                              String mimeType, Lock lock, String errMsg,
-                             List<ClientException.ErrorMessage> errMsgStack,
                              Status contentState, Status propState,
                              LockStatus lockState, long revision,
                              String changelistName, RevisionRange mergeRange,
@@ -202,18 +214,18 @@ public class ClientNotifyInformation ext
                              long hunkModifiedStart, long hunkModifiedLength,
                              long hunkMatchedLine, int hunkFuzz)
     {
-        this(path, action, kind, mimeType, lock, errMsg,
+        this(path, action, kind, mimeType, lock, errMsg, null,
              contentState, propState, lockState, revision,
-             changelistName, mergeRange, pathPrefix, propName,
-             revProps, oldRevision,
+             changelistName, mergeRange, null, pathPrefix,
+             propName, revProps, oldRevision,
              hunkOriginalStart, hunkOriginalLength,
              hunkModifiedStart, hunkModifiedLength,
              hunkMatchedLine, hunkFuzz);
-        this.errMsgStack = errMsgStack;
     }
 
     /**
      * @return The path of the item, which is the source of the event.
+     *         This may actually be a URL.
      */
     public String getPath()
     {
@@ -221,6 +233,15 @@ public class ClientNotifyInformation ext
     }
 
     /**
+     * @return {@link #path}, which may be <code>null</code>.
+     * @since 1.9
+     */
+    public String getNotifiedPath()
+    {
+        return this.path;
+    }
+
+    /**
      * @return The {@link Action} which triggered this event.
      */
     public Action getAction()
@@ -317,6 +338,15 @@ public class ClientNotifyInformation ext
     }
 
     /**
+     * @return {@link #url}, which may be <code>null</code>
+     * @since 1.9
+     */
+    public String getUrl()
+    {
+        return this.url;
+    }
+
+    /**
      * @return The common absolute path prefix.
      */
     public String getPathPrefix()

Modified: subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/CommitInfo.java
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/CommitInfo.java?rev=1545955&r1=1545954&r2=1545955&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/CommitInfo.java (original)
+++ subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/CommitInfo.java Wed Nov 27 07:53:29 2013
@@ -32,13 +32,9 @@ import org.apache.subversion.javahl.type
  */
 public class CommitInfo implements java.io.Serializable
 {
-    // Update the serialVersionUID when there is a incompatible change
-    // made to this class.  See any of the following, depending upon
-    // the Java release.
-    // http://java.sun.com/j2se/1.3/docs/guide/serialization/spec/version.doc7.html
-    // http://java.sun.com/j2se/1.4/pdf/serial-spec.pdf
-    // http://java.sun.com/j2se/1.5.0/docs/guide/serialization/spec/version.html#6678
-    // http://java.sun.com/javase/6/docs/platform/serialization/spec/version.html#6678
+    // Update the serialVersionUID when there is a incompatible change made to
+    // this class.  See the java documentation for when a change is incompatible.
+    // http://java.sun.com/javase/7/docs/platform/serialization/spec/version.html#6678
     private static final long serialVersionUID = 1L;
 
     /** the revision committed */

Modified: subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/CommitItem.java
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/CommitItem.java?rev=1545955&r1=1545954&r2=1545955&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/CommitItem.java (original)
+++ subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/CommitItem.java Wed Nov 27 07:53:29 2013
@@ -30,13 +30,9 @@ import org.apache.subversion.javahl.type
  */
 public class CommitItem implements java.io.Serializable
 {
-    // Update the serialVersionUID when there is a incompatible change
-    // made to this class.  See any of the following, depending upon
-    // the Java release.
-    // http://java.sun.com/j2se/1.3/docs/guide/serialization/spec/version.doc7.html
-    // http://java.sun.com/j2se/1.4/pdf/serial-spec.pdf
-    // http://java.sun.com/j2se/1.5.0/docs/guide/serialization/spec/version.html#6678
-    // http://java.sun.com/javase/6/docs/platform/serialization/spec/version.html#6678
+    // Update the serialVersionUID when there is a incompatible change made to
+    // this class.  See the java documentation for when a change is incompatible.
+    // http://java.sun.com/javase/7/docs/platform/serialization/spec/version.html#6678
     private static final long serialVersionUID = 1L;
 
     /**

Modified: subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/DiffSummary.java
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/DiffSummary.java?rev=1545955&r1=1545954&r2=1545955&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/DiffSummary.java (original)
+++ subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/DiffSummary.java Wed Nov 27 07:53:29 2013
@@ -33,13 +33,9 @@ import org.apache.subversion.javahl.type
  */
 public class DiffSummary extends EventObject
 {
-    // Update the serialVersionUID when there is a incompatible change
-    // made to this class.  See any of the following, depending upon
-    // the Java release.
-    // http://java.sun.com/j2se/1.3/docs/guide/serialization/spec/version.doc7.html
-    // http://java.sun.com/j2se/1.4/pdf/serial-spec.pdf
-    // http://java.sun.com/j2se/1.5.0/docs/guide/serialization/spec/version.html#6678
-    // http://java.sun.com/javase/6/docs/platform/serialization/spec/version.html#6678
+    // Update the serialVersionUID when there is a incompatible change made to
+    // this class.  See the java documentation for when a change is incompatible.
+    // http://java.sun.com/javase/7/docs/platform/serialization/spec/version.html#6678
     private static final long serialVersionUID = 1L;
 
     private DiffKind diffKind;

Modified: subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java?rev=1545955&r1=1545954&r2=1545955&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java (original)
+++ subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java Wed Nov 27 07:53:29 2013
@@ -51,6 +51,11 @@ public interface ISVNClient
     public Version getVersion();
 
     /**
+     * @return Runtime version information about the loaded libsvn_client.
+     */
+    public RuntimeVersion getRuntimeVersion();
+
+    /**
      * @return Extended version information about the underlying
      * native libraries and operating system.
      */
@@ -314,6 +319,7 @@ public interface ISVNClient
      * @param handler   the commit message callback, may be <code>null</code>
      *                  if <code>destPath</code> is not a URL
      * @throws ClientException If the copy operation fails.
+     * @throws NullPointerException if the <code>sources</code> list is empty.
      */
     void copy(List<CopySource> sources, String destPath,
               boolean copyAsChild, boolean makeParents,
@@ -353,6 +359,7 @@ public interface ISVNClient
      * @deprecated Provided for backward compatibility with 1.7. Passes
      *             metadataOnly false and allowMixRev true.
      */
+    @Deprecated
     void move(Set<String> srcPaths, String destPath, boolean force,
               boolean moveAsChild, boolean makeParents,
               Map<String, String> revpropTable,
@@ -596,7 +603,7 @@ public interface ISVNClient
      * Merge set of revisions into a new local path.
      * <p>
      * <b>Note:</b> Behaves like the 1.8 version where ignoreAncestry
-     * maps to both ignoreMergeinfo and diffIgnoreAncestry
+     * maps to both ignoreMergeinfo and diffIgnoreAncestry.
      *
      * @param path          path or url
      * @param pegRevision   revision to interpret path
@@ -633,6 +640,7 @@ public interface ISVNClient
      * @throws ClientException
      * @deprecated Will be removed in a future release
      */
+    @Deprecated
     void mergeReintegrate(String path, Revision pegRevision,
                           String localPath, boolean dryRun)
              throws ClientException;
@@ -655,7 +663,7 @@ public interface ISVNClient
      * @param pegRevision            peg rev for pathOrUrl
      * @param mergeSourceUrl         the source of the merge
      * @param srcPegRevision         peg rev for mergeSourceUrl
-     * @param srcStartRevieion       lower bound of the source revision range
+     * @param srcStartRevision       lower bound of the source revision range
      * @param srcEndRevision         upper bound of the source revision range
      * @param discoverChangedPaths   return paths of changed items
      * @param depth                  the depth to recurse to
@@ -702,7 +710,7 @@ public interface ISVNClient
      * @param target2       second path or url
      * @param revision2     second revision
      * @param relativeToDir index path is relative to this path
-     * @param outFileName   file name where difference are written
+     * @param outStream     the stream to which difference are written
      * @param depth         how deep to traverse into subdirectories
      * @param ignoreAncestry ignore if files are not related
      * @param noDiffDeleted no output on deleted files
@@ -723,6 +731,26 @@ public interface ISVNClient
               DiffOptions options)
             throws ClientException;
 
+    /**
+     * Display the differences between two paths
+     * @param target1       first path or url
+     * @param revision1     first revision
+     * @param target2       second path or url
+     * @param revision2     second revision
+     * @param relativeToDir index path is relative to this path
+     * @param outFileName   file name where difference are written
+     * @param depth         how deep to traverse into subdirectories
+     * @param ignoreAncestry ignore if files are not related
+     * @param noDiffDeleted no output on deleted files
+     * @param force         diff even on binary files
+     * @param copiesAsAdds  if set, copied files will be shown in their
+     *                      entirety, not as diffs from their sources
+     * @param ignoreProps   don't show property diffs
+     * @param propsOnly     show property changes only
+     * @param options       additional options for controlling the output
+     * @throws ClientException
+     * @since 1.8
+     */
     void diff(String target1, Revision revision1, String target2,
               Revision revision2, String relativeToDir, String outFileName,
               Depth depth, Collection<String> changelists,
@@ -738,7 +766,7 @@ public interface ISVNClient
      * @param target2       second path or url
      * @param revision2     second revision
      * @param relativeToDir index path is relative to this path
-     * @param outFileName   file name where difference are written
+     * @param outStream     the stream to which difference are written
      * @param depth         how deep to traverse into subdirectories
      * @param ignoreAncestry ignore if files are not related
      * @param noDiffDeleted no output on deleted files
@@ -756,6 +784,24 @@ public interface ISVNClient
               boolean copiesAsAdds, boolean ignoreProps, boolean propsOnly)
             throws ClientException;
 
+    /**
+     * Display the differences between two paths
+     * @param target1       first path or url
+     * @param revision1     first revision
+     * @param target2       second path or url
+     * @param revision2     second revision
+     * @param relativeToDir index path is relative to this path
+     * @param outFileName   file name where difference are written
+     * @param depth         how deep to traverse into subdirectories
+     * @param ignoreAncestry ignore if files are not related
+     * @param noDiffDeleted no output on deleted files
+     * @param force         diff even on binary files
+     * @param copiesAsAdds  if set, copied files will be shown in their
+     *                      entirety, not as diffs from their sources
+     * @param ignoreProps   don't show property diffs
+     * @param propsOnly     show property changes only
+     * @throws ClientException
+     */
     void diff(String target1, Revision revision1, String target2,
               Revision revision2, String relativeToDir, String outFileName,
               Depth depth, Collection<String> changelists,
@@ -770,7 +816,7 @@ public interface ISVNClient
      * @param startRevision first Revision to compare
      * @param endRevision   second Revision to compare
      * @param relativeToDir index path is relative to this path
-     * @param outFileName   file name where difference are written
+     * @param outStream     the stream to which difference are written
      * @param depth         how deep to traverse into subdirectories
      * @param changelists  if non-null, filter paths using changelists
      * @param ignoreAncestry ignore if files are not related
@@ -792,6 +838,27 @@ public interface ISVNClient
               DiffOptions options)
             throws ClientException;
 
+    /**
+     * Display the differences between two paths.
+     * @param target        path or url
+     * @param pegRevision   revision tointerpret target
+     * @param startRevision first Revision to compare
+     * @param endRevision   second Revision to compare
+     * @param relativeToDir index path is relative to this path
+     * @param outFileName   file name where difference are written
+     * @param depth         how deep to traverse into subdirectories
+     * @param changelists  if non-null, filter paths using changelists
+     * @param ignoreAncestry ignore if files are not related
+     * @param noDiffDeleted no output on deleted files
+     * @param force         diff even on binary files
+     * @param copiesAsAdds  if set, copied files will be shown in their
+     *                      entirety, not as diffs from their sources
+     * @param ignoreProps   don't show property diffs
+     * @param propsOnly     show property changes only
+     * @param options       additional options for controlling the output
+     * @throws ClientException
+     * @since 1.8
+     */
     void diff(String target, Revision pegRevision, Revision startRevision,
               Revision endRevision, String relativeToDir, String outFileName,
               Depth depth, Collection<String> changelists,
@@ -807,7 +874,7 @@ public interface ISVNClient
      * @param startRevision first Revision to compare
      * @param endRevision   second Revision to compare
      * @param relativeToDir index path is relative to this path
-     * @param outFileName   file name where difference are written
+     * @param outStream     the stream to which difference are written
      * @param depth         how deep to traverse into subdirectories
      * @param changelists  if non-null, filter paths using changelists
      * @param ignoreAncestry ignore if files are not related
@@ -827,6 +894,25 @@ public interface ISVNClient
               boolean copiesAsAdds, boolean ignoreProps, boolean propsOnly)
             throws ClientException;
 
+    /**
+     * Display the differences between two paths.
+     * @param target        path or url
+     * @param pegRevision   revision tointerpret target
+     * @param startRevision first Revision to compare
+     * @param endRevision   second Revision to compare
+     * @param relativeToDir index path is relative to this path
+     * @param outFileName   file name where difference are written
+     * @param depth         how deep to traverse into subdirectories
+     * @param changelists  if non-null, filter paths using changelists
+     * @param ignoreAncestry ignore if files are not related
+     * @param noDiffDeleted no output on deleted files
+     * @param force         diff even on binary files
+     * @param copiesAsAdds  if set, copied files will be shown in their
+     *                      entirety, not as diffs from their sources
+     * @param ignoreProps   don't show property diffs
+     * @param propsOnly     show property changes only
+     * @throws ClientException
+     */
     void diff(String target, Revision pegRevision, Revision startRevision,
               Revision endRevision, String relativeToDir, String outFileName,
               Depth depth, Collection<String> changelists,
@@ -866,7 +952,7 @@ public interface ISVNClient
      *
      * @param target Path or URL.
      * @param pegRevision Revision at which to interpret
-     * <code>target</code>.  If {@link Revision.Kind#unspecified} or
+     * <code>target</code>.  If {@link Revision#UNSPECIFIED} or
      * <code>null</code>, behave identically to {@link
      * #diffSummarize(String, Revision, String, Revision, Depth,
      * Collection, boolean, DiffSummaryCallback)}, using
@@ -931,14 +1017,11 @@ public interface ISVNClient
      *
      * @param paths   paths of the items
      * @param name    name of the property
-     * @param value   new value of the property. Set value to <code>
-     * null</code> to delete a property
+     * @param value   new value of the property. Set value to
+     * <code>null</code> to delete a property
      * @param depth   the depth to recurse into subdirectories
      * @param changelists changelists to filter by
      * @param force   do not check if the value is valid
-     * @param revpropTable A string-to-string mapping of revision properties
-     *                     to values which will be set if this operation
-     *                     results in a commit.
      * @throws ClientException
      */
     void propertySetLocal(Set<String> paths, String name, byte[] value,
@@ -946,6 +1029,21 @@ public interface ISVNClient
                           boolean force)
             throws ClientException;
 
+    /**
+     * Sets one property of an item with a String value
+     *
+     * @param paths   paths of the items
+     * @param name    name of the property
+     * @param value   new value of the property. Set value to <code>
+     * null</code> to delete a property
+     * @param depth   the depth to recurse into subdirectories
+     * @param changelists changelists to filter by
+     * @param force   do not check if the value is valid
+     * @param revpropTable A string-to-string mapping of revision properties
+     *                     to values which will be set if this operation
+     *                     results in a commit.
+     * @throws ClientException
+     */
     void propertySetRemote(String path, long baseRev, String name,
                            byte[] value, CommitMessageCallback handler,
                            boolean force, Map<String, String> revpropTable,
@@ -1082,6 +1180,19 @@ public interface ISVNClient
     String getConfigDirectory() throws ClientException;
 
     /**
+     * Set an event handler that will be called every time the
+     * configuration is loaded by this client object.
+     */
+    void setConfigEventHandler(ConfigEvent configHandler)
+            throws ClientException;
+
+    /**
+     * Return a reference to the installed configuration event
+     * handler. The returned value may be <code>null</code>.
+     */
+    ConfigEvent getConfigEventHandler() throws ClientException;
+
+    /**
      * cancel the active operation
      * @throws ClientException
      */
@@ -1179,7 +1290,7 @@ public interface ISVNClient
      */
     void info2(String pathOrUrl,
                Revision revision, Revision pegRevision, Depth depth,
-               boolean fertchExcluded, boolean fetchActualOnly,
+               boolean fetchExcluded, boolean fetchActualOnly,
                Collection<String> changelists, InfoCallback callback)
         throws ClientException;
 

Modified: subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNConfig.java
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNConfig.java?rev=1545955&r1=1545954&r2=1545955&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNConfig.java (original)
+++ subversion/branches/fsfs-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNConfig.java Wed Nov 27 07:53:29 2013
@@ -132,7 +132,7 @@ public interface ISVNConfig
     /**
      * Interface for reading and modifying configuration
      * categories. Returned by {@link #config()} and
-     * {@link servers()}.
+     * {@link #servers()}.
      */
     public interface Category
     {
@@ -160,7 +160,7 @@ public interface ISVNConfig
 
         /**
          * Returns the long integer value of a configuration option.
-         * @see #get(String,String,Boolean)
+         * @see #get(String,String,boolean)
          */
         long get(String section,
                  String option,
@@ -169,8 +169,8 @@ public interface ISVNConfig
 
         /**
          * Returns the {@link Tristate} value of a configuration option.
-         * @param unknown The value used for {@link Tristate.Unknown}.
-         * @see #get(String,String,Boolean)
+         * @param unknown The value used for {@link Tristate#Unknown}.
+         * @see #get(String,String,boolean)
          */
         Tristate get(String section,
                      String option,
@@ -181,7 +181,7 @@ public interface ISVNConfig
         /**
          * Check that the configuration option's value is true, false
          * or "ask". The boolean representations are the same as those
-         * understood by {@link #get(String,String,Boolean)}. If the
+         * understood by {@link #get(String,String,boolean)}. If the
          * option is not found, the default value will be parsed
          * instead.
          * @return {@link ISVNConfig#TRUE}, {@link ISVNConfig#FALSE}
@@ -207,7 +207,7 @@ public interface ISVNConfig
 
         /**
          * Set the value of a configuration option to represent a boolean.
-         * @see @set(String,String,String)
+         * @see #set(String,String,String)
          */
         void set(String section,
                  String option,
@@ -215,7 +215,7 @@ public interface ISVNConfig
 
         /**
          * Set the value of a configuration option to represent a long integer.
-         * @see @set(String,String,String)
+         * @see #set(String,String,String)
          */
         void set(String section,
                  String option,