subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From i...@apache.org
Subject svn commit: r1686174 [4/18] - in /subversion/branches/reuse-ra-session: ./ build/ build/ac-macros/ build/generator/ build/generator/templates/ subversion/bindings/javahl/ subversion/bindings/javahl/native/ subversion/bindings/javahl/native/jniwrapper/ ...
Date Thu, 18 Jun 2015 10:35:33 GMT
Modified: subversion/branches/reuse-ra-session/subversion/bindings/javahl/native/VersionExtended.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/bindings/javahl/native/VersionExtended.cpp?rev=1686174&r1=1686173&r2=1686174&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/bindings/javahl/native/VersionExtended.cpp (original)
+++ subversion/branches/reuse-ra-session/subversion/bindings/javahl/native/VersionExtended.cpp Thu Jun 18 10:35:30 2015
@@ -27,7 +27,7 @@
 #include "JNIUtil.h"
 #include "VersionExtended.h"
 
-const VersionExtended *
+VersionExtended *
 VersionExtended::getCppObject(jobject jthis)
 {
   if (!jthis)
@@ -35,7 +35,7 @@ VersionExtended::getCppObject(jobject jt
 
   static jfieldID fid = 0;
   jlong cppAddr = SVNBase::findCppAddrForJObject(
-      jthis, &fid, JAVA_PACKAGE"/types/VersionExtended");
+      jthis, &fid, JAVAHL_CLASS("/types/VersionExtended"));
   return (cppAddr == 0 ? NULL : reinterpret_cast<VersionExtended *>(cppAddr));
 }
 
@@ -46,7 +46,7 @@ static jobject getWrapperAddress(jobject
   if (!*fid)
     {
       *fid = env->GetFieldID(env->GetObjectClass(jthat), "wrapper",
-                             "L"JAVA_PACKAGE"/types/VersionExtended;");
+                             JAVAHL_ARG("/types/VersionExtended;"));
       if (JNIUtil::isJavaExceptionThrown())
         {
           *fid = 0;
@@ -94,5 +94,5 @@ VersionExtended::~VersionExtended() {}
 void VersionExtended::dispose(jobject jthis)
 {
   static jfieldID fid = 0;
-  SVNBase::dispose(jthis, &fid, JAVA_PACKAGE"/types/VersionExtended");
+  SVNBase::dispose(jthis, &fid, JAVAHL_CLASS("/types/VersionExtended"));
 }

Modified: subversion/branches/reuse-ra-session/subversion/bindings/javahl/native/VersionExtended.h
URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/bindings/javahl/native/VersionExtended.h?rev=1686174&r1=1686173&r2=1686174&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/bindings/javahl/native/VersionExtended.h (original)
+++ subversion/branches/reuse-ra-session/subversion/bindings/javahl/native/VersionExtended.h Thu Jun 18 10:35:30 2015
@@ -33,7 +33,7 @@
 class VersionExtended : public SVNBase
 {
 public:
-  static const VersionExtended *getCppObject(jobject jthis);
+  static VersionExtended *getCppObject(jobject jthis);
   static const VersionExtended *getCppObjectFromLinkedLib(jobject jthat);
   static const VersionExtended *getCppObjectFromLoadedLib(jobject jthat);
   static const VersionExtended *getCppObjectFromLinkedLibIterator(jobject jthat);

Modified: subversion/branches/reuse-ra-session/subversion/bindings/javahl/native/jniwrapper/jni_base.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/bindings/javahl/native/jniwrapper/jni_base.cpp?rev=1686174&r1=1686173&r2=1686174&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/bindings/javahl/native/jniwrapper/jni_base.cpp (original)
+++ subversion/branches/reuse-ra-session/subversion/bindings/javahl/native/jniwrapper/jni_base.cpp Thu Jun 18 10:35:30 2015
@@ -179,30 +179,6 @@ void Env::throw_java_out_of_memory(const
 const jint LocalFrame::DEFAULT_CAPACITY = 16;
 
 
-// class Java::GlobalObject
-
-GlobalObject& GlobalObject::operator=(jobject that)
-{
-  this->~GlobalObject();
-  return *new(this) GlobalObject(Env(), that);
-}
-
-GlobalObject::~GlobalObject()
-{
-  if (m_obj)
-    Env().DeleteGlobalRef(m_obj);
-}
-
-
-// class Java::GlobalClass
-
-GlobalClass& GlobalClass::operator=(jclass that)
-{
-  this->~GlobalClass();
-  return *new(this) GlobalClass(Env(), that);
-}
-
-
 // Class Java::Object
 
 const char* const Object::m_class_name = "java/lang/Object";
@@ -375,7 +351,8 @@ const char* unknown_cxx_exception_messag
 
 svn_error_t* caught_java_exception_error(apr_status_t status) throw()
 {
-  return svn_error_create(status, NULL, _("Java exception"));
+  return svn_error_create(status, JNIUtil::wrapJavaException(),
+                          _("Java exception"));
 }
 
 } // namespace Java

Modified: subversion/branches/reuse-ra-session/subversion/bindings/javahl/native/jniwrapper/jni_globalref.hpp
URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/bindings/javahl/native/jniwrapper/jni_globalref.hpp?rev=1686174&r1=1686173&r2=1686174&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/bindings/javahl/native/jniwrapper/jni_globalref.hpp (original)
+++ subversion/branches/reuse-ra-session/subversion/bindings/javahl/native/jniwrapper/jni_globalref.hpp Thu Jun 18 10:35:30 2015
@@ -24,6 +24,8 @@
 #ifndef SVN_JAVAHL_JNIWRAPPER_GLOBALREF_HPP
 #define SVN_JAVAHL_JNIWRAPPER_GLOBALREF_HPP
 
+#include <memory>
+
 #include <jni.h>
 
 #include "jni_env.hpp"
@@ -43,11 +45,19 @@ public:
     : m_obj(obj ? env.NewGlobalRef(obj) : NULL)
     {}
 
-  ~GlobalObject();
+  ~GlobalObject() throw()
+    {
+      if (m_obj)
+        Env().DeleteGlobalRef(m_obj);
+    }
 
-  GlobalObject& operator=(jobject that);
+  GlobalObject& operator=(jobject that)
+    {
+      this->~GlobalObject();
+      return *new(this) GlobalObject(Env(), that);
+    }
 
-  jobject get() const
+  jobject get() const throw()
     {
       return m_obj;
     }
@@ -73,9 +83,13 @@ public:
     : GlobalObject(env, cls)
     {}
 
-  GlobalClass& operator=(jclass that);
+  GlobalClass& operator=(jclass that)
+    {
+      GlobalObject::operator=(that);
+      return *this;
+    }
 
-  jclass get() const
+  jclass get() const throw()
     {
       return jclass(GlobalObject::get());
     }

Modified: subversion/branches/reuse-ra-session/subversion/bindings/javahl/native/org_apache_subversion_javahl_types_VersionExtended.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/bindings/javahl/native/org_apache_subversion_javahl_types_VersionExtended.cpp?rev=1686174&r1=1686173&r2=1686174&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/bindings/javahl/native/org_apache_subversion_javahl_types_VersionExtended.cpp (original)
+++ subversion/branches/reuse-ra-session/subversion/bindings/javahl/native/org_apache_subversion_javahl_types_VersionExtended.cpp Thu Jun 18 10:35:30 2015
@@ -33,8 +33,24 @@
 #include "JNIStackElement.h"
 #include <string>
 
+#include "svn_private_config.h"
+
 // VersionExtended native methods
 
+JNIEXPORT void JNICALL
+Java_org_apache_subversion_javahl_types_VersionExtended_dispose(
+    JNIEnv *env, jobject jthis)
+{
+  JNIEntry(VersionExtended, dispose);
+  VersionExtended *const vx = VersionExtended::getCppObject(jthis);
+  if (vx == NULL)
+    {
+      JNIUtil::throwError(_("bad C++ this"));
+      return;
+    }
+  vx->dispose(jthis);
+}
+
 JNIEXPORT jstring JNICALL
 Java_org_apache_subversion_javahl_types_VersionExtended_getBuildDate(
     JNIEnv *env, jobject jthis)

Modified: subversion/branches/reuse-ra-session/subversion/bindings/javahl/native/org_apache_subversion_javahl_util_ConfigImpl_Category.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/bindings/javahl/native/org_apache_subversion_javahl_util_ConfigImpl_Category.cpp?rev=1686174&r1=1686173&r2=1686174&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/bindings/javahl/native/org_apache_subversion_javahl_util_ConfigImpl_Category.cpp (original)
+++ subversion/branches/reuse-ra-session/subversion/bindings/javahl/native/org_apache_subversion_javahl_util_ConfigImpl_Category.cpp Thu Jun 18 10:35:30 2015
@@ -270,12 +270,12 @@ Java_org_apache_subversion_javahl_util_C
       {
         enumerator_t* enmr = static_cast<enumerator_t*>(baton);
         JNIEnv* const e = enmr->m_env;
-        const jobject jh = enmr->m_jhandler;;
+        const jobject jh = enmr->m_jhandler;
 
         static jmethodID mid = 0;
         if (0 == mid)
           {
-            jclass cls = e->FindClass(JAVA_PACKAGE"/ISVNConfig$Enumerator");
+            jclass cls = e->FindClass(JAVAHL_CLASS("/ISVNConfig$Enumerator"));
             if (JNIUtil::isJavaExceptionThrown())
               return false;
             mid = e->GetMethodID(cls, "option",

Modified: subversion/branches/reuse-ra-session/subversion/bindings/javahl/native/org_apache_subversion_javahl_util_SubstLib.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/bindings/javahl/native/org_apache_subversion_javahl_util_SubstLib.cpp?rev=1686174&r1=1686173&r2=1686174&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/bindings/javahl/native/org_apache_subversion_javahl_util_SubstLib.cpp (original)
+++ subversion/branches/reuse-ra-session/subversion/bindings/javahl/native/org_apache_subversion_javahl_util_SubstLib.cpp Thu Jun 18 10:35:30 2015
@@ -61,7 +61,7 @@ build_keywords_common(Java::Env env, con
   svn_string_t* keywords_string = keywords_contents.get_string(pool);
   const char* revision = (jrevision < 0 ? NULL
                           : apr_psprintf(pool.getPool(),
-                                         "%"APR_UINT64_T_FMT,
+                                         "%" APR_UINT64_T_FMT,
                                          apr_uint64_t(jrevision)));
   const Java::String::Contents url_contents(url);
   const Java::String::Contents root_url_contents(repos_root_url);

Modified: subversion/branches/reuse-ra-session/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java
URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java?rev=1686174&r1=1686173&r2=1686174&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java (original)
+++ subversion/branches/reuse-ra-session/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java Thu Jun 18 10:35:30 2015
@@ -502,9 +502,9 @@ public interface ISVNClient
      * Recursively cleans up a local directory, finishing any
      * incomplete operations, removing lockfiles, etc.
      * <p>
-     * Behaves like the 1.9 version with <code>breakLocks</code> and
-     * <code>includeExternals</code> set to <code>false<code>, and the
-     * other flags to <code>true</code>.
+     * Behaves like the 1.9 version with <code>includeExternals</code>
+     * set to <code>false<code>, and the other flags to
+     * <code>true</code>.
      * @param path a local directory.
      * @throws ClientException
      */

Modified: subversion/branches/reuse-ra-session/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNEditor.java
URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNEditor.java?rev=1686174&r1=1686173&r2=1686174&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNEditor.java (original)
+++ subversion/branches/reuse-ra-session/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNEditor.java Thu Jun 18 10:35:30 2015
@@ -94,7 +94,9 @@ public interface ISVNEditor
      * <code>replacesRevision</code> set accordingly <em>must</em> be used.
      * <p>
      * <b>Note:</b> The <code>contents</code> stream's lifetime must not
-     *      extend beyond the scope of this function.
+     *      extend beyond the scope of this function. An
+     *      implementation <b>must</b> close the stream after
+     *      consuming its contents.
      *
      * @throws ClientException
      */
@@ -193,7 +195,9 @@ public interface ISVNEditor
      * #addFile().
      * <p>
      * <b>Note:</b> The <code>contents</code> stream's lifetime must not
-     *      extend beyond the scope of this function.
+     *      extend beyond the scope of this function. An
+     *      implementation <b>must</b> close the stream after
+     *      consuming its contents.
      *
      * @throws ClientException
      */

Modified: subversion/branches/reuse-ra-session/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java
URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java?rev=1686174&r1=1686173&r2=1686174&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java (original)
+++ subversion/branches/reuse-ra-session/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java Thu Jun 18 10:35:30 2015
@@ -294,7 +294,7 @@ public class SVNClient implements ISVNCl
 
     public void cleanup(String path) throws ClientException
     {
-        cleanup(path, false, true, true, true, false);
+        cleanup(path, true, true, true, true, false);
     }
 
     public native void resolve(String path, Depth depth,

Modified: subversion/branches/reuse-ra-session/subversion/bindings/javahl/src/org/apache/subversion/javahl/remote/StatusEditor.java
URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/bindings/javahl/src/org/apache/subversion/javahl/remote/StatusEditor.java?rev=1686174&r1=1686173&r2=1686174&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/bindings/javahl/src/org/apache/subversion/javahl/remote/StatusEditor.java (original)
+++ subversion/branches/reuse-ra-session/subversion/bindings/javahl/src/org/apache/subversion/javahl/remote/StatusEditor.java Thu Jun 18 10:35:30 2015
@@ -33,6 +33,7 @@ import java.util.GregorianCalendar;
 import java.util.Locale;
 import java.util.SimpleTimeZone;
 import java.io.InputStream;
+import java.io.IOException;
 import java.nio.charset.Charset;
 
 /**
@@ -78,6 +79,14 @@ class StatusEditor implements ISVNEditor
                         long replacesRevision)
     {
         //DEBUG:System.err.println("  [J] StatusEditor.addFile");
+        if (contents != null) {
+            try {
+                contents.close();
+            } catch (IOException ex) {
+                throw new RuntimeException(ex);
+            }
+        }
+
         checkState();
         receiver.addedFile(relativePath);
     }
@@ -120,6 +129,14 @@ class StatusEditor implements ISVNEditor
                           Map<String, byte[]> properties)
     {
         //DEBUG:System.err.println("  [J] StatusEditor.alterFile");
+        if (contents != null) {
+            try {
+                contents.close();
+            } catch (IOException ex) {
+                throw new RuntimeException(ex);
+            }
+        }
+
         checkState();
         receiver.modifiedFile(relativePath,
                               (checksum != null && contents != null),

Modified: subversion/branches/reuse-ra-session/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/VersionExtended.java
URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/VersionExtended.java?rev=1686174&r1=1686173&r2=1686174&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/VersionExtended.java (original)
+++ subversion/branches/reuse-ra-session/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/VersionExtended.java Thu Jun 18 10:35:30 2015
@@ -41,6 +41,21 @@ public class VersionExtended
     }
 
     /**
+     * Release the native peer. This method must be called to release
+     * the native resources held by this object.
+     * <p>
+     * Once this method is called, all object references obtained from
+     * the iterators returned by {@link #getLinkedLibs()} and
+     * {@link #getLoadedLibs()} become invalid and should no longer be used.
+     */
+    public native void dispose();
+
+    /**
+     * release the native peer (should use dispose instead)
+     */
+    public native void finalize();
+
+    /**
      * @return The date when the libsvn_subr library was compiled, in
      * the format defined by the C standard macro #__DATE__.
      */

Modified: subversion/branches/reuse-ra-session/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java
URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java?rev=1686174&r1=1686173&r2=1686174&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java (original)
+++ subversion/branches/reuse-ra-session/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java Thu Jun 18 10:35:30 2015
@@ -139,9 +139,10 @@ public class BasicTests extends SVNTests
      */
     public void testVersionExtendedQuiet() throws Throwable
     {
+        VersionExtended vx = null;
         try
         {
-            VersionExtended vx = client.getVersionExtended(false);
+            vx = client.getVersionExtended(false);
             String result = vx.getBuildDate();
             if (result == null || result.trim().length() == 0)
                 throw new Exception("Build date empty");
@@ -160,6 +161,11 @@ public class BasicTests extends SVNTests
             fail("VersionExtended should always be available unless the " +
                  "native libraries failed to initialize: " + e);
         }
+        finally
+        {
+            if (vx != null)
+                vx.dispose();
+        }
     }
 
     /**
@@ -168,9 +174,10 @@ public class BasicTests extends SVNTests
      */
     public void testVersionExtendedVerbose() throws Throwable
     {
+        VersionExtended vx = null;
         try
         {
-            VersionExtended vx = client.getVersionExtended(true);
+            vx = client.getVersionExtended(true);
             String result = vx.getRuntimeHost();
             if (result == null || result.trim().length() == 0)
                 throw new Exception("Runtime host empty");
@@ -216,6 +223,11 @@ public class BasicTests extends SVNTests
             fail("VersionExtended should always be available unless the " +
                  "native libraries failed to initialize: " + e);
         }
+        finally
+        {
+            if (vx != null)
+                vx.dispose();
+        }
     }
 
     /**
@@ -1091,6 +1103,7 @@ public class BasicTests extends SVNTests
     private void setupPinExternalsTest(OneTest thisTest) throws Throwable
     {
         byte[] extref = ("^/A/D/H ADHext\n" +
+                         "^/A/D/H ADHext2\n" +
                          "^/A/D/H@1 peggedADHext\n" +
                          "-r1 ^/A/D/H revvedADHext\n").getBytes();
         Set<String> paths = new HashSet<String>();
@@ -1130,6 +1143,7 @@ public class BasicTests extends SVNTests
 
         // Verification
         String expected = ("^/A/D/H@2 ADHext\n" +
+                           "^/A/D/H@2 ADHext2\n" +
                            "^/A/D/H@1 peggedADHext\n" +
                            "-r1 ^/A/D/H@2 revvedADHext\n");
         String actual =
@@ -1158,6 +1172,7 @@ public class BasicTests extends SVNTests
 
         // Verification
         String expected = ("^/A/D/H@2 ADHext\n" +
+                           "^/A/D/H@2 ADHext2\n" +
                            "^/A/D/H@1 peggedADHext\n" +
                            "-r1 ^/A/D/H@2 revvedADHext\n");
         String actual =
@@ -1186,6 +1201,7 @@ public class BasicTests extends SVNTests
 
         // Verification
         String expected = ("^/A/D/H@2 ADHext\n" +
+                           "^/A/D/H@2 ADHext2\n" +
                            "^/A/D/H@1 peggedADHext\n" +
                            "-r1 ^/A/D/H@2 revvedADHext\n");
         String actual =
@@ -1214,6 +1230,7 @@ public class BasicTests extends SVNTests
 
         // Verification
         String expected = ("^/A/D/H@2 ADHext\n" +
+                           "^/A/D/H@2 ADHext2\n" +
                            "^/A/D/H@1 peggedADHext\n" +
                            "-r1 ^/A/D/H@2 revvedADHext\n");
         String actual =
@@ -1249,6 +1266,44 @@ public class BasicTests extends SVNTests
 
         // Verification
         String expected = ("^/A/D/H@2 ADHext\n" +
+                           "^/A/D/H ADHext2\n" +
+                           "^/A/D/H@1 peggedADHext\n" +
+                           "-r1 ^/A/D/H revvedADHext\n");
+        String actual =
+            new String(client.propertyGet(target, "svn:externals", null, null));
+
+        assertEquals(expected, actual);
+    }
+
+    /**
+     * Test REPO-to-REPO copy with explicit pinned externals that
+     * don't correspond to actual externals
+     * @throws Throwable
+     */
+    public void testCopyPinExternals_repo2repo_corkscrew() throws Throwable
+    {
+        // build the test setup
+        OneTest thisTest = new OneTest();
+        setupPinExternalsTest(thisTest);
+
+        String sourceUrl = thisTest.getUrl() + "/A/B";
+        Map<String, List<ExternalItem>> externalsToPin =
+            new HashMap<String, List<ExternalItem>>();
+        List<ExternalItem> items = new ArrayList<ExternalItem>(1);
+        items.add(new ExternalItem("ADHext", "^/A/D/H", null, null));
+        externalsToPin.put(sourceUrl + "/A", items);
+
+        List<CopySource> sources = new ArrayList<CopySource>(1);
+        sources.add(new CopySource(sourceUrl, null, null));
+        String target = thisTest.getUrl() + "/A/Bcopy";
+        client.copy(sources, target, true, false, false, false,
+                    true,       // pinExternals
+                    externalsToPin,
+                    null, new ConstMsg("Copy WC to REPO"), null);
+
+        // Verification
+        String expected = ("^/A/D/H ADHext\n" +
+                           "^/A/D/H ADHext2\n" +
                            "^/A/D/H@1 peggedADHext\n" +
                            "-r1 ^/A/D/H revvedADHext\n");
         String actual =

Modified: subversion/branches/reuse-ra-session/subversion/bindings/javahl/tests/org/apache/subversion/javahl/RunTests.java
URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/bindings/javahl/tests/org/apache/subversion/javahl/RunTests.java?rev=1686174&r1=1686173&r2=1686174&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/bindings/javahl/tests/org/apache/subversion/javahl/RunTests.java (original)
+++ subversion/branches/reuse-ra-session/subversion/bindings/javahl/tests/org/apache/subversion/javahl/RunTests.java Thu Jun 18 10:35:30 2015
@@ -95,6 +95,7 @@ public class RunTests
                 suite.addTestSuite(UtilTests.class);
                 suite.addTestSuite(SVNRemoteTests.class);
                 suite.addTestSuite(SVNReposTests.class);
+                suite.addTestSuite(ExceptionTests.class);
             }
             else
             {

Modified: subversion/branches/reuse-ra-session/subversion/bindings/javahl/tests/org/apache/subversion/javahl/SVNRemoteTests.java
URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/bindings/javahl/tests/org/apache/subversion/javahl/SVNRemoteTests.java?rev=1686174&r1=1686173&r2=1686174&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/bindings/javahl/tests/org/apache/subversion/javahl/SVNRemoteTests.java (original)
+++ subversion/branches/reuse-ra-session/subversion/bindings/javahl/tests/org/apache/subversion/javahl/SVNRemoteTests.java Thu Jun 18 10:35:30 2015
@@ -53,15 +53,35 @@ import java.security.NoSuchAlgorithmExce
  */
 public class SVNRemoteTests extends SVNTests
 {
+    /**
+     * Base name of all our tests.
+     */
+    public final static String testName = "remote_test";
+
     protected OneTest thisTest;
 
     public SVNRemoteTests()
     {
+        init();
     }
 
     public SVNRemoteTests(String name)
     {
         super(name);
+        init();
+    }
+
+    /**
+     * Initialize the testBaseName and the testCounter, if this is the
+     * first test of this class.
+     */
+    private void init()
+    {
+        if (!testName.equals(testBaseName))
+        {
+            testCounter = 0;
+            testBaseName = testName;
+        }
     }
 
     protected void setUp() throws Exception
@@ -937,6 +957,7 @@ public class SVNRemoteTests extends SVNT
                        0, false, false, false, null,
                        receiver);
         assertEquals(1, receiver.logs.size());
+        assertTrue(receiver.logs.get(0).revprops.size() > 0);
 
         receiver.logs.clear();
         session.reparent(getTestRepoUrl() + "/A");
@@ -945,6 +966,7 @@ public class SVNRemoteTests extends SVNT
                        0, 0, false, false, false, null,
                        receiver);
         assertEquals(2, receiver.logs.size());
+        assertTrue(receiver.logs.get(0).revprops.size() > 0);
     }
 
     public void testGetLogMissing() throws Exception

Modified: subversion/branches/reuse-ra-session/subversion/bindings/javahl/tests/org/apache/subversion/javahl/SVNReposTests.java
URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/bindings/javahl/tests/org/apache/subversion/javahl/SVNReposTests.java?rev=1686174&r1=1686173&r2=1686174&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/bindings/javahl/tests/org/apache/subversion/javahl/SVNReposTests.java (original)
+++ subversion/branches/reuse-ra-session/subversion/bindings/javahl/tests/org/apache/subversion/javahl/SVNReposTests.java Thu Jun 18 10:35:30 2015
@@ -40,13 +40,33 @@ import java.util.Map;
  */
 public class SVNReposTests extends SVNTests
 {
+    /**
+     * Base name of all our tests.
+     */
+    public final static String testName = "repos_test";
+
     public SVNReposTests()
     {
+        init();
     }
 
     public SVNReposTests(String name)
     {
         super(name);
+        init();
+    }
+
+    /**
+     * Initialize the testBaseName and the testCounter, if this is the
+     * first test of this class.
+     */
+    private void init()
+    {
+        if (!testName.equals(testBaseName))
+        {
+            testCounter = 0;
+            testBaseName = testName;
+        }
     }
 
     /**

Modified: subversion/branches/reuse-ra-session/subversion/bindings/javahl/tests/org/apache/subversion/javahl/SVNTests.java
URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/bindings/javahl/tests/org/apache/subversion/javahl/SVNTests.java?rev=1686174&r1=1686173&r2=1686174&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/bindings/javahl/tests/org/apache/subversion/javahl/SVNTests.java (original)
+++ subversion/branches/reuse-ra-session/subversion/bindings/javahl/tests/org/apache/subversion/javahl/SVNTests.java Thu Jun 18 10:35:30 2015
@@ -80,6 +80,17 @@ class SVNTests extends TestCase
     protected static int testCounter;
 
     /**
+     * Set to true if tests should clean up after themselves.
+     */
+    protected boolean cleanupAfterTests = false;
+
+    /**
+     * this list contains the names of all repository and working copy
+     * directories created by one test case.
+     */
+    protected static List<File> testDirs;
+
+    /**
      * the file in which the sample repository has been dumped.
      */
     protected File greekDump;
@@ -173,6 +184,10 @@ class SVNTests extends TestCase
 
     private void init()
     {
+        String cleanupProp = System.getProperty("test.cleanup");
+        if (cleanupProp != null)
+            cleanupAfterTests = (0 < cleanupProp.trim().length());
+
         String disableCredStore = System.getProperty("test.disablecredstore");
         if (disableCredStore != null)
         {
@@ -510,6 +525,16 @@ class SVNTests extends TestCase
         client.dispose();
         // remove the temporary directory
         removeDirOrFile(localTmp);
+
+        // optionally remove the test directories
+        List<File> td = testDirs;
+        testDirs = null;
+        if (cleanupAfterTests && td != null)
+        {
+            for(File f: td)
+                removeDirOrFile(f);
+        }
+
         super.tearDown();
     }
 
@@ -788,6 +813,13 @@ class SVNTests extends TestCase
             return wc;
         }
 
+        private void trackDir(File dir)
+        {
+            if (testDirs == null)
+                testDirs = new ArrayList<File>();
+            testDirs.add(dir);
+        }
+
         /**
          * Create the repository for the beginning of the test.
          * Assumes that {@link #testName} has been set.
@@ -804,6 +836,7 @@ class SVNTests extends TestCase
             // build a clean repository directory
             File repos = new File(repositories, this.testName);
             removeDirOrFile(repos);
+            trackDir(repos);
             // create and load the repository from the default repository dump
             admin.create(repos, true, false, conf, fsType);
             if (loadGreek)
@@ -829,6 +862,7 @@ class SVNTests extends TestCase
             URI uri = makeReposUrl(repos);
             workingCopy = new File(workingCopies, this.testName);
             removeDirOrFile(workingCopy);
+            trackDir(workingCopy);
             // checkout the repository
             client.checkout(uri.toString(), workingCopy.getAbsolutePath(),
                    null, null, Depth.infinity, false, false);

Modified: subversion/branches/reuse-ra-session/subversion/bindings/javahl/tests/org/tigris/subversion/javahl/SVNAdminTests.java
URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/bindings/javahl/tests/org/tigris/subversion/javahl/SVNAdminTests.java?rev=1686174&r1=1686173&r2=1686174&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/bindings/javahl/tests/org/tigris/subversion/javahl/SVNAdminTests.java (original)
+++ subversion/branches/reuse-ra-session/subversion/bindings/javahl/tests/org/tigris/subversion/javahl/SVNAdminTests.java Thu Jun 18 10:35:30 2015
@@ -35,13 +35,33 @@ import org.tigris.subversion.javahl.Subv
  */
 public class SVNAdminTests extends SVNTests
 {
+    /**
+     * Base name of all our tests.
+     */
+    public final static String testName = "admin_test";
+
     public SVNAdminTests()
     {
+        init();
     }
 
     public SVNAdminTests(String name)
     {
         super(name);
+        init();
+    }
+
+    /**
+     * Initialize the testBaseName and the testCounter, if this is the
+     * first test of this class.
+     */
+    private void init()
+    {
+        if (!testName.equals(testBaseName))
+        {
+            testCounter = 0;
+            testBaseName = testName;
+        }
     }
 
     /**

Modified: subversion/branches/reuse-ra-session/subversion/bindings/swig/INSTALL
URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/bindings/swig/INSTALL?rev=1686174&r1=1686173&r2=1686174&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/bindings/swig/INSTALL (original)
+++ subversion/branches/reuse-ra-session/subversion/bindings/swig/INSTALL Thu Jun 18 10:35:30 2015
@@ -65,7 +65,7 @@ BUILDING SWIG BINDINGS FOR SVN ON UNIX
 
 
 Step 1:  Install a suitable version of SWIG (which is
-         currently SWIG version 1.3.24 or later).
+         currently SWIG version 1.3.24 or later, but not SWIG 3.0.0 or newer).
 
     * Perhaps your distribution packages a suitable version - if it does
       install it, and skip to the last bullet point in this section.

Modified: subversion/branches/reuse-ra-session/subversion/bindings/swig/core.i
URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/bindings/swig/core.i?rev=1686174&r1=1686173&r2=1686174&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/bindings/swig/core.i (original)
+++ subversion/branches/reuse-ra-session/subversion/bindings/swig/core.i Thu Jun 18 10:35:30 2015
@@ -532,8 +532,10 @@
         $1 = NULL;
     }
     else if (SvPOK($input)) {
-        if (_global_pool == NULL)
+        if (_global_pool == NULL) {
             _global_pool = svn_swig_pl_make_pool((SV *)NULL);
+            SPAGAIN;
+        }
         $1 = apr_pstrdup(_global_pool, SvPV_nolen($input));
     }
     else {

Modified: subversion/branches/reuse-ra-session/subversion/bindings/swig/include/apr.swg
URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/bindings/swig/include/apr.swg?rev=1686174&r1=1686173&r2=1686174&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/bindings/swig/include/apr.swg (original)
+++ subversion/branches/reuse-ra-session/subversion/bindings/swig/include/apr.swg Thu Jun 18 10:35:30 2015
@@ -31,23 +31,21 @@
 */
 #ifdef SWIGPERL
 %typemap(out) long long {
-    char temp[256];
+    char temp[30];
     sprintf(temp, "%" APR_INT64_T_FMT, (apr_int64_t) $1);
-    ST(argvi) = sv_newmortal();
-    sv_setpv((SV*)ST(argvi++), temp);
+    %append_output(sv_2mortal(newSVpv(temp, 0)));
 }
 
 %typemap(out) unsigned long long {
-    char temp[256];
+    char temp[30];
     sprintf(temp, "%" APR_UINT64_T_FMT, (apr_uint64_t) $1);
-    ST(argvi) = sv_newmortal();
-    sv_setpv((SV*)ST(argvi++), temp);
+    %append_output(sv_2mortal(newSVpv(temp, 0)));
 }
 
 %typemap(in, numinputs=0) long long *OUTPUT (apr_int64_t temp)
     "$1 = &temp;";
 %typemap(argout) long long *OUTPUT {
-  char temp[256];
+  char temp[30];
   sprintf(temp, "%" APR_INT64_T_FMT, (apr_int64_t)*($1));
   %append_output(sv_2mortal(newSVpv(temp, 0)));
 }
@@ -55,7 +53,7 @@
 %typemap(in, numinputs=0) unsigned long long *OUTPUT (apr_uint64_t temp)
     "$1 = &temp;";
 %typemap(argout) unsigned long long *OUTPUT {
-  char temp[256];
+  char temp[30];
   sprintf(temp, "%" APR_UINT64_T_FMT, (apr_uint64_t)*($1));
   %append_output(sv_2mortal(newSVpv(temp, 0)));
 }

Modified: subversion/branches/reuse-ra-session/subversion/bindings/swig/include/svn_containers.swg
URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/bindings/swig/include/svn_containers.swg?rev=1686174&r1=1686173&r2=1686174&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/bindings/swig/include/svn_containers.swg (original)
+++ subversion/branches/reuse-ra-session/subversion/bindings/swig/include/svn_containers.swg Thu Jun 18 10:35:30 2015
@@ -269,8 +269,10 @@
 %typemap(in) apr_hash_t *PROPHASH
   (apr_pool_t *_global_pool = NULL)
 {
-  if (_global_pool == NULL)
+  if (_global_pool == NULL) {
     _global_pool = svn_swig_pl_make_pool((SV *)NULL);
+    SPAGAIN;
+  }
   $1 = svn_swig_pl_hash_to_prophash($input, _global_pool);  
 }
 %typemap(out) apr_hash_t *PROPHASH

Modified: subversion/branches/reuse-ra-session/subversion/bindings/swig/include/svn_string.swg
URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/bindings/swig/include/svn_string.swg?rev=1686174&r1=1686173&r2=1686174&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/bindings/swig/include/svn_string.swg (original)
+++ subversion/branches/reuse-ra-session/subversion/bindings/swig/include/svn_string.swg Thu Jun 18 10:35:30 2015
@@ -90,6 +90,7 @@ typedef struct svn_string_t svn_string_t
 %typemap(in) svn_stringbuf_t * {
     apr_size_t len;
     char *buf;
+    apr_pool_t *pool;
 
     if (!SvOK($input)) {
         $1 = NULL;
@@ -97,8 +98,9 @@ typedef struct svn_string_t svn_string_t
         buf = SvPV($input, len);
         /* Another case of ugly pool handling, this should use the current
            default pool, or make a new one if it doesn't exist yet */
-        $1 = svn_stringbuf_ncreate(buf,len,
-                                   svn_swig_pl_make_pool ((SV *)NULL));
+        pool = svn_swig_pl_make_pool ((SV *)NULL);
+        SPAGAIN;
+        $1 = svn_stringbuf_ncreate(buf,len, pool);
     } else {
         croak("Not a string");
     }

Modified: subversion/branches/reuse-ra-session/subversion/bindings/swig/include/svn_types.swg
URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/bindings/swig/include/svn_types.swg?rev=1686174&r1=1686173&r2=1686174&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/bindings/swig/include/svn_types.swg (original)
+++ subversion/branches/reuse-ra-session/subversion/bindings/swig/include/svn_types.swg Thu Jun 18 10:35:30 2015
@@ -423,9 +423,11 @@ svn_ ## TYPE ## _swig_rb_closed(VALUE se
         if (SvOK(exception_handler)) {
             SV *callback_result;
 
+            PUTBACK;
             svn_swig_pl_callback_thunk (CALL_SV, exception_handler,
                                         &callback_result, "S", $1,
                                         $1_descriptor);
+            SPAGAIN;
         } else {
             $result = SWIG_NewPointerObj($1, $1_descriptor, 0);
             argvi++;
@@ -548,6 +550,7 @@ svn_ ## TYPE ## _swig_rb_closed(VALUE se
 %typemap(in) apr_pool_t *pool "";
 %typemap(default) apr_pool_t *pool(apr_pool_t *_global_pool) {
     _global_pool = $1 = svn_swig_pl_make_pool (ST(items-1));
+    SPAGAIN;
 }
 #endif
 #ifdef SWIGRUBY
@@ -935,15 +938,24 @@ svn_ ## TYPE ## _swig_rb_closed(VALUE se
 #ifdef SWIGPERL
 %typemap(in) svn_stream_t * {
     svn_swig_pl_make_stream (&$1, $input);
+    SPAGAIN;
 }
 
 %typemap(out) svn_stream_t * {
-    $result = svn_swig_pl_from_stream ($1);
+    SV* tmp;
+    PUTBACK;
+    tmp = svn_swig_pl_from_stream ($1);
+    SPAGAIN;
+    $result = tmp;
     argvi++;
 }
 
 %typemap(argout) svn_stream_t ** {
-  %append_output(svn_swig_pl_from_stream(*$1));
+    SV *tmp;
+    PUTBACK;
+    tmp = svn_swig_pl_from_stream(*$1);
+    SPAGAIN;
+    %append_output(tmp);
 }
 #endif
 
@@ -1116,11 +1128,11 @@ svn_ ## TYPE ## _swig_rb_closed(VALUE se
 }
 
 %typemap(argout) unsigned char *result_digest {
-  /* FIXME: This code is clearly buggy. The return value of sv_newmortal()
-     is immediately overwritten by the return value
-     of svn_swig_pl_from_md5(). */
-    ST(argvi) = sv_newmortal();
-    ST(argvi++) = svn_swig_pl_from_md5($1);
+    SV *tmp;
+    PUTBACK;
+    tmp = svn_swig_pl_from_md5($1);
+    SPAGAIN;
+    %append_output(tmp);
 }
 #endif
 
@@ -1174,8 +1186,10 @@ svn_ ## TYPE ## _swig_rb_closed(VALUE se
 %typemap(in) svn_opt_revision_t * 
   (svn_opt_revision_t rev, apr_pool_t *_global_pool = NULL)
 {
-  if (_global_pool == NULL)
+  if (_global_pool == NULL) {
     _global_pool = svn_swig_pl_make_pool((SV *)NULL);
+    SPAGAIN;
+  }
   $1 = svn_swig_pl_set_revision(&rev, $input, TRUE, _global_pool);
 }
 #endif

Modified: subversion/branches/reuse-ra-session/subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl.c
URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl.c?rev=1686174&r1=1686173&r2=1686174&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl.c (original)
+++ subversion/branches/reuse-ra-session/subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl.c Thu Jun 18 10:35:30 2015
@@ -520,6 +520,7 @@ svn_opt_revision_t *svn_swig_pl_set_revi
    put returned value in result if result is not NULL
 */
 
+/* NOTE: calls back into Perl (directly) */
 svn_error_t *svn_swig_pl_callback_thunk(perl_func_invoker_t caller_func,
                                         void *func,
                                         SV **result,
@@ -670,6 +671,7 @@ static item_baton * make_baton(apr_pool_
     return newb;
 }
 
+/* NOTE: calls back into Perl (by calling svn_swig_pl_callback_thunk) */
 static svn_error_t * close_baton(void *baton, const char *method, apr_pool_t *pool)
 {
     item_baton *ib = baton;
@@ -690,6 +692,7 @@ static svn_error_t * close_baton(void *b
     return SVN_NO_ERROR;
 }
 
+/* NOTE: calls back into Perl (by calling svn_swig_pl_callback_thunk) */
 static svn_error_t * thunk_set_target_revision(void *edit_baton,
                                                svn_revnum_t target_revision,
                                                apr_pool_t *pool)
@@ -703,6 +706,7 @@ static svn_error_t * thunk_set_target_re
     return SVN_NO_ERROR;
 }
 
+/* NOTE: calls back into Perl (by calling svn_swig_pl_callback_thunk) */
 static svn_error_t * thunk_open_root(void *edit_baton,
                                      svn_revnum_t base_revision,
                                      apr_pool_t *dir_pool,
@@ -720,6 +724,7 @@ static svn_error_t * thunk_open_root(voi
     return SVN_NO_ERROR;
 }
 
+/* NOTE: calls back into Perl (by calling svn_swig_pl_callback_thunk) */
 static svn_error_t * thunk_delete_entry(const char *path,
                                         svn_revnum_t revision,
                                         void *parent_baton,
@@ -734,6 +739,7 @@ static svn_error_t * thunk_delete_entry(
     return SVN_NO_ERROR;
 }
 
+/* NOTE: calls back into Perl (by calling svn_swig_pl_callback_thunk) */
 static svn_error_t * thunk_add_directory(const char *path,
                                          void *parent_baton,
                                          const char *copyfrom_path,
@@ -753,6 +759,7 @@ static svn_error_t * thunk_add_directory
     return SVN_NO_ERROR;
 }
 
+/* NOTE: calls back into Perl (by calling svn_swig_pl_callback_thunk) */
 static svn_error_t * thunk_open_directory(const char *path,
                                           void *parent_baton,
                                           svn_revnum_t base_revision,
@@ -772,6 +779,7 @@ static svn_error_t * thunk_open_director
     return SVN_NO_ERROR;
 }
 
+/* NOTE: calls back into Perl (by calling svn_swig_pl_callback_thunk) */
 static svn_error_t * thunk_change_dir_prop(void *dir_baton,
                                            const char *name,
                                            const svn_string_t *value,
@@ -787,12 +795,14 @@ static svn_error_t * thunk_change_dir_pr
     return SVN_NO_ERROR;
 }
 
+/* NOTE: calls back into Perl (by calling close_baton) */
 static svn_error_t * thunk_close_directory(void *dir_baton,
                                            apr_pool_t *pool)
 {
     return close_baton(dir_baton, "close_directory", pool);
 }
 
+/* NOTE: calls back into Perl (by calling svn_swig_pl_callback_thunk) */
 static svn_error_t * thunk_absent_directory(const char *path,
                                             void *parent_baton,
                                             apr_pool_t *pool)
@@ -807,6 +817,7 @@ static svn_error_t * thunk_absent_direct
     return SVN_NO_ERROR;
 }
 
+/* NOTE: calls back into Perl (by calling svn_swig_pl_callback_thunk) */
 static svn_error_t * thunk_add_file(const char *path,
                                     void *parent_baton,
                                     const char *copyfrom_path,
@@ -827,6 +838,7 @@ static svn_error_t * thunk_add_file(cons
     return SVN_NO_ERROR;
 }
 
+/* NOTE: calls back into Perl (by calling svn_swig_pl_callback_thunk) */
 static svn_error_t * thunk_open_file(const char *path,
                                      void *parent_baton,
                                      svn_revnum_t base_revision,
@@ -845,6 +857,7 @@ static svn_error_t * thunk_open_file(con
     return SVN_NO_ERROR;
 }
 
+/* NOTE: calls back into Perl (by calling svn_swig_pl_callback_thunk) */
 static svn_error_t * thunk_window_handler(svn_txdelta_window_t *window,
                                           void *baton)
 {
@@ -865,6 +878,7 @@ static svn_error_t * thunk_window_handle
     return SVN_NO_ERROR;
 }
 
+/* NOTE: calls back into Perl (by calling svn_swig_pl_callback_thunk) */
 static svn_error_t *
 thunk_apply_textdelta(void *file_baton,
                       const char *base_checksum,
@@ -909,6 +923,7 @@ thunk_apply_textdelta(void *file_baton,
     return SVN_NO_ERROR;
 }
 
+/* NOTE: calls back into Perl (by calling svn_swig_pl_callback_thunk) */
 static svn_error_t * thunk_change_file_prop(void *file_baton,
                                             const char *name,
                                             const svn_string_t *value,
@@ -924,6 +939,7 @@ static svn_error_t * thunk_change_file_p
     return SVN_NO_ERROR;
 }
 
+/* NOTE: calls back into Perl (by calling svn_swig_pl_callback_thunk) */
 static svn_error_t * thunk_close_file(void *file_baton,
                                       const char *text_checksum,
                                       apr_pool_t *pool)
@@ -940,6 +956,7 @@ static svn_error_t * thunk_close_file(vo
     return SVN_NO_ERROR;
 }
 
+/* NOTE: calls back into Perl (by calling svn_swig_pl_callback_thunk) */
 static svn_error_t * thunk_absent_file(const char *path,
                                        void *parent_baton,
                                        apr_pool_t *pool)
@@ -954,12 +971,14 @@ static svn_error_t * thunk_absent_file(c
     return SVN_NO_ERROR;
 }
 
+/* NOTE: calls back into Perl (by calling close_baton) */
 static svn_error_t * thunk_close_edit(void *edit_baton,
                                       apr_pool_t *pool)
 {
     return close_baton(edit_baton, "close_edit", pool);
 }
 
+/* NOTE: calls back into Perl (by calling close_baton) */
 static svn_error_t * thunk_abort_edit(void *edit_baton,
                                       apr_pool_t *pool)
 {
@@ -967,18 +986,6 @@ static svn_error_t * thunk_abort_edit(vo
 }
 
 
-void
-svn_swig_pl_wrap_window_handler(svn_txdelta_window_handler_t *handler,
-                                void **h_baton,
-                                SV *callback,
-                                apr_pool_t *pool)
-{
-    *handler = thunk_window_handler;
-    *h_baton = callback;
-    SvREFCNT_inc(callback);
-    svn_swig_pl_hold_ref_in_pool(pool, callback);
-}
-
 void svn_swig_pl_make_editor(svn_delta_editor_t **editor,
                              void **edit_baton,
                              SV *perl_editor,
@@ -1008,6 +1015,7 @@ void svn_swig_pl_make_editor(svn_delta_e
     svn_swig_pl_hold_ref_in_pool(pool, perl_editor);
 }
 
+/* NOTE: calls back into Perl (by calling svn_swig_pl_callback_thunk) */
 svn_error_t *svn_swig_pl_thunk_log_receiver(void *baton,
                                             apr_hash_t *changed_paths,
                                             svn_revnum_t rev,
@@ -1032,6 +1040,7 @@ svn_error_t *svn_swig_pl_thunk_log_recei
     return SVN_NO_ERROR;
 }
 
+/* NOTE: calls back into Perl (by calling svn_swig_pl_callback_thunk) */
 svn_error_t *svn_swig_pl_thunk_log_entry_receiver(void *baton,
                                                   svn_log_entry_t *log_entry,
                                                   apr_pool_t *pool)
@@ -1050,6 +1059,7 @@ svn_error_t *svn_swig_pl_thunk_log_entry
     return SVN_NO_ERROR;
 }
 
+/* NOTE: calls back into Perl (by calling svn_swig_pl_callback_thunk) */
 svn_error_t * svn_swig_pl_thunk_client_diff_summarize_func(
                      const svn_client_diff_summarize_t *diff,
                      void *baton,
@@ -1069,6 +1079,7 @@ svn_error_t * svn_swig_pl_thunk_client_d
     return SVN_NO_ERROR;
 }
 
+/* NOTE: calls back into Perl (by calling svn_swig_pl_callback_thunk) */
 svn_error_t *svn_swig_pl_thunk_history_func(void *baton,
                                             const char *path,
                                             svn_revnum_t revision,
@@ -1086,6 +1097,7 @@ svn_error_t *svn_swig_pl_thunk_history_f
     return SVN_NO_ERROR;
 }
 
+/* NOTE: calls back into Perl (by calling svn_swig_pl_callback_thunk) */
 svn_error_t *svn_swig_pl_thunk_authz_func(svn_boolean_t *allowed,
                                           svn_fs_root_t *root,
                                           const char *path,
@@ -1108,6 +1120,7 @@ svn_error_t *svn_swig_pl_thunk_authz_fun
     return SVN_NO_ERROR;
 }
 
+/* NOTE: calls back into Perl (by calling svn_swig_pl_callback_thunk) */
 svn_error_t *svn_swig_pl_thunk_commit_callback(svn_revnum_t new_revision,
                                                const char *date,
                                                const char *author,
@@ -1122,6 +1135,7 @@ svn_error_t *svn_swig_pl_thunk_commit_ca
     return SVN_NO_ERROR;
 }
 
+/* NOTE: calls back into Perl (by calling svn_swig_pl_callback_thunk) */
 svn_error_t *svn_swig_pl_thunk_commit_callback2(const svn_commit_info_t *commit_info,
                                                 void *baton,
                                                 apr_pool_t *pool)
@@ -1140,6 +1154,7 @@ svn_error_t *svn_swig_pl_thunk_commit_ca
 
 /* Wrap RA */
 
+/* NOTE: calls back into Perl (by calling svn_swig_pl_callback_thunk) */
 static svn_error_t * thunk_open_tmp_file(apr_file_t **fp,
                                          void *callback_baton,
                                          apr_pool_t *pool)
@@ -1158,11 +1173,12 @@ static svn_error_t * thunk_open_tmp_file
     return SVN_NO_ERROR;
 }
 
-svn_error_t *thunk_get_wc_prop(void *baton,
-                               const char *relpath,
-                               const char *name,
-                               const svn_string_t **value,
-                               apr_pool_t *pool)
+/* NOTE: calls back into Perl (by calling svn_swig_pl_callback_thunk) */
+static svn_error_t *thunk_get_wc_prop(void *baton,
+                                      const char *relpath,
+                                      const char *name,
+                                      const svn_string_t **value,
+                                      apr_pool_t *pool)
 {
     SV *result;
     char *data;
@@ -1215,6 +1231,7 @@ svn_error_t *svn_swig_pl_make_callbacks(
     return SVN_NO_ERROR;
 }
 
+/* NOTE: calls back into Perl (by calling svn_swig_pl_callback_thunk) */
 svn_error_t *svn_swig_pl_thunk_gnome_keyring_unlock_prompt(char **keyring_password,
                                                            const char *keyring_name,
                                                            void *baton,
@@ -1243,6 +1260,7 @@ svn_error_t *svn_swig_pl_thunk_gnome_key
     return SVN_NO_ERROR;
 }
 
+/* NOTE: calls back into Perl (by calling svn_swig_pl_callback_thunk) */
 svn_error_t *svn_swig_pl_thunk_simple_prompt(svn_auth_cred_simple_t **cred,
                                              void *baton,
                                              const char *realm,
@@ -1264,6 +1282,7 @@ svn_error_t *svn_swig_pl_thunk_simple_pr
     return SVN_NO_ERROR;
 }
 
+/* NOTE: calls back into Perl (by calling svn_swig_pl_callback_thunk) */
 svn_error_t *svn_swig_pl_thunk_username_prompt(svn_auth_cred_username_t **cred,
                                                void *baton,
                                                const char *realm,
@@ -1284,6 +1303,7 @@ svn_error_t *svn_swig_pl_thunk_username_
     return SVN_NO_ERROR;
 }
 
+/* NOTE: calls back into Perl (by calling svn_swig_pl_callback_thunk) */
 svn_error_t *svn_swig_pl_thunk_ssl_server_trust_prompt(
                               svn_auth_cred_ssl_server_trust_t **cred,
                               void *baton,
@@ -1318,6 +1338,7 @@ svn_error_t *svn_swig_pl_thunk_ssl_serve
     return SVN_NO_ERROR;
 }
 
+/* NOTE: calls back into Perl (by calling svn_swig_pl_callback_thunk) */
 svn_error_t *svn_swig_pl_thunk_ssl_client_cert_prompt(
                 svn_auth_cred_ssl_client_cert_t **cred,
                 void *baton,
@@ -1339,6 +1360,7 @@ svn_error_t *svn_swig_pl_thunk_ssl_clien
     return SVN_NO_ERROR;
 }
 
+/* NOTE: calls back into Perl (by calling svn_swig_pl_callback_thunk) */
 svn_error_t *svn_swig_pl_thunk_ssl_client_cert_pw_prompt(
                                      svn_auth_cred_ssl_client_cert_pw_t **cred,
                                      void *baton,
@@ -1361,6 +1383,7 @@ svn_error_t *svn_swig_pl_thunk_ssl_clien
 }
 
 /* Thunked version of svn_wc_notify_func_t callback type */
+/* NOTE: calls back into Perl (by calling svn_swig_pl_callback_thunk) */
 void svn_swig_pl_notify_func(void * baton,
                              const char *path,
                              svn_wc_notify_action_t action,
@@ -1382,6 +1405,7 @@ void svn_swig_pl_notify_func(void * bato
 }
 
 /* Thunked version of svn_client_get_commit_log3_t callback type. */
+/* NOTE: calls back into Perl (by calling svn_swig_pl_callback_thunk) */
 svn_error_t *svn_swig_pl_get_commit_log_func(const char **log_msg,
                                              const char **tmp_file,
                                              const apr_array_header_t *
@@ -1444,6 +1468,7 @@ svn_error_t *svn_swig_pl_get_commit_log_
 }
 
 /* Thunked version of svn_client_info_t callback type. */
+/* NOTE: calls back into Perl (by calling svn_swig_pl_callback_thunk) */
 svn_error_t *svn_swig_pl_info_receiver(void *baton,
                                        const char *path,
                                        const svn_info_t *info,
@@ -1475,6 +1500,7 @@ svn_error_t *svn_swig_pl_info_receiver(v
 
 
 /* Thunked version of svn_wc_cancel_func_t callback type. */
+/* NOTE: calls back into Perl (by calling svn_swig_pl_callback_thunk) */
 svn_error_t *svn_swig_pl_cancel_func(void *cancel_baton) {
     SV *result;
     svn_error_t *ret_val;
@@ -1504,6 +1530,7 @@ svn_error_t *svn_swig_pl_cancel_func(voi
 }
 
 /* Thunked version of svn_wc_status_func_t callback type. */
+/* NOTE: calls back into Perl (by calling svn_swig_pl_callback_thunk) */
 void svn_swig_pl_status_func(void *baton,
                              const char *path,
                              svn_wc_status_t *status)
@@ -1520,6 +1547,7 @@ void svn_swig_pl_status_func(void *baton
 }
 
 /* Thunked version of svn_wc_status_func2_t callback type. */
+/* NOTE: calls back into Perl (by calling svn_swig_pl_callback_thunk) */
 void svn_swig_pl_status_func2(void *baton,
                               const char *path,
                               svn_wc_status2_t *status)
@@ -1536,6 +1564,7 @@ void svn_swig_pl_status_func2(void *bato
 }
 
 /* Thunked version of svn_wc_status_func3_t callback type. */
+/* NOTE: calls back into Perl (by calling svn_swig_pl_callback_thunk) */
 svn_error_t *svn_swig_pl_status_func3(void *baton,
                                       const char *path,
                                       svn_wc_status2_t *status,
@@ -1568,6 +1597,7 @@ svn_error_t *svn_swig_pl_status_func3(vo
 
 
 /* Thunked version of svn_client_blame_receiver_t callback type. */
+/* NOTE: calls back into Perl (by calling svn_swig_pl_callback_thunk) */
 svn_error_t *svn_swig_pl_blame_func(void *baton,
                                     apr_int64_t line_no,
                                     svn_revnum_t revision,
@@ -1596,6 +1626,7 @@ svn_error_t *svn_swig_pl_blame_func(void
 }
 
 /* Thunked config enumerator */
+/* NOTE: calls back into Perl (by calling svn_swig_pl_callback_thunk) */
 svn_boolean_t svn_swig_pl_thunk_config_enumerator(const char *name, const char *value, void *baton)
 {
     SV *result;
@@ -1639,6 +1670,7 @@ void svn_swig_pl_set_current_pool(apr_po
   set_current_pool_cb(pool);
 }
 
+/* NOTE: calls back into Perl (by calling svn_swig_pl_callback_thunk) */
 apr_pool_t *svn_swig_pl_make_pool(SV *obj)
 {
     apr_pool_t *pool;
@@ -1667,6 +1699,7 @@ typedef struct io_baton_t {
     IO *io;
 } io_baton_t;
 
+/* NOTE: calls back into Perl (by calling svn_swig_pl_callback_thunk) */
 static svn_error_t *io_handle_read(void *baton,
                                    char *buffer,
                                    apr_size_t *len)
@@ -1690,6 +1723,7 @@ static svn_error_t *io_handle_read(void
     return SVN_NO_ERROR;
 }
 
+/* NOTE: calls back into Perl (by calling svn_swig_pl_callback_thunk) */
 static svn_error_t *io_handle_write(void *baton,
                                     const char *data,
                                     apr_size_t *len)
@@ -1710,6 +1744,7 @@ static svn_error_t *io_handle_write(void
     return SVN_NO_ERROR;
 }
 
+/* NOTE: calls back into Perl (by calling svn_swig_pl_callback_thunk) */
 static svn_error_t *io_handle_close(void *baton)
 {
     io_baton_t *io = baton;
@@ -1733,6 +1768,7 @@ static apr_status_t io_handle_cleanup(vo
     return APR_SUCCESS;
 }
 
+/* NOTE: calls back into Perl (by calling svn_swig_pl_callback_thunk) */
 svn_error_t *svn_swig_pl_make_stream(svn_stream_t **stream, SV *obj)
 {
     IO *io;
@@ -1778,6 +1814,7 @@ svn_error_t *svn_swig_pl_make_stream(svn
     return SVN_NO_ERROR;
 }
 
+/* NOTE: calls back into Perl (by calling svn_swig_pl_callback_thunk) */
 svn_error_t *svn_swig_pl_ra_lock_callback(
                     void *baton,
                     const char *path,
@@ -1797,6 +1834,7 @@ svn_error_t *svn_swig_pl_ra_lock_callbac
   return SVN_NO_ERROR;
 }
 
+/* NOTE: calls back into Perl (by calling svn_swig_pl_callback_thunk) */
 SV *svn_swig_pl_from_stream(svn_stream_t *stream)
 {
     SV *ret;
@@ -1848,6 +1886,7 @@ void svn_swig_pl_hold_ref_in_pool(apr_po
     apr_pool_cleanup_register(pool, sv, cleanup_refcnt, apr_pool_cleanup_null);
 }
 
+/* NOTE: calls back into Perl (by calling svn_swig_pl_callback_thunk) */
 SV *svn_swig_pl_from_md5(unsigned char *digest)
 {
     SV *ret;

Modified: subversion/branches/reuse-ra-session/subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl.h
URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl.h?rev=1686174&r1=1686173&r2=1686174&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl.h (original)
+++ subversion/branches/reuse-ra-session/subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl.h Thu Jun 18 10:35:30 2015
@@ -209,13 +209,6 @@ svn_error_t *svn_swig_pl_thunk_ssl_clien
    svn_boolean_t may_save,
    apr_pool_t *pool);
 
-/* thunked callback for svn_ra_get_wc_prop_func_t */
-svn_error_t *thunk_get_wc_prop(void *baton,
-                               const char *relpath,
-                               const char *name,
-                               const svn_string_t **value,
-                               apr_pool_t *pool);
-
 /* Thunked version of svn_wc_notify_func_t callback type */
 void svn_swig_pl_notify_func(void * baton,
                              const char *path,
@@ -278,11 +271,6 @@ void svn_swig_pl_make_editor(svn_delta_e
                              SV *perl_editor,
                              apr_pool_t *pool);
 
-void svn_swig_pl_wrap_window_handler(svn_txdelta_window_handler_t *handler,
-                                     void **h_baton,
-                                     SV *callback,
-                                     apr_pool_t *pool);
-
 /* svn_stream_t helpers */
 svn_error_t *svn_swig_pl_make_stream(svn_stream_t **stream, SV *obj);
 SV *svn_swig_pl_from_stream(svn_stream_t *stream);

Modified: subversion/branches/reuse-ra-session/subversion/bindings/swig/perl/native/Core.pm
URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/bindings/swig/perl/native/Core.pm?rev=1686174&r1=1686173&r2=1686174&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/bindings/swig/perl/native/Core.pm (original)
+++ subversion/branches/reuse-ra-session/subversion/bindings/swig/perl/native/Core.pm Thu Jun 18 10:35:30 2015
@@ -959,6 +959,8 @@ use SVN::Base qw(Core svn_log_entry_t_);
 
 =head2 svn_log_entry_t
 
+=over 4
+
 =item $entry-E<gt>revision()
 
 The revision of the commit.
@@ -988,6 +990,8 @@ in the same sense of C<_p_svn_merge_rang
 Whether C<$entry-E<gt>revision()> is a merged revision resulting 
 from a reverse merge.
 
+=back
+
 =cut
 
 package _p_svn_auth_cred_simple_t;

Modified: subversion/branches/reuse-ra-session/subversion/bindings/swig/perl/native/Delta.pm
URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/bindings/swig/perl/native/Delta.pm?rev=1686174&r1=1686173&r2=1686174&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/bindings/swig/perl/native/Delta.pm (original)
+++ subversion/branches/reuse-ra-session/subversion/bindings/swig/perl/native/Delta.pm Thu Jun 18 10:35:30 2015
@@ -101,12 +101,11 @@ use SVN::Base qw(Delta svn_txdelta_ appl
 
 # special case for backward compatibility.  When called with an additional
 # argument "md5", it's the old style and don't return the md5.
-# Note that since the returned m5 is to be populated upon the last window
-# sent to the handler, it's not currently working to magically change things
-# in Perl land.
 sub apply {
     if (@_ == 5 || (@_ == 4 && ref($_[-1]) ne 'SVN::Pool' && ref($_[-1]) ne '_p_apr_pool_t')) {
-        splice(@_, 3, 1);
+        # we're called as 
+        # apply($source, $target, $result_digest, $error_info [, $pool]) 
+        splice(@_, 2, 1);
         my @ret = SVN::_Delta::svn_txdelta_apply(@_);
         return @ret[1,2];
     }

Modified: subversion/branches/reuse-ra-session/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c
URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c?rev=1686174&r1=1686173&r2=1686174&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c (original)
+++ subversion/branches/reuse-ra-session/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c Thu Jun 18 10:35:30 2015
@@ -464,7 +464,7 @@ static PyObject *make_ob_error(svn_error
   if (err)
     return svn_swig_NewPointerObjString(err, "svn_error_t *", NULL);
   else
-    return Py_None;
+    Py_RETURN_NONE;
 }
 
 
@@ -1529,8 +1529,9 @@ finished:
 static svn_error_t *callback_bad_return_error(const char *message)
 {
   PyErr_SetString(PyExc_TypeError, message);
-  return svn_error_create(APR_EGENERAL, NULL,
-                          "Python callback returned an invalid object");
+  return svn_error_createf(APR_EGENERAL, NULL,
+                           "Python callback returned an invalid object: %s",
+                           message);
 }
 
 /* Return a generic error about not being able to map types. */

Modified: subversion/branches/reuse-ra-session/subversion/bindings/swig/svn_client.i
URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/bindings/swig/svn_client.i?rev=1686174&r1=1686173&r2=1686174&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/bindings/swig/svn_client.i (original)
+++ subversion/branches/reuse-ra-session/subversion/bindings/swig/svn_client.i Thu Jun 18 10:35:30 2015
@@ -293,8 +293,9 @@ Callback: svn_client_diff_summarize_func
  */
 #ifdef SWIGPERL
 %typemap(in) apr_hash_t *config {
-  $1 = svn_swig_pl_objs_to_hash_by_name ($input, "svn_config_t *",
-                                         svn_swig_pl_make_pool ((SV *)NULL));
+  apr_pool_t *pool = svn_swig_pl_make_pool ((SV *)NULL);
+  SPAGAIN;
+  $1 = svn_swig_pl_objs_to_hash_by_name ($input, "svn_config_t *", pool);
 }
 
 %typemap(out) apr_hash_t *config {

Modified: subversion/branches/reuse-ra-session/subversion/include/private/svn_atomic.h
URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/include/private/svn_atomic.h?rev=1686174&r1=1686173&r2=1686174&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/include/private/svn_atomic.h (original)
+++ subversion/branches/reuse-ra-session/subversion/include/private/svn_atomic.h Thu Jun 18 10:35:30 2015
@@ -76,21 +76,66 @@ extern "C" {
 /** @} */
 
 /**
+ * @name Single-threaded atomic initialization
+ * @{
+ */
+
+/**
+ * Callback for svn_atomic__init_once().
+ * @return an #svn_error_t if the initialization fails.
+ * @since New in 1.10
+ */
+typedef svn_error_t *(svn_atomic__err_init_func_t)(void *baton,
+                                                   apr_pool_t *pool);
+
+/**
+ * Callback for svn_atomic__init_no_error().
+ * @return a string containing an error message if the initialization fails.
+ * @since New in 1.10
+ */
+typedef const char *(svn_atomic__str_init_func_t)(void *baton);
+
+/**
  * Call an initialization function in a thread-safe manner.
  *
  * @a global_status must be a pointer to a global, zero-initialized
- * #svn_atomic_t. @a init_func is a pointer to the function that performs
- * the actual initialization. @a baton and and @a pool are passed on to the
- * init_func for its use.
+ * #svn_atomic_t. @a err_init_func is a pointer to the function that
+ * performs the actual initialization. @a baton and and @a pool are
+ * passed on to @a err_init_func for its use.
+ *
+ * @return the error returned by @a err_init_func.
  *
  * @since New in 1.5.
  */
 svn_error_t *
 svn_atomic__init_once(volatile svn_atomic_t *global_status,
-                      svn_error_t *(*init_func)(void*,apr_pool_t*),
+                      svn_atomic__err_init_func_t err_init_func,
                       void *baton,
                       apr_pool_t* pool);
 
+/**
+ * Call an initialization function in a thread-safe manner.
+ *
+ * Unlike svn_atomic__init_once(), this function does not need a pool
+ * and does not create an #svn_error_t, and neither should the
+ * @a str_init_func implementation.
+ *
+ * @a global_status must be a pointer to a global, zero-initialized
+ * #svn_atomic_t. @a str_init_func is a pointer to the function that
+ * performs the actual initialization. @a baton is passed on to
+ * @a str_init_func for its use.
+ *
+ * @return the error string returned by @a str_init_func.
+ *
+ * @since New in 1.10.
+ */
+const char *
+svn_atomic__init_once_no_error(volatile svn_atomic_t *global_status,
+                               svn_atomic__str_init_func_t str_init_func,
+                               void *baton);
+
+/** @} */
+
 #ifdef __cplusplus
 }
 #endif /* __cplusplus */

Modified: subversion/branches/reuse-ra-session/subversion/include/private/svn_auth_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/include/private/svn_auth_private.h?rev=1686174&r1=1686173&r2=1686174&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/include/private/svn_auth_private.h (original)
+++ subversion/branches/reuse-ra-session/subversion/include/private/svn_auth_private.h Thu Jun 18 10:35:30 2015
@@ -234,10 +234,12 @@ svn_auth__ssl_client_cert_pw_set(svn_boo
 /* Apply the specified configuration for connecting with SERVER_NAME
    to the auth baton */
 svn_error_t *
-svn_auth__apply_config_for_server(svn_auth_baton_t *ab,
-                                  apr_hash_t *config,
-                                  const char *server_name,
-                                  apr_pool_t *scratch_pool);
+svn_auth__make_session_auth(svn_auth_baton_t **session_auth_baton,
+                            const svn_auth_baton_t *auth_baton,
+                            apr_hash_t *config,
+                            const char *server_name,
+                            apr_pool_t *result_pool,
+                            apr_pool_t *scratch_pool);
 
 #if (defined(WIN32) && !defined(__MINGW32__)) || defined(DOXYGEN)
 /**

Modified: subversion/branches/reuse-ra-session/subversion/include/private/svn_client_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/include/private/svn_client_private.h?rev=1686174&r1=1686173&r2=1686174&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/include/private/svn_client_private.h (original)
+++ subversion/branches/reuse-ra-session/subversion/include/private/svn_client_private.h Thu Jun 18 10:35:30 2015
@@ -40,6 +40,51 @@ extern "C" {
 #endif /* __cplusplus */
 
 
+/* Set *REVNUM to the revision number identified by REVISION.
+
+   If REVISION->kind is svn_opt_revision_number, just use
+   REVISION->value.number, ignoring LOCAL_ABSPATH and RA_SESSION.
+
+   Else if REVISION->kind is svn_opt_revision_committed,
+   svn_opt_revision_previous, or svn_opt_revision_base, or
+   svn_opt_revision_working, then the revision can be identified
+   purely based on the working copy's administrative information for
+   LOCAL_ABSPATH, so RA_SESSION is ignored.  If LOCAL_ABSPATH is not
+   under revision control, return SVN_ERR_UNVERSIONED_RESOURCE, or if
+   LOCAL_ABSPATH is null, return SVN_ERR_CLIENT_VERSIONED_PATH_REQUIRED.
+
+   Else if REVISION->kind is svn_opt_revision_date or
+   svn_opt_revision_head, then RA_SESSION is used to retrieve the
+   revision from the repository (using REVISION->value.date in the
+   former case), and LOCAL_ABSPATH is ignored.  If RA_SESSION is null,
+   return SVN_ERR_CLIENT_RA_ACCESS_REQUIRED.
+
+   Else if REVISION->kind is svn_opt_revision_unspecified, set
+   *REVNUM to SVN_INVALID_REVNUM.
+
+   If YOUNGEST_REV is non-NULL, it is an in/out parameter.  If
+   *YOUNGEST_REV is valid, use it as the youngest revision in the
+   repository (regardless of reality) -- don't bother to lookup the
+   true value for HEAD, and don't return any value in *REVNUM greater
+   than *YOUNGEST_REV.  If *YOUNGEST_REV is not valid, and a HEAD
+   lookup is required to populate *REVNUM, then also populate
+   *YOUNGEST_REV with the result.  This is useful for making multiple
+   serialized calls to this function with a basically static view of
+   the repository, avoiding race conditions which could occur between
+   multiple invocations with HEAD lookup requests.
+
+   Else return SVN_ERR_CLIENT_BAD_REVISION.
+
+   Use SCRATCH_POOL for any temporary allocation.  */
+svn_error_t *
+svn_client__get_revision_number(svn_revnum_t *revnum,
+                                svn_revnum_t *youngest_rev,
+                                svn_wc_context_t *wc_ctx,
+                                const char *local_abspath,
+                                svn_ra_session_t *ra_session,
+                                const svn_opt_revision_t *revision,
+                                apr_pool_t *scratch_pool);
+
 /* Return true if KIND is a revision kind that is dependent on the working
  * copy. Otherwise, return false. */
 #define SVN_CLIENT__REVKIND_NEEDS_WC(kind)                                 \

Modified: subversion/branches/reuse-ra-session/subversion/include/private/svn_cmdline_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/include/private/svn_cmdline_private.h?rev=1686174&r1=1686173&r2=1686174&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/include/private/svn_cmdline_private.h (original)
+++ subversion/branches/reuse-ra-session/subversion/include/private/svn_cmdline_private.h Thu Jun 18 10:35:30 2015
@@ -88,11 +88,15 @@ typedef struct svn_cmdline__config_argum
  * containing svn_cmdline__config_argument_t* elements, allocating the option
  * data in @a pool
  *
+ * [Since 1.9:] If the file, section, or option value is not recognized,
+ * warn to @c stderr, using @a prefix as in svn_handle_warning2().
+ *
  * @since New in 1.7.
  */
 svn_error_t *
 svn_cmdline__parse_config_option(apr_array_header_t *config_options,
                                  const char *opt_arg,
+                                 const char *prefix,
                                  apr_pool_t *pool);
 
 /** Sets the config options in @a config_options, an apr array containing
@@ -220,6 +224,20 @@ svn_boolean_t
 svn_cmdline__be_interactive(svn_boolean_t non_interactive,
                             svn_boolean_t force_interactive);
 
+/* Parses the argument value of '--trust-server-cert-failures' OPT_ARG into
+ * the expected booleans for passing to svn_cmdline_create_auth_baton2()
+ *
+ * @since New in 1.9.
+ */
+svn_error_t *
+svn_cmdline__parse_trust_options(
+                        svn_boolean_t *trust_server_cert_unknown_ca,
+                        svn_boolean_t *trust_server_cert_cn_mismatch,
+                        svn_boolean_t *trust_server_cert_expired,
+                        svn_boolean_t *trust_server_cert_not_yet_valid,
+                        svn_boolean_t *trust_server_cert_other_failure,
+                        const char *opt_arg,
+                        apr_pool_t *scratch_pool);
 
 #ifdef __cplusplus
 }

Modified: subversion/branches/reuse-ra-session/subversion/include/private/svn_dep_compat.h
URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/include/private/svn_dep_compat.h?rev=1686174&r1=1686173&r2=1686174&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/include/private/svn_dep_compat.h (original)
+++ subversion/branches/reuse-ra-session/subversion/include/private/svn_dep_compat.h Thu Jun 18 10:35:30 2015
@@ -75,6 +75,31 @@ extern "C" {
 #endif
 
 /**
+ * Indicate whether we are running on a POSIX platform.  This has
+ * implications on the way e.g. fsync() works.
+ *
+ * For details on this check, see
+ * http://nadeausoftware.com/articles/2012/01/c_c_tip_how_use_compiler_predefined_macros_detect_operating_system#POSIX
+ *
+ * @since New in 1.10.
+ */
+#ifndef SVN_ON_POSIX
+#if    !defined(_WIN32) \
+    && (   defined(__unix__) \
+        || defined(__unix) \
+        || (defined(__APPLE__) && defined(__MACH__)))  /* UNIX-style OS? */
+#  include <unistd.h>
+#  if defined(_POSIX_VERSION)
+#    define SVN_ON_POSIX 1
+#  else
+#    define SVN_ON_POSIX 0
+#  endif
+#else
+#  define SVN_ON_POSIX 0
+#endif
+#endif
+
+/**
  * APR keeps a few interesting defines hidden away in its private
  * headers apr_arch_file_io.h, so we redefined them here.
  *

Modified: subversion/branches/reuse-ra-session/subversion/include/private/svn_fs_fs_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/include/private/svn_fs_fs_private.h?rev=1686174&r1=1686173&r2=1686174&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/include/private/svn_fs_fs_private.h (original)
+++ subversion/branches/reuse-ra-session/subversion/include/private/svn_fs_fs_private.h Thu Jun 18 10:35:30 2015
@@ -53,7 +53,8 @@ typedef struct svn_fs_fs__large_change_i
   /* size of the (deltified) representation */
   apr_uint64_t size;
 
-  /* Revision of the representation. SVN_INVALID_REVNUM for unused entries. */
+  /* Revision of the representation. SVN_INVALID_REVNUM for unused entries.
+   */
   svn_revnum_t revision;
 
   /* node path. "" for unused instances */
@@ -267,19 +268,20 @@ svn_fs_fs__get_stats(svn_fs_fs__stats_t
                      apr_pool_t *result_pool,
                      apr_pool_t *scratch_pool);
 
-/* Node-revision IDs in FSFS consist of 3 of sub-IDs ("parts") that consist
+/* A node-revision ID in FSFS consists of 3 sub-IDs ("parts") that consist
  * of a creation REVISION number and some revision- / transaction-local
  * counter value (NUMBER).  Old-style ID parts use global counter values.
  *
  * The parts are: node_id, copy_id and txn_id for in-txn IDs as well as
- * node_id, copy_id and rev_offset for in-revision IDs.  This struct the
+ * node_id, copy_id and rev_item for in-revision IDs.  This struct is the
  * data structure used for each of those parts.
  */
 typedef struct svn_fs_fs__id_part_t
 {
-  /* SVN_INVALID_REVNUM for txns -> not a txn, COUNTER must be 0.
-     SVN_INVALID_REVNUM for others -> not assigned to a revision, yet.
-     0                  for others -> old-style ID or the root in rev 0. */
+  /* SVN_INVALID_REVNUM for txn_id part -> not a txn, NUMBER must be 0.
+     SVN_INVALID_REVNUM for other parts -> not assigned to a revision, yet.
+     0                  for other parts -> old-style ID or the root in rev 0.
+   */
   svn_revnum_t revision;
 
   /* sub-id value relative to REVISION.  Its interpretation depends on

Modified: subversion/branches/reuse-ra-session/subversion/include/private/svn_mutex.h
URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/include/private/svn_mutex.h?rev=1686174&r1=1686173&r2=1686174&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/include/private/svn_mutex.h (original)
+++ subversion/branches/reuse-ra-session/subversion/include/private/svn_mutex.h Thu Jun 18 10:35:30 2015
@@ -27,8 +27,6 @@
 #ifndef SVN_MUTEX_H
 #define SVN_MUTEX_H
 
-#include <apr_thread_mutex.h>
-
 #include "svn_error.h"
 
 #ifdef __cplusplus

Modified: subversion/branches/reuse-ra-session/subversion/include/private/svn_subr_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/include/private/svn_subr_private.h?rev=1686174&r1=1686173&r2=1686174&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/include/private/svn_subr_private.h (original)
+++ subversion/branches/reuse-ra-session/subversion/include/private/svn_subr_private.h Thu Jun 18 10:35:30 2015
@@ -537,20 +537,21 @@ svn__decode_uint(apr_uint64_t *val,
                  const unsigned char *p,
                  const unsigned char *end);
 
-/* Get the data from IN, compress it according to the specified
- * COMPRESSION_METHOD and write the result to OUT.
+/* Compress the data from DATA with length LEN, it according to the
+ * specified COMPRESSION_METHOD and write the result to OUT.
  * SVN__COMPRESSION_NONE is valid for COMPRESSION_METHOD.
  */
 svn_error_t *
-svn__compress(svn_stringbuf_t *in,
+svn__compress(const void *data, apr_size_t len,
               svn_stringbuf_t *out,
               int compression_method);
 
-/* Get the compressed data from IN, decompress it and write the result to
- * OUT.  Return an error if the decompressed size is larger than LIMIT.
+/* Decompress the compressed data from DATA with length LEN and write the
+ * result to OUT.  Return an error if the decompressed size is larger than
+ * LIMIT.
  */
 svn_error_t *
-svn__decompress(svn_stringbuf_t *in,
+svn__decompress(const void *data, apr_size_t len,
                 svn_stringbuf_t *out,
                 apr_size_t limit);
 
@@ -681,6 +682,11 @@ svn_boolean_t
 svn_bit_array__get(svn_bit_array__t *array,
                    apr_size_t idx);
 
+/* Return the global pool used by the DSO loader, this may be NULL if
+   no DSOs have been loaded. */
+apr_pool_t *
+svn_dso__pool(void);
+
 /** @} */
 
 #ifdef __cplusplus

Modified: subversion/branches/reuse-ra-session/subversion/include/private/svn_wc_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/include/private/svn_wc_private.h?rev=1686174&r1=1686173&r2=1686174&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/include/private/svn_wc_private.h (original)
+++ subversion/branches/reuse-ra-session/subversion/include/private/svn_wc_private.h Thu Jun 18 10:35:30 2015
@@ -82,6 +82,8 @@ svn_wc__get_file_external_editor(const s
                                  const char *recorded_url,
                                  const svn_opt_revision_t *recorded_peg_rev,
                                  const svn_opt_revision_t *recorded_rev,
+                                 svn_wc_conflict_resolver_func2_t conflict_func,
+                                 void *conflict_baton,
                                  svn_cancel_func_t cancel_func,
                                  void *cancel_baton,
                                  svn_wc_notify_func2_t notify_func,

Modified: subversion/branches/reuse-ra-session/subversion/include/svn_client.h
URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/include/svn_client.h?rev=1686174&r1=1686173&r2=1686174&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/include/svn_client.h (original)
+++ subversion/branches/reuse-ra-session/subversion/include/svn_client.h Thu Jun 18 10:35:30 2015
@@ -4109,6 +4109,13 @@ svn_client_mergeinfo_log_eligible(const
  * If @a remove_ignored_items is @c TRUE, remove ignored unversioned items
  * in @a dir after successful working copy cleanup.
  *
+ * If @a fix_recorded_timestamps is @c TRUE, this function fixes recorded
+ * timestamps for unmodified files in the working copy, reducing comparision
+ * time on future checks.
+ *
+ * If @a vacuum_pristines is @c TRUE, and @a dir_abspath points to the working
+ * copy root unreferenced files in the pristine store are removed.
+ *
  * When asked to remove unversioned or ignored items, and the working copy
  * is already locked, return #SVN_ERR_WC_LOCKED. This prevents accidental
  * working copy corruption in case users run the cleanup operation to
@@ -4348,6 +4355,112 @@ svn_client_revert(const apr_array_header
 
 /** @} */
 
+/**
+ * @defgroup Conflicts Dealing with conflicted paths.
+ *
+ * @{
+ */
+
+/**
+ * Return the absolute path to the conflicted working copy node described
+ * by @a conflict.
+ *
+ * @since New in 1.10. 
+ */
+const char *
+svn_client_conflict_get_local_abspath(
+  const svn_wc_conflict_description2_t *conflict);
+
+/**
+ * Return the operation during which the conflict described by @a
+ * conflict was recorded.
+ *
+ * @since New in 1.10. 
+ */
+svn_wc_operation_t
+svn_client_conflict_get_operation(
+  const svn_wc_conflict_description2_t *conflict);
+
+/**
+ * Return the action an update, switch, or merge operation attempted to
+ * perform on the working copy node described by @a conflict.
+ * 
+ * @since New in 1.10. 
+ */
+svn_wc_conflict_action_t
+svn_client_conflict_get_incoming_change(
+  const svn_wc_conflict_description2_t *conflict);
+
+/**
+ * Return the reason why the attempted action performed by an update, switch,
+ * or merge operation conflicted with the state of the node in the working copy.
+ *
+ * During update and switch operations this local change is part of uncommitted
+ * modifications in the working copy. During merge operations it may
+ * additionally be part of the history of the merge target branch, anywhere
+ * between the common ancestor revision and the working copy revision.
+ * 
+ * @since New in 1.10. 
+ */
+svn_wc_conflict_reason_t
+svn_client_conflict_get_local_change(
+  const svn_wc_conflict_description2_t *conflict);
+
+/**
+ * Accessor functions for svn_wc_conflict_description2_t. This is a temporary
+ * API for eventually replacing svn_wc_conflict_description2_t with an opaque
+ * type and providing improved APIs for conflict resolution.
+ * 
+ * @since New in 1.10. 
+ */
+
+#define svn_client_conflict_get_node_kind(conflict) \
+  ((conflict)->node_kind)
+
+#define svn_client_conflict_get_kind(conflict) \
+  ((conflict)->kind)
+
+#define svn_client_conflict_get_property_name(conflict) \
+  ((conflict)->property_name)
+
+#define svn_client_conflict_get_is_binary(conflict) \
+  ((conflict)->is_binary)
+
+#define svn_client_conflict_get_mime_type(conflict) \
+  ((conflict)->mime_type)
+
+#define svn_client_conflict_get_base_abspath(conflict) \
+  ((conflict)->base_abspath)
+
+#define svn_client_conflict_get_their_abspath(conflict) \
+  ((conflict)->their_abspath)
+
+#define svn_client_conflict_get_my_abspath(conflict) \
+  ((conflict)->my_abspath)
+
+#define svn_client_conflict_get_merged_file(conflict) \
+  ((conflict)->merged_file)
+
+#define svn_client_conflict_get_src_left_version(conflict) \
+  ((conflict)->src_left_version)
+
+#define svn_client_conflict_get_src_right_version(conflict) \
+  ((conflict)->src_right_version)
+
+#define svn_client_conflict_get_prop_reject_abspath(conflict) \
+  ((conflict)->prop_reject_abspath)
+
+#define svn_client_conflict_get_prop_value_working(conflict) \
+  ((conflict)->prop_value_working)
+
+#define svn_client_conflict_get_prop_value_incoming_old(conflict) \
+  ((conflict)->prop_value_incoming_old)
+
+#define svn_client_conflict_get_prop_value_incoming_new(conflict) \
+  ((conflict)->prop_value_incoming_new)
+
+/** @} */
+
 /**
  * @defgroup Resolved Mark conflicted paths as resolved.
  *

Modified: subversion/branches/reuse-ra-session/subversion/include/svn_cmdline.h
URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/include/svn_cmdline.h?rev=1686174&r1=1686173&r2=1686174&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/include/svn_cmdline.h (original)
+++ subversion/branches/reuse-ra-session/subversion/include/svn_cmdline.h Thu Jun 18 10:35:30 2015
@@ -374,6 +374,7 @@ svn_cmdline_create_auth_baton2(svn_auth_
  * @deprecated Provided for backward compatibility with the 1.8 API.
  * @since New in 1.6.
  */
+SVN_DEPRECATED
 svn_error_t *
 svn_cmdline_create_auth_baton(svn_auth_baton_t **ab,
                               svn_boolean_t non_interactive,

Modified: subversion/branches/reuse-ra-session/subversion/include/svn_config.h
URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/include/svn_config.h?rev=1686174&r1=1686173&r2=1686174&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/include/svn_config.h (original)
+++ subversion/branches/reuse-ra-session/subversion/include/svn_config.h Thu Jun 18 10:35:30 2015
@@ -63,6 +63,12 @@ typedef struct svn_config_t svn_config_t
  * @{
  */
 
+/* If you add a new SVN_CONFIG_* category/section/option macro to this group,
+ * you have to re-run gen-make.py manually.
+ *
+ * ### This should be fixed in the build system; see issue #4581.
+ */
+
  /* This list of #defines is intentionally presented as a nested list
     that matches the in-config hierarchy.  */
 
@@ -782,7 +788,8 @@ svn_config_write_auth_data(apr_hash_t *h
  * fully purged) to allow perusal and selective removal of credentials.
  *
  * @a cred_kind and @a realmstring specify the key of the credential.
- * @a hash contains the hash data associated with the record.
+ * @a hash contains the hash data associated with the record. @a walk_baton
+ * is the baton passed to svn_config_walk_auth_data().
  *
  * Before returning set @a *delete_cred to TRUE to remove the credential from
  * the cache; leave @a *delete_cred unchanged or set it to FALSE to keep the



Mime
View raw message