Author: stsp
Date: Tue Feb  3 22:51:18 2015
New Revision: 1656942

URL: http://svn.apache.org/r1656942
Log:
On the pin-externals branch, merge outstanding changes from trunk.

Added:
    subversion/branches/pin-externals/subversion/include/svn_x509.h
      - copied unchanged from r1656940, 
subversion/trunk/subversion/include/svn_x509.h
    subversion/branches/pin-externals/subversion/libsvn_subr/x509.h
      - copied unchanged from r1656940, 
subversion/trunk/subversion/libsvn_subr/x509.h
    subversion/branches/pin-externals/subversion/libsvn_subr/x509info.c
      - copied unchanged from r1656940, 
subversion/trunk/subversion/libsvn_subr/x509info.c
    subversion/branches/pin-externals/subversion/libsvn_subr/x509parse.c
      - copied unchanged from r1656940, 
subversion/trunk/subversion/libsvn_subr/x509parse.c
    subversion/branches/pin-externals/subversion/tests/libsvn_subr/x509-test.c
      - copied unchanged from r1656940, 
subversion/trunk/subversion/tests/libsvn_subr/x509-test.c
    subversion/branches/pin-externals/tools/dev/x509-parser.c
      - copied unchanged from r1656940, subversion/trunk/tools/dev/x509-parser.c
Modified:
    subversion/branches/pin-externals/   (props changed)
    subversion/branches/pin-externals/LICENSE
    subversion/branches/pin-externals/NOTICE
    subversion/branches/pin-externals/build.conf
    subversion/branches/pin-externals/build/run_tests.py
    subversion/branches/pin-externals/notes/   (props changed)
    
subversion/branches/pin-externals/subversion/bindings/javahl/native/AuthnCallback.cpp
    
subversion/branches/pin-externals/subversion/bindings/javahl/native/AuthnCallback.hpp
    
subversion/branches/pin-externals/subversion/bindings/javahl/native/Prompter.cpp
    
subversion/branches/pin-externals/subversion/bindings/javahl/native/RemoteSession.cpp
    
subversion/branches/pin-externals/subversion/bindings/javahl/native/jniwrapper/jni_base.cpp
    
subversion/branches/pin-externals/subversion/bindings/javahl/native/jniwrapper/jni_exception.hpp
    
subversion/branches/pin-externals/subversion/bindings/javahl/native/org_apache_subversion_javahl_types_Version.cpp
    
subversion/branches/pin-externals/subversion/bindings/javahl/native/org_apache_subversion_javahl_util_ConfigLib.cpp
    
subversion/branches/pin-externals/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNRemote.java
    
subversion/branches/pin-externals/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNUtil.java
    
subversion/branches/pin-externals/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/AuthnCallback.java
    
subversion/branches/pin-externals/subversion/bindings/javahl/src/org/apache/subversion/javahl/util/ConfigLib.java
    
subversion/branches/pin-externals/subversion/bindings/javahl/tests/org/apache/subversion/javahl/SVNRemoteTests.java
    
subversion/branches/pin-externals/subversion/bindings/javahl/tests/org/apache/subversion/javahl/UtilTests.java
    
subversion/branches/pin-externals/subversion/include/private/svn_ra_private.h
    
subversion/branches/pin-externals/subversion/include/private/svn_utf_private.h
    subversion/branches/pin-externals/subversion/include/svn_client.h
    subversion/branches/pin-externals/subversion/include/svn_config.h
    subversion/branches/pin-externals/subversion/include/svn_error_codes.h
    subversion/branches/pin-externals/subversion/include/svn_fs.h
    subversion/branches/pin-externals/subversion/include/svn_ra.h
    subversion/branches/pin-externals/subversion/libsvn_client/client.h
    subversion/branches/pin-externals/subversion/libsvn_client/ctx.c
    subversion/branches/pin-externals/subversion/libsvn_client/diff.c
    subversion/branches/pin-externals/subversion/libsvn_client/ra.c
    subversion/branches/pin-externals/subversion/libsvn_fs_fs/tree.c
    subversion/branches/pin-externals/subversion/libsvn_fs_x/   (props changed)
    subversion/branches/pin-externals/subversion/libsvn_ra/ra_loader.c
    subversion/branches/pin-externals/subversion/libsvn_ra_serf/get_file.c
    subversion/branches/pin-externals/subversion/libsvn_ra_serf/get_lock.c
    subversion/branches/pin-externals/subversion/libsvn_ra_serf/lock.c
    subversion/branches/pin-externals/subversion/libsvn_ra_serf/serf.c
    subversion/branches/pin-externals/subversion/libsvn_repos/rev_hunt.c
    
subversion/branches/pin-externals/subversion/libsvn_subr/ssl_server_trust_providers.c
    subversion/branches/pin-externals/subversion/libsvn_subr/utf.c
    subversion/branches/pin-externals/subversion/libsvn_subr/utf8proc.c
    subversion/branches/pin-externals/subversion/libsvn_subr/win32_xlate.c
    subversion/branches/pin-externals/subversion/libsvn_subr/win32_xlate.h
    subversion/branches/pin-externals/subversion/svn/auth-cmd.c
    subversion/branches/pin-externals/subversion/svn/svn.c
    subversion/branches/pin-externals/subversion/svnserve/serve.c
    subversion/branches/pin-externals/subversion/svnsync/sync.c
    
subversion/branches/pin-externals/subversion/tests/cmdline/svnsync_tests_data/mergeinfo-contains-r0.dump
    
subversion/branches/pin-externals/subversion/tests/cmdline/svnsync_tests_data/mergeinfo-contains-r0.expected.dump
    subversion/branches/pin-externals/subversion/tests/libsvn_client/mtcc-test.c
    subversion/branches/pin-externals/subversion/tests/libsvn_fs_x/   (props 
changed)
    subversion/branches/pin-externals/subversion/tests/libsvn_ra/ra-test.c
    subversion/branches/pin-externals/subversion/tests/libsvn_subr/utf-test.c
    subversion/branches/pin-externals/subversion/tests/libsvn_wc/op-depth-test.c
    subversion/branches/pin-externals/subversion/tests/libsvn_wc/utils.c
    subversion/branches/pin-externals/subversion/tests/libsvn_wc/utils.h
    subversion/branches/pin-externals/subversion/tests/svn_test.h
    subversion/branches/pin-externals/subversion/tests/svn_test_fs.c
    subversion/branches/pin-externals/subversion/tests/svn_test_fs.h
    subversion/branches/pin-externals/subversion/tests/svn_test_main.c

Propchange: subversion/branches/pin-externals/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Feb  3 22:51:18 2015
@@ -67,6 +67,7 @@
 /subversion/branches/revprop-caching-ng:1620597,1620599
 
/subversion/branches/revprop-packing:1143907,1143971,1143997,1144017,1144499,1144568,1146145
 /subversion/branches/subtree-mergeinfo:876734-878766
+/subversion/branches/svn-auth-x509:1603509-1655900
 /subversion/branches/svn-mergeinfo-enhancements:870119-870195,870197-870288
 /subversion/branches/svn-patch-improvements:918519-934609
 /subversion/branches/svn_mutex:1141683-1182099
@@ -85,4 +86,4 @@
 /subversion/branches/verify-at-commit:1462039-1462408
 /subversion/branches/verify-keep-going:1439280-1546110
 /subversion/branches/wc-collate-path:1402685-1480384
-/subversion/trunk:1643755-1655873
+/subversion/trunk:1643755-1656940

Modified: subversion/branches/pin-externals/LICENSE
URL: 
http://svn.apache.org/viewvc/subversion/branches/pin-externals/LICENSE?rev=1656942&r1=1656941&r2=1656942&view=diff
==============================================================================
--- subversion/branches/pin-externals/LICENSE (original)
+++ subversion/branches/pin-externals/LICENSE Tue Feb  3 22:51:18 2015
@@ -332,3 +332,37 @@ For the (modified) utf8proc library in s
   Unicode and the Unicode logo are trademarks of Unicode, Inc., and may be
   registered in some jurisdictions. All other trademarks and registered
   trademarks mentioned herein are the property of their respective owners.
+
+For the files subversion/libsvn_subr/x509parse.c and
+subversion/libsvn_subr/x509.h
+
+ *  Based on XySSL: Copyright (C) 2006-2008   Christophe Devine
+ *
+ *  Copyright (C) 2009  Paul Bakker <polarssl_maintainer at polarssl dot org>
+ *
+ *  All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions
+ *  are met:
+ *
+ *    * Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ *    * Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *    * Neither the names of PolarSSL or XySSL nor the names of its 
contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ *  FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ *  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ *  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
+ *  TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ *  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ *  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ *  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Modified: subversion/branches/pin-externals/NOTICE
URL: 
http://svn.apache.org/viewvc/subversion/branches/pin-externals/NOTICE?rev=1656942&r1=1656941&r2=1656942&view=diff
==============================================================================
--- subversion/branches/pin-externals/NOTICE (original)
+++ subversion/branches/pin-externals/NOTICE Tue Feb  3 22:51:18 2015
@@ -22,4 +22,7 @@ modifications by Spyglass Inc., Carnegie
 Bell Communications Research, Inc (Bellcore).
 
 This product includes software developed by Public Software Group e. V.
-under a permissive license, see LICENSE.
\ No newline at end of file
+under a permissive license, see LICENSE.
+
+This software contains code derived from TropicSSL under a BSD 3-Clause
+license, see LICENSE.

Modified: subversion/branches/pin-externals/build.conf
URL: 
http://svn.apache.org/viewvc/subversion/branches/pin-externals/build.conf?rev=1656942&r1=1656941&r2=1656942&view=diff
==============================================================================
--- subversion/branches/pin-externals/build.conf (original)
+++ subversion/branches/pin-externals/build.conf Tue Feb  3 22:51:18 2015
@@ -372,7 +372,7 @@ msvc-export =
         svn_error.h svn_hash.h svn_io.h svn_iter.h svn_md5.h svn_mergeinfo.h 
         svn_nls.h svn_opt.h svn_path.h svn_pools.h svn_props.h svn_quoprint.h 
         svn_sorts.h svn_string.h svn_subst.h svn_time.h svn_types.h svn_user.h
-        svn_utf.h svn_version.h svn_xml.h 
+        svn_utf.h svn_version.h svn_xml.h svn_x509.h
         private\svn_atomic.h private\svn_cache.h private\svn_cmdline_private.h
         private\svn_debug.h private\svn_error_private.h private\svn_fspath.h
         private\svn_log.h private\svn_mergeinfo_private.h
@@ -1124,6 +1124,15 @@ sources = translate-test.c
 install = test
 libs = libsvn_test libsvn_subr apriconv apr
 
+[x509-test]
+description = Test x509 parser
+type = exe
+path = subversion/tests/libsvn_subr
+sources = x509-test.c
+install = test
+libs = libsvn_test libsvn_subr apriconv apr
+
+
 # ----------------------------------------------------------------------------
 # Tests for libsvn_delta
 
@@ -1490,7 +1499,7 @@ libs = __ALL__
        conflict-data-test db-test pristine-store-test entries-compat-test
        op-depth-test dirent_uri-test wc-queries-test wc-test
        auth-test
-       parse-diff-test
+       parse-diff-test x509-test
 
 [__MORE__]
 type = project
@@ -1610,3 +1619,10 @@ type = exe
 path = tools/dev/svnraisetreeconflict
 libs = libsvn_wc libsvn_subr apriconv apr
 install = tools
+
+[x509-parser]
+type = exe
+path = tools/dev
+sources = x509-parser.c
+install = tools
+libs = libsvn_subr apr

Modified: subversion/branches/pin-externals/build/run_tests.py
URL: 
http://svn.apache.org/viewvc/subversion/branches/pin-externals/build/run_tests.py?rev=1656942&r1=1656941&r2=1656942&view=diff
==============================================================================
--- subversion/branches/pin-externals/build/run_tests.py (original)
+++ subversion/branches/pin-externals/build/run_tests.py Tue Feb  3 22:51:18 
2015
@@ -385,6 +385,22 @@ class TestHarness:
     if self.config_file is not None:
       cmdline.append('--config-file=' + self.config_file)
 
+    if self.base_url is not None:
+      subdir = 'subversion/tests/cmdline/svn-test-work'
+
+      cmdline.append('--repos-url=%s' % self.base_url +
+                        '/svn-test-work/repositories')
+      cmdline.append('--repos-dir=%s'
+                     % os.path.abspath(
+                         os.path.join(self.builddir, subdir, 'repositories')))
+
+      # Enable access for http
+      if self.base_url.startswith('http'):
+        open(os.path.join(self.builddir, subdir, 'authz'), 'w').write(
+                '[/]\n' +
+                '* = rw\n')
+
+    # ### Support --repos-template
     if self.verbose is not None:
       cmdline.append('--verbose')
     if self.cleanup is not None:

Propchange: subversion/branches/pin-externals/notes/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Feb  3 22:51:18 2015
@@ -25,6 +25,7 @@
 /subversion/branches/ra_serf-digest-authn/notes:875693-876404
 /subversion/branches/reintegrate-improvements/notes:873853-874164
 /subversion/branches/subtree-mergeinfo/notes:876734-878766
+/subversion/branches/svn-auth-x509/notes:1603509-1655900
 
/subversion/branches/svn-mergeinfo-enhancements/notes:870119-870195,870197-870288
 /subversion/branches/svn-patch-improvements/notes:918519-934609
 /subversion/branches/svnpatch-diff/notes:865738-876477
@@ -36,4 +37,4 @@
 /subversion/branches/tc_url_rev/notes:874351-874483
 /subversion/branches/tree-conflicts/notes:868291-873154
 /subversion/branches/tree-conflicts-notify/notes:873926-874008
-/subversion/trunk/notes:1643755-1653571
+/subversion/trunk/notes:1643755-1656940

Modified: 
subversion/branches/pin-externals/subversion/bindings/javahl/native/AuthnCallback.cpp
URL: 
http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/bindings/javahl/native/AuthnCallback.cpp?rev=1656942&r1=1656941&r2=1656942&view=diff
==============================================================================
--- 
subversion/branches/pin-externals/subversion/bindings/javahl/native/AuthnCallback.cpp
 (original)
+++ 
subversion/branches/pin-externals/subversion/bindings/javahl/native/AuthnCallback.cpp
 Tue Feb  3 22:51:18 2015
@@ -21,10 +21,19 @@
  * @endcopyright
  */
 
+#include "svn_base64.h"
+#include "svn_x509.h"
+
 #include "jniwrapper/jni_stack.hpp"
+#include "jniwrapper/jni_exception.hpp"
+#include "jniwrapper/jni_string.hpp"
+#include "jniwrapper/jni_array.hpp"
+#include "jniwrapper/jni_list.hpp"
 
 #include "AuthnCallback.hpp"
 
+#include "svn_private_config.h"
+
 namespace JavaHL {
 
 // Class JavaHL::AuthnCallback
@@ -176,30 +185,75 @@ AuthnCallback::SSLServerCertInfo::ClassI
   : ::Java::Object::ClassImpl(env, cls),
     m_mid_ctor(env.GetMethodID(cls, "<init>",
                                "(Ljava/lang/String;"
-                               "Ljava/lang/String;"
-                               "Ljava/lang/String;"
-                               "Ljava/lang/String;"
-                               "Ljava/lang/String;"
+                               "Ljava/lang/String;JJ[B"
+                               "Ljava/util/List;"
                                "Ljava/lang/String;)V"))
 {}
 
 AuthnCallback::SSLServerCertInfo::ClassImpl::~ClassImpl() {}
 
 AuthnCallback::SSLServerCertInfo::SSLServerCertInfo(
-    ::Java::Env env,
-    const ::Java::String& hostname,
-    const ::Java::String& fingerprint,
-    const ::Java::String& validFrom,
-    const ::Java::String& validUntil,
-    const ::Java::String& issuer,
-    const ::Java::String& der)
+    ::Java::Env env, const char* ascii_cert)
   : ::Java::Object(env,
                    ::Java::ClassCache::get_authn_ssl_server_cert_info(env))
 {
+  SVN::Pool pool;
+
+  /* Convert header-less PEM to DER by undoing base64 encoding. */
+  const svn_string_t cert_string = { ascii_cert, strlen(ascii_cert) };
+  const svn_string_t* der = svn_base64_decode_string(&cert_string,
+                                                     pool.getPool());
+
+  svn_x509_certinfo_t *certinfo;
+  SVN_JAVAHL_CHECK(env, svn_x509_parse_cert(&certinfo, der->data, der->len,
+                                            pool.getPool(), pool.getPool()));
+
+  const ::Java::String subject(
+      env, svn_x509_certinfo_get_subject(certinfo, pool.getPool()));
+  const ::Java::String issuer(
+      env, svn_x509_certinfo_get_issuer(certinfo, pool.getPool()));
+  const ::Java::String cert(env, ascii_cert);
+  const jlong valid_from =
+    (jlong(svn_x509_certinfo_get_valid_from(certinfo)) + 500) / 1000;
+  const jlong valid_to =
+    (jlong(svn_x509_certinfo_get_valid_to(certinfo)) + 500) / 1000;
+
+  const svn_checksum_t* digest = svn_x509_certinfo_get_digest(certinfo);
+  jsize digest_size;
+  switch (digest->kind)
+    {
+    case svn_checksum_sha1:
+      digest_size = 160 / 8;
+      break;
+
+    case svn_checksum_md5:
+      digest_size = 128 / 8;
+      break;
+
+    default:
+      digest_size = 0;          // Initialize this to avoid compiler warnings
+      ::Java::IllegalArgumentException(env).raise(
+          _("Unknown certificate digest type"));
+    }
+  const ::Java::ByteArray fingerprint(env, digest->digest, digest_size);
+
+  jobject jhostnames = NULL;
+  const apr_array_header_t* hostnames =
+    svn_x509_certinfo_get_hostnames(certinfo);
+  if (hostnames)
+    {
+      ::Java::MutableList< ::Java::String> hn(env, hostnames->nelts);
+      for (int i = 0; i < hostnames->nelts; ++i)
+        hn.add(::Java::String(env, APR_ARRAY_IDX(hostnames, i, const char*)));
+      jhostnames = hn.get();
+    }
+
   set_this(env.NewObject(get_class(), impl().m_mid_ctor,
-                         hostname.get(), fingerprint.get(),
-                         validFrom.get(), validUntil.get(),
-                         issuer.get(), der.get()));
+                         subject.get(), issuer.get(),
+                         valid_from, valid_to,
+                         fingerprint.get(),
+                         jhostnames,
+                         cert.get()));
 }
 
 

Modified: 
subversion/branches/pin-externals/subversion/bindings/javahl/native/AuthnCallback.hpp
URL: 
http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/bindings/javahl/native/AuthnCallback.hpp?rev=1656942&r1=1656941&r2=1656942&view=diff
==============================================================================
--- 
subversion/branches/pin-externals/subversion/bindings/javahl/native/AuthnCallback.hpp
 (original)
+++ 
subversion/branches/pin-externals/subversion/bindings/javahl/native/AuthnCallback.hpp
 Tue Feb  3 22:51:18 2015
@@ -153,13 +153,7 @@ public:
     /**
      * Creates and initializes a wrapped object;
      */
-    explicit SSLServerCertInfo(::Java::Env env,
-                               const ::Java::String& hostname,
-                               const ::Java::String& fingerprint,
-                               const ::Java::String& validFrom,
-                               const ::Java::String& validUntil,
-                               const ::Java::String& issuer,
-                               const ::Java::String& der);
+    explicit SSLServerCertInfo(::Java::Env env, const char* ascii_cert);
 
   private:
     /**

Modified: 
subversion/branches/pin-externals/subversion/bindings/javahl/native/Prompter.cpp
URL: 
http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/bindings/javahl/native/Prompter.cpp?rev=1656942&r1=1656941&r2=1656942&view=diff
==============================================================================
--- 
subversion/branches/pin-externals/subversion/bindings/javahl/native/Prompter.cpp
 (original)
+++ 
subversion/branches/pin-externals/subversion/bindings/javahl/native/Prompter.cpp
 Tue Feb  3 22:51:18 2015
@@ -325,14 +325,7 @@ svn_error_t *Prompter::dispatch_ssl_serv
       authn.ssl_server_trust_prompt(
           ::Java::String(env, realm),
           ::JavaHL::AuthnCallback::SSLServerCertFailures(env, jint(failures)),
-          ::JavaHL::AuthnCallback::SSLServerCertInfo(
-              env,
-              ::Java::String(env, cert_info->hostname),
-              ::Java::String(env, cert_info->fingerprint),
-              ::Java::String(env, cert_info->valid_from),
-              ::Java::String(env, cert_info->valid_until),
-              ::Java::String(env, cert_info->issuer_dname),
-              ::Java::String(env, cert_info->ascii_cert)),
+          ::JavaHL::AuthnCallback::SSLServerCertInfo(env, 
cert_info->ascii_cert),
           may_save));
   if (!result.get())
     return svn_error_create(SVN_ERR_RA_NOT_AUTHORIZED, NULL,

Modified: 
subversion/branches/pin-externals/subversion/bindings/javahl/native/RemoteSession.cpp
URL: 
http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/bindings/javahl/native/RemoteSession.cpp?rev=1656942&r1=1656941&r2=1656942&view=diff
==============================================================================
--- 
subversion/branches/pin-externals/subversion/bindings/javahl/native/RemoteSession.cpp
 (original)
+++ 
subversion/branches/pin-externals/subversion/bindings/javahl/native/RemoteSession.cpp
 Tue Feb  3 22:51:18 2015
@@ -1174,7 +1174,9 @@ public:
         static_cast<FileRevisionHandler*>(baton);
       SVN_ERR_ASSERT(self->m_jcallback != NULL);
       self->call(path, revision, revision_props,
-                result_of_merge, prop_diffs, scratch_pool);
+                result_of_merge, prop_diffs,
+                (delta_handler != NULL),
+                scratch_pool);
       SVN_ERR(JNIUtil::checkJavaException(SVN_ERR_BASE));
       return SVN_NO_ERROR;
     }
@@ -1199,6 +1201,7 @@ private:
            apr_hash_t* revision_props,
            svn_boolean_t result_of_merge,
            apr_array_header_t* prop_diffs,
+           svn_boolean_t has_text_delta,
            apr_pool_t* scratch_pool)
     {
       JNIEnv* env = JNIUtil::getEnv();
@@ -1211,7 +1214,7 @@ private:
         {
           mid = env->GetMethodID(cls, "<init>",
                                  "(Ljava/lang/String;JZ"
-                                 "Ljava/util/Map;Ljava/util/Map;)V");
+                                 "Ljava/util/Map;Ljava/util/Map;Z)V");
           if (JNIUtil::isJavaExceptionThrown())
             return;
         }
@@ -1229,7 +1232,8 @@ private:
       env->CallVoidMethod(m_jcallback, m_call_mid,
                           env->NewObject(cls, mid, jpath, jlong(revision),
                                          jboolean(result_of_merge),
-                                         jrevprops, jpropdelta));
+                                         jrevprops, jpropdelta,
+                                         jboolean(has_text_delta)));
       if (JNIUtil::isJavaExceptionThrown())
         return;
       env->DeleteLocalRef(jpath);

Modified: 
subversion/branches/pin-externals/subversion/bindings/javahl/native/jniwrapper/jni_base.cpp
URL: 
http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/bindings/javahl/native/jniwrapper/jni_base.cpp?rev=1656942&r1=1656941&r2=1656942&view=diff
==============================================================================
--- 
subversion/branches/pin-externals/subversion/bindings/javahl/native/jniwrapper/jni_base.cpp
 (original)
+++ 
subversion/branches/pin-externals/subversion/bindings/javahl/native/jniwrapper/jni_base.cpp
 Tue Feb  3 22:51:18 2015
@@ -329,6 +329,8 @@ const char* const IndexOutOfBoundsExcept
 const char* const IOException::m_class_name =
   "java/io/IOException";
 
+const char* const IllegalArgumentException::m_class_name =
+  "java/lang/IllegalArgumentException";
 
 // Implementation of jni_stack.hpp
 

Modified: 
subversion/branches/pin-externals/subversion/bindings/javahl/native/jniwrapper/jni_exception.hpp
URL: 
http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/bindings/javahl/native/jniwrapper/jni_exception.hpp?rev=1656942&r1=1656941&r2=1656942&view=diff
==============================================================================
--- 
subversion/branches/pin-externals/subversion/bindings/javahl/native/jniwrapper/jni_exception.hpp
 (original)
+++ 
subversion/branches/pin-externals/subversion/bindings/javahl/native/jniwrapper/jni_exception.hpp
 Tue Feb  3 22:51:18 2015
@@ -286,6 +286,25 @@ private:
   static const char* const m_class_name;
 };
 
+/**
+ * Generator class for exceptions of type @c 
java.lang.IllegalArgumentException.
+ *
+ * @since New in 1.9.
+ */
+class IllegalArgumentException : public Exception
+{
+public:
+  /**
+   * Constructs an exception generator object.
+   */
+  explicit IllegalArgumentException(Env env)
+    : Exception(env, m_class_name)
+    {}
+
+private:
+  static const char* const m_class_name;
+};
+
 } // namespace Java
 
 #endif // SVN_JAVAHL_JNIWRAPPER_ENV_HPP

Modified: 
subversion/branches/pin-externals/subversion/bindings/javahl/native/org_apache_subversion_javahl_types_Version.cpp
URL: 
http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/bindings/javahl/native/org_apache_subversion_javahl_types_Version.cpp?rev=1656942&r1=1656941&r2=1656942&view=diff
==============================================================================
--- 
subversion/branches/pin-externals/subversion/bindings/javahl/native/org_apache_subversion_javahl_types_Version.cpp
 (original)
+++ 
subversion/branches/pin-externals/subversion/bindings/javahl/native/org_apache_subversion_javahl_types_Version.cpp
 Tue Feb  3 22:51:18 2015
@@ -28,12 +28,19 @@
 #include "JNIStackElement.h"
 #include "svn_version.h"
 
+namespace {
+const svn_version_t* javahl_version()
+{
+  SVN_VERSION_BODY;
+}
+} //anonymous namespace
+
 JNIEXPORT jint JNICALL
 Java_org_apache_subversion_javahl_types_Version_getMajor(JNIEnv *env,
  jobject jthis)
 {
   JNIEntry(Version, getMajor);
-  return SVN_VER_MAJOR;
+  return javahl_version()->major;
 }
 
 JNIEXPORT jint JNICALL
@@ -41,7 +48,7 @@ Java_org_apache_subversion_javahl_types_
  jobject jthis)
 {
   JNIEntry(Version, getMinor);
-  return SVN_VER_MINOR;
+  return javahl_version()->minor;
 }
 
 JNIEXPORT jint JNICALL
@@ -49,7 +56,7 @@ Java_org_apache_subversion_javahl_types_
  jobject jthis)
 {
   JNIEntry(Version, getPatch);
-  return SVN_VER_PATCH;
+  return javahl_version()->patch;
 }
 
 JNIEXPORT jstring JNICALL

Modified: 
subversion/branches/pin-externals/subversion/bindings/javahl/native/org_apache_subversion_javahl_util_ConfigLib.cpp
URL: 
http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/bindings/javahl/native/org_apache_subversion_javahl_util_ConfigLib.cpp?rev=1656942&r1=1656941&r2=1656942&view=diff
==============================================================================
--- 
subversion/branches/pin-externals/subversion/bindings/javahl/native/org_apache_subversion_javahl_util_ConfigLib.cpp
 (original)
+++ 
subversion/branches/pin-externals/subversion/bindings/javahl/native/org_apache_subversion_javahl_util_ConfigLib.cpp
 Tue Feb  3 22:51:18 2015
@@ -41,8 +41,10 @@
 #include "JNICriticalSection.h"
 
 #include "svn_auth.h"
+#include "svn_base64.h"
 #include "svn_config.h"
 #include "svn_hash.h"
+#include "svn_x509.h"
 
 #include "svn_private_config.h"
 
@@ -140,41 +142,14 @@ jobject build_credential(Java::Env env,
   else if (0 == strcmp(cred_kind, SVN_AUTH_CRED_SSL_SERVER_TRUST))
     {
       entry = static_cast<svn_string_t*>(
-          svn_hash_gets(cred, SVN_CONFIG_AUTHN_HOSTNAME_KEY));
-      const char* hostname = (entry ? entry->data : NULL);
-
-      entry = static_cast<svn_string_t*>(
-          svn_hash_gets(cred, SVN_CONFIG_AUTHN_FINGERPRINT_KEY));
-      const char* fingerprint = (entry ? entry->data : NULL);
-
-      entry = static_cast<svn_string_t*>(
-          svn_hash_gets(cred, SVN_CONFIG_AUTHN_VALID_FROM_KEY));
-      const char* valid_from = (entry ? entry->data : NULL);
-
-      entry = static_cast<svn_string_t*>(
-          svn_hash_gets(cred, SVN_CONFIG_AUTHN_VALID_UNTIL_KEY));
-      const char* valid_until = (entry ? entry->data : NULL);
-
-      entry = static_cast<svn_string_t*>(
-          svn_hash_gets(cred, SVN_CONFIG_AUTHN_ISSUER_DN_KEY));
-      const char* issuer = (entry ? entry->data : NULL);
-
-      entry = static_cast<svn_string_t*>(
           svn_hash_gets(cred, SVN_CONFIG_AUTHN_ASCII_CERT_KEY));
-      const char* der = (entry ? entry->data : NULL);
+      const char* ascii_cert = (entry ? entry->data : NULL);
 
       entry = static_cast<svn_string_t*>(
           svn_hash_gets(cred, SVN_CONFIG_AUTHN_FAILURES_KEY));
       jint failflags = (!entry ? 0 : jint(apr_atoi64(entry->data)));
 
-      info = JavaHL::AuthnCallback
-        ::SSLServerCertInfo(env,
-                            Java::String(env, hostname),
-                            Java::String(env, fingerprint),
-                            Java::String(env, valid_from),
-                            Java::String(env, valid_until),
-                            Java::String(env, issuer),
-                            Java::String(env, der)).get();
+      info = JavaHL::AuthnCallback::SSLServerCertInfo(env, ascii_cert).get();
       failures = JavaHL::AuthnCallback
         ::SSLServerCertFailures(env, failflags).get();
     }
@@ -370,6 +345,19 @@ Java_org_apache_subversion_javahl_util_C
         const ::Java::Env m_env;
         ::Java::MutableList<JavaHL::Credential> m_credentials;
 
+        bool match_array(const char* pattern,
+                         const apr_array_header_t* hostnames)
+          {
+            for (int i = 0; i < hostnames->nelts; ++i)
+              {
+                const char* const hostname =
+                  APR_ARRAY_IDX(hostnames, i, const char*);
+                if (!apr_fnmatch(pattern, hostname, 0))
+                  return true;
+              }
+            return false;
+          }
+
       public:
         explicit Callback(::Java::Env ctor_env,
                           const char* ctor_cred_kind,
@@ -411,25 +399,41 @@ Java_org_apache_subversion_javahl_util_C
                 svn_hash_gets(cb_cred_hash, SVN_CONFIG_AUTHN_PASSTYPE_KEY));
             const char* const store = (entry ? entry->data : NULL);
 
-            entry = static_cast<svn_string_t*>(
-                svn_hash_gets(cb_cred_hash, SVN_CONFIG_AUTHN_HOSTNAME_KEY));
-            const char* const hostname = (entry ? entry->data : NULL);
-
-            entry = static_cast<svn_string_t*>(
-                svn_hash_gets(cb_cred_hash, SVN_CONFIG_AUTHN_FINGERPRINT_KEY));
-            const char* const fingerprint = (entry ? entry->data : NULL);
+            const svn_string_t* ascii_cert = static_cast<svn_string_t*>(
+                svn_hash_gets(cb_cred_hash, SVN_CONFIG_AUTHN_ASCII_CERT_KEY));
 
-            entry = static_cast<svn_string_t*>(
-                svn_hash_gets(cb_cred_hash, SVN_CONFIG_AUTHN_VALID_FROM_KEY));
-            const char* const valid_from = (entry ? entry->data : NULL);
-
-            entry = static_cast<svn_string_t*>(
-                svn_hash_gets(cb_cred_hash, SVN_CONFIG_AUTHN_VALID_UNTIL_KEY));
-            const char* const valid_until = (entry ? entry->data : NULL);
-
-            entry = static_cast<svn_string_t*>(
-                svn_hash_gets(cb_cred_hash, SVN_CONFIG_AUTHN_ISSUER_DN_KEY));
-            const char* const issuer = (entry ? entry->data : NULL);
+            /* Parsed certificate data. */
+            const char* subject = NULL;
+            const char* issuer = NULL;
+            const char* fingerprint = NULL;
+            const apr_array_header_t* hostnames = NULL;
+
+            if (ascii_cert)
+              {
+                const svn_string_t* const der =
+                  svn_base64_decode_string(ascii_cert, cb_scratch_pool);
+                svn_x509_certinfo_t* certinfo;
+                svn_error_t* err = svn_x509_parse_cert(
+                    &certinfo, der->data, der->len,
+                    cb_scratch_pool, cb_scratch_pool);
+                if (err)
+                  {
+                    // Ignore credentials that can't be parsed.
+                    svn_error_clear(err);
+                    return SVN_NO_ERROR;
+                  }
+                else
+                  {
+                    subject = svn_x509_certinfo_get_subject(
+                        certinfo, cb_scratch_pool);
+                    issuer = svn_x509_certinfo_get_issuer(
+                        certinfo, cb_scratch_pool);
+                    fingerprint = svn_checksum_to_cstring_display(
+                        svn_x509_certinfo_get_digest(certinfo),
+                        cb_scratch_pool);
+                    hostnames = svn_x509_certinfo_get_hostnames(certinfo);
+                  }
+              }
 
             bool match = (m_realm_pattern
                           && !apr_fnmatch(m_realm_pattern, cb_realmstring, 0));
@@ -441,8 +445,8 @@ Java_org_apache_subversion_javahl_util_C
 
             if (!match && m_hostname_pattern)
               match = (match
-                       || (hostname
-                           && !apr_fnmatch(m_hostname_pattern, hostname, 0)));
+                       || (hostnames
+                           &&  match_array(m_hostname_pattern, hostnames)));
 
             if (!match && m_text_pattern)
               match = (match
@@ -450,16 +454,14 @@ Java_org_apache_subversion_javahl_util_C
                            && !apr_fnmatch(m_text_pattern, username, 0))
                        || (store
                            && !apr_fnmatch(m_text_pattern, store, 0))
-                       || (hostname
-                           && !apr_fnmatch(m_text_pattern, hostname, 0))
+                       || (subject
+                           && !apr_fnmatch(m_text_pattern, subject, 0))
+                       || (issuer
+                           && !apr_fnmatch(m_text_pattern, issuer, 0))
                        || (fingerprint
                            && !apr_fnmatch(m_text_pattern, fingerprint, 0))
-                       || (valid_from
-                           && !apr_fnmatch(m_text_pattern, valid_from, 0))
-                       || (valid_until
-                           && !apr_fnmatch(m_text_pattern, valid_until, 0))
-                       || (issuer
-                           && !apr_fnmatch(m_text_pattern, issuer, 0)));
+                       || (hostnames
+                           && match_array(m_text_pattern, hostnames)));
 
             if (match)
               m_credentials.add(

Modified: 
subversion/branches/pin-externals/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNRemote.java
URL: 
http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNRemote.java?rev=1656942&r1=1656941&r2=1656942&view=diff
==============================================================================
--- 
subversion/branches/pin-externals/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNRemote.java
 (original)
+++ 
subversion/branches/pin-externals/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNRemote.java
 Tue Feb  3 22:51:18 2015
@@ -599,13 +599,15 @@ public interface ISVNRemote
         private FileRevision(String path, long revision,
                              boolean resultOfMerge,
                              Map<String, byte[]> revisionProperties,
-                             Map<String, byte[]> propertiesDelta)
+                             Map<String, byte[]> propertiesDelta,
+                             boolean textDelta)
         {
             this.path = path;
             this.revision = revision;
             this.resultOfMerge = resultOfMerge;
             this.revisionProperties = revisionProperties;
             this.propertiesDelta = propertiesDelta;
+            this.textDelta = textDelta;
         }
 
         /**
@@ -643,11 +645,17 @@ public interface ISVNRemote
             return propertiesDelta;
         }
 
+        /**
+         * @return A flag indicating that this revision has a text delta.
+         */
+        public boolean hasTextDelta() { return textDelta; }
+
         private String path;
         private long revision;
         private boolean resultOfMerge;
         private Map<String, byte[]> revisionProperties;
         private Map<String, byte[]> propertiesDelta;
+        private boolean textDelta;
     }
 
     /**

Modified: 
subversion/branches/pin-externals/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNUtil.java
URL: 
http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNUtil.java?rev=1656942&r1=1656941&r2=1656942&view=diff
==============================================================================
--- 
subversion/branches/pin-externals/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNUtil.java
 (original)
+++ 
subversion/branches/pin-externals/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNUtil.java
 Tue Feb  3 22:51:18 2015
@@ -466,11 +466,12 @@ public class SVNUtil
      *             otherwise, only those credentials that have a username,
      *             and where the username matches the pattern, will be
      *             returned.
-     * @param hostnamePattern A glob pattern for the hostname (CN) of
-     *             a server certificate; if <code>null</code>, all credntials
-     *             will be considered; otherwise, only those credentials
-     *             that have a server certificate with a hostname that
-     *             matches the pattern will be returned.
+     * @param hostnamePattern A glob pattern for the hostnames of a
+     *             server certificate; if <code>null</code>, all
+     *             credntials will be considered; otherwise, only
+     *             those credentials that have a server certificate
+     *             with a hostname that matches the pattern will be
+     *             returned.
      * @param textPattern A glob pattern that must match any textual
      *             information in a credential, for example, a realm,
      *             username, certificate details, etc; passwords, passphrases

Modified: 
subversion/branches/pin-externals/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/AuthnCallback.java
URL: 
http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/AuthnCallback.java?rev=1656942&r1=1656941&r2=1656942&view=diff
==============================================================================
--- 
subversion/branches/pin-externals/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/AuthnCallback.java
 (original)
+++ 
subversion/branches/pin-externals/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/AuthnCallback.java
 Tue Feb  3 22:51:18 2015
@@ -23,6 +23,8 @@
 
 package org.apache.subversion.javahl.callback;
 
+import java.util.Date;
+import java.util.List;
 import java.util.logging.Logger;
 
 /**
@@ -243,74 +245,84 @@ public interface AuthnCallback
         private static final long serialVersionUID = 1L;
 
         /**
-         * @return The primary CN of the certificate.
+         * @return The subject of the certificate.
          */
-        public String getHostname()
+        public String getSubject()
         {
-            return hostname;
+            return subject;
         }
 
         /**
-         * @return The text representation of the certificate fingerprint.
+         * @return The certificate issuer.
          */
-        public String getFingerprint()
+        public String getIssuer()
         {
-            return fingerprint;
+            return issuer;
         }
 
         /**
-         * @return The text represent representation of the date from
-         *         which the certificate is valid.
+         * @return The from which the certificate is valid.
          */
-        public String getValidFrom()
+        public Date getValidFrom()
         {
             return validFrom;
         }
 
         /**
-         * @return The text represent representation of the date after
-         *         which the certificate is no longer valid.
+         * @return The date after which the certificate is no longer valid.
          */
-        public String getValidUntil()
+        public Date getValidTo()
         {
-            return validUntil;
+            return validTo;
         }
 
         /**
-         * @return The DN of the certificate issuer.
+         * @return The certificate fingerprint.
          */
-        public String getIssuer()
+        public byte[] getFingerprint()
         {
-            return issuer;
+            return fingerprint;
         }
 
         /**
-         * @return the Base64-encoded DER representation of the certificate.
+         * @return A list of host names that the certificate represents.
          */
-        public String getDER()
+        public List<String> getHostnames()
         {
-            return der;
+            return hostnames;
+        }
+
+        /**
+         * @return the Base64-encoded raw certificate data.
+         */
+        public String getCert()
+        {
+            return asciiCert;
         }
 
         /* This private constructor is used by the native implementation. */
-        private SSLServerCertInfo(String hostname, String fingerprint,
-                                  String validFrom, String validUntil,
-                                  String issuer, String der)
+        private SSLServerCertInfo(String subject, String issuer,
+                                  long validFrom, long validTo,
+                                  byte[] fingerprint,
+                                  List<String> hostnames,
+                                  String asciiCert)
         {
-            this.hostname = hostname;
-            this.fingerprint = fingerprint;
-            this.validFrom = validFrom;
-            this.validUntil = validUntil;
+            this.subject = subject;
             this.issuer = issuer;
-            this.der = der;
+            this.validFrom = new Date(validFrom);
+            this.validTo = new Date(validTo);
+            this.fingerprint = fingerprint;
+            this.hostnames = hostnames;
+            this.asciiCert = asciiCert;
         }
 
-        private String hostname;
-        private String fingerprint;
-        private String validFrom;
-        private String validUntil;
+        private String subject;
         private String issuer;
-        private String der;
+        private Date validFrom;
+        private Date validTo;
+        private byte[] fingerprint;
+        private List<String> hostnames;
+        private String asciiCert;
     }
 
     /**

Modified: 
subversion/branches/pin-externals/subversion/bindings/javahl/src/org/apache/subversion/javahl/util/ConfigLib.java
URL: 
http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/bindings/javahl/src/org/apache/subversion/javahl/util/ConfigLib.java?rev=1656942&r1=1656941&r2=1656942&view=diff
==============================================================================
--- 
subversion/branches/pin-externals/subversion/bindings/javahl/src/org/apache/subversion/javahl/util/ConfigLib.java
 (original)
+++ 
subversion/branches/pin-externals/subversion/bindings/javahl/src/org/apache/subversion/javahl/util/ConfigLib.java
 Tue Feb  3 22:51:18 2015
@@ -81,48 +81,6 @@ public class ConfigLib
         return nativeRemoveCredential(configDir, kind.toString(), realm);
     }
 
-    ///** @see SVNUtil.addCredential */
-    //public SVNUtil.Credential addCredential(String configDir,
-    //                                        SVNUtil.Credential credential,
-    //                                        boolean replace)
-    //    throws ClientException, SubversionException
-    //{
-    //    final SVNUtil.Credential.Kind kind = credential.getKind();
-    //
-    //    final String username =
-    //        ((kind == SVNUtil.Credential.Kind.username
-    //          || kind == SVNUtil.Credential.Kind.simple)
-    //         ? credential.getUsername() : null);
-    //
-    //    final String password =
-    //        (kind == SVNUtil.Credential.Kind.simple
-    //         ? credential.getPassword() : null);
-    //
-    //    final AuthnCallback.SSLServerCertInfo sci =
-    //        (kind == SVNUtil.Credential.Kind.sslServer
-    //         ? credential.getServerCertInfo() : null);
-    //
-    //    final AuthnCallback.SSLServerCertFailures scf =
-    //        (kind == SVNUtil.Credential.Kind.sslServer
-    //         ? credential.getServerCertFailures() : null);
-    //
-    //    final String passphrase =
-    //        (kind == SVNUtil.Credential.Kind.sslClientPassphrase
-    //         ? credential.getClientCertPassphrase() : null);
-    //
-    //    return nativeAddCredential(configDir, kind.toString(),
-    //                               credential.getRealm(),
-    //                               username, password,
-    //                               (sci != null ? sci.getHostname() : null),
-    //                               (sci != null ? sci.getFingerprint() : 
null),
-    //                               (sci != null ? sci.getValidFrom() : null),
-    //                               (sci != null ? sci.getValidUntil() : 
null),
-    //                               (sci != null ? sci.getIssuer() : null),
-    //                               (sci != null ? sci.getDER() : null),
-    //                               (scf != null ? scf.getFailures() : 0),
-    //                               passphrase);
-    //}
-
     /** @see SVNUtil.searchCredentials */
     public List<SVNUtil.Credential>
         searchCredentials(String configDir,
@@ -151,22 +109,6 @@ public class ConfigLib
                                String realm)
         throws ClientException, SubversionException;
 
-    //private native SVNUtil.Credential
-    //    nativeAddCredential(String configDir,
-    //                        String kind,
-    //                        String realm,
-    //                        String username,
-    //                        String password,
-    //                        String serverCertHostname,
-    //                        String serverCertFingerprint,
-    //                        String serverCertValidFrom,
-    //                        String serverCertValidUntil,
-    //                        String serverCertIssuer,
-    //                        String serverCertDER,
-    //                        int serverCertFailures,
-    //                        String clientCertPassphrase)
-    //    throws ClientException, SubversionException;
-
     private native List<SVNUtil.Credential>
         nativeSearchCredentials(String configDir,
                                 String kind,

Modified: 
subversion/branches/pin-externals/subversion/bindings/javahl/tests/org/apache/subversion/javahl/SVNRemoteTests.java
URL: 
http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/bindings/javahl/tests/org/apache/subversion/javahl/SVNRemoteTests.java?rev=1656942&r1=1656941&r2=1656942&view=diff
==============================================================================
--- 
subversion/branches/pin-externals/subversion/bindings/javahl/tests/org/apache/subversion/javahl/SVNRemoteTests.java
 (original)
+++ 
subversion/branches/pin-externals/subversion/bindings/javahl/tests/org/apache/subversion/javahl/SVNRemoteTests.java
 Tue Feb  3 22:51:18 2015
@@ -1398,6 +1398,7 @@ public class SVNRemoteTests extends SVNT
         ISVNRemote.FileRevision rev = result.get(0);
         assertEquals("/iota", rev.getPath());
         assertFalse(rev.isResultOfMerge());
+        assertTrue(rev.hasTextDelta());
     }
 
     // This test is a result of a threading bug that was identified in

Modified: 
subversion/branches/pin-externals/subversion/bindings/javahl/tests/org/apache/subversion/javahl/UtilTests.java
URL: 
http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/bindings/javahl/tests/org/apache/subversion/javahl/UtilTests.java?rev=1656942&r1=1656941&r2=1656942&view=diff
==============================================================================
--- 
subversion/branches/pin-externals/subversion/bindings/javahl/tests/org/apache/subversion/javahl/UtilTests.java
 (original)
+++ 
subversion/branches/pin-externals/subversion/bindings/javahl/tests/org/apache/subversion/javahl/UtilTests.java
 Tue Feb  3 22:51:18 2015
@@ -627,16 +627,41 @@ public class UtilTests extends SVNTests
     private static final String util_cred_ssl_server =
         "K 10\n" +
         "ascii_cert\n" +
-        "V 12\n" +
-        "NotTelling==\n" +
+        "V 1616\n" +
+        "MIIEtzCCA5+gAwIBAgIQWGBOrapkezd+BWVsAtmtmTANBgkqhkiG9w0BAQsFADA8" +
+        "MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMVGhhd3RlLCBJbmMuMRYwFAYDVQQDEw1U" +
+        "aGF3dGUgU1NMIENBMB4XDTE0MDQxMTAwMDAwMFoXDTE2MDQwNzIzNTk1OVowgYsx" +
+        "CzAJBgNVBAYTAlVTMREwDwYDVQQIEwhNYXJ5bGFuZDEUMBIGA1UEBxQLRm9yZXN0" +
+        "IEhpbGwxIzAhBgNVBAoUGkFwYWNoZSBTb2Z0d2FyZSBGb3VuZGF0aW9uMRcwFQYD" +
+        "VQQLFA5JbmZyYXN0cnVjdHVyZTEVMBMGA1UEAxQMKi5hcGFjaGUub3JnMIIBIjAN" +
+        "BgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA+Tq4mH+stRoxe4xth8tUCgLt+P4L" +
+        "D/JWZz4a2IecaaAk57vIlTxEyP16fUShUfxVJnD0KV11zv2qaEUXNaA6hKd4H/oB" +
+        "u2OyGev+quRM+aFCjWqASkXt7fLGsIkHAwP3XwBVBpARbcXJeCjCBxqaYrQqS8LT" +
+        "wfPUD9eYncGlQ+ixb3Bosy7TmkWKeLsRdS90cAO/rdgQ8OI7kLT/1tr5GpF9RmXo" +
+        "RnVqMP+U0zGd/BNNSneg7emb7TxLzxeMKZ7QbF4MZi8RRN11spvx8/f92CiYrGGu" +
+        "y67VdOGPaomYc+VZ2syLwduHGK40ADrEK3+MQpsRFB0dM08j9bhpr5A44wIDAQAB" +
+        "o4IBYzCCAV8wFwYDVR0RBBAwDoIMKi5hcGFjaGUub3JnMAkGA1UdEwQCMAAwQgYD" +
+        "VR0gBDswOTA3BgpghkgBhvhFAQc2MCkwJwYIKwYBBQUHAgEWG2h0dHBzOi8vd3d3" +
+        "LnRoYXd0ZS5jb20vY3BzLzAOBgNVHQ8BAf8EBAMCBaAwHwYDVR0jBBgwFoAUp6KD" +
+        "uzRFQD381TBPErk+oQGf9tswOgYDVR0fBDMwMTAvoC2gK4YpaHR0cDovL3N2ci1v" +
+        "di1jcmwudGhhd3RlLmNvbS9UaGF3dGVPVi5jcmwwHQYDVR0lBBYwFAYIKwYBBQUH" +
+        "AwEGCCsGAQUFBwMCMGkGCCsGAQUFBwEBBF0wWzAiBggrBgEFBQcwAYYWaHR0cDov" +
+        "L29jc3AudGhhd3RlLmNvbTA1BggrBgEFBQcwAoYpaHR0cDovL3N2ci1vdi1haWEu" +
+        "dGhhd3RlLmNvbS9UaGF3dGVPVi5jZXIwDQYJKoZIhvcNAQELBQADggEBAF52BLvl" +
+        "x5or9/aO7+cPhxuPxwiNRgbvHdCakD7n8vzjNyct9fKp6/XxB6GQiTZ0nZPJOyIu" +
+        "Pi1QDLKOXvaPeLKDBilL/+mrn/ev3s/aRQSrUsieKDoQnqtmlxEHc/T3+Ni/RZob" +
+        "PD4GzPuNKpK3BIc0fk/95T8R1DjBSQ5/clvkzOKtcl3VffAwnHiE9TZx9js7kZwO" +
+        "b9nOKX8DFao3EpQcS7qn63Ibzbq5A6ry8ZNRQSIJK/xlCAWoyUd1uxnqGFnus8wb" +
+        "9RVZJQe8YvyytBjgbE3QjnfPOxoEJA3twupnPmH+OCTM6V3TZqpRZj/sZ5rtIQ++" +
+        "hI5FdJWUWVSgnSw=\n" +
         "K 8\n" +
         "failures\n" +
         "V 1\n" +
         "8\n" +
         "K 15\n" +
         "svn:realmstring\n" +
-        "V 27\n" +
-        "https://svn.example.com:443\n"; +
+        "V 26\n" +
+        "https://svn.apache.org:443\n"; +
         "END\n";
 
     private static final String util_cred_ssl_client_passphrase =
@@ -717,9 +742,12 @@ public class UtilTests extends SVNTests
         /* one SSL server trust credential */
         cred = SVNUtil.getCredential(configDir,
                                      SVNUtil.Credential.Kind.sslServer,
-                                     "https://svn.example.com:443";);
+                                     "https://svn.apache.org:443";);
         assertNotNull(cred);
-        assertEquals(cred.getServerCertInfo().getDER(), "NotTelling==");
+        assertEquals(cred.getServerCertInfo().getSubject(),
+                     "C=US, ST=Maryland, L=Forest Hill, " +
+                     "O=Apache Software Foundation, OU=Infrastructure, " +
+                     "CN=*.apache.org");
 
         /* one SSL client passphrase credential */
         cred = SVNUtil.getCredential(configDir,
@@ -764,10 +792,16 @@ public class UtilTests extends SVNTests
         assertNotNull(creds);
         assertEquals(creds.size(), 2);
 
+        /* search with match on subvject */
+        creds = SVNUtil.searchCredentials(configDir, null,
+                                          null, null, "\\*.apache.org", null);
+        assertNotNull(creds);
+        assertEquals(creds.size(), 1);
+
         /* search with match on realm */
         creds = SVNUtil.searchCredentials(configDir, null,
                                           "*example*", null, null, null);
         assertNotNull(creds);
-        assertEquals(creds.size(), 4);
+        assertEquals(creds.size(), 3);
     }
 }

Modified: 
subversion/branches/pin-externals/subversion/include/private/svn_ra_private.h
URL: 
http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/include/private/svn_ra_private.h?rev=1656942&r1=1656941&r2=1656942&view=diff
==============================================================================
--- 
subversion/branches/pin-externals/subversion/include/private/svn_ra_private.h 
(original)
+++ 
subversion/branches/pin-externals/subversion/include/private/svn_ra_private.h 
Tue Feb  3 22:51:18 2015
@@ -39,6 +39,33 @@
 extern "C" {
 #endif /* __cplusplus */
 
+
+
+/**
+ * Open a new ra session @a *new_session to the same repository as an existing
+ * ra session @a old_session, copying the callbacks, auth baton, etc. from the
+ * old session. This essentially limits the lifetime of the new, duplicated
+ * session to the lifetime of the old session. If the new session should
+ * outlive the new session, creating a new session using svn_ra_open4() is
+ * recommended.
+ *
+ * If @a session_url is not NULL, parent the new session at session_url. Note
+ * that @a session_url MUST BE in the same repository as @a old_session or an
+ * error will be returned. When @a session_url NULL the same session root
+ * will be used.
+ *
+ * Allocate @a new_session in @a result_pool. Perform temporary allocations
+ * in @a scratch_pool.
+ *
+ * @since New in 1.9.
+ */
+svn_error_t *
+svn_ra__dup_session(svn_ra_session_t **new_session,
+                    svn_ra_session_t *old_session,
+                    const char *session_url,
+                    apr_pool_t *result_pool,
+                    apr_pool_t *scratch_pool);
+
 /* Equivalent to svn_ra__assert_capable_server()
    for SVN_RA_CAPABILITY_MERGEINFO. */
 svn_error_t *

Modified: 
subversion/branches/pin-externals/subversion/include/private/svn_utf_private.h
URL: 
http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/include/private/svn_utf_private.h?rev=1656942&r1=1656941&r2=1656942&view=diff
==============================================================================
--- 
subversion/branches/pin-externals/subversion/include/private/svn_utf_private.h 
(original)
+++ 
subversion/branches/pin-externals/subversion/include/private/svn_utf_private.h 
Tue Feb  3 22:51:18 2015
@@ -159,6 +159,23 @@ svn_utf__normalize(const char **result,
 svn_boolean_t
 svn_utf__is_normalized(const char *string, apr_pool_t *scratch_pool);
 
+/* Encode an UCS-4 string to UTF-8, placing the result into BUFFER.
+ * While utf8proc does have a similar function, it does more checking
+ * and processing than we want here; this function does not attempt
+ * any normalizations but just encodes the individual code points.
+ * The encoded string will always be NUL-terminated.
+ *
+ * Return the length of the result (excluding the NUL terminator) in
+ * *result_length.
+ *
+ * A returned error indicates that a codepoint is invalid.
+ */
+svn_error_t *
+svn_utf__encode_ucs4_string(svn_membuf_t *buffer,
+                            const apr_int32_t *ucs4str,
+                            apr_size_t length,
+                            apr_size_t *result_length);
+
 /* Pattern matching similar to the the SQLite LIKE and GLOB
  * operators. PATTERN, KEY and ESCAPE must all point to UTF-8
  * strings. Furthermore, ESCAPE, if provided, must be a character from
@@ -191,6 +208,48 @@ svn_utf__glob(svn_boolean_t *match,
 const char *
 svn_utf__utf8proc_version(void);
 
+/* Convert an UTF-16 (or UCS-2) string to UTF-8, returning the pointer
+ * in RESULT. If BIG_ENDIAN is set, then UTF16STR is big-endian;
+ * otherwise, it's little-endian.
+ *
+ * If UTF16LEN is SVN_UTF__UNKNOWN_LENGTH, then UTF16STR must be
+ * terminated with a zero; otherwise, it is the number of 16-bit codes
+ * to convert, and the source string may contain NUL values.
+ *
+ * Allocate RESULT in RESULT_POOL and use SCRATCH_POOL for
+ * intermediate allocation.
+ *
+ * This function combines UTF-16 surrogate pairs into single code
+ * points, but will leave single lead or trail surrogates unchanged.
+ */
+svn_error_t *
+svn_utf__utf16_to_utf8(const svn_string_t **result,
+                       const apr_uint16_t *utf16str,
+                       apr_size_t utf16len,
+                       svn_boolean_t big_endian,
+                       apr_pool_t *result_pool,
+                       apr_pool_t *scratch_pool);
+
+/* Convert an UTF-32 string to UTF-8, returning the pointer in
+ * RESULT. If BIG_ENDIAN is set, then UTF32STR is big-endian;
+ * otherwise, it's little-endian.
+ *
+ * If UTF32LEN is SVN_UTF__UNKNOWN_LENGTH, then UTF32STR must be
+ * terminated with a zero; otherwise, it is the number of 32-bit codes
+ * to convert, and the source string may contain NUL values.
+ *
+ * Allocate RESULT in RESULT_POOL and use SCRATCH_POOL for
+ * intermediate allocation.
+ */
+svn_error_t *
+svn_utf__utf32_to_utf8(const svn_string_t **result,
+                       const apr_int32_t *utf32str,
+                       apr_size_t utf32len,
+                       svn_boolean_t big_endian,
+                       apr_pool_t *result_pool,
+                       apr_pool_t *scratch_pool);
+
+
 #ifdef __cplusplus
 }
 #endif /* __cplusplus */

Modified: subversion/branches/pin-externals/subversion/include/svn_client.h
URL: 
http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/include/svn_client.h?rev=1656942&r1=1656941&r2=1656942&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/include/svn_client.h (original)
+++ subversion/branches/pin-externals/subversion/include/svn_client.h Tue Feb  
3 22:51:18 2015
@@ -1020,11 +1020,6 @@ typedef struct svn_client_ctx_t
    * @since New in 1.7.  */
   svn_wc_context_t *wc_ctx;
 
-  /** Total number of bytes transferred over network.
-   *
-   * @since New in 1.9. */
-  apr_off_t progress;
-
   /** Check-tunnel callback
    *
    * If not @c NULL, and open_tunnel_func is also not @c NULL, this

Modified: subversion/branches/pin-externals/subversion/include/svn_config.h
URL: 
http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/include/svn_config.h?rev=1656942&r1=1656941&r2=1656942&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/include/svn_config.h (original)
+++ subversion/branches/pin-externals/subversion/include/svn_config.h Tue Feb  
3 22:51:18 2015
@@ -731,31 +731,6 @@ svn_config_ensure(const char *config_dir
  */
 #define SVN_CONFIG_AUTHN_FAILURES_KEY           "failures"
 
-/** A hash-key for a hostname, such as hostnames in SSL certificates.
- * @since New in 1.9.
- */
-#define SVN_CONFIG_AUTHN_HOSTNAME_KEY           "hostname"
-
-/** A hash-key for a fingerprint, such as fingerprints in SSL certificates.
- * @since New in 1.9.
- */
-#define SVN_CONFIG_AUTHN_FINGERPRINT_KEY        "fingerprint"
-
-/** A hash-key for a valid-from date, such as dates in SSL certificates.
- * @since New in 1.9.
- */
-#define SVN_CONFIG_AUTHN_VALID_FROM_KEY         "valid_from"
-
-/** A hash-key for a valid-to date, such as dates in SSL certificates.
- * @since New in 1.9.
- */
-#define SVN_CONFIG_AUTHN_VALID_UNTIL_KEY        "valid_until"
-
-/** A hash-key for an issuer distinguished name, such as issuer names
- * in SSL certificates.
- * @since New in 1.9.
- */
-#define SVN_CONFIG_AUTHN_ISSUER_DN_KEY        "issuer_dn"
 
 /** @} */
 

Modified: subversion/branches/pin-externals/subversion/include/svn_error_codes.h
URL: 
http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/include/svn_error_codes.h?rev=1656942&r1=1656941&r2=1656942&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/include/svn_error_codes.h 
(original)
+++ subversion/branches/pin-externals/subversion/include/svn_error_codes.h Tue 
Feb  3 22:51:18 2015
@@ -150,6 +150,8 @@ extern "C" {
                                          + (22 * SVN_ERR_CATEGORY_SIZE))
 #define SVN_ERR_MALFUNC_CATEGORY_START  (APR_OS_START_USERERR \
                                          + (23 * SVN_ERR_CATEGORY_SIZE))
+#define SVN_ERR_X509_CATEGORY_START     (APR_OS_START_USERERR \
+                                         + (24 * SVN_ERR_CATEGORY_SIZE))
 
 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
 
@@ -1617,6 +1619,90 @@ SVN_ERROR_START
              SVN_ERR_MALFUNC_CATEGORY_START + 1,
              "No non-tracing links found in the error chain")
 
+  /* X509 parser errors.
+   * Names of these error codes are based on tropicssl error codes.
+   * @since New in 1.9 */
+
+  SVN_ERRDEF(SVN_ERR_ASN1_OUT_OF_DATA,
+             SVN_ERR_X509_CATEGORY_START + 0,
+             "Unexpected end of ASN1 data")
+
+  SVN_ERRDEF(SVN_ERR_ASN1_UNEXPECTED_TAG,
+             SVN_ERR_X509_CATEGORY_START + 1,
+             "Unexpected ASN1 tag")
+
+  SVN_ERRDEF(SVN_ERR_ASN1_INVALID_LENGTH,
+             SVN_ERR_X509_CATEGORY_START + 2,
+             "Invalid ASN1 length")
+
+  SVN_ERRDEF(SVN_ERR_ASN1_LENGTH_MISMATCH,
+             SVN_ERR_X509_CATEGORY_START + 3,
+             "ASN1 length mismatch")
+
+  SVN_ERRDEF(SVN_ERR_ASN1_INVALID_DATA,
+             SVN_ERR_X509_CATEGORY_START + 4,
+             "Invalid ASN1 data")
+
+  SVN_ERRDEF(SVN_ERR_X509_FEATURE_UNAVAILABLE,
+             SVN_ERR_X509_CATEGORY_START + 5,
+             "Unavailable X509 feature")
+
+  SVN_ERRDEF(SVN_ERR_X509_CERT_INVALID_PEM,
+             SVN_ERR_X509_CATEGORY_START + 6,
+             "Invalid PEM certificate")
+
+  SVN_ERRDEF(SVN_ERR_X509_CERT_INVALID_FORMAT,
+             SVN_ERR_X509_CATEGORY_START + 7,
+             "Invalid certificate format")
+
+  SVN_ERRDEF(SVN_ERR_X509_CERT_INVALID_VERSION,
+             SVN_ERR_X509_CATEGORY_START + 8,
+             "Invalid certificate version")
+
+  SVN_ERRDEF(SVN_ERR_X509_CERT_INVALID_SERIAL,
+             SVN_ERR_X509_CATEGORY_START + 9,
+             "Invalid certificate serial number")
+
+  SVN_ERRDEF(SVN_ERR_X509_CERT_INVALID_ALG,
+             SVN_ERR_X509_CATEGORY_START + 10,
+             "Found invalid algorithm in certificate")
+
+  SVN_ERRDEF(SVN_ERR_X509_CERT_INVALID_NAME,
+             SVN_ERR_X509_CATEGORY_START + 11,
+             "Found invalid name in certificate")
+
+  SVN_ERRDEF(SVN_ERR_X509_CERT_INVALID_DATE,
+             SVN_ERR_X509_CATEGORY_START + 12,
+             "Found invalid date in certificate")
+
+  SVN_ERRDEF(SVN_ERR_X509_CERT_INVALID_PUBKEY,
+             SVN_ERR_X509_CATEGORY_START + 13,
+             "Found invalid public key in certificate")
+
+  SVN_ERRDEF(SVN_ERR_X509_CERT_INVALID_SIGNATURE,
+             SVN_ERR_X509_CATEGORY_START + 14,
+             "Found invalid signature in certificate")
+
+  SVN_ERRDEF(SVN_ERR_X509_CERT_INVALID_EXTENSIONS,
+             SVN_ERR_X509_CATEGORY_START + 15,
+             "Found invalid extensions in certificate")
+
+  SVN_ERRDEF(SVN_ERR_X509_CERT_UNKNOWN_VERSION,
+             SVN_ERR_X509_CATEGORY_START + 16,
+             "Unknown certificate version")
+
+  SVN_ERRDEF(SVN_ERR_X509_CERT_UNKNOWN_PK_ALG,
+             SVN_ERR_X509_CATEGORY_START + 17,
+             "Certificate uses unknown public key algorithm")
+
+  SVN_ERRDEF(SVN_ERR_X509_CERT_SIG_MISMATCH,
+             SVN_ERR_X509_CATEGORY_START + 18,
+             "Certificate signature mismatch")
+
+  SVN_ERRDEF(SVN_ERR_X509_CERT_VERIFY_FAILED,
+             SVN_ERR_X509_CATEGORY_START + 19,
+             "Certficate verification failed")
+
 SVN_ERROR_END
 
 

Modified: subversion/branches/pin-externals/subversion/include/svn_fs.h
URL: 
http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/include/svn_fs.h?rev=1656942&r1=1656941&r2=1656942&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/include/svn_fs.h (original)
+++ subversion/branches/pin-externals/subversion/include/svn_fs.h Tue Feb  3 
22:51:18 2015
@@ -2807,7 +2807,7 @@ svn_fs_unlock(svn_fs_t *fs,
 /** If @a path is locked in @a fs, set @a *lock to an svn_lock_t which
  *  represents the lock, allocated in @a pool.
  *
- * If @a path is not locked, set @a *lock to NULL.
+ * If @a path is not locked or does not exist in HEAD, set @a *lock to NULL.
  */
 svn_error_t *
 svn_fs_get_lock(svn_lock_t **lock,

Modified: subversion/branches/pin-externals/subversion/include/svn_ra.h
URL: 
http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/include/svn_ra.h?rev=1656942&r1=1656941&r2=1656942&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/include/svn_ra.h (original)
+++ subversion/branches/pin-externals/subversion/include/svn_ra.h Tue Feb  3 
22:51:18 2015
@@ -785,32 +785,6 @@ svn_ra_open(svn_ra_session_t **session_p
             apr_hash_t *config,
             apr_pool_t *pool);
 
-/**
- * Open a new ra session @a *new_session to the same repository as an existing
- * ra session @a old_session, copying the callbacks, auth baton, etc. from the
- * old session. This essentially limits the lifetime of the new, duplicated
- * session to the lifetime of the old session. If the new session should
- * outlive the new session, creating a new session using svn_ra_open4() is
- * recommended.
- *
- * If @a session_url is not NULL, parent the new session at session_url. Note
- * that @a session_url MUST BE in the same repository as @a old_session or an
- * error will be returned. When @a session_url NULL the same session root
- * will be used.
- *
- * Allocate @a new_session in @a result_pool. Perform temporary allocations
- * in @a scratch_pool.
- *
- * @since New in 1.9.
- */
-svn_error_t *
-svn_ra_dup_session(svn_ra_session_t **new_session,
-                   svn_ra_session_t *old_session,
-                   const char *session_url,
-                   apr_pool_t *result_pool,
-                   apr_pool_t *scratch_pool);
-
-
 /** Change the root URL of an open @a ra_session to point to a new path in the
  * same repository.  @a url is the new root URL.  Use @a pool for
  * temporary allocations.
@@ -1932,8 +1906,12 @@ svn_ra_unlock(svn_ra_session_t *session,
 
 /**
  * If @a path is locked, set @a *lock to an svn_lock_t which
- * represents the lock, allocated in @a pool.  If @a path is not
- * locked, set @a *lock to NULL.
+ * represents the lock, allocated in @a pool.
+ *
+ * If @a path is not locked or does not exist in HEAD, set @a *lock to NULL.
+ *
+ * @note Before 1.9, this function could return SVN_ERR_FS_NOT_FOUND
+ * when @a path didn't exist in HEAD on specific ra layers.
  *
  * @since New in 1.2.
  */

Modified: subversion/branches/pin-externals/subversion/libsvn_client/client.h
URL: 
http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/libsvn_client/client.h?rev=1656942&r1=1656941&r2=1656942&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/libsvn_client/client.h 
(original)
+++ subversion/branches/pin-externals/subversion/libsvn_client/client.h Tue Feb 
 3 22:51:18 2015
@@ -45,6 +45,35 @@
 extern "C" {
 #endif /* __cplusplus */
 
+
+/* Private client context.
+ *
+ * This is what is actually allocated by svn_client_create_context2(),
+ * which then returns the address of the public_ctx member. */
+typedef struct svn_client__private_ctx_t
+{
+  /* Reserved field, always zero, to detect misuse of the private
+     context as a public client context. */
+  apr_uint64_t magic_null;
+
+  /* Reserved field, always set to a known magic number, to identify
+     this struct as the private client context. */
+  apr_uint64_t magic_id;
+
+  /* Total number of bytes transferred over network across all RA sessions. */
+  apr_off_t total_progress;
+
+  /* The public context. */
+  svn_client_ctx_t public_ctx;
+} svn_client__private_ctx_t;
+
+
+/* Given a public client context CTX, return the private context
+   within which it is allocated. */
+svn_client__private_ctx_t *
+svn_client__get_private_ctx(svn_client_ctx_t *ctx);
+
+
 /* Set *REVNUM to the revision number identified by REVISION.
 
    If REVISION->kind is svn_opt_revision_number, just use

Modified: subversion/branches/pin-externals/subversion/libsvn_client/ctx.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/libsvn_client/ctx.c?rev=1656942&r1=1656941&r2=1656942&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/libsvn_client/ctx.c (original)
+++ subversion/branches/pin-externals/subversion/libsvn_client/ctx.c Tue Feb  3 
22:51:18 2015
@@ -27,6 +27,7 @@
 
 /*** Includes. ***/
 
+#include <stddef.h>
 #include <apr_pools.h>
 #include "svn_hash.h"
 #include "svn_client.h"
@@ -34,6 +35,8 @@
 
 #include "private/svn_wc_private.h"
 
+#include "client.h"
+
 
 /*** Code. ***/
 
@@ -76,6 +79,20 @@ call_conflict_func(svn_wc_conflict_resul
   return SVN_NO_ERROR;
 }
 
+/* The magic number in client_ctx_t.magic_id. */
+#define CLIENT_CTX_MAGIC APR_UINT64_C(0xDEADBEEF600DF00D)
+
+svn_client__private_ctx_t *
+svn_client__get_private_ctx(svn_client_ctx_t *ctx)
+{
+  svn_client__private_ctx_t *const private_ctx =
+    (void*)((char *)ctx - offsetof(svn_client__private_ctx_t, public_ctx));
+  SVN_ERR_ASSERT_NO_RETURN(&private_ctx->public_ctx == ctx);
+  SVN_ERR_ASSERT_NO_RETURN(0 == private_ctx->magic_null);
+  SVN_ERR_ASSERT_NO_RETURN(CLIENT_CTX_MAGIC == private_ctx->magic_id);
+  return private_ctx;
+}
+
 svn_error_t *
 svn_client_create_context2(svn_client_ctx_t **ctx,
                            apr_hash_t *cfg_hash,
@@ -83,23 +100,29 @@ svn_client_create_context2(svn_client_ct
 {
   svn_config_t *cfg_config;
 
-  *ctx = apr_pcalloc(pool, sizeof(svn_client_ctx_t));
+  svn_client__private_ctx_t *const private_ctx =
+    apr_pcalloc(pool, sizeof(*private_ctx));
+  svn_client_ctx_t *const public_ctx = &private_ctx->public_ctx;
+
+  private_ctx->magic_null = 0;
+  private_ctx->magic_id = CLIENT_CTX_MAGIC;
 
-  (*ctx)->notify_func2 = call_notify_func;
-  (*ctx)->notify_baton2 = *ctx;
+  public_ctx->notify_func2 = call_notify_func;
+  public_ctx->notify_baton2 = public_ctx;
 
-  (*ctx)->conflict_func2 = call_conflict_func;
-  (*ctx)->conflict_baton2 = *ctx;
+  public_ctx->conflict_func2 = call_conflict_func;
+  public_ctx->conflict_baton2 = public_ctx;
 
-  (*ctx)->config = cfg_hash;
+  public_ctx->config = cfg_hash;
 
   if (cfg_hash)
     cfg_config = svn_hash_gets(cfg_hash, SVN_CONFIG_CATEGORY_CONFIG);
   else
     cfg_config = NULL;
 
-  SVN_ERR(svn_wc_context_create(&(*ctx)->wc_ctx, cfg_config, pool,
-                                pool));
+  SVN_ERR(svn_wc_context_create(&public_ctx->wc_ctx, cfg_config,
+                                pool, pool));
+  *ctx = public_ctx;
 
   return SVN_NO_ERROR;
 }

Modified: subversion/branches/pin-externals/subversion/libsvn_client/diff.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/libsvn_client/diff.c?rev=1656942&r1=1656941&r2=1656942&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/libsvn_client/diff.c (original)
+++ subversion/branches/pin-externals/subversion/libsvn_client/diff.c Tue Feb  
3 22:51:18 2015
@@ -52,6 +52,7 @@
 #include "private/svn_diff_private.h"
 #include "private/svn_subr_private.h"
 #include "private/svn_io_private.h"
+#include "private/svn_ra_private.h"
 
 #include "svn_private_config.h"
 
@@ -1805,8 +1806,8 @@ diff_repos_repos(const char **root_relpa
   /* Now, we open an extra RA session to the correct anchor
      location for URL1.  This is used during the editor calls to fetch file
      contents.  */
-  SVN_ERR(svn_ra_dup_session(&extra_ra_session, ra_session, anchor1,
-                             scratch_pool, scratch_pool));
+  SVN_ERR(svn_ra__dup_session(&extra_ra_session, ra_session, anchor1,
+                              scratch_pool, scratch_pool));
 
   if (ddi)
     {

Modified: subversion/branches/pin-externals/subversion/libsvn_client/ra.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/libsvn_client/ra.c?rev=1656942&r1=1656941&r2=1656942&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/libsvn_client/ra.c (original)
+++ subversion/branches/pin-externals/subversion/libsvn_client/ra.c Tue Feb  3 
22:51:18 2015
@@ -299,17 +299,20 @@ progress_func(apr_off_t progress,
               apr_pool_t *pool)
 {
   callback_baton_t *b = baton;
-  svn_client_ctx_t *ctx = b->ctx;
+  svn_client_ctx_t *public_ctx = b->ctx;
+  svn_client__private_ctx_t *private_ctx =
+    svn_client__get_private_ctx(public_ctx);
 
-  ctx->progress += (progress - b->last_progress);
+  private_ctx->total_progress += (progress - b->last_progress);
   b->last_progress = progress;
 
-  if (ctx->progress_func)
+  if (public_ctx->progress_func)
     {
       /* All RA implementations currently provide -1 for total. So it doesn't
          make sense to develop some complex logic to combine total across all
          RA sessions. */
-      ctx->progress_func(ctx->progress, -1, ctx->progress_baton, pool);
+      public_ctx->progress_func(private_ctx->total_progress, -1,
+                                public_ctx->progress_baton, pool);
     }
 }
 

Modified: subversion/branches/pin-externals/subversion/libsvn_fs_fs/tree.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/libsvn_fs_fs/tree.c?rev=1656942&r1=1656941&r2=1656942&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/libsvn_fs_fs/tree.c (original)
+++ subversion/branches/pin-externals/subversion/libsvn_fs_fs/tree.c Tue Feb  3 
22:51:18 2015
@@ -373,8 +373,8 @@ locate_cache(svn_cache__t **cache,
     }
 }
 
-/* Return NODE_P for PATH from ROOT's node cache, or NULL if the node
-   isn't cached; read it from the FS. *NODE_P is allocated in POOL. */
+/* In *NODE_P, return the DAG node for PATH from ROOT's node cache, or NULL
+   if the node isn't cached.  *NODE_P is allocated in POOL. */
 static svn_error_t *
 dag_node_cache_get(dag_node_t **node_p,
                    svn_fs_root_t *root,
@@ -404,7 +404,7 @@ dag_node_cache_get(dag_node_t **node_p,
           if (found && node)
             {
               /* Patch up the FS, since this might have come from an old FS
-              * object. */
+               * object. */
               svn_fs_fs__dag_set_fs(node, root->fs);
 
               /* Retain the DAG node in L1 cache. */
@@ -428,7 +428,7 @@ dag_node_cache_get(dag_node_t **node_p,
       if (found && node)
         {
           /* Patch up the FS, since this might have come from an old FS
-          * object. */
+           * object. */
           svn_fs_fs__dag_set_fs(node, root->fs);
         }
     }
@@ -451,11 +451,7 @@ dag_node_cache_set(svn_fs_root_t *root,
 
   SVN_ERR_ASSERT(*path == '/');
 
-  /* Do *not* attempt to dup and put the node into L1.
-   * dup() is twice as expensive as an L2 lookup (which will set also L1).
-   */
   locate_cache(&cache, &key, root, path, pool);
-
   return svn_cache__set(cache, key, node, pool);
 }
 

Propchange: subversion/branches/pin-externals/subversion/libsvn_fs_x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Feb  3 22:51:18 2015
@@ -68,6 +68,7 @@
 /subversion/branches/revprop-caching-ng/subversion/libsvn_fs_x:1620597
 
/subversion/branches/revprop-packing/subversion/libsvn_fs_x:1143907,1143971,1143997,1144017,1144499,1144568,1146145
 /subversion/branches/subtree-mergeinfo/subversion/libsvn_fs_x:876734-878766
+/subversion/branches/svn-auth-x509/subversion/libsvn_fs_x:1603509-1655900
 
/subversion/branches/svn-mergeinfo-enhancements/subversion/libsvn_fs_x:870119-870195,870197-870288
 
/subversion/branches/svn-patch-improvements/subversion/libsvn_fs_x:918519-934609
 /subversion/branches/svn_mutex/subversion/libsvn_fs_x:1141683-1182099
@@ -87,4 +88,4 @@
 
/subversion/branches/verify-keep-going/subversion/libsvn_fs_x:1439280-1492639,1546002-1546110
 /subversion/branches/wc-collate-path/subversion/libsvn_fs_x:1402685-1480384
 
/subversion/trunk/subversion/libsvn_fs_fs:1415133-1596500,1596567,1597414,1597989,1598273,1599140,1600872,1601633,1603485-1603487,1603499,1603605,1604128,1604188,1604413-1604414,1604416-1604417,1604421,1604442,1604700,1604717,1604720,1604726,1604755,1604794,1604802,1604824,1604836,1604844,1604902-1604903,1604911,1604925,1604933,1604947,1605059-1605060,1605064-1605065,1605068,1605071-1605073,1605075,1605123,1605188-1605189,1605191,1605197,1605444,1605633,1606132,1606142,1606144,1606514,1606526,1606528,1606551,1606554,1606564,1606598-1606599,1606656,1606658,1606662,1606744,1606840,1607085,1607572,1612407,1612810,1613339,1613872,1614611,1615348,1615351-1615352,1615356,1616338-1616339,1616613,1617586,1617688,1618138,1618151,1618153,1618226,1618641,1618653,1618662,1619068,1619358,1619413,1619769,1619774,1620602,1620909,1620912,1620928,1620930,1621275,1621635,1622931,1622937,1622942,1622946,1622959-1622960,1622963,1622987,1623007,1623368,1623373,1623377,1623379,1623381,1623398,1623402,162
 
4011,1624265,1624512,1626246,1626871,1626873,1626886,1627497-1627498,1627502,1627947-1627949,1627966,1628083,1628093,1628158-1628159,1628161,1628392-1628393,1628415,1628427,1628676,1628738,1628762,1628764,1629854-1629855,1629857,1629865,1629873,1629875,1629879,1630067,1630070,1631049-1631051,1631075,1631115,1631171,1631180,1631185-1631186,1631196-1631197,1631239-1631240,1631548,1631550,1631563,1631567,1631588,1631598,1632646,1632776,1632849,1632851-1632853,1632856-1632857,1632868,1632908,1632926,1633232,1633617-1633618,1634872,1634875,1634879-1634880,1634920,1636478,1636483,1636629,1636644,1637184,1637186,1637330,1637358,1637363,1637393,1639319,1639322,1639335,1639348,1639352,1639355,1639358,1639414,1639419,1639426,1639430,1639436,1639440,1639549,1640061-1640062,1640197,1640915,1640966,1641013,1643139,1643233,1645567,1646021,1646712,1646716,1647537,1647540-1647541,1647820,1647905,1648230,1648238,1648241-1648243,1648253,1648272,1648532,1648537-1648539,1648542,1648591,1648612
-/subversion/trunk/subversion/libsvn_fs_x:1414756-1509914,1643755-1653571
+/subversion/trunk/subversion/libsvn_fs_x:1414756-1509914,1643755-1656940

Modified: subversion/branches/pin-externals/subversion/libsvn_ra/ra_loader.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/libsvn_ra/ra_loader.c?rev=1656942&r1=1656941&r2=1656942&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/libsvn_ra/ra_loader.c 
(original)
+++ subversion/branches/pin-externals/subversion/libsvn_ra/ra_loader.c Tue Feb  
3 22:51:18 2015
@@ -531,11 +531,11 @@ svn_error_t *svn_ra_open4(svn_ra_session
 }
 
 svn_error_t *
-svn_ra_dup_session(svn_ra_session_t **new_session,
-                   svn_ra_session_t *old_session,
-                   const char *session_url,
-                   apr_pool_t *result_pool,
-                   apr_pool_t *scratch_pool)
+svn_ra__dup_session(svn_ra_session_t **new_session,
+                    svn_ra_session_t *old_session,
+                    const char *session_url,
+                    apr_pool_t *result_pool,
+                    apr_pool_t *scratch_pool)
 {
   svn_ra_session_t *session;
 
@@ -1010,8 +1010,8 @@ svn_error_t *svn_ra_stat(svn_ra_session_
               svn_uri_split(&parent_url, &base_name, session_url,
                             scratch_pool);
 
-              SVN_ERR(svn_ra_dup_session(&parent_session, session, parent_url,
-                                         scratch_pool, scratch_pool));
+              SVN_ERR(svn_ra__dup_session(&parent_session, session, parent_url,
+                                          scratch_pool, scratch_pool));
 
               /* Get all parent's entries, no props. */
               SVN_ERR(svn_ra_get_dir2(parent_session, &parent_ents, NULL,

Modified: subversion/branches/pin-externals/subversion/libsvn_ra_serf/get_file.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/libsvn_ra_serf/get_file.c?rev=1656942&r1=1656941&r2=1656942&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/libsvn_ra_serf/get_file.c 
(original)
+++ subversion/branches/pin-externals/subversion/libsvn_ra_serf/get_file.c Tue 
Feb  3 22:51:18 2015
@@ -397,9 +397,6 @@ svn_ra_serf__get_file(svn_ra_session_t *
 
           handler = svn_ra_serf__create_handler(session, pool);
 
-          /* What connection should we go on? */
-          handler->conn = session->conns[session->cur_conn];
-
           handler->method = "GET";
           handler->path = fetch_url;
 

Modified: subversion/branches/pin-externals/subversion/libsvn_ra_serf/get_lock.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/libsvn_ra_serf/get_lock.c?rev=1656942&r1=1656941&r2=1656942&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/libsvn_ra_serf/get_lock.c 
(original)
+++ subversion/branches/pin-externals/subversion/libsvn_ra_serf/get_lock.c Tue 
Feb  3 22:51:18 2015
@@ -321,8 +321,8 @@ svn_ra_serf__get_lock(svn_ra_session_t *
     return svn_error_trace(
              svn_error_create(SVN_ERR_RA_NOT_IMPLEMENTED, err,
                               _("Server does not support locking features")));
-  else if (err)
-    return svn_error_trace(err);
+  else if (svn_error_find_cause(err, SVN_ERR_FS_NOT_FOUND))
+    svn_error_clear(err); /* Behave like the other RA layers */
   else if (handler->sline.code != 207)
     return svn_error_trace(svn_ra_serf__unexpected_status(handler));
 

Modified: subversion/branches/pin-externals/subversion/libsvn_ra_serf/lock.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/libsvn_ra_serf/lock.c?rev=1656942&r1=1656941&r2=1656942&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/libsvn_ra_serf/lock.c 
(original)
+++ subversion/branches/pin-externals/subversion/libsvn_ra_serf/lock.c Tue Feb  
3 22:51:18 2015
@@ -336,7 +336,7 @@ run_locks(svn_ra_serf__session_t *sess,
                 {
                   svn_lock_t *report_lock = NULL;
 
-                  if (locking)
+                  if (locking && ctx->lock->token)
                     report_lock = ctx->lock;
 
                   cb_err = lock_func(lock_baton, ctx->path, locking,

Modified: subversion/branches/pin-externals/subversion/libsvn_ra_serf/serf.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/libsvn_ra_serf/serf.c?rev=1656942&r1=1656941&r2=1656942&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/libsvn_ra_serf/serf.c 
(original)
+++ subversion/branches/pin-externals/subversion/libsvn_ra_serf/serf.c Tue Feb  
3 22:51:18 2015
@@ -776,6 +776,7 @@ ra_serf_dup_session(svn_ra_session_t *ne
                                new_sess);
 
   new_sess->num_conns = 1;
+  new_sess->cur_conn = 0;
 
   new_session->priv = new_sess;
 

Modified: subversion/branches/pin-externals/subversion/libsvn_repos/rev_hunt.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/libsvn_repos/rev_hunt.c?rev=1656942&r1=1656941&r2=1656942&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/libsvn_repos/rev_hunt.c 
(original)
+++ subversion/branches/pin-externals/subversion/libsvn_repos/rev_hunt.c Tue 
Feb  3 22:51:18 2015
@@ -1386,7 +1386,7 @@ send_path_revision(struct path_revision
   /* Compute and send delta if client asked for it.
      Note that this was initialized to NULL, so if !contents_changed,
      no deltas will be computed. */
-  if (delta_handler)
+  if (delta_handler && delta_handler != svn_delta_noop_window_handler)
     {
       /* Get the content delta. */
       SVN_ERR(svn_fs_get_file_delta_stream(&delta_stream,


Reply via email to