subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From i...@apache.org
Subject svn commit: r1606666 [1/2] - in /subversion/branches/remove-log-addressing: ./ subversion/bindings/javahl/native/ subversion/bindings/javahl/native/jniwrapper/ subversion/bindings/javahl/src/org/apache/subversion/javahl/types/ subversion/bindings/javah...
Date Mon, 30 Jun 2014 10:15:08 GMT
Author: ivan
Date: Mon Jun 30 10:15:06 2014
New Revision: 1606666

URL: http://svn.apache.org/r1606666
Log:
On remove-log-addressing branch: Merge changes from trunk.

Modified:
    subversion/branches/remove-log-addressing/   (props changed)
    subversion/branches/remove-log-addressing/Makefile.in
    subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/AuthnCallback.cpp
    subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/AuthnCallback.hpp
    subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/Credential.cpp
    subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/Credential.hpp
    subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/EditorCallbacks.hpp
    subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/ExternalItem.cpp
    subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/Prompter.cpp
    subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/RemoteSession.cpp
    subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/RemoteSessionContext.cpp
    subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/SubversionException.hpp
    subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/jniwrapper/jni_base.cpp
    subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/jniwrapper/jni_channel.cpp
    subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/jniwrapper/jni_channel.hpp
    subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/jniwrapper/jni_class_cache.cpp
    subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/jniwrapper/jni_io_stream.hpp
    subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/jniwrapper/jni_list.cpp
    subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/jniwrapper/jni_list.hpp
    subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/jniwrapper/jni_object.hpp
    subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/jniwrapper/jni_string_map.cpp
    subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/jniwrapper/jni_string_map.hpp
    subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/org_apache_subversion_javahl_util_ConfigImpl_Category.cpp
    subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/org_apache_subversion_javahl_util_ConfigLib.cpp
    subversion/branches/remove-log-addressing/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/ExternalItem.java
    subversion/branches/remove-log-addressing/subversion/bindings/javahl/tests/org/tigris/subversion/javahl/BasicTests.java
    subversion/branches/remove-log-addressing/subversion/include/private/svn_subr_private.h
    subversion/branches/remove-log-addressing/subversion/libsvn_client/diff.c
    subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/cached_data.c
    subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/fs_fs.c
    subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/hotcopy.c
    subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/recovery.c
    subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/rev_file.c
    subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/rev_file.h
    subversion/branches/remove-log-addressing/subversion/libsvn_ra_serf/options.c
    subversion/branches/remove-log-addressing/subversion/libsvn_wc/diff_editor.c
    subversion/branches/remove-log-addressing/subversion/mod_dav_svn/version.c
    subversion/branches/remove-log-addressing/subversion/svn/cl.h
    subversion/branches/remove-log-addressing/subversion/svn/notify.c
    subversion/branches/remove-log-addressing/subversion/svn/svn.c
    subversion/branches/remove-log-addressing/subversion/tests/cmdline/basic_tests.py
    subversion/branches/remove-log-addressing/subversion/tests/cmdline/blame_tests.py
    subversion/branches/remove-log-addressing/subversion/tests/cmdline/copy_tests.py
    subversion/branches/remove-log-addressing/subversion/tests/cmdline/diff_tests.py
    subversion/branches/remove-log-addressing/subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout
    subversion/branches/remove-log-addressing/subversion/tests/cmdline/merge_reintegrate_tests.py
    subversion/branches/remove-log-addressing/subversion/tests/cmdline/merge_tests.py
    subversion/branches/remove-log-addressing/subversion/tests/cmdline/stat_tests.py
    subversion/branches/remove-log-addressing/subversion/tests/cmdline/svnadmin_tests.py
    subversion/branches/remove-log-addressing/subversion/tests/cmdline/svnrdump_tests.py
    subversion/branches/remove-log-addressing/subversion/tests/cmdline/switch_tests.py
    subversion/branches/remove-log-addressing/subversion/tests/cmdline/update_tests.py
    subversion/branches/remove-log-addressing/subversion/tests/libsvn_fs/locks-test.c
    subversion/branches/remove-log-addressing/tools/dist/backport.pl
    subversion/branches/remove-log-addressing/tools/server-side/svnfsfs/stats-cmd.c
    subversion/branches/remove-log-addressing/win-tests.py

Propchange: subversion/branches/remove-log-addressing/
------------------------------------------------------------------------------
  Merged /subversion/trunk:r1605442-1606650

Modified: subversion/branches/remove-log-addressing/Makefile.in
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/Makefile.in?rev=1606666&r1=1606665&r2=1606666&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/Makefile.in (original)
+++ subversion/branches/remove-log-addressing/Makefile.in Mon Jun 30 10:15:06 2014
@@ -497,17 +497,17 @@ clean-javahl:
 check-tigris-javahl: javahl-compat
 	@FIX_JAVAHL_LIB@
 	$(TEST_SHLIB_VAR_JAVAHL) \
-	$(JAVA) "-Dtest.rootdir=$(javahl_test_rootdir)" "-Dtest.srcdir=$(javahl_test_srcdir)" "-Dtest.rooturl=$(BASE_URL)" "-Dtest.fstype=$(FS_TYPE)" "-Djava.library.path=@JAVAHL_OBJDIR@:$(libdir)" -classpath "$(javahl_compat_tests_PATH):$(javahl_tests_CLASSPATH)" "-Dtest.tests=$(JAVAHL_TESTS)" org.tigris.subversion.javahl.RunTests
+	$(JAVA) -Xcheck:jni "-Dtest.rootdir=$(javahl_test_rootdir)" "-Dtest.srcdir=$(javahl_test_srcdir)" "-Dtest.rooturl=$(BASE_URL)" "-Dtest.fstype=$(FS_TYPE)" "-Djava.library.path=@JAVAHL_OBJDIR@:$(libdir)" -classpath "$(javahl_compat_tests_PATH):$(javahl_tests_CLASSPATH)" "-Dtest.tests=$(JAVAHL_TESTS)" org.tigris.subversion.javahl.RunTests
 
 check-apache-javahl: javahl
 	@FIX_JAVAHL_LIB@
 	$(TEST_SHLIB_VAR_JAVAHL) \
-	$(JAVA) "-Dtest.rootdir=$(javahl_test_rootdir)" "-Dtest.srcdir=$(javahl_test_srcdir)" "-Dtest.rooturl=$(BASE_URL)" "-Dtest.fstype=$(FS_TYPE)" "-Djava.library.path=@JAVAHL_OBJDIR@:$(libdir)" -classpath "$(javahl_tests_PATH):$(javahl_tests_CLASSPATH)" "-Dtest.tests=$(JAVAHL_TESTS)" org.apache.subversion.javahl.RunTests
+	$(JAVA) -Xcheck:jni "-Dtest.rootdir=$(javahl_test_rootdir)" "-Dtest.srcdir=$(javahl_test_srcdir)" "-Dtest.rooturl=$(BASE_URL)" "-Dtest.fstype=$(FS_TYPE)" "-Djava.library.path=@JAVAHL_OBJDIR@:$(libdir)" -classpath "$(javahl_tests_PATH):$(javahl_tests_CLASSPATH)" "-Dtest.tests=$(JAVAHL_TESTS)" org.apache.subversion.javahl.RunTests
 
 check-deprecated-authn-javahl: javahl
 	@FIX_JAVAHL_LIB@
 	$(TEST_SHLIB_VAR_JAVAHL) \
-	$(JAVA) "-Dtest.rootdir=$(javahl_test_rootdir)" "-Dtest.srcdir=$(javahl_test_srcdir)" "-Dtest.rooturl=$(BASE_URL)" "-Dtest.fstype=$(FS_TYPE)" "-Djava.library.path=@JAVAHL_OBJDIR@:$(libdir)" -classpath "$(javahl_tests_PATH):$(javahl_tests_CLASSPATH)" "-Dtest.tests=$(JAVAHL_TESTS)" "-Dtest.authn.deprecated=true" org.apache.subversion.javahl.RunTests
+	$(JAVA) -Xcheck:jni "-Dtest.rootdir=$(javahl_test_rootdir)" "-Dtest.srcdir=$(javahl_test_srcdir)" "-Dtest.rooturl=$(BASE_URL)" "-Dtest.fstype=$(FS_TYPE)" "-Djava.library.path=@JAVAHL_OBJDIR@:$(libdir)" -classpath "$(javahl_tests_PATH):$(javahl_tests_CLASSPATH)" "-Dtest.tests=$(JAVAHL_TESTS)" "-Dtest.authn.deprecated=true" org.apache.subversion.javahl.RunTests
 
 check-javahl: check-apache-javahl
 

Modified: subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/AuthnCallback.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/AuthnCallback.cpp?rev=1606666&r1=1606665&r2=1606666&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/AuthnCallback.cpp (original)
+++ subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/AuthnCallback.cpp Mon Jun 30 10:15:06 2014
@@ -161,7 +161,7 @@ AuthnCallback::SSLServerCertFailures::Cl
 AuthnCallback::SSLServerCertFailures::SSLServerCertFailures(
     ::Java::Env env, jint failures)
   : ::Java::Object(env,
-                   ::Java::ClassCache::get_authn_ssl_server_cert_failures())
+                   ::Java::ClassCache::get_authn_ssl_server_cert_failures(env))
 {
   set_this(env.NewObject(get_class(), impl().m_mid_ctor, failures));
 }
@@ -194,7 +194,7 @@ AuthnCallback::SSLServerCertInfo::SSLSer
     const ::Java::String& issuer,
     const ::Java::String& der)
   : ::Java::Object(env,
-                   ::Java::ClassCache::get_authn_ssl_server_cert_info())
+                   ::Java::ClassCache::get_authn_ssl_server_cert_info(env))
 {
   set_this(env.NewObject(get_class(), impl().m_mid_ctor,
                          hostname.get(), fingerprint.get(),

Modified: subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/AuthnCallback.hpp
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/AuthnCallback.hpp?rev=1606666&r1=1606665&r2=1606666&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/AuthnCallback.hpp (original)
+++ subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/AuthnCallback.hpp Mon Jun 30 10:15:06 2014
@@ -52,7 +52,7 @@ public:
      * The constructor does not verify the class of the wrapped object.
      */
     explicit AuthnResult(::Java::Env env, jobject jthis)
-      : ::Java::Object(env, ::Java::ClassCache::get_authn_result(), jthis)
+      : ::Java::Object(env, ::Java::ClassCache::get_authn_result(env), jthis)
       {}
 
     bool save() const
@@ -193,7 +193,7 @@ public:
    * The constructor does not verify the class of the wrapped object.
    */
   explicit AuthnCallback(::Java::Env env, jobject jthis)
-    : ::Java::Object(env, ::Java::ClassCache::get_authn_cb(), jthis)
+    : ::Java::Object(env, ::Java::ClassCache::get_authn_cb(env), jthis)
     {}
 
   /**
@@ -285,7 +285,7 @@ public:
    * The constructor does not verify the class of the wrapped object.
    */
   explicit UserPasswordCallback(::Java::Env env, jobject jthis)
-    : ::Java::Object(env, ::Java::ClassCache::get_user_passwd_cb(), jthis)
+    : ::Java::Object(env, ::Java::ClassCache::get_user_passwd_cb(env), jthis)
     {}
 
   /**

Modified: subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/Credential.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/Credential.cpp?rev=1606666&r1=1606665&r2=1606666&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/Credential.cpp (original)
+++ subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/Credential.cpp Mon Jun 30 10:15:06 2014
@@ -52,7 +52,7 @@ Credential::Credential(::Java::Env env, 
                        const ::Java::String& password,
                        jobject info, jobject failures,
                        const ::Java::String& passphrase)
-  : ::Java::Object(env, ::Java::ClassCache::get_credential())
+  : ::Java::Object(env, ::Java::ClassCache::get_credential(env))
 {
   set_this(env.NewObject(get_class(), impl().m_mid_ctor,
                          kind, realm.get(), store.get(),
@@ -76,7 +76,7 @@ Credential::Kind::ClassImpl::~ClassImpl(
 
 Credential::Kind::Kind(::Java::Env env,
                        const ::Java::String& value)
-  : ::Java::Object(env, ::Java::ClassCache::get_credential_kind())
+  : ::Java::Object(env, ::Java::ClassCache::get_credential_kind(env))
 {
   set_this(env.CallStaticObjectMethod(
                get_class(), impl().m_static_mid_from_string, value.get()));

Modified: subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/Credential.hpp
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/Credential.hpp?rev=1606666&r1=1606665&r2=1606666&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/Credential.hpp (original)
+++ subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/Credential.hpp Mon Jun 30 10:15:06 2014
@@ -81,7 +81,7 @@ public:
    * The constructor does not verify the class of the wrapped object.
    */
   explicit Credential(::Java::Env env, jobject jthis)
-    : ::Java::Object(env, ::Java::ClassCache::get_credential(), jthis)
+    : ::Java::Object(env, ::Java::ClassCache::get_credential(env), jthis)
     {}
 
   /**

Modified: subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/EditorCallbacks.hpp
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/EditorCallbacks.hpp?rev=1606666&r1=1606665&r2=1606666&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/EditorCallbacks.hpp (original)
+++ subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/EditorCallbacks.hpp Mon Jun 30 10:15:06 2014
@@ -47,7 +47,7 @@ public:
    */
   explicit ProvideBaseCallback(::Java::Env env, jobject jthis)
     : ::Java::Object(env,
-                     ::Java::ClassCache::get_editor_provide_base_cb(),
+                     ::Java::ClassCache::get_editor_provide_base_cb(env),
                      jthis)
     {}
 
@@ -69,7 +69,7 @@ public:
      */
     explicit ReturnValue(::Java::Env env, jobject jthis)
       : Java::Object(env,
-                     ::Java::ClassCache::get_editor_provide_base_cb_ret(),
+                     ::Java::ClassCache::get_editor_provide_base_cb_ret(env),
                      jthis)
       {}
 
@@ -167,7 +167,7 @@ public:
    */
   explicit ProvidePropsCallback(::Java::Env env, jobject jthis)
     : ::Java::Object(env,
-                     ::Java::ClassCache::get_editor_provide_props_cb(),
+                     ::Java::ClassCache::get_editor_provide_props_cb(env),
                      jthis)
     {}
 
@@ -188,7 +188,7 @@ public:
      */
     explicit ReturnValue(::Java::Env env, jobject jthis)
       : Java::Object(env,
-                     ::Java::ClassCache::get_editor_provide_props_cb_ret(),
+                     ::Java::ClassCache::get_editor_provide_props_cb_ret(env),
                      jthis)
       {}
 
@@ -284,7 +284,7 @@ public:
    */
   explicit GetNodeKindCallback(::Java::Env env, jobject jthis)
     : ::Java::Object(env,
-                     ::Java::ClassCache::get_editor_get_kind_cb(),
+                     ::Java::ClassCache::get_editor_get_kind_cb(env),
                      jthis)
     {}
 

Modified: subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/ExternalItem.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/ExternalItem.cpp?rev=1606666&r1=1606665&r2=1606666&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/ExternalItem.cpp (original)
+++ subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/ExternalItem.cpp Mon Jun 30 10:15:06 2014
@@ -82,7 +82,7 @@ make_external_item(::Java::Env env,
 } // anonymous namespace
 
 ExternalItem::ExternalItem(::Java::Env env, jobject jthis)
-  : Object(env, ::Java::ClassCache::get_external_item(), jthis),
+  : Object(env, ::Java::ClassCache::get_external_item(env), jthis),
     m_target_dir(env, get_string_field(env, jthis, impl().m_fid_target_dir)),
     m_url(env, get_string_field(env, jthis, impl().m_fid_url)),
     m_revision(get_revision_field(env, jthis, impl().m_fid_revision)),
@@ -94,7 +94,7 @@ ExternalItem::ExternalItem(::Java::Env e
                            const char* url,
                            const svn_opt_revision_t* revision,
                            const svn_opt_revision_t* peg_revision)
-  : Object(env, ::Java::ClassCache::get_external_item()),
+  : Object(env, ::Java::ClassCache::get_external_item(env)),
     m_target_dir(env, target_dir),
     m_url(env, url),
     m_revision(*revision),

Modified: subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/Prompter.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/Prompter.cpp?rev=1606666&r1=1606665&r2=1606666&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/Prompter.cpp (original)
+++ subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/Prompter.cpp Mon Jun 30 10:15:06 2014
@@ -51,7 +51,7 @@ Prompter::UniquePtr Prompter::create(job
   const ::Java::Env jenv;
   try
     {
-      const jclass cls = ::Java::ClassCache::get_authn_cb()->get_class();
+      const jclass cls = ::Java::ClassCache::get_authn_cb(jenv)->get_class();
       if (!jenv.IsInstanceOf(jprompter, cls))
         return UniquePtr(NULL);
 
@@ -445,7 +445,8 @@ Prompter::UniquePtr CompatPrompter::crea
   const ::Java::Env jenv;
   try
     {
-      const jclass cls = ::Java::ClassCache::get_user_passwd_cb()->get_class();
+      const jclass cls =
+        ::Java::ClassCache::get_user_passwd_cb(jenv)->get_class();
       if (!jenv.IsInstanceOf(jprompter, cls))
         return UniquePtr(NULL);
 

Modified: subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/RemoteSession.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/RemoteSession.cpp?rev=1606666&r1=1606665&r2=1606666&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/RemoteSession.cpp (original)
+++ subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/RemoteSession.cpp Mon Jun 30 10:15:06 2014
@@ -73,35 +73,28 @@ RemoteSession::open(jint jretryAttempts,
 {
   SVN_ERR_ASSERT_NO_RETURN(!jprompter != !jdeprecatedPrompter);
 
-  JNIEnv *env = JNIUtil::getEnv();
-
   SVN::Pool requestPool;
   URL url(jurl, requestPool);
   if (JNIUtil::isExceptionThrown())
     return NULL;
   SVN_JNI_ERR(url.error_occurred(), NULL);
-  env->DeleteLocalRef(jurl);
 
   JNIStringHolder uuid(juuid);
   if (JNIUtil::isExceptionThrown())
     return NULL;
-  env->DeleteLocalRef(juuid);
 
   Path configDirectory(jconfigDirectory, requestPool);
   if (JNIUtil::isExceptionThrown())
     return NULL;
   SVN_JNI_ERR(configDirectory.error_occurred(), NULL);
-  env->DeleteLocalRef(jconfigDirectory);
 
   JNIStringHolder usernameStr(jusername);
   if (JNIUtil::isExceptionThrown())
     return NULL;
-  env->DeleteLocalRef(jusername);
 
   JNIStringHolder passwordStr(jpassword);
   if (JNIUtil::isExceptionThrown())
     return NULL;
-  env->DeleteLocalRef(jpassword);
 
   Prompter::UniquePtr prompter(jprompter ? Prompter::create(jprompter)
                                : CompatPrompter::create(jdeprecatedPrompter));

Modified: subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/RemoteSessionContext.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/RemoteSessionContext.cpp?rev=1606666&r1=1606665&r2=1606666&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/RemoteSessionContext.cpp (original)
+++ subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/RemoteSessionContext.cpp Mon Jun 30 10:15:06 2014
@@ -109,7 +109,6 @@ void RemoteSessionContext::activate(jobj
     return;
 
   env->CallVoidMethod(m_jctx, mid, jprogress);
-  env->DeleteLocalRef(jprogress);
   m_raCallbacks->progress_baton = m_jctx;
 }
 

Modified: subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/SubversionException.hpp
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/SubversionException.hpp?rev=1606666&r1=1606665&r2=1606666&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/SubversionException.hpp (original)
+++ subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/SubversionException.hpp Mon Jun 30 10:15:06 2014
@@ -41,7 +41,7 @@ class SubversionException : public ::Jav
 {
 public:
   explicit SubversionException(::Java::Env env)
-    : Java::Exception(env, ::Java::ClassCache::get_subversion_exception())
+    : Java::Exception(env, ::Java::ClassCache::get_subversion_exception(env))
     {}
 
 private:

Modified: subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/jniwrapper/jni_base.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/jniwrapper/jni_base.cpp?rev=1606666&r1=1606665&r2=1606666&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/jniwrapper/jni_base.cpp (original)
+++ subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/jniwrapper/jni_base.cpp Mon Jun 30 10:15:06 2014
@@ -220,7 +220,7 @@ MethodID Class::m_mid_get_name;
 void Class::static_init(Env env, jclass cls)
 {
   m_mid_get_class = env.GetMethodID(
-      ClassCache::get_object()->get_class(),
+      ClassCache::get_object(env)->get_class(),
       "getClass", "()Ljava/lang/Class;");
   m_mid_get_name = env.GetMethodID(
       cls, "getName",  "()Ljava/lang/String;");
@@ -343,7 +343,7 @@ void handle_svn_error(Env env, ::svn_err
     {
       cause = env.ExceptionOccurred();
       if (env.IsInstanceOf(
-              cause, ClassCache::get_subversion_exception()->get_class()))
+              cause, ClassCache::get_subversion_exception(env)->get_class()))
         {
           // XXX FIXME: Should really have a special error code
           // specifically for propagating Java exceptions from

Modified: subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/jniwrapper/jni_channel.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/jniwrapper/jni_channel.cpp?rev=1606666&r1=1606665&r2=1606666&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/jniwrapper/jni_channel.cpp (original)
+++ subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/jniwrapper/jni_channel.cpp Mon Jun 30 10:15:06 2014
@@ -135,7 +135,7 @@ ByteChannel::ByteBuffer::ClassImpl::~Cla
 
 jint ByteChannel::read(jobject destination)
 {
-  const ByteBuffer::ClassImpl& bufimpl = ByteBuffer::impl();
+  const ByteBuffer::ClassImpl& bufimpl = ByteBuffer::impl(m_env);
 
   const jint remaining = get_remaining(m_env, destination,
                                        bufimpl.m_mid_get_remaining);
@@ -196,7 +196,7 @@ jint ByteChannel::read(jobject destinati
 
 jint ByteChannel::write(jobject source)
 {
-  const ByteBuffer::ClassImpl& bufimpl = ByteBuffer::impl();
+  const ByteBuffer::ClassImpl& bufimpl = ByteBuffer::impl(m_env);
 
   const jint remaining = get_remaining(m_env, source,
                                        bufimpl.m_mid_get_remaining);

Modified: subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/jniwrapper/jni_channel.hpp
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/jniwrapper/jni_channel.hpp?rev=1606666&r1=1606665&r2=1606666&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/jniwrapper/jni_channel.hpp (original)
+++ subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/jniwrapper/jni_channel.hpp Mon Jun 30 10:15:06 2014
@@ -154,9 +154,10 @@ private:
     };
 
     static const char* const m_class_name;
-    static const ClassImpl& impl()
+    static const ClassImpl& impl(Env env)
       {
-        return *dynamic_cast<const ClassImpl*>(ClassCache::get_byte_buffer());
+        return *dynamic_cast<const ClassImpl*>(
+            ClassCache::get_byte_buffer(env));
       }
   };
 };

Modified: subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/jniwrapper/jni_class_cache.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/jniwrapper/jni_class_cache.cpp?rev=1606666&r1=1606665&r2=1606666&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/jniwrapper/jni_class_cache.cpp (original)
+++ subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/jniwrapper/jni_class_cache.cpp Mon Jun 30 10:15:06 2014
@@ -101,11 +101,9 @@ class ClassCacheImpl
 {
 
   friend class ClassCache;
-  const Env m_env;
 
   // We only statically initialize a few of the common class wrappers.
-  explicit ClassCacheImpl(Env env)
-    : m_env(env),
+  explicit ClassCacheImpl(Env env) :
 
 #define JNIWRAPPER_INIT_CACHED_CLASS(M, C)     \
   m_impl_##M(new C::ClassImpl(env, env.FindClass(C::m_class_name)))
@@ -120,10 +118,10 @@ class ClassCacheImpl
   // We can't do this in the constructor above, because the satic
   // initializers will expect that ClassCache::m_impl is already set;
   // that doesn't happen until the constructor returns.
-  void static_init()
+  void static_init(Env env)
     {
-#define JNIWRAPPER_STATIC_CACHED_CLASS(M, C)     \
-      C::static_init(m_env, m_impl_##M->get_class())
+#define JNIWRAPPER_STATIC_CACHED_CLASS(M, C)            \
+      C::static_init(env, m_impl_##M->get_class())
 
       // No-op JNIWRAPPER_STATIC_CACHED_CLASS(object, Object);
       JNIWRAPPER_STATIC_CACHED_CLASS(classtype, Class);
@@ -136,7 +134,7 @@ class ClassCacheImpl
   // therefore do not need atomic access.
 #define JNIWRAPPER_DEFINE_CACHED_CLASS(M, C)            \
   std::auto_ptr<Object::ClassImpl> m_impl_##M;          \
-  const Object::ClassImpl* get_##M()                    \
+  const Object::ClassImpl* get_##M(Env)                 \
     {                                                   \
       return m_impl_##M.get();                          \
     }
@@ -150,14 +148,14 @@ class ClassCacheImpl
   // All other class wrappers must be atomically initialized
 #define JNIWRAPPER_DEFINE_CACHED_CLASS(M, C)                    \
   ClassImplPtr m_impl_##M;                                      \
-  const Object::ClassImpl* get_##M()                            \
+  const Object::ClassImpl* get_##M(Env env)                     \
     {                                                           \
       Object::ClassImpl* pimpl = m_impl_##M.get();              \
       if (!pimpl)                                               \
         {                                                       \
           std::auto_ptr<Object::ClassImpl> tmp(                 \
               new C::ClassImpl(                                 \
-                  m_env, m_env.FindClass(C::m_class_name)));    \
+                  env, env.FindClass(C::m_class_name)));        \
           pimpl = m_impl_##M.test_and_set(tmp.get());           \
           if (!pimpl)                                           \
             pimpl = tmp.release();                              \
@@ -224,8 +222,9 @@ void ClassCache::create()
 
   try
     {
-      m_impl = new ClassCacheImpl(Env());
-      m_impl->static_init();
+      const Env env;
+      m_impl = new ClassCacheImpl(env);
+      m_impl->static_init(env);
     }
   catch (const SignalExceptionThrown&)
     {}
@@ -270,9 +269,9 @@ void ClassCache::destroy()
 }
 
 #define JNIWRAPPER_IMPL_CLASS_CACHE_ACCESSOR(M)         \
-const Object::ClassImpl* ClassCache::get_##M()          \
+const Object::ClassImpl* ClassCache::get_##M(Env env)   \
 {                                                       \
-  return m_impl->get_##M();                             \
+  return m_impl->get_##M(env);                          \
 }
 
 JNIWRAPPER_IMPL_CLASS_CACHE_ACCESSOR(object);

Modified: subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/jniwrapper/jni_io_stream.hpp
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/jniwrapper/jni_io_stream.hpp?rev=1606666&r1=1606665&r2=1606666&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/jniwrapper/jni_io_stream.hpp (original)
+++ subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/jniwrapper/jni_io_stream.hpp Mon Jun 30 10:15:06 2014
@@ -49,7 +49,7 @@ public:
    * Constructs a wrapper around an existing @c InputStream @a jstream.
    */
   explicit InputStream(Env env, jobject jstream)
-    : Object(env, ClassCache::get_input_stream(), jstream)
+    : Object(env, ClassCache::get_input_stream(env), jstream)
     {}
 
   /**
@@ -177,7 +177,7 @@ public:
    * Constructs a wrapper around an existing @c OutputStream @a jstream.
    */
   explicit OutputStream(Env env, jobject jstream)
-    : Object(env, ClassCache::get_output_stream(), jstream)
+    : Object(env, ClassCache::get_output_stream(env), jstream)
     {}
 
   /**

Modified: subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/jniwrapper/jni_list.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/jniwrapper/jni_list.cpp?rev=1606666&r1=1606665&r2=1606666&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/jniwrapper/jni_list.cpp (original)
+++ subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/jniwrapper/jni_list.cpp Mon Jun 30 10:15:06 2014
@@ -40,7 +40,8 @@ BaseList::ClassImpl::~ClassImpl() {}
 BaseList::ovector
 BaseList::convert_to_vector(Env env, jobject jlist)
 {
-  const ClassImpl* pimpl = dynamic_cast<const ClassImpl*>(ClassCache::get_list());
+  const ClassImpl* pimpl =
+    dynamic_cast<const ClassImpl*>(ClassCache::get_list(env));
   const jint length = env.CallIntMethod(jlist, pimpl->m_mid_size);
 
   if (!length)

Modified: subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/jniwrapper/jni_list.hpp
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/jniwrapper/jni_list.hpp?rev=1606666&r1=1606665&r2=1606666&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/jniwrapper/jni_list.hpp (original)
+++ subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/jniwrapper/jni_list.hpp Mon Jun 30 10:15:06 2014
@@ -58,7 +58,7 @@ protected:
    * @c std::vector.
    */
   explicit BaseList(Env env, jobject jlist)
-    : Object(env, ClassCache::get_list(), jlist),
+    : Object(env, ClassCache::get_list(env), jlist),
       m_contents(convert_to_vector(env, m_jthis))
     {}
 
@@ -197,7 +197,7 @@ protected:
    * Constructs the list wrapper, deriving the class from @a jlist.
    */
   explicit BaseMutableList(Env env, jobject jlist)
-    : Object(env, ClassCache::get_array_list(), jlist)
+    : Object(env, ClassCache::get_array_list(env), jlist)
     {}
 
   /**
@@ -205,7 +205,7 @@ protected:
    * with initial allocation size @a length.
    */
   explicit BaseMutableList(Env env, jint length)
-    : Object(env, ClassCache::get_array_list())
+    : Object(env, ClassCache::get_array_list(env))
     {
       set_this(env.NewObject(get_class(), impl().m_mid_ctor, length));
     }

Modified: subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/jniwrapper/jni_object.hpp
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/jniwrapper/jni_object.hpp?rev=1606666&r1=1606665&r2=1606666&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/jniwrapper/jni_object.hpp (original)
+++ subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/jniwrapper/jni_object.hpp Mon Jun 30 10:15:06 2014
@@ -164,7 +164,7 @@ public:
   static void destroy();
 
 #define JNIWRAPPER_DECLARE_CACHED_CLASS_ACCESSOR(M)     \
-  static const Object::ClassImpl* get_##M();
+  static const Object::ClassImpl* get_##M(Env env);
 
   JNIWRAPPER_DECLARE_CACHED_CLASS_ACCESSOR(object);
   JNIWRAPPER_DECLARE_CACHED_CLASS_ACCESSOR(classtype);

Modified: subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/jniwrapper/jni_string_map.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/jniwrapper/jni_string_map.cpp?rev=1606666&r1=1606665&r2=1606666&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/jniwrapper/jni_string_map.cpp (original)
+++ subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/jniwrapper/jni_string_map.cpp Mon Jun 30 10:15:06 2014
@@ -87,7 +87,8 @@ jobject BaseMap::operator[](const std::s
 
 BaseMap::somap BaseMap::convert_to_map(Env env, jobject jmap)
 {
-  const ClassImpl* pimpl = dynamic_cast<const ClassImpl*>(ClassCache::get_map());
+  const ClassImpl* pimpl =
+    dynamic_cast<const ClassImpl*>(ClassCache::get_map(env));
 
   if (!env.CallIntMethod(jmap, pimpl->m_mid_size))
     return somap();
@@ -95,10 +96,10 @@ BaseMap::somap BaseMap::convert_to_map(E
   // Get an iterator over the map's entry set
   const jobject entries = env.CallObjectMethod(jmap, pimpl->m_mid_entry_set);
   const jobject iterator = env.CallObjectMethod(entries,
-                                                Set::impl().m_mid_iterator);
+                                                Set::impl(env).m_mid_iterator);
 
-  const Iterator::ClassImpl& iterimpl = Iterator::impl();
-  const Entry::ClassImpl& entimpl = Entry::impl();
+  const Iterator::ClassImpl& iterimpl = Iterator::impl(env);
+  const Entry::ClassImpl& entimpl = Entry::impl(env);
 
   // Yterate over the map, filling the native map
   somap contents;

Modified: subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/jniwrapper/jni_string_map.hpp
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/jniwrapper/jni_string_map.hpp?rev=1606666&r1=1606665&r2=1606666&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/jniwrapper/jni_string_map.hpp (original)
+++ subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/jniwrapper/jni_string_map.hpp Mon Jun 30 10:15:06 2014
@@ -59,7 +59,7 @@ protected:
    * @c std::map.
    */
   explicit BaseMap(Env env, jobject jmap)
-    : Object(env, ClassCache::get_map(), jmap),
+    : Object(env, ClassCache::get_map(env), jmap),
       m_contents(convert_to_map(env, m_jthis))
     {}
 
@@ -117,9 +117,9 @@ private:
     };
 
     static const char* const m_class_name;
-    static const ClassImpl& impl()
+    static const ClassImpl& impl(Env env)
       {
-        return *dynamic_cast<const ClassImpl*>(ClassCache::get_set());
+        return *dynamic_cast<const ClassImpl*>(ClassCache::get_set(env));
       }
   };
 
@@ -143,9 +143,9 @@ private:
     };
 
     static const char* const m_class_name;
-    static const ClassImpl& impl()
+    static const ClassImpl& impl(Env env)
       {
-        return *dynamic_cast<const ClassImpl*>(ClassCache::get_iterator());
+        return *dynamic_cast<const ClassImpl*>(ClassCache::get_iterator(env));
       }
   };
 
@@ -169,9 +169,9 @@ private:
     };
 
     static const char* const m_class_name;
-    static const ClassImpl& impl()
+    static const ClassImpl& impl(Env env)
       {
-        return *dynamic_cast<const ClassImpl*>(ClassCache::get_map_entry());
+        return *dynamic_cast<const ClassImpl*>(ClassCache::get_map_entry(env));
       }
   };
 };
@@ -277,7 +277,7 @@ protected:
    * Constructs the map wrapper, deriving the class from @a jmap.
    */
   explicit BaseMutableMap(Env env, jobject jmap)
-    : Object(env, ClassCache::get_hash_map(), jmap)
+    : Object(env, ClassCache::get_hash_map(env), jmap)
     {}
 
   /**
@@ -285,7 +285,7 @@ protected:
    * with initial allocation size @a length.
    */
   explicit BaseMutableMap(Env env, jint length)
-    : Object(env, ClassCache::get_hash_map())
+    : Object(env, ClassCache::get_hash_map(env))
     {
       set_this(env.NewObject(get_class(), impl().m_mid_ctor, length));
     }

Modified: subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/org_apache_subversion_javahl_util_ConfigImpl_Category.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/org_apache_subversion_javahl_util_ConfigImpl_Category.cpp?rev=1606666&r1=1606665&r2=1606666&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/org_apache_subversion_javahl_util_ConfigImpl_Category.cpp (original)
+++ subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/org_apache_subversion_javahl_util_ConfigImpl_Category.cpp Mon Jun 30 10:15:06 2014
@@ -77,10 +77,6 @@ struct ImplContext
         return;
       if (option.c_str())
         m_option = option.c_str();
-
-      env->DeleteLocalRef(jcategory);
-      env->DeleteLocalRef(jsection);
-      env->DeleteLocalRef(joption);
     }
 
   svn_config_t* m_config;

Modified: subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/org_apache_subversion_javahl_util_ConfigLib.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/org_apache_subversion_javahl_util_ConfigLib.cpp?rev=1606666&r1=1606665&r2=1606666&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/org_apache_subversion_javahl_util_ConfigLib.cpp (original)
+++ subversion/branches/remove-log-addressing/subversion/bindings/javahl/native/org_apache_subversion_javahl_util_ConfigLib.cpp Mon Jun 30 10:15:06 2014
@@ -225,23 +225,24 @@ public:
 
 class SimpleSearchCallback : public WalkCredentialsCallback
 {
+  const ::Java::Env m_env;
   const char* const m_cred_kind;
   const char* const m_realm;
   const bool m_delete_when_found;
-  apr_hash_t* m_cred;
+  jobject m_credential;
 
 public:
-  explicit SimpleSearchCallback(const char* cred_kind, const char* realm,
+  explicit SimpleSearchCallback(::Java::Env env,
+                                const char* cred_kind, const char* realm,
                                 bool delete_when_found)
-    : m_cred_kind(cred_kind),
+    : m_env(env),
+      m_cred_kind(cred_kind),
       m_realm(realm),
       m_delete_when_found(delete_when_found),
-      m_cred(NULL)
+      m_credential(NULL)
     {}
 
-  const char* cred_kind() const { return m_cred_kind; }
-  const char* realm() const { return m_realm; }
-  apr_hash_t* cred() const { return m_cred; }
+  jobject credential() const { return m_credential; }
 
   virtual svn_error_t* operator()(svn_boolean_t *delete_cred,
                                   const char *cred_kind,
@@ -252,7 +253,9 @@ public:
       if (0 == strcmp(cred_kind, m_cred_kind)
           && 0 == strcmp(realmstring, m_realm))
         {
-          m_cred = cred_hash;
+          m_credential = build_credential(m_env, cred_hash,
+                                          cred_kind, realmstring,
+                                          scratch_pool);
           *delete_cred = m_delete_when_found;
           return svn_error_create(SVN_ERR_CEASE_INVOCATION, NULL, "");
         }
@@ -283,7 +286,8 @@ Java_org_apache_subversion_javahl_util_C
       // with its own pool around for these functions.
       SVN::Pool pool;
 
-      SimpleSearchCallback cb(cred_kind.strdup(pool.getPool()),
+      SimpleSearchCallback cb(env,
+                              cred_kind.strdup(pool.getPool()),
                               realm.strdup(pool.getPool()),
                               false);
 
@@ -291,10 +295,7 @@ Java_org_apache_subversion_javahl_util_C
                        svn_config_walk_auth_data(
                            Java::String::Contents(config_dir).c_str(),
                            cb.walk_func, &cb, pool.getPool()));
-      if (!cb.cred())
-        return NULL;
-      return build_credential(env, cb.cred(), cb.cred_kind(), cb.realm(),
-                              pool.getPool());
+      return cb.credential();
     }
   SVN_JAVAHL_JNI_CATCH;
   return NULL;
@@ -319,7 +320,8 @@ Java_org_apache_subversion_javahl_util_C
       // with its own pool around for these functions.
       SVN::Pool pool;
 
-      SimpleSearchCallback cb(cred_kind.strdup(pool.getPool()),
+      SimpleSearchCallback cb(env,
+                              cred_kind.strdup(pool.getPool()),
                               realm.strdup(pool.getPool()),
                               true);
 
@@ -327,11 +329,7 @@ Java_org_apache_subversion_javahl_util_C
                        svn_config_walk_auth_data(
                            Java::String::Contents(config_dir).c_str(),
                            cb.walk_func, &cb, pool.getPool()));
-      if (!cb.cred())
-        return NULL;
-
-      return build_credential(env, cb.cred(), cb.cred_kind(), cb.realm(),
-                              pool.getPool());
+      return cb.credential();
     }
   SVN_JAVAHL_JNI_CATCH;
   return NULL;

Modified: subversion/branches/remove-log-addressing/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/ExternalItem.java
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/ExternalItem.java?rev=1606666&r1=1606665&r2=1606666&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/ExternalItem.java (original)
+++ subversion/branches/remove-log-addressing/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/ExternalItem.java Mon Jun 30 10:15:06 2014
@@ -31,8 +31,9 @@ import org.apache.subversion.javahl.Subv
  */
 public class ExternalItem implements java.io.Serializable
 {
-    // Update the serialVersionUID when there is a incompatible change
-    // made to this class.
+    // 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;
 
     /**
@@ -127,6 +128,19 @@ public class ExternalItem implements jav
                 && this.pegRevision.equals(that.pegRevision));
     }
 
+    /**
+     * Return a hash code for this object.
+     */
+    public int hashCode()
+    {
+        int hash = 17;
+        hash = hash * 33 + (null != targetDir ? targetDir.hashCode() : 0);
+        hash = hash * 33 + (null != url ? url.hashCode() : 0);
+        hash = hash * 33 + (null != revision ? revision.hashCode() : 0);
+        hash = hash * 33 + (null != pegRevision ? pegRevision.hashCode() : 0);
+        return hash;
+    }
+
     /* Exception class for failed revision kind validation. */
     private static class BadRevisionKindException extends SubversionException
     {

Modified: subversion/branches/remove-log-addressing/subversion/bindings/javahl/tests/org/tigris/subversion/javahl/BasicTests.java
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/bindings/javahl/tests/org/tigris/subversion/javahl/BasicTests.java?rev=1606666&r1=1606665&r2=1606666&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/bindings/javahl/tests/org/tigris/subversion/javahl/BasicTests.java (original)
+++ subversion/branches/remove-log-addressing/subversion/bindings/javahl/tests/org/tigris/subversion/javahl/BasicTests.java Mon Jun 30 10:15:06 2014
@@ -2938,6 +2938,16 @@ public class BasicTests extends SVNTests
         }
     }
 
+    private static class CountingProgressListener implements ProgressListener
+    {
+        public void onProgress(ProgressEvent event)
+        {
+            // TODO: Examine the byte counts from "event".
+            gotProgress = true;
+        }
+        public boolean gotProgress = false;
+    }
+
     public void testDataTransferProgressReport() throws Throwable
     {
         // ### FIXME: This isn't working over ra_local, because
@@ -2947,25 +2957,13 @@ public class BasicTests extends SVNTests
 
         // build the test setup
         OneTest thisTest = new OneTest();
-        ProgressListener listener = new ProgressListener()
-        {
-            public void onProgress(ProgressEvent event)
-            {
-                // TODO: Examine the byte counts from "event".
-                throw new RuntimeException("Progress reported as expected");
-            }
-        };
+        CountingProgressListener listener = new CountingProgressListener();
         client.setProgressListener(listener);
 
         // Perform an update to exercise the progress notification.
-        try
-        {
-            client.update(thisTest.getWCPath(), null, true);
+        client.update(thisTest.getWCPath(), null, true);
+        if (!listener.gotProgress)
             fail("No progress reported");
-        }
-        catch (RuntimeException progressReported)
-        {
-        }
     }
 
     /**

Modified: subversion/branches/remove-log-addressing/subversion/include/private/svn_subr_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/include/private/svn_subr_private.h?rev=1606666&r1=1606665&r2=1606666&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/include/private/svn_subr_private.h (original)
+++ subversion/branches/remove-log-addressing/subversion/include/private/svn_subr_private.h Mon Jun 30 10:15:06 2014
@@ -297,7 +297,6 @@ svn_checksum__wrap_write_stream_fnv1a_32
 
 /**
  * Return a 32 bit FNV-1a checksum for the first @a len bytes in @a input.
- * The representation is in Big Endian.
  *
  * @since New in 1.9
  */
@@ -306,7 +305,7 @@ svn__fnv1a_32(const void *input, apr_siz
 
 /**
  * Return a 32 bit modified FNV-1a checksum for the first @a len bytes in
- * @a input.  The representation is in Big Endian.
+ * @a input.
  * 
  * @note This is a proprietary checksumming algorithm based FNV-1a with
  *       approximately the same strength.  It is up to 4 times faster

Modified: subversion/branches/remove-log-addressing/subversion/libsvn_client/diff.c
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/libsvn_client/diff.c?rev=1606666&r1=1606665&r2=1606666&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/libsvn_client/diff.c (original)
+++ subversion/branches/remove-log-addressing/subversion/libsvn_client/diff.c Mon Jun 30 10:15:06 2014
@@ -2082,15 +2082,19 @@ diff_repos_wc(const char **root_relpath,
       if (cf_depth == svn_depth_unknown)
         cf_depth = svn_depth_infinity;
 
+      /* Reporting the in-wc revision as r0, makes the repository send
+         everything as added, which avoids using BASE for pristine information,
+         which is not there (or unrelated) for a copy */
+
       SVN_ERR(reporter->set_path(reporter_baton, "",
-                                 cf_revision,
+                                 ignore_ancestry ? 0 : cf_revision,
                                  cf_depth, FALSE, NULL, scratch_pool));
 
       if (*target)
         SVN_ERR(reporter->link_path(reporter_baton, target,
-                                      target_url,
-                                      cf_revision,
-                                      cf_depth, FALSE, NULL, scratch_pool));
+                                    target_url,
+                                    ignore_ancestry ? 0 : cf_revision,
+                                    cf_depth, FALSE, NULL, scratch_pool));
 
       /* Finish the report to generate the diff. */
       SVN_ERR(reporter->finish_report(reporter_baton, scratch_pool));

Modified: subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/cached_data.c
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/cached_data.c?rev=1606666&r1=1606665&r2=1606666&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/cached_data.c (original)
+++ subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/cached_data.c Mon Jun 30 10:15:06 2014
@@ -197,7 +197,7 @@ open_and_seek_revision(svn_fs_fs__revisi
 
   SVN_ERR(svn_fs_fs__ensure_revision_exists(rev, fs, pool));
 
-  SVN_ERR(svn_fs_fs__open_pack_or_rev_file(&rev_file, fs, rev, pool));
+  SVN_ERR(svn_fs_fs__open_pack_or_rev_file(&rev_file, fs, rev, pool, pool));
   SVN_ERR(svn_fs_fs__item_offset(&offset, fs, rev_file, rev, NULL, item,
                                  pool));
 
@@ -219,7 +219,7 @@ open_and_seek_transaction(svn_fs_fs__rev
 {
   apr_off_t offset;
 
-  SVN_ERR(svn_fs_fs__open_proto_rev_file(file, fs, &rep->txn_id, pool));
+  SVN_ERR(svn_fs_fs__open_proto_rev_file(file, fs, &rep->txn_id, pool, pool));
 
   SVN_ERR(svn_fs_fs__item_offset(&offset, fs, NULL, SVN_INVALID_REVNUM,
                                  &rep->txn_id, rep->item_index, pool));
@@ -525,7 +525,8 @@ svn_fs_fs__rev_get_root(svn_fs_id_t **ro
   if (is_cached)
     return SVN_NO_ERROR;
 
-  SVN_ERR(svn_fs_fs__open_pack_or_rev_file(&revision_file, fs, rev, scratch_pool));
+  SVN_ERR(svn_fs_fs__open_pack_or_rev_file(&revision_file, fs, rev,
+                                           scratch_pool, scratch_pool));
   SVN_ERR(get_root_changes_offset(&root_offset, NULL,
                                   revision_file->file, fs, rev, scratch_pool));
 
@@ -622,7 +623,8 @@ auto_open_shared_file(shared_file_t *fil
 {
   if (file->rfile == NULL)
     SVN_ERR(svn_fs_fs__open_pack_or_rev_file(&file->rfile, file->fs,
-                                             file->revision, file->pool));
+                                             file->revision, file->pool,
+                                             file->pool));
 
   return SVN_NO_ERROR;
 }
@@ -793,7 +795,8 @@ create_rep_state_body(rep_state_t **rep_
       if (! svn_fs_fs__id_txn_used(&rep->txn_id))
         {
           if (ffd->rep_header_cache)
-            SVN_ERR(svn_cache__set(ffd->rep_header_cache, &key, rh, scratch_pool));
+            SVN_ERR(svn_cache__set(ffd->rep_header_cache, &key, rh,
+                                   scratch_pool));
         }
     }
 
@@ -873,7 +876,6 @@ svn_fs_fs__check_rep(representation_t *r
   svn_fs_fs__rep_header_t *rep_header;
 
   /* ### Should this be using read_rep_line() directly? */
-  /* ### Should this be using read_rep_line() directly? */
   SVN_ERR(create_rep_state(&rs, &rep_header, (shared_file_t**)hint,
                            rep, fs, scratch_pool, scratch_pool));
 
@@ -2592,13 +2594,14 @@ svn_fs_fs__get_changes(apr_array_header_
 
       SVN_ERR(svn_fs_fs__ensure_revision_exists(rev, fs, scratch_pool));
       SVN_ERR(svn_fs_fs__open_pack_or_rev_file(&revision_file, fs, rev,
-                                               scratch_pool));
+                                               scratch_pool, scratch_pool));
 
       /* physical addressing mode code path */
       SVN_ERR(get_root_changes_offset(NULL, &changes_offset,
                                       revision_file->file, fs, rev,
                                       scratch_pool));
 
+      /* Actual reading and parsing are the same, though. */
       SVN_ERR(aligned_seek(fs, revision_file->file, NULL, changes_offset,
                            scratch_pool));
       SVN_ERR(svn_fs_fs__read_changes(changes, revision_file->stream,

Modified: subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/fs_fs.c
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/fs_fs.c?rev=1606666&r1=1606665&r2=1606666&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/fs_fs.c (original)
+++ subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/fs_fs.c Mon Jun 30 10:15:06 2014
@@ -35,6 +35,7 @@
 
 #include "cached_data.h"
 #include "id.h"
+#include "index.h"
 #include "rep-cache.h"
 #include "revprops.h"
 #include "transaction.h"
@@ -1337,11 +1338,13 @@ svn_fs_fs__rep_copy(representation_t *re
 }
 
 
-/* Write out the zeroth revision for filesystem FS. */
+/* Write out the zeroth revision for filesystem FS.
+   Perform temporary allocations in SCRATCH_POOL. */
 static svn_error_t *
-write_revision_zero(svn_fs_t *fs)
+write_revision_zero(svn_fs_t *fs,
+                    apr_pool_t *scratch_pool)
 {
-  const char *path_revision_zero = svn_fs_fs__path_rev(fs, 0, fs->pool);
+  const char *path_revision_zero = svn_fs_fs__path_rev(fs, 0, scratch_pool);
   apr_hash_t *proplist;
   svn_string_t date;
 
@@ -1354,16 +1357,18 @@ write_revision_zero(svn_fs_t *fs)
                               "text: 0 0 4 4 "
                               "2d2977d1c96f487abe4a1e202dd03b4e\n"
                               "cpath: /\n"
-                              "\n\n17 107\n", fs->pool));
+                              "\n\n17 107\n", scratch_pool));
 
-  SVN_ERR(svn_io_set_file_read_only(path_revision_zero, FALSE, fs->pool));
+  SVN_ERR(svn_io_set_file_read_only(path_revision_zero, FALSE, scratch_pool));
 
   /* Set a date on revision 0. */
-  date.data = svn_time_to_cstring(apr_time_now(), fs->pool);
+  date.data = svn_time_to_cstring(apr_time_now(), scratch_pool);
   date.len = strlen(date.data);
-  proplist = apr_hash_make(fs->pool);
+  proplist = apr_hash_make(scratch_pool);
   svn_hash_sets(proplist, SVN_PROP_REVISION_DATE, &date);
-  return svn_fs_fs__set_revision_proplist(fs, 0, proplist, fs->pool);
+  SVN_ERR(svn_fs_fs__set_revision_proplist(fs, 0, proplist, scratch_pool));
+
+  return SVN_NO_ERROR;
 }
 
 svn_error_t *
@@ -1374,7 +1379,7 @@ svn_fs_fs__create(svn_fs_t *fs,
   int format = SVN_FS_FS__FORMAT_NUMBER;
   fs_fs_data_t *ffd = fs->fsap_data;
 
-  fs->path = apr_pstrdup(pool, path);
+  fs->path = apr_pstrdup(fs->pool, path);
   /* See if compatibility with older versions was explicitly requested. */
   if (fs->config)
     {
@@ -1455,7 +1460,7 @@ svn_fs_fs__create(svn_fs_t *fs,
   SVN_ERR(svn_io_file_create_empty(svn_fs_fs__path_lock(fs, pool), pool));
   SVN_ERR(svn_fs_fs__set_uuid(fs, NULL, pool));
 
-  SVN_ERR(write_revision_zero(fs));
+  SVN_ERR(write_revision_zero(fs, pool));
 
   /* Create the fsfs.conf file if supported.  Older server versions would
      simply ignore the file but that might result in a different behavior

Modified: subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/hotcopy.c
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/hotcopy.c?rev=1606666&r1=1606665&r2=1606666&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/hotcopy.c (original)
+++ subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/hotcopy.c Mon Jun 30 10:15:06 2014
@@ -684,63 +684,28 @@ hotcopy_revisions(svn_revnum_t *dst_youn
    * If necessary, update 'current' after copying all files from a shard. */
   for (; rev <= src_youngest; rev++)
     {
-      svn_error_t *err;
-
       svn_pool_clear(iterpool);
 
       if (cancel_func)
         SVN_ERR(cancel_func(cancel_baton));
 
-      /* Copy the rev file. */
-      err = hotcopy_copy_shard_file(src_revs_dir, dst_revs_dir,
-                                    rev, max_files_per_dir,
-                                    iterpool);
-      if (err)
-        {
-          if (APR_STATUS_IS_ENOENT(err->apr_err) &&
-              src_ffd->format >= SVN_FS_FS__MIN_PACKED_FORMAT)
-            {
-              svn_error_clear(err);
-
-              /* The source rev file does not exist. This can happen if the
-               * source repository is being packed concurrently with this
-               * hotcopy operation.
-               *
-               * If the new revision is now packed, and the youngest revision
-               * we're interested in is not inside this pack, try to copy the
-               * pack instead.
-               *
-               * If the youngest revision ended up being packed, don't try
-               * to be smart and work around this. Just abort the hotcopy. */
-              SVN_ERR(svn_fs_fs__update_min_unpacked_rev(src_fs, pool));
-              if (svn_fs_fs__is_packed_rev(src_fs, rev))
-                {
-                  if (svn_fs_fs__is_packed_rev(src_fs, src_youngest))
-                    return svn_error_createf(
-                             SVN_ERR_FS_NO_SUCH_REVISION, NULL,
-                             _("The assumed HEAD revision (%lu) of the "
-                               "hotcopy source has been packed while the "
-                               "hotcopy was in progress; please restart "
-                               "the hotcopy operation"),
-                             src_youngest);
-
-                  SVN_ERR(hotcopy_copy_packed_shard(&dst_min_unpacked_rev,
-                                                    src_fs, dst_fs,
-                                                    rev, max_files_per_dir,
-                                                    iterpool));
-                  rev = dst_min_unpacked_rev;
-                  continue;
-                }
-              else
-                return svn_error_createf(SVN_ERR_FS_NO_SUCH_REVISION, NULL,
-                                         _("Revision %lu disappeared from the "
-                                           "hotcopy source while hotcopy was "
-                                           "in progress"), rev);
-            }
-          else
-            return svn_error_trace(err);
-        }
+      /* Copying non-packed revisions is racy in case the source repository is
+       * being packed concurrently with this hotcopy operation. The race can
+       * happen with FS formats prior to SVN_FS_FS__MIN_PACK_LOCK_FORMAT that
+       * support packed revisions. With the pack lock, however, the race is
+       * impossible, because hotcopy and pack operations block each other.
+       *
+       * We assume that all revisions coming after 'min-unpacked-rev' really
+       * are unpacked and that's not necessarily true with concurrent packing.
+       * Don't try to be smart in this edge case, because handling it properly
+       * might require copying *everything* from the start. Just abort the
+       * hotcopy with an ENOENT (revision file moved to a pack, so it is no
+       * longer where we expect it to be). */
 
+      /* Copy the rev file. */
+      SVN_ERR(hotcopy_copy_shard_file(src_revs_dir, dst_revs_dir,
+                                      rev, max_files_per_dir,
+                                      iterpool));
       /* Copy the revprop file. */
       SVN_ERR(hotcopy_copy_shard_file(src_revprops_dir,
                                       dst_revprops_dir,

Modified: subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/recovery.c
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/recovery.c?rev=1606666&r1=1606665&r2=1606666&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/recovery.c (original)
+++ subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/recovery.c Mon Jun 30 10:15:06 2014
@@ -57,7 +57,8 @@ recover_get_largest_revision(svn_fs_t *f
       svn_fs_fs__revision_file_t *file;
       svn_pool_clear(iterpool);
 
-      err = svn_fs_fs__open_pack_or_rev_file(&file, fs, right, iterpool);
+      err = svn_fs_fs__open_pack_or_rev_file(&file, fs, right, iterpool,
+                                             iterpool);
       if (err && err->apr_err == SVN_ERR_FS_NO_SUCH_REVISION)
         {
           svn_error_clear(err);
@@ -80,7 +81,8 @@ recover_get_largest_revision(svn_fs_t *f
       svn_fs_fs__revision_file_t *file;
       svn_pool_clear(iterpool);
 
-      err = svn_fs_fs__open_pack_or_rev_file(&file, fs, probe, iterpool);
+      err = svn_fs_fs__open_pack_or_rev_file(&file, fs, probe, iterpool,
+                                             iterpool);
       if (err && err->apr_err == SVN_ERR_FS_NO_SUCH_REVISION)
         {
           svn_error_clear(err);
@@ -410,7 +412,8 @@ recover_body(void *baton, apr_pool_t *po
           if (b->cancel_func)
             SVN_ERR(b->cancel_func(b->cancel_baton));
 
-          SVN_ERR(svn_fs_fs__open_pack_or_rev_file(&rev_file, fs, rev, pool));
+          SVN_ERR(svn_fs_fs__open_pack_or_rev_file(&rev_file, fs, rev, pool,
+                                                   iterpool));
           SVN_ERR(recover_get_root_offset(&root_offset, rev, rev_file, pool));
           SVN_ERR(recover_find_max_ids(fs, rev, rev_file, root_offset,
                                        &next_node_id, &next_copy_id, pool));

Modified: subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/rev_file.c
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/rev_file.c?rev=1606666&r1=1606665&r2=1606666&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/rev_file.c (original)
+++ subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/rev_file.c Mon Jun 30 10:15:06 2014
@@ -27,6 +27,7 @@
 
 #include "../libsvn_fs/fs-loader.h"
 
+#include "private/svn_io_private.h"
 #include "svn_private_config.h"
 
 static void
@@ -47,6 +48,36 @@ init_revision_file(svn_fs_fs__revision_f
   file->pool = pool;
 }
 
+/* Baton type for set_read_only() */
+typedef struct set_read_only_baton_t
+{
+  /* File to set to read-only. */
+  const char *file_path;
+
+  /* Scratch pool sufficient life time.
+   * Ideally the pool that we registered the cleanup on. */
+  apr_pool_t *pool;
+} set_read_only_baton_t;
+
+/* APR pool cleanup callback taking a set_read_only_baton_t baton and then
+ * (trying to) set the specified file to r/o mode. */
+static apr_status_t
+set_read_only(void *baton)
+{
+  set_read_only_baton_t *ro_baton = baton;
+  apr_status_t status;
+  svn_error_t *err;
+
+  err = svn_io_set_file_read_only(ro_baton->file_path, TRUE, ro_baton->pool);
+  if (err)
+    {
+      status = err->apr_err;
+      svn_error_clear(err);
+    }
+
+  return status;
+}
+
 /* Core implementation of svn_fs_fs__open_pack_or_rev_file working on an
  * existing, initialized FILE structure.
  */
@@ -54,7 +85,8 @@ static svn_error_t *
 open_pack_or_rev_file(svn_fs_fs__revision_file_t *file,
                       svn_fs_t *fs,
                       svn_revnum_t rev,
-                      apr_pool_t *pool)
+                      apr_pool_t *result_pool,
+                      apr_pool_t *scratch_pool)
 {
   fs_fs_data_t *ffd = fs->fsap_data;
   svn_error_t *err;
@@ -62,16 +94,18 @@ open_pack_or_rev_file(svn_fs_fs__revisio
 
   do
     {
-      const char *path = svn_fs_fs__path_rev_absolute(fs, rev, pool);
+      const char *path = svn_fs_fs__path_rev_absolute(fs, rev, scratch_pool);
       apr_file_t *apr_file;
 
       /* open the revision file in buffered r/o mode */
-      err = svn_io_file_open(&apr_file, path,
-                             APR_READ | APR_BUFFERED, APR_OS_DEFAULT, pool);
+      err = svn_io_file_open(&apr_file, path, APR_READ | APR_BUFFERED,
+                             APR_OS_DEFAULT, result_pool);
+
       if (!err)
         {
           file->file = apr_file;
-          file->stream = svn_stream_from_aprfile2(apr_file, TRUE, pool);
+          file->stream = svn_stream_from_aprfile2(apr_file, TRUE,
+                                                  result_pool);
           file->is_packed = svn_fs_fs__is_packed_rev(fs, rev);
 
           return SVN_NO_ERROR;
@@ -91,7 +125,7 @@ open_pack_or_rev_file(svn_fs_fs__revisio
                                          _("No such revision %ld"), rev);
 
               /* We failed for the first time. Refresh cache & retry. */
-              SVN_ERR(svn_fs_fs__update_min_unpacked_rev(fs, pool));
+              SVN_ERR(svn_fs_fs__update_min_unpacked_rev(fs, scratch_pool));
 
               retry = TRUE;
             }
@@ -116,30 +150,35 @@ svn_error_t *
 svn_fs_fs__open_pack_or_rev_file(svn_fs_fs__revision_file_t **file,
                                  svn_fs_t *fs,
                                  svn_revnum_t rev,
-                                 apr_pool_t *pool)
+                                 apr_pool_t *result_pool,
+                                 apr_pool_t *scratch_pool)
 {
-  *file = apr_palloc(pool, sizeof(**file));
-  init_revision_file(*file, fs, rev, pool);
+  *file = apr_palloc(result_pool, sizeof(**file));
+  init_revision_file(*file, fs, rev, result_pool);
 
-  return svn_error_trace(open_pack_or_rev_file(*file, fs, rev, pool));
+  return svn_error_trace(open_pack_or_rev_file(*file, fs, rev, result_pool,
+                                               scratch_pool));
 }
 
 svn_error_t *
 svn_fs_fs__open_proto_rev_file(svn_fs_fs__revision_file_t **file,
                                svn_fs_t *fs,
                                const svn_fs_fs__id_part_t *txn_id,
-                               apr_pool_t *pool)
+                               apr_pool_t* result_pool,
+                               apr_pool_t *scratch_pool)
 {
   apr_file_t *apr_file;
   SVN_ERR(svn_io_file_open(&apr_file,
-                           svn_fs_fs__path_txn_proto_rev(fs, txn_id, pool),
-                           APR_READ | APR_BUFFERED, APR_OS_DEFAULT, pool));
+                           svn_fs_fs__path_txn_proto_rev(fs, txn_id,
+                                                         scratch_pool),
+                           APR_READ | APR_BUFFERED, APR_OS_DEFAULT,
+                           result_pool));
 
-  *file = apr_pcalloc(pool, sizeof(**file));
+  *file = apr_pcalloc(result_pool, sizeof(**file));
   (*file)->file = apr_file;
   (*file)->is_packed = FALSE;
   (*file)->start_revision = SVN_INVALID_REVNUM;
-  (*file)->stream = svn_stream_from_aprfile2(apr_file, TRUE, pool);
+  (*file)->stream = svn_stream_from_aprfile2(apr_file, TRUE, result_pool);
 
   return SVN_NO_ERROR;
 }

Modified: subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/rev_file.h
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/rev_file.h?rev=1606666&r1=1606665&r2=1606666&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/rev_file.h (original)
+++ subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/rev_file.h Mon Jun 30 10:15:06 2014
@@ -64,12 +64,14 @@ typedef struct svn_fs_fs__revision_file_
 /* Open the correct revision file for REV.  If the filesystem FS has
  * been packed, *FILE will be set to the packed file; otherwise, set *FILE
  * to the revision file for REV.  Return SVN_ERR_FS_NO_SUCH_REVISION if the
- * file doesn't exist.  Use POOL for allocations. */
+ * file doesn't exist.  Allocate *FILE in RESULT_POOL and use SCRATCH_POOL
+ * for temporaries. */
 svn_error_t *
 svn_fs_fs__open_pack_or_rev_file(svn_fs_fs__revision_file_t **file,
                                  svn_fs_t *fs,
                                  svn_revnum_t rev,
-                                 apr_pool_t *pool);
+                                 apr_pool_t *result_pool,
+                                 apr_pool_t *scratch_pool);
 
 /* Close previous files as well as streams in FILE (if open) and open the
  * rev / pack file for REVISION in FS.  This is useful when a pack operation
@@ -82,12 +84,13 @@ svn_fs_fs__reopen_revision_file(svn_fs_f
                                 svn_revnum_t revision);
 
 /* Open the proto-rev file of transaction TXN_ID in FS and return it in *FILE.
- * Use POOL for allocations. */
+ * Allocate *FILE in RESULT_POOL use and SCRATCH_POOL for temporaries.. */
 svn_error_t *
 svn_fs_fs__open_proto_rev_file(svn_fs_fs__revision_file_t **file,
                                svn_fs_t *fs,
                                const svn_fs_fs__id_part_t *txn_id,
-                               apr_pool_t *pool);
+                               apr_pool_t* result_pool,
+                               apr_pool_t *scratch_pool);
 
 /* Close all files and streams in FILE.
  */

Modified: subversion/branches/remove-log-addressing/subversion/libsvn_ra_serf/options.c
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/libsvn_ra_serf/options.c?rev=1606666&r1=1606665&r2=1606666&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/libsvn_ra_serf/options.c (original)
+++ subversion/branches/remove-log-addressing/subversion/libsvn_ra_serf/options.c Mon Jun 30 10:15:06 2014
@@ -301,7 +301,7 @@ capabilities_headers_iterator_callback(v
           /* May contain multiple values, separated by commas. */
           int i;
           apr_array_header_t *vals = svn_cstring_split(val, ",", TRUE,
-                                                       opt_ctx->pool);
+                                                       session->pool);
 
           for (i = 0; i < vals->nelts; i++)
             {

Modified: subversion/branches/remove-log-addressing/subversion/libsvn_wc/diff_editor.c
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/libsvn_wc/diff_editor.c?rev=1606666&r1=1606665&r2=1606666&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/libsvn_wc/diff_editor.c (original)
+++ subversion/branches/remove-log-addressing/subversion/libsvn_wc/diff_editor.c Mon Jun 30 10:15:06 2014
@@ -717,6 +717,9 @@ walk_local_nodes_diff(struct edit_baton_
           if (!info->have_base)
             {
               local_only = TRUE; /* Only report additions */
+
+              if (info->status == svn_wc__db_status_deleted)
+                continue; /* Nothing added (deleted copy) */
             }
           else if (info->status == svn_wc__db_status_normal)
             {

Modified: subversion/branches/remove-log-addressing/subversion/mod_dav_svn/version.c
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/mod_dav_svn/version.c?rev=1606666&r1=1606665&r2=1606666&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/mod_dav_svn/version.c (original)
+++ subversion/branches/remove-log-addressing/subversion/mod_dav_svn/version.c Mon Jun 30 10:15:06 2014
@@ -972,7 +972,7 @@ dav_svn__checkin(dav_resource *resource,
             {
               const char *post_commit_err = svn_repos__post_commit_error_str
                                               (serr, resource->pool);
-              ap_log_perror(APLOG_MARK, APLOG_ERR, serr->apr_err,
+              ap_log_perror(APLOG_MARK, APLOG_ERR, APR_EGENERAL,
                             resource->pool,
                             "commit of r%ld succeeded, but an error occurred "
                             "after the commit: '%s'",
@@ -1497,6 +1497,11 @@ merge(dav_resource *target,
              ### client some other way than hijacking the post-commit
              ### error message.*/
           post_commit_err = svn_repos__post_commit_error_str(serr, pool);
+          ap_log_perror(APLOG_MARK, APLOG_ERR, APR_EGENERAL, pool,
+                        "commit of r%ld succeeded, but an error occurred "
+                        "after the commit: '%s'",
+                        new_rev,
+                        post_commit_err);
           svn_error_clear(serr);
           serr = SVN_NO_ERROR;
         }

Modified: subversion/branches/remove-log-addressing/subversion/svn/cl.h
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/svn/cl.h?rev=1606666&r1=1606665&r2=1606666&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/svn/cl.h (original)
+++ subversion/branches/remove-log-addressing/subversion/svn/cl.h Mon Jun 30 10:15:06 2014
@@ -223,7 +223,6 @@ typedef struct svn_cl__opt_state_t
                                     (not converted to UTF-8) */
   svn_boolean_t parents;         /* create intermediate directories */
   svn_boolean_t use_merge_history; /* use/display extra merge information */
-  svn_boolean_t auto_moves;      /* interpret unique DEL/ADD pairs as moves */
   svn_cl__accept_t accept_which;   /* how to handle conflicts */
   svn_cl__show_revs_t show_revs;   /* mergeinfo flavor */
   svn_depth_t set_depth;           /* new sticky ambient depth value */

Modified: subversion/branches/remove-log-addressing/subversion/svn/notify.c
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/svn/notify.c?rev=1606666&r1=1606665&r2=1606666&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/svn/notify.c (original)
+++ subversion/branches/remove-log-addressing/subversion/svn/notify.c Mon Jun 30 10:15:06 2014
@@ -1060,8 +1060,8 @@ notify_body(struct notify_baton *nb,
       if (nb->sent_first_txdelta)
         {
           SVN_ERR(svn_cmdline_printf(pool, _("done\n")));
-          SVN_ERR(svn_cmdline_printf(pool, _("Committing transaction...")));
         }
+      SVN_ERR(svn_cmdline_printf(pool, _("Committing transaction...")));
       break;
 
     default:

Modified: subversion/branches/remove-log-addressing/subversion/svn/svn.c
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/svn/svn.c?rev=1606666&r1=1606665&r2=1606666&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/svn/svn.c (original)
+++ subversion/branches/remove-log-addressing/subversion/svn/svn.c Mon Jun 30 10:15:06 2014
@@ -120,7 +120,6 @@ typedef enum svn_cl__longopt_t {
   opt_with_revprop,
   opt_with_all_revprops,
   opt_with_no_revprops,
-  opt_auto_moves,
   opt_parents,
   opt_accept,
   opt_show_revs,
@@ -298,10 +297,6 @@ const apr_getopt_option_t svn_cl__option
                     N_("set revision property ARG in new revision\n"
                        "                             "
                        "using the name[=value] format")},
-  {"auto-moves",    opt_auto_moves, 0,
-                    N_("attempt to interpret matching unique DEL+ADD\n"
-                       "                             "
-                       "pairs as moves")},
   {"parents",       opt_parents, 0, N_("make intermediate directories")},
   {"use-merge-history", 'g', 0,
                     N_("use/display additional information from merge\n"
@@ -806,7 +801,7 @@ const svn_opt_subcommand_desc2_t svn_cl_
      "      svn log --stop-on-copy --limit 1 -r0:HEAD ^/branches/foo\n"),
     {'r', 'q', 'v', 'g', 'c', opt_targets, opt_stop_on_copy, opt_incremental,
      opt_xml, 'l', opt_with_all_revprops, opt_with_no_revprops,
-     opt_with_revprop, opt_auto_moves, opt_depth, opt_diff, opt_diff_cmd,
+     opt_with_revprop, opt_depth, opt_diff, opt_diff_cmd,
      opt_internal_diff, 'x', opt_search, opt_search_and },
     {{opt_with_revprop, N_("retrieve revision property ARG")},
      {'c', N_("the change made in revision ARG")}} },
@@ -2254,9 +2249,6 @@ sub_main(int *exit_code, int argc, const
       case 'g':
         opt_state.use_merge_history = TRUE;
         break;
-      case opt_auto_moves:
-        opt_state.auto_moves = TRUE;
-        break;
       case opt_accept:
         SVN_ERR(svn_utf_cstring_to_utf8(&utf8_opt_arg, opt_arg, pool));
         opt_state.accept_which = svn_cl__accept_from_word(utf8_opt_arg);

Modified: subversion/branches/remove-log-addressing/subversion/tests/cmdline/basic_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/tests/cmdline/basic_tests.py?rev=1606666&r1=1606665&r2=1606666&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/tests/cmdline/basic_tests.py (original)
+++ subversion/branches/remove-log-addressing/subversion/tests/cmdline/basic_tests.py Mon Jun 30 10:15:06 2014
@@ -241,7 +241,8 @@ def basic_mkdir_url(sbox):
   Y_Z_url = sbox.repo_url + '/Y/Z'
 
   svntest.actions.run_and_verify_svn("mkdir URL URL/subdir",
-                                     ["\n", "Committed revision 2.\n"], [],
+                                     ["Committing transaction...\n",
+                                      "Committed revision 2.\n"], [],
                                      'mkdir', '-m', 'log_msg', Y_url, Y_Z_url)
 
   expected_output = wc.State(sbox.wc_dir, {
@@ -285,12 +286,14 @@ def basic_mkdir_url_with_parents(sbox):
                                      X_Y_Z_url, X_Y_Z2_url, X_T_C_url, U_V_W_url)
 
   svntest.actions.run_and_verify_svn("mkdir",
-                                     ["\n", "Committed revision 2.\n"], [],
+                                     ["Committing transaction...\n",
+                                      "Committed revision 2.\n"], [],
                                      'mkdir', '-m', 'log_msg',
                                      X_url, U_url)
 
   svntest.actions.run_and_verify_svn("mkdir --parents",
-                                     ["\n", "Committed revision 3.\n"], [],
+                                     ["Committing transaction...\n",
+                                      "Committed revision 3.\n"], [],
                                      'mkdir', '-m', 'log_msg', '--parents',
                                      X_Y_Z_url, X_Y_Z2_url, X_T_C_url, U_V_W_url)
 
@@ -1263,7 +1266,8 @@ def basic_delete(sbox):
   iota_URL = sbox.repo_url + '/iota'
 
   svntest.actions.run_and_verify_svn(None,
-                                     ["\n", "Committed revision 2.\n"], [],
+                                     ["Committing transaction...\n",
+                                      "Committed revision 2.\n"], [],
                                      'rm', '-m', 'delete iota URL',
                                      iota_URL)
 

Modified: subversion/branches/remove-log-addressing/subversion/tests/cmdline/blame_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/tests/cmdline/blame_tests.py?rev=1606666&r1=1606665&r2=1606666&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/tests/cmdline/blame_tests.py (original)
+++ subversion/branches/remove-log-addressing/subversion/tests/cmdline/blame_tests.py Mon Jun 30 10:15:06 2014
@@ -631,7 +631,8 @@ def blame_output_after_merge(sbox):
   A_url = sbox.repo_url + '/A'
 
   # r2: mv greek tree in trunk.
-  svntest.actions.run_and_verify_svn(None, ["\n","Committed revision 2.\n"], [],
+  svntest.actions.run_and_verify_svn(None, ["Committing transaction...\n",
+                                            "Committed revision 2.\n"], [],
                                      'mv', "--parents", A_url, trunk_A_url,
                                      "-m", "move greek tree to trunk")
 

Modified: subversion/branches/remove-log-addressing/subversion/tests/cmdline/copy_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/tests/cmdline/copy_tests.py?rev=1606666&r1=1606665&r2=1606666&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/tests/cmdline/copy_tests.py (original)
+++ subversion/branches/remove-log-addressing/subversion/tests/cmdline/copy_tests.py Mon Jun 30 10:15:06 2014
@@ -1157,7 +1157,8 @@ def wc_copy_parent_into_child(sbox):
 
   svntest.actions.run_and_verify_svn(None,
                                      ['Adding copy of        .\n',
-                                     '\n', 'Committed revision 2.\n'], [],
+                                      'Committing transaction...\n',
+                                      'Committed revision 2.\n'], [],
                                      'cp',
                                      '-m', 'a larger can',
                                      '.', F_B_url)

Modified: subversion/branches/remove-log-addressing/subversion/tests/cmdline/diff_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/tests/cmdline/diff_tests.py?rev=1606666&r1=1606665&r2=1606666&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/tests/cmdline/diff_tests.py (original)
+++ subversion/branches/remove-log-addressing/subversion/tests/cmdline/diff_tests.py Mon Jun 30 10:15:06 2014
@@ -4728,6 +4728,61 @@ def diff_parent_dir(sbox):
   finally:
     os.chdir(was_cwd)
 
+def diff_deleted_in_move_against_repos(sbox):
+  "diff deleted in move against repository"
+
+  sbox.build()
+  sbox.simple_move('A/B', 'BB')
+  sbox.simple_move('BB/E/alpha', 'BB/q')
+  sbox.simple_rm('BB/E/beta')
+
+  svntest.actions.run_and_verify_svn(None, None, [],
+                                     'mkdir', sbox.repo_url + '/BB/E',
+                                     '--parents', '-m', 'Create dir')
+
+  # OK. Local diff
+  svntest.actions.run_and_verify_svn(None, None, [],
+                                     'diff', sbox.wc_dir)
+
+  # OK. Walks nodes locally from wc-root, notices ancestry
+  svntest.actions.run_and_verify_svn(None, None, [],
+                                     'diff', sbox.wc_dir, '-r1',
+                                     '--notice-ancestry')
+
+  # OK. Walks nodes locally from BB, notices ancestry
+  svntest.actions.run_and_verify_svn(None, None, [],
+                                     'diff', sbox.wc_dir, '-r2',
+                                     '--notice-ancestry')
+
+  # OK. Walks nodes locally from wc-root
+  svntest.actions.run_and_verify_svn(None, None, [],
+                                     'diff', sbox.wc_dir, '-r1')
+
+  # Assertion. Walks nodes locally from BB.
+  svntest.actions.run_and_verify_svn(None, None, [],
+                                     'diff', sbox.wc_dir, '-r2')
+
+def diff_replaced_moved(sbox):
+  "diff against a replaced moved node"
+
+  sbox.build(read_only=True)
+  sbox.simple_move('A', 'AA')
+  sbox.simple_rm('AA/B')
+  sbox.simple_move('AA/D', 'AA/B')
+
+  # Ok
+  svntest.actions.run_and_verify_svn(None, None, [],
+                                     'diff', sbox.ospath('.'), '-r1')
+
+  # Ok (rhuijben: Works through a hack assuming some BASE knowledge)
+  svntest.actions.run_and_verify_svn(None, None, [],
+                                     'diff', sbox.ospath('AA'), '-r1')
+
+  # Error (misses BASE node because the diff editor is driven incorrectly)
+  svntest.actions.run_and_verify_svn(None, None, [],
+                                     'diff', sbox.ospath('AA/B'), '-r1')
+
+
 
 ########################################################################
 #Run the tests
@@ -4816,6 +4871,8 @@ test_list = [ None,
               diff_repo_repo_added_file_mime_type,
               diff_switched_file,
               diff_parent_dir,
+              diff_deleted_in_move_against_repos,
+              diff_replaced_moved,
               ]
 
 if __name__ == '__main__':

Modified: subversion/branches/remove-log-addressing/subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout?rev=1606666&r1=1606665&r2=1606666&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout (original)
+++ subversion/branches/remove-log-addressing/subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout Mon Jun 30 10:15:06 2014
@@ -95,8 +95,6 @@ Valid options:
   --with-all-revprops      : retrieve all revision properties
   --with-no-revprops       : retrieve no revision properties
   --with-revprop ARG       : retrieve revision property ARG
-  --auto-moves             : attempt to interpret matching unique DEL+ADD
-                             pairs as moves
   --depth ARG              : limit operation by depth ARG ('empty', 'files',
                              'immediates', or 'infinity')
   --diff                   : produce diff output

Modified: subversion/branches/remove-log-addressing/subversion/tests/cmdline/merge_reintegrate_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/tests/cmdline/merge_reintegrate_tests.py?rev=1606666&r1=1606665&r2=1606666&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/tests/cmdline/merge_reintegrate_tests.py (original)
+++ subversion/branches/remove-log-addressing/subversion/tests/cmdline/merge_reintegrate_tests.py Mon Jun 30 10:15:06 2014
@@ -278,7 +278,8 @@ def basic_reintegrate(sbox):
   # mergeinfo and the A-->A_MOVED path difference.
   svntest.actions.run_and_verify_svn(None, None, [], 'revert', '-R', wc_dir)
   svntest.actions.run_and_verify_svn(None,
-                                     ['\n', 'Committed revision 9.\n'],
+                                     ['Committing transaction...\n',
+                                      'Committed revision 9.\n'],
                                      [], 'move',
                                      sbox.repo_url + '/A',
                                      sbox.repo_url + '/A_MOVED',



Mime
View raw message