You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ph...@apache.org on 2014/03/12 18:18:26 UTC

svn commit: r1576824 [4/7] - in /subversion/branches/fsfs-lock-many: ./ build/generator/ build/generator/templates/ subversion/bindings/ctypes-python/test/ subversion/bindings/javahl/native/ subversion/bindings/javahl/src/org/apache/subversion/javahl/t...

Modified: subversion/branches/fsfs-lock-many/subversion/libsvn_ra_serf/serf.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-lock-many/subversion/libsvn_ra_serf/serf.c?rev=1576824&r1=1576823&r2=1576824&view=diff
==============================================================================
--- subversion/branches/fsfs-lock-many/subversion/libsvn_ra_serf/serf.c (original)
+++ subversion/branches/fsfs-lock-many/subversion/libsvn_ra_serf/serf.c Wed Mar 12 17:18:20 2014
@@ -29,7 +29,6 @@
 #include <apr_uri.h>
 #include <serf.h>
 
-#include "svn_private_config.h"
 #include "svn_pools.h"
 #include "svn_ra.h"
 #include "svn_dav.h"
@@ -48,6 +47,7 @@
 #include "private/svn_dep_compat.h"
 #include "private/svn_fspath.h"
 #include "private/svn_subr_private.h"
+#include "svn_private_config.h"
 
 #include "ra_serf.h"
 
@@ -489,6 +489,7 @@ svn_ra_serf__open(svn_ra_session_t *sess
   apr_uri_t url;
   const char *client_string = NULL;
   svn_error_t *err;
+  apr_pool_t *subpool;
 
   if (corrected_url)
     *corrected_url = NULL;
@@ -584,12 +585,24 @@ svn_ra_serf__open(svn_ra_session_t *sess
 
   session->priv = serf_sess;
 
-  err = svn_ra_serf__exchange_capabilities(serf_sess, corrected_url, pool);
+  /* This subpool not only avoids having a lot of temporary state in the long
+     living session pool, but it also works around a bug in serf
+     <= r2319 / 1.3.4 where serf doesn't report the request as failed/cancelled
+     when the authorization request handler fails to handle the request.
+
+     In this specific case the serf connection is cleaned up by the pool
+     handlers before our handler is cleaned up (via subpools). Using a
+     subpool here cleans up our handler before the connection is cleaned. */
+  subpool = svn_pool_create(pool);
+
+  err = svn_ra_serf__exchange_capabilities(serf_sess, corrected_url,
+                                           pool, subpool);
 
   /* serf should produce a usable error code instead of APR_EGENERAL */
   if (err && err->apr_err == APR_EGENERAL)
     err = svn_error_createf(SVN_ERR_RA_DAV_REQUEST_FAILED, err,
                             _("Connection to '%s' failed"), session_URL);
+  svn_pool_clear(subpool);
   SVN_ERR(err);
 
   /* We have set up a useful connection (that doesn't indication a redirect).
@@ -598,7 +611,9 @@ svn_ra_serf__open(svn_ra_session_t *sess
      problems in any proxy.  */
   if ((corrected_url == NULL || *corrected_url == NULL)
       && serf_sess->detect_chunking && !serf_sess->http10)
-    SVN_ERR(svn_ra_serf__probe_proxy(serf_sess, pool));
+    SVN_ERR(svn_ra_serf__probe_proxy(serf_sess, subpool));
+
+  svn_pool_destroy(subpool);
 
   return SVN_NO_ERROR;
 }

Modified: subversion/branches/fsfs-lock-many/subversion/libsvn_ra_serf/stat.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-lock-many/subversion/libsvn_ra_serf/stat.c?rev=1576824&r1=1576823&r2=1576824&view=diff
==============================================================================
--- subversion/branches/fsfs-lock-many/subversion/libsvn_ra_serf/stat.c (original)
+++ subversion/branches/fsfs-lock-many/subversion/libsvn_ra_serf/stat.c Wed Mar 12 17:18:20 2014
@@ -172,7 +172,7 @@ dirent_walker(void *baton,
         }
       else if (strcmp(name, "creator-displayname") == 0)
         {
-          dwb->entry->last_author = val->data;
+          dwb->entry->last_author = apr_pstrdup(dwb->result_pool, val->data);
         }
       else if (strcmp(name, SVN_DAV__CREATIONDATE) == 0)
         {

Modified: subversion/branches/fsfs-lock-many/subversion/libsvn_ra_serf/update.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-lock-many/subversion/libsvn_ra_serf/update.c?rev=1576824&r1=1576823&r2=1576824&view=diff
==============================================================================
--- subversion/branches/fsfs-lock-many/subversion/libsvn_ra_serf/update.c (original)
+++ subversion/branches/fsfs-lock-many/subversion/libsvn_ra_serf/update.c Wed Mar 12 17:18:20 2014
@@ -31,7 +31,6 @@
 
 #include <serf.h>
 
-#include "svn_private_config.h"
 #include "svn_hash.h"
 #include "svn_pools.h"
 #include "svn_ra.h"
@@ -42,6 +41,7 @@
 #include "svn_base64.h"
 #include "svn_props.h"
 
+#include "svn_private_config.h"
 #include "private/svn_dep_compat.h"
 #include "private/svn_fspath.h"
 #include "private/svn_string_private.h"

Modified: subversion/branches/fsfs-lock-many/subversion/libsvn_ra_serf/util.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-lock-many/subversion/libsvn_ra_serf/util.c?rev=1576824&r1=1576823&r2=1576824&view=diff
==============================================================================
--- subversion/branches/fsfs-lock-many/subversion/libsvn_ra_serf/util.c (original)
+++ subversion/branches/fsfs-lock-many/subversion/libsvn_ra_serf/util.c Wed Mar 12 17:18:20 2014
@@ -33,10 +33,10 @@
 #include <serf.h>
 #include <serf_bucket_types.h>
 
-#include "svn_private_config.h"
 #include "svn_hash.h"
 #include "svn_dirent_uri.h"
 #include "svn_path.h"
+#include "svn_private_config.h"
 #include "svn_string.h"
 #include "svn_props.h"
 #include "svn_dirent_uri.h"
@@ -131,6 +131,7 @@ construct_realm(svn_ra_serf__session_t *
 static char *
 convert_organisation_to_str(apr_hash_t *org, apr_pool_t *pool)
 {
+  const char *cn = svn_hash_gets(org, "CN");
   const char *org_unit = svn_hash_gets(org, "OU");
   const char *org_name = svn_hash_gets(org, "O");
   const char *locality = svn_hash_gets(org, "L");
@@ -139,6 +140,12 @@ convert_organisation_to_str(apr_hash_t *
   const char *email = svn_hash_gets(org, "E");
   svn_stringbuf_t *buf = svn_stringbuf_create_empty(pool);
 
+  if (cn)
+    {
+      svn_stringbuf_appendcstr(buf, cn);
+      svn_stringbuf_appendcstr(buf, ", ");
+    }
+
   if (org_unit)
     {
       svn_stringbuf_appendcstr(buf, org_unit);

Modified: subversion/branches/fsfs-lock-many/subversion/libsvn_ra_serf/xml.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-lock-many/subversion/libsvn_ra_serf/xml.c?rev=1576824&r1=1576823&r2=1576824&view=diff
==============================================================================
--- subversion/branches/fsfs-lock-many/subversion/libsvn_ra_serf/xml.c (original)
+++ subversion/branches/fsfs-lock-many/subversion/libsvn_ra_serf/xml.c Wed Mar 12 17:18:20 2014
@@ -27,7 +27,6 @@
 #include <expat.h>
 #include <serf.h>
 
-#include "svn_private_config.h"
 #include "svn_hash.h"
 #include "svn_pools.h"
 #include "svn_ra.h"
@@ -38,6 +37,7 @@
 #include "svn_delta.h"
 #include "svn_path.h"
 
+#include "svn_private_config.h"
 #include "private/svn_string_private.h"
 
 #include "ra_serf.h"

Propchange: subversion/branches/fsfs-lock-many/subversion/libsvn_ra_svn/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Wed Mar 12 17:18:20 2014
@@ -7,3 +7,5 @@ Debug
 *.o
 *~
 .*~
+libsvn_ra_svn.pc.in
+libsvn_ra_svn.pc

Modified: subversion/branches/fsfs-lock-many/subversion/libsvn_ra_svn/client.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-lock-many/subversion/libsvn_ra_svn/client.c?rev=1576824&r1=1576823&r2=1576824&view=diff
==============================================================================
--- subversion/branches/fsfs-lock-many/subversion/libsvn_ra_svn/client.c (original)
+++ subversion/branches/fsfs-lock-many/subversion/libsvn_ra_svn/client.c Wed Mar 12 17:18:20 2014
@@ -32,7 +32,6 @@
 #include <apr_network_io.h>
 #include <apr_uri.h>
 
-#include "svn_private_config.h"
 #include "svn_hash.h"
 #include "svn_types.h"
 #include "svn_string.h"
@@ -48,6 +47,8 @@
 #include "svn_mergeinfo.h"
 #include "svn_version.h"
 
+#include "svn_private_config.h"
+
 #include "private/svn_fspath.h"
 #include "private/svn_subr_private.h"
 
@@ -433,7 +434,7 @@ static svn_error_t *find_tunnel_agent(co
   for (n = 0; cmd_argv[n] != NULL; n++)
     ;
   *argv = apr_palloc(pool, (n + 4) * sizeof(char *));
-  memcpy((void *) *argv, cmd_argv, n * sizeof(char *));
+  memcpy(*argv, cmd_argv, n * sizeof(char *));
   (*argv)[n++] = svn_path_uri_decode(hostinfo, pool);
   (*argv)[n++] = "svnserve";
   (*argv)[n++] = "-t";

Modified: subversion/branches/fsfs-lock-many/subversion/libsvn_ra_svn/editorp.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-lock-many/subversion/libsvn_ra_svn/editorp.c?rev=1576824&r1=1576823&r2=1576824&view=diff
==============================================================================
--- subversion/branches/fsfs-lock-many/subversion/libsvn_ra_svn/editorp.c (original)
+++ subversion/branches/fsfs-lock-many/subversion/libsvn_ra_svn/editorp.c Wed Mar 12 17:18:20 2014
@@ -28,7 +28,6 @@
 #include <apr_general.h>
 #include <apr_strings.h>
 
-#include "svn_private_config.h"
 #include "svn_hash.h"
 #include "svn_types.h"
 #include "svn_string.h"
@@ -38,6 +37,7 @@
 #include "svn_ra_svn.h"
 #include "svn_path.h"
 #include "svn_pools.h"
+#include "svn_private_config.h"
 
 #include "private/svn_fspath.h"
 #include "private/svn_editor.h"

Modified: subversion/branches/fsfs-lock-many/subversion/libsvn_ra_svn/marshal.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-lock-many/subversion/libsvn_ra_svn/marshal.c?rev=1576824&r1=1576823&r2=1576824&view=diff
==============================================================================
--- subversion/branches/fsfs-lock-many/subversion/libsvn_ra_svn/marshal.c (original)
+++ subversion/branches/fsfs-lock-many/subversion/libsvn_ra_svn/marshal.c Wed Mar 12 17:18:20 2014
@@ -32,13 +32,13 @@
 #include <apr_lib.h>
 #include <apr_strings.h>
 
-#include "svn_private_config.h"
 #include "svn_hash.h"
 #include "svn_types.h"
 #include "svn_string.h"
 #include "svn_error.h"
 #include "svn_pools.h"
 #include "svn_ra_svn.h"
+#include "svn_private_config.h"
 #include "svn_ctype.h"
 #include "svn_sorts.h"
 #include "svn_time.h"

Propchange: subversion/branches/fsfs-lock-many/subversion/libsvn_repos/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Wed Mar 12 17:18:20 2014
@@ -8,3 +8,5 @@ Release
 *~
 .*~
 libsvn_repos.def
+libsvn_repos.pc.in
+libsvn_repos.pc

Modified: subversion/branches/fsfs-lock-many/subversion/libsvn_repos/authz.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-lock-many/subversion/libsvn_repos/authz.c?rev=1576824&r1=1576823&r2=1576824&view=diff
==============================================================================
--- subversion/branches/fsfs-lock-many/subversion/libsvn_repos/authz.c (original)
+++ subversion/branches/fsfs-lock-many/subversion/libsvn_repos/authz.c Wed Mar 12 17:18:20 2014
@@ -26,7 +26,6 @@
 #include <apr_pools.h>
 #include <apr_file_io.h>
 
-#include "svn_private_config.h"
 #include "svn_hash.h"
 #include "svn_pools.h"
 #include "svn_error.h"

Modified: subversion/branches/fsfs-lock-many/subversion/libsvn_repos/commit.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-lock-many/subversion/libsvn_repos/commit.c?rev=1576824&r1=1576823&r2=1576824&view=diff
==============================================================================
--- subversion/branches/fsfs-lock-many/subversion/libsvn_repos/commit.c (original)
+++ subversion/branches/fsfs-lock-many/subversion/libsvn_repos/commit.c Wed Mar 12 17:18:20 2014
@@ -26,7 +26,6 @@
 #include <apr_pools.h>
 #include <apr_file_io.h>
 
-#include "svn_private_config.h"
 #include "svn_hash.h"
 #include "svn_compat.h"
 #include "svn_pools.h"
@@ -40,6 +39,7 @@
 #include "svn_ctype.h"
 #include "svn_props.h"
 #include "svn_mergeinfo.h"
+#include "svn_private_config.h"
 
 #include "repos.h"
 

Modified: subversion/branches/fsfs-lock-many/subversion/libsvn_repos/delta.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-lock-many/subversion/libsvn_repos/delta.c?rev=1576824&r1=1576823&r2=1576824&view=diff
==============================================================================
--- subversion/branches/fsfs-lock-many/subversion/libsvn_repos/delta.c (original)
+++ subversion/branches/fsfs-lock-many/subversion/libsvn_repos/delta.c Wed Mar 12 17:18:20 2014
@@ -24,7 +24,6 @@
 
 #include <apr_hash.h>
 
-#include "svn_private_config.h"
 #include "svn_hash.h"
 #include "svn_types.h"
 #include "svn_delta.h"
@@ -34,6 +33,7 @@
 #include "svn_repos.h"
 #include "svn_pools.h"
 #include "svn_props.h"
+#include "svn_private_config.h"
 #include "repos.h"
 
 
@@ -875,10 +875,10 @@ delta_dirs(struct context *c,
      from the target tree. */
   for (hi = apr_hash_first(pool, t_entries); hi; hi = apr_hash_next(hi))
     {
-      const svn_fs_dirent_t *s_entry, *t_entry;
-      const void *key;
-      void *val;
-      apr_ssize_t klen;
+      const void *key = svn__apr_hash_index_key(hi);
+      apr_ssize_t klen = svn__apr_hash_index_klen(hi);
+      const svn_fs_dirent_t *t_entry = svn__apr_hash_index_val(hi);
+      const svn_fs_dirent_t *s_entry;
       const char *t_fullpath;
       const char *e_fullpath;
       const char *s_fullpath;
@@ -887,9 +887,6 @@ delta_dirs(struct context *c,
       /* Clear out our subpool for the next iteration... */
       svn_pool_clear(subpool);
 
-      /* KEY is the entry name in target, VAL the dirent */
-      apr_hash_this(hi, &key, &klen, &val);
-      t_entry = val;
       tgt_kind = t_entry->kind;
       t_fullpath = svn_relpath_join(target_path, t_entry->name, subpool);
       e_fullpath = svn_relpath_join(edit_path, t_entry->name, subpool);
@@ -964,17 +961,13 @@ delta_dirs(struct context *c,
     {
       for (hi = apr_hash_first(pool, s_entries); hi; hi = apr_hash_next(hi))
         {
-          const svn_fs_dirent_t *s_entry;
-          void *val;
+          const svn_fs_dirent_t *s_entry = svn__apr_hash_index_val(hi);
           const char *e_fullpath;
           svn_node_kind_t src_kind;
 
           /* Clear out our subpool for the next iteration... */
           svn_pool_clear(subpool);
 
-          /* KEY is the entry name in source, VAL the dirent */
-          apr_hash_this(hi, NULL, NULL, &val);
-          s_entry = val;
           src_kind = s_entry->kind;
           e_fullpath = svn_relpath_join(edit_path, s_entry->name, subpool);
 

Modified: subversion/branches/fsfs-lock-many/subversion/libsvn_repos/deprecated.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-lock-many/subversion/libsvn_repos/deprecated.c?rev=1576824&r1=1576823&r2=1576824&view=diff
==============================================================================
--- subversion/branches/fsfs-lock-many/subversion/libsvn_repos/deprecated.c (original)
+++ subversion/branches/fsfs-lock-many/subversion/libsvn_repos/deprecated.c Wed Mar 12 17:18:20 2014
@@ -26,12 +26,13 @@
    deprecated functions in this file. */
 #define SVN_DEPRECATED
 
-#include "svn_private_config.h"
 #include "svn_repos.h"
 #include "svn_compat.h"
 #include "svn_hash.h"
 #include "svn_props.h"
 
+#include "svn_private_config.h"
+
 #include "repos.h"
 
 

Modified: subversion/branches/fsfs-lock-many/subversion/libsvn_repos/dump.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-lock-many/subversion/libsvn_repos/dump.c?rev=1576824&r1=1576823&r2=1576824&view=diff
==============================================================================
--- subversion/branches/fsfs-lock-many/subversion/libsvn_repos/dump.c (original)
+++ subversion/branches/fsfs-lock-many/subversion/libsvn_repos/dump.c Wed Mar 12 17:18:20 2014
@@ -21,6 +21,8 @@
  */
 
 
+#include <stdarg.h>
+
 #include "svn_private_config.h"
 #include "svn_pools.h"
 #include "svn_error.h"
@@ -350,6 +352,34 @@ store_delta(apr_file_t **tempfile, svn_f
 }
 
 
+/* Send a notification of type #svn_repos_notify_warning, subtype WARNING,
+   with message WARNING_FMT formatted with the remaining variable arguments.
+   Send it by calling NOTIFY_FUNC (if not null) with NOTIFY_BATON.
+ */
+static void
+notify_warning(apr_pool_t *scratch_pool,
+               svn_repos_notify_func_t notify_func,
+               void *notify_baton,
+               svn_repos_notify_warning_t warning,
+               const char *warning_fmt,
+               ...)
+{
+  va_list va;
+  svn_repos_notify_t *notify;
+
+  if (notify_func == NULL)
+    return;
+
+  notify = svn_repos_notify_create(svn_repos_notify_warning, scratch_pool);
+  notify->warning = warning;
+  va_start(va, warning_fmt);
+  notify->warning_str = apr_pvsprintf(scratch_pool, warning_fmt, va);
+  va_end(va);
+
+  notify_func(notify_baton, notify, scratch_pool);
+}
+
+
 /*----------------------------------------------------------------------*/
 
 /** An editor which dumps node-data in 'dumpfile format' to a file. **/
@@ -586,6 +616,43 @@ node_must_not_exist(struct edit_baton *e
   return SVN_NO_ERROR;
 }
 
+/* If the mergeinfo in MERGEINFO_STR refers to any revisions older than
+ * OLDEST_DUMPED_REV, issue a warning and set *FOUND_OLD_MERGEINFO to TRUE,
+ * otherwise leave *FOUND_OLD_MERGEINFO unchanged.
+ */
+static svn_error_t *
+verify_mergeinfo_revisions(svn_boolean_t *found_old_mergeinfo,
+                           const char *mergeinfo_str,
+                           svn_revnum_t oldest_dumped_rev,
+                           svn_repos_notify_func_t notify_func,
+                           void *notify_baton,
+                           apr_pool_t *pool)
+{
+  svn_mergeinfo_t mergeinfo, old_mergeinfo;
+
+  SVN_ERR(svn_mergeinfo_parse(&mergeinfo, mergeinfo_str, pool));
+  SVN_ERR(svn_mergeinfo__filter_mergeinfo_by_ranges(
+            &old_mergeinfo, mergeinfo,
+            oldest_dumped_rev - 1, 0,
+            TRUE, pool, pool));
+
+  if (apr_hash_count(old_mergeinfo))
+    {
+      notify_warning(pool, notify_func, notify_baton,
+                     svn_repos_notify_warning_found_old_mergeinfo,
+                     _("Mergeinfo referencing revision(s) prior "
+                       "to the oldest dumped revision (r%ld). "
+                       "Loading this dump may result in invalid "
+                       "mergeinfo."),
+                     oldest_dumped_rev);
+
+      if (found_old_mergeinfo)
+        *found_old_mergeinfo = TRUE;
+    }
+
+  return SVN_NO_ERROR;
+}
+
 /* Unique string pointers used by verify_mergeinfo_normalization()
    and check_name_collision() */
 static const char normalized_unique[] = "normalized_unique";
@@ -676,19 +743,15 @@ verify_mergeinfo_normalization(void *bat
   else
     {
       /* Report path collision in mergeinfo */
-      svn_repos_notify_t *notify;
-
       svn_hash_sets(vb->normalized_paths,
                     apr_pstrdup(vb->buffer.pool, normpath),
                     normalized_collision);
 
-      notify = svn_repos_notify_create(svn_repos_notify_warning, iterpool);
-      notify->warning = svn_repos_notify_warning_mergeinfo_collision;
-      notify->warning_str = apr_psprintf(
-          iterpool, _("Duplicate representation of path '%s'"
-                  " in %s property of '%s'"),
-          normpath, SVN_PROP_MERGEINFO, vb->path);
-      vb->notify_func(vb->notify_baton, notify, iterpool);
+      notify_warning(iterpool, vb->notify_func, vb->notify_baton,
+                     svn_repos_notify_warning_mergeinfo_collision,
+                     _("Duplicate representation of path '%s'"
+                       " in %s property of '%s'"),
+                     normpath, SVN_PROP_MERGEINFO, vb->path);
     }
   return SVN_NO_ERROR;
 }
@@ -799,17 +862,12 @@ dump_node(struct edit_baton *eb,
           if (eb->notify_func)
             {
               char errbuf[512]; /* ### svn_strerror() magic number  */
-              svn_repos_notify_t *notify;
-              notify = svn_repos_notify_create(svn_repos_notify_warning, pool);
-
-              notify->warning = svn_repos_notify_warning_invalid_fspath;
-              notify->warning_str = apr_psprintf(
-                     pool,
-                     _("E%06d: While validating fspath '%s': %s"),
-                     err->apr_err, path,
-                     svn_err_best_message(err, errbuf, sizeof(errbuf)));
 
-              eb->notify_func(eb->notify_baton, notify, pool);
+              notify_warning(pool, eb->notify_func, eb->notify_baton,
+                             svn_repos_notify_warning_invalid_fspath,
+                             _("E%06d: While validating fspath '%s': %s"),
+                             err->apr_err, path,
+                             svn_err_best_message(err, errbuf, sizeof(errbuf)));
             }
 
           /* Return the error in addition to notifying about it. */
@@ -979,21 +1037,16 @@ dump_node(struct edit_baton *eb,
           if (!eb->verify && cmp_rev < eb->oldest_dumped_rev
               && eb->notify_func)
             {
-              svn_repos_notify_t *notify =
-                    svn_repos_notify_create(svn_repos_notify_warning, pool);
-
-              notify->warning = svn_repos_notify_warning_found_old_reference;
-              notify->warning_str = apr_psprintf(
-                     pool,
-                     _("Referencing data in revision %ld,"
-                       " which is older than the oldest"
-                       " dumped revision (r%ld).  Loading this dump"
-                       " into an empty repository"
-                       " will fail."),
-                     cmp_rev, eb->oldest_dumped_rev);
+              notify_warning(pool, eb->notify_func, eb->notify_baton,
+                             svn_repos_notify_warning_found_old_reference,
+                             _("Referencing data in revision %ld,"
+                               " which is older than the oldest"
+                               " dumped revision (r%ld).  Loading this dump"
+                               " into an empty repository"
+                               " will fail."),
+                             cmp_rev, eb->oldest_dumped_rev);
               if (eb->found_old_reference)
                 *eb->found_old_reference = TRUE;
-              eb->notify_func(eb->notify_baton, notify, pool);
             }
 
           SVN_ERR(svn_stream_printf(eb->stream, pool,
@@ -1074,32 +1127,13 @@ dump_node(struct edit_baton *eb,
                                                       SVN_PROP_MERGEINFO);
           if (mergeinfo_str)
             {
-              svn_mergeinfo_t mergeinfo, old_mergeinfo;
-
-              SVN_ERR(svn_mergeinfo_parse(&mergeinfo, mergeinfo_str->data,
-                                          pool));
-              SVN_ERR(svn_mergeinfo__filter_mergeinfo_by_ranges(
-                &old_mergeinfo, mergeinfo,
-                eb->oldest_dumped_rev - 1, 0,
-                TRUE, pool, pool));
-              if (apr_hash_count(old_mergeinfo))
-                {
-                  svn_repos_notify_t *notify =
-                    svn_repos_notify_create(svn_repos_notify_warning, pool);
-
-                  notify->warning = svn_repos_notify_warning_found_old_mergeinfo;
-                  notify->warning_str = apr_psprintf(
-                    pool,
-                    _("Mergeinfo referencing revision(s) prior "
-                      "to the oldest dumped revision (r%ld). "
-                      "Loading this dump may result in invalid "
-                      "mergeinfo."),
-                    eb->oldest_dumped_rev);
-
-                  if (eb->found_old_mergeinfo)
-                    *eb->found_old_mergeinfo = TRUE;
-                  eb->notify_func(eb->notify_baton, notify, pool);
-                }
+              /* An error in verifying the mergeinfo must not prevent dumping
+                 the data. Ignore any such error. */
+              svn_error_clear(verify_mergeinfo_revisions(
+                                eb->found_old_mergeinfo,
+                                mergeinfo_str->data, eb->oldest_dumped_rev,
+                                eb->notify_func, eb->notify_baton,
+                                pool));
             }
         }
 
@@ -1888,28 +1922,24 @@ svn_repos_dump_fs3(svn_repos_t *repos,
 
       if (found_old_reference)
         {
-          notify = svn_repos_notify_create(svn_repos_notify_warning, subpool);
-
-          notify->warning = svn_repos_notify_warning_found_old_reference;
-          notify->warning_str = _("The range of revisions dumped "
-                                  "contained references to "
-                                  "copy sources outside that "
-                                  "range.");
-          notify_func(notify_baton, notify, subpool);
+          notify_warning(subpool, notify_func, notify_baton,
+                         svn_repos_notify_warning_found_old_reference,
+                         _("The range of revisions dumped "
+                           "contained references to "
+                           "copy sources outside that "
+                           "range."));
         }
 
       /* Ditto if we issued any warnings about old revisions referenced
          in dumped mergeinfo. */
       if (found_old_mergeinfo)
         {
-          notify = svn_repos_notify_create(svn_repos_notify_warning, subpool);
-
-          notify->warning = svn_repos_notify_warning_found_old_mergeinfo;
-          notify->warning_str = _("The range of revisions dumped "
-                                  "contained mergeinfo "
-                                  "which reference revisions outside "
-                                  "that range.");
-          notify_func(notify_baton, notify, subpool);
+          notify_warning(subpool, notify_func, notify_baton,
+                         svn_repos_notify_warning_found_old_mergeinfo,
+                         _("The range of revisions dumped "
+                           "contained mergeinfo "
+                           "which reference revisions outside "
+                           "that range."));
         }
     }
 
@@ -2010,7 +2040,6 @@ check_name_collision(void *baton, const 
     {
       struct dir_baton *const db = cb->dir_baton;
       struct edit_baton *const eb = db->edit_baton;
-      svn_repos_notify_t *notify;
       const char* normpath;
 
       svn_hash_sets(cb->normalized, apr_pstrdup(cb->buffer.pool, name),
@@ -2019,11 +2048,9 @@ check_name_collision(void *baton, const 
       SVN_ERR(svn_utf__normalize(
                   &normpath, svn_relpath_join(db->path, name, iterpool),
                   SVN_UTF__UNKNOWN_LENGTH, &cb->buffer));
-      notify = svn_repos_notify_create(svn_repos_notify_warning, iterpool);
-      notify->warning = svn_repos_notify_warning_name_collision;
-      notify->warning_str = apr_psprintf(
-          iterpool, _("Duplicate representation of path '%s'"), normpath);
-      eb->notify_func(eb->notify_baton, notify, iterpool);
+      notify_warning(iterpool, eb->notify_func, eb->notify_baton,
+                     svn_repos_notify_warning_name_collision,
+                     _("Duplicate representation of path '%s'"), normpath);
     }
   return SVN_NO_ERROR;
 }
@@ -2193,8 +2220,8 @@ svn_repos_verify_fs3(svn_repos_t *repos,
      forwarding structure for notifications from inside svn_fs_verify(). */
   if (notify_func)
     {
-      notify = svn_repos_notify_create(svn_repos_notify_verify_rev_end,
-                                       pool);
+      notify = svn_repos_notify_create(svn_repos_notify_verify_rev_end, pool);
+
       verify_notify = verify_fs2_notify_func;
       verify_notify_baton = apr_palloc(pool, sizeof(*verify_notify_baton));
       verify_notify_baton->notify_func = notify_func;
@@ -2220,6 +2247,8 @@ svn_repos_verify_fs3(svn_repos_t *repos,
       svn_error_clear(err);
 
       if (!keep_going)
+        /* ### Jump to "We're done" and so send the final notification,
+               for consistency? */
         return svn_error_createf(SVN_ERR_REPOS_CORRUPTED, NULL,
                                 _("Repository '%s' failed to verify"),
                                 svn_dirent_local_style(svn_repos_path(repos,
@@ -2267,7 +2296,6 @@ svn_repos_verify_fs3(svn_repos_t *repos,
       notify_func(notify_baton, notify, iterpool);
     }
 
-  /* Per-backend verification. */
   svn_pool_destroy(iterpool);
 
   if (found_corruption)

Modified: subversion/branches/fsfs-lock-many/subversion/libsvn_repos/fs-wrap.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-lock-many/subversion/libsvn_repos/fs-wrap.c?rev=1576824&r1=1576823&r2=1576824&view=diff
==============================================================================
--- subversion/branches/fsfs-lock-many/subversion/libsvn_repos/fs-wrap.c (original)
+++ subversion/branches/fsfs-lock-many/subversion/libsvn_repos/fs-wrap.c Wed Mar 12 17:18:20 2014
@@ -24,7 +24,6 @@
 #include <string.h>
 #include <ctype.h>
 
-#include "svn_private_config.h"
 #include "svn_hash.h"
 #include "svn_pools.h"
 #include "svn_error.h"
@@ -35,7 +34,7 @@
 #include "svn_time.h"
 #include "svn_sorts.h"
 #include "repos.h"
-
+#include "svn_private_config.h"
 #include "private/svn_repos_private.h"
 #include "private/svn_sorts_private.h"
 #include "private/svn_utf_private.h"
@@ -75,8 +74,7 @@ svn_repos_fs_commit_txn(const char **con
   iterpool = svn_pool_create(pool);
   for (hi = apr_hash_first(pool, props); hi; hi = apr_hash_next(hi))
     {
-      const void *key;
-      apr_hash_this(hi, &key, NULL, NULL);
+      const char *key = svn__apr_hash_index_key(hi);
 
       svn_pool_clear(iterpool);
 
@@ -96,9 +94,8 @@ svn_repos_fs_commit_txn(const char **con
       iterpool = svn_pool_create(pool);
       for (hi = apr_hash_first(pool, props); hi; hi = apr_hash_next(hi))
         {
-          const void *key;
-          void *val;
-          apr_hash_this(hi, &key, NULL, &val);
+          const char *key = svn__apr_hash_index_key(hi);
+          svn_string_t *val = svn__apr_hash_index_val(hi);
 
           svn_pool_clear(iterpool);
 

Modified: subversion/branches/fsfs-lock-many/subversion/libsvn_repos/hooks.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-lock-many/subversion/libsvn_repos/hooks.c?rev=1576824&r1=1576823&r2=1576824&view=diff
==============================================================================
--- subversion/branches/fsfs-lock-many/subversion/libsvn_repos/hooks.c (original)
+++ subversion/branches/fsfs-lock-many/subversion/libsvn_repos/hooks.c Wed Mar 12 17:18:20 2014
@@ -27,7 +27,6 @@
 #include <apr_pools.h>
 #include <apr_file_io.h>
 
-#include "svn_private_config.h"
 #include "svn_config.h"
 #include "svn_hash.h"
 #include "svn_error.h"
@@ -37,7 +36,7 @@
 #include "svn_repos.h"
 #include "svn_utf.h"
 #include "repos.h"
-
+#include "svn_private_config.h"
 #include "private/svn_fs_private.h"
 #include "private/svn_repos_private.h"
 #include "private/svn_string_private.h"
@@ -520,11 +519,9 @@ lock_token_content(apr_file_t **handle, 
   for (hi = apr_hash_first(pool, lock_tokens); hi;
        hi = apr_hash_next(hi))
     {
-      void *val;
-      const char *path, *token;
+      const char *token = svn__apr_hash_index_key(hi);
+      const char *path = svn__apr_hash_index_val(hi);
 
-      apr_hash_this(hi, (void *)&token, NULL, &val);
-      path = val;
       svn_stringbuf_appendstr(lock_str,
         svn_stringbuf_createf(pool, "%s|%s\n",
                               svn_path_uri_autoescape(path, pool),

Modified: subversion/branches/fsfs-lock-many/subversion/libsvn_repos/load-fs-vtable.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-lock-many/subversion/libsvn_repos/load-fs-vtable.c?rev=1576824&r1=1576823&r2=1576824&view=diff
==============================================================================
--- subversion/branches/fsfs-lock-many/subversion/libsvn_repos/load-fs-vtable.c (original)
+++ subversion/branches/fsfs-lock-many/subversion/libsvn_repos/load-fs-vtable.c Wed Mar 12 17:18:20 2014
@@ -202,17 +202,16 @@ prefix_mergeinfo_paths(svn_string_t **me
 {
   apr_hash_t *prefixed_mergeinfo, *mergeinfo;
   apr_hash_index_t *hi;
-  void *rangelist;
 
   SVN_ERR(svn_mergeinfo_parse(&mergeinfo, mergeinfo_orig->data, pool));
   prefixed_mergeinfo = apr_hash_make(pool);
   for (hi = apr_hash_first(pool, mergeinfo); hi; hi = apr_hash_next(hi))
     {
-      const void *key;
-      const char *path, *merge_source;
+      const char *merge_source = svn__apr_hash_index_key(hi);
+      svn_rangelist_t *rangelist = svn__apr_hash_index_val(hi);
+      const char *path;
 
-      apr_hash_this(hi, &key, NULL, &rangelist);
-      merge_source = svn_relpath_canonicalize(key, pool);
+      merge_source = svn_relpath_canonicalize(merge_source, pool);
 
       /* The svn:mergeinfo property syntax demands a repos abspath */
       path = svn_fspath__canonicalize(svn_relpath_join(parent_dir,
@@ -268,16 +267,10 @@ renumber_mergeinfo_revs(svn_string_t **f
 
   for (hi = apr_hash_first(subpool, mergeinfo); hi; hi = apr_hash_next(hi))
     {
-      const char *merge_source;
-      svn_rangelist_t *rangelist;
+      const char *merge_source = svn__apr_hash_index_key(hi);
+      svn_rangelist_t *rangelist = svn__apr_hash_index_val(hi);
       struct parse_baton *pb = rb->pb;
       int i;
-      const void *key;
-      void *val;
-
-      apr_hash_this(hi, &key, NULL, &val);
-      merge_source = key;
-      rangelist = val;
 
       /* Possibly renumber revisions in merge source's rangelist. */
       for (i = 0; i < rangelist->nelts; i++)
@@ -754,29 +747,27 @@ set_node_property(void *baton,
 
   if (strcmp(name, SVN_PROP_MERGEINFO) == 0)
     {
+      svn_string_t prop_val = *value;
       svn_string_t *renumbered_mergeinfo;
-      /* ### Need to cast away const. We cannot change the declaration of
-       * ### this function since it is part of svn_repos_parse_fns2_t. */
-      svn_string_t *prop_val = (svn_string_t *)value;
 
       /* Tolerate mergeinfo with "\r\n" line endings because some
          dumpstream sources might contain as much.  If so normalize
          the line endings to '\n' and make a notification to
          PARSE_BATON->FEEDBACK_STREAM that we have made this
          correction. */
-      if (strstr(prop_val->data, "\r"))
+      if (strstr(prop_val.data, "\r"))
         {
           const char *prop_eol_normalized;
 
-          SVN_ERR(svn_subst_translate_cstring2(prop_val->data,
+          SVN_ERR(svn_subst_translate_cstring2(prop_val.data,
                                                &prop_eol_normalized,
                                                "\n",  /* translate to LF */
                                                FALSE, /* no repair */
                                                NULL,  /* no keywords */
                                                FALSE, /* no expansion */
                                                nb->pool));
-          prop_val->data = prop_eol_normalized;
-          prop_val->len = strlen(prop_eol_normalized);
+          prop_val.data = prop_eol_normalized;
+          prop_val.len = strlen(prop_eol_normalized);
 
           if (pb->notify_func)
             {
@@ -786,7 +777,7 @@ set_node_property(void *baton,
         }
 
       /* Renumber mergeinfo as appropriate. */
-      SVN_ERR(renumber_mergeinfo_revs(&renumbered_mergeinfo, prop_val, rb,
+      SVN_ERR(renumber_mergeinfo_revs(&renumbered_mergeinfo, &prop_val, rb,
                                       nb->pool));
       value = renumbered_mergeinfo;
       if (pb->parent_dir)
@@ -838,9 +829,8 @@ remove_node_props(void *baton)
 
   for (hi = apr_hash_first(nb->pool, proplist); hi; hi = apr_hash_next(hi))
     {
-      const void *key;
+      const char *key = svn__apr_hash_index_key(hi);
 
-      apr_hash_this(hi, &key, NULL, NULL);
       SVN_ERR(change_node_prop(rb->txn_root, nb->path, key, NULL,
                                rb->pb->validate_props, nb->pool));
     }

Modified: subversion/branches/fsfs-lock-many/subversion/libsvn_repos/load.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-lock-many/subversion/libsvn_repos/load.c?rev=1576824&r1=1576823&r2=1576824&view=diff
==============================================================================
--- subversion/branches/fsfs-lock-many/subversion/libsvn_repos/load.c (original)
+++ subversion/branches/fsfs-lock-many/subversion/libsvn_repos/load.c Wed Mar 12 17:18:20 2014
@@ -21,26 +21,18 @@
  */
 
 
-#include "svn_private_config.h"
+#include <apr.h>
+
 #include "svn_hash.h"
 #include "svn_pools.h"
 #include "svn_error.h"
-#include "svn_fs.h"
 #include "svn_repos.h"
 #include "svn_string.h"
-#include "svn_path.h"
-#include "svn_props.h"
 #include "repos.h"
 #include "svn_private_config.h"
-#include "svn_mergeinfo.h"
-#include "svn_checksum.h"
-#include "svn_subst.h"
 #include "svn_ctype.h"
 
-#include <apr_lib.h>
-
 #include "private/svn_dep_compat.h"
-#include "private/svn_mergeinfo_private.h"
 
 /*----------------------------------------------------------------------*/
 
@@ -291,7 +283,8 @@ parse_property_block(svn_stream_t *strea
 }
 
 
-/* Read CONTENT_LENGTH bytes from STREAM, and use
+/* Read CONTENT_LENGTH bytes from STREAM. If IS_DELTA is true, use
+   PARSE_FNS->apply_textdelta to push a text delta, otherwise use
    PARSE_FNS->set_fulltext to push those bytes as replace fulltext for
    a node.  Use BUFFER/BUFLEN to push the fulltext in "chunks".
 
@@ -324,15 +317,6 @@ parse_text_block(svn_stream_t *stream,
       SVN_ERR(parse_fns->set_fulltext(&text_stream, record_baton));
     }
 
-  /* If there are no contents to read, just write an empty buffer
-     through our callback. */
-  if (content_length == 0)
-    {
-      wlen = 0;
-      if (text_stream)
-        SVN_ERR(svn_stream_write(text_stream, "", &wlen));
-    }
-
   /* Regardless of whether or not we have a sink for our data, we
      need to read it. */
   while (content_length)

Modified: subversion/branches/fsfs-lock-many/subversion/libsvn_repos/log.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-lock-many/subversion/libsvn_repos/log.c?rev=1576824&r1=1576823&r2=1576824&view=diff
==============================================================================
--- subversion/branches/fsfs-lock-many/subversion/libsvn_repos/log.c (original)
+++ subversion/branches/fsfs-lock-many/subversion/libsvn_repos/log.c Wed Mar 12 17:18:20 2014
@@ -25,8 +25,8 @@
 #define APR_WANT_STRFUNC
 #include <apr_want.h>
 
-#include "svn_private_config.h"
 #include "svn_compat.h"
+#include "svn_private_config.h"
 #include "svn_hash.h"
 #include "svn_pools.h"
 #include "svn_error.h"
@@ -81,14 +81,11 @@ svn_repos_check_revision_access(svn_repo
   subpool = svn_pool_create(pool);
   for (hi = apr_hash_first(pool, changes); hi; hi = apr_hash_next(hi))
     {
-      const void *key;
-      void *val;
-      svn_fs_path_change2_t *change;
+      const char *key = svn__apr_hash_index_key(hi);
+      svn_fs_path_change2_t *change = svn__apr_hash_index_val(hi);
       svn_boolean_t readable;
 
       svn_pool_clear(subpool);
-      apr_hash_this(hi, &key, NULL, &val);
-      change = val;
 
       SVN_ERR(authz_read_func(&readable, rev_root, key,
                               authz_read_baton, subpool));
@@ -175,10 +172,7 @@ turn_moves_into_copies(apr_hash_t *chang
   apr_hash_index_t *hi;
   for (hi = apr_hash_first(pool, changes); hi; hi = apr_hash_next(hi))
     {
-      const char *key;
-      apr_ssize_t klen;
-      svn_log_changed_path2_t *change;
-      apr_hash_this(hi, (const void **)&key, &klen, (void**)&change);
+      svn_log_changed_path2_t *change = svn__apr_hash_index_val(hi);
 
       switch (change->action)
         {
@@ -218,8 +212,7 @@ turn_unique_copies_into_moves(apr_hash_t
 
   for (hi = apr_hash_first(pool, changes); hi; hi = apr_hash_next(hi))
     {
-      svn_log_changed_path2_t *change;
-      apr_hash_this(hi, NULL, NULL, (void**)&change);
+      svn_log_changed_path2_t *change = svn__apr_hash_index_val(hi);
 
       if (change->copyfrom_path && change->copyfrom_rev == revision-1)
         APR_ARRAY_PUSH(copy_sources, const char *)
@@ -258,11 +251,9 @@ turn_unique_copies_into_moves(apr_hash_t
 
   for (hi = apr_hash_first(pool, changes); hi; hi = apr_hash_next(hi))
     {
-      const char *key;
-      apr_ssize_t klen;
-      svn_log_changed_path2_t *change, *copy_from_change;
+      svn_log_changed_path2_t *change = svn__apr_hash_index_val(hi);
+      svn_log_changed_path2_t *copy_from_change;
 
-      apr_hash_this(hi, (const void **)&key, &klen, (void**)&change);
       if (   change->copyfrom_rev != revision-1
           || !change->copyfrom_path
           || !svn_hash_gets(unique_copy_sources, change->copyfrom_path))
@@ -353,17 +344,14 @@ detect_changed(apr_hash_t **changed,
       /* NOTE:  Much of this loop is going to look quite similar to
          svn_repos_check_revision_access(), but we have to do more things
          here, so we'll live with the duplication. */
-      svn_fs_path_change2_t *change;
-      const char *path;
-      apr_ssize_t path_len;
+      const char *path = svn__apr_hash_index_key(hi);
+      apr_ssize_t path_len = svn__apr_hash_index_klen(hi);
+      svn_fs_path_change2_t *change = svn__apr_hash_index_val(hi);
       char action;
       svn_log_changed_path2_t *item;
 
       svn_pool_clear(subpool);
 
-      /* KEY will be the path, VAL the change. */
-      apr_hash_this(hi, (const void **)&path, &path_len, (void **)&change);
-
       /* Skip path if unreadable. */
       if (authz_read_func)
         {
@@ -774,21 +762,15 @@ fs_mergeinfo_changed(svn_mergeinfo_catal
        hi;
        hi = apr_hash_next(hi))
     {
-      const void *key;
-      void *val;
-      svn_fs_path_change2_t *change;
-      const char *changed_path, *base_path = NULL;
+      const char *changed_path = svn__apr_hash_index_key(hi);
+      svn_fs_path_change2_t *change = svn__apr_hash_index_val(hi);
+      const char *base_path = NULL;
       svn_revnum_t base_rev = SVN_INVALID_REVNUM;
       svn_fs_root_t *base_root = NULL;
       svn_string_t *prev_mergeinfo_value = NULL, *mergeinfo_value;
 
       svn_pool_clear(iterpool);
 
-      /* KEY will be the path, VAL the change. */
-      apr_hash_this(hi, &key, NULL, &val);
-      changed_path = key;
-      change = val;
-
       /* If there was no mergeinfo change on this item, ignore it. */
       if (change->mergeinfo_mod == svn_tristate_false)
         continue;
@@ -1133,16 +1115,10 @@ get_combined_mergeinfo_changes(svn_merge
   for (hi = apr_hash_first(scratch_pool, added_mergeinfo_catalog);
        hi; hi = apr_hash_next(hi))
     {
-      const void *key;
-      apr_ssize_t klen;
-      void *val;
-      const char *changed_path;
-      svn_mergeinfo_t added, deleted;
-
-      /* The path is the key, the mergeinfo delta is the value. */
-      apr_hash_this(hi, &key, &klen, &val);
-      changed_path = key;
-      added = val;
+      const char *changed_path = svn__apr_hash_index_key(hi);
+      apr_ssize_t klen = svn__apr_hash_index_klen(hi);
+      svn_mergeinfo_t added = svn__apr_hash_index_val(hi);
+      svn_mergeinfo_t deleted;
 
       for (i = 0; i < paths->nelts; i++)
         {
@@ -1150,7 +1126,7 @@ get_combined_mergeinfo_changes(svn_merge
           if (! svn_fspath__skip_ancestor(path, changed_path))
             continue;
           svn_pool_clear(iterpool);
-          deleted = apr_hash_get(deleted_mergeinfo_catalog, key, klen);
+          deleted = apr_hash_get(deleted_mergeinfo_catalog, changed_path, klen);
           SVN_ERR(svn_mergeinfo_merge2(*deleted_mergeinfo,
                                        svn_mergeinfo_dup(deleted, result_pool),
                                        result_pool, iterpool));
@@ -1375,18 +1351,14 @@ send_log(svn_revnum_t rev,
           const char *changed_path = svn__apr_hash_index_key(hi);
           apr_hash_index_t *hi2;
 
-          apr_hash_this(hi, (const void**)&changed_path, NULL, NULL);
-
           /* Look at each path on the log target's mergeinfo. */
           for (hi2 = apr_hash_first(iterpool,
                                     log_target_history_as_mergeinfo);
                hi2;
                hi2 = apr_hash_next(hi2))
             {
-              const char *mergeinfo_path;
-              svn_rangelist_t *rangelist;
-              apr_hash_this(hi2, (const void**)&mergeinfo_path, NULL,
-                                 (void **)&rangelist);
+              const char *mergeinfo_path = svn__apr_hash_index_key(hi2);
+              svn_rangelist_t *rangelist = svn__apr_hash_index_val(hi2);
 
               /* Check whether CHANGED_PATH at revision REV is a child of
                  a (path, revision) tuple in LOG_TARGET_HISTORY_AS_MERGEINFO. */
@@ -1663,8 +1635,9 @@ combine_mergeinfo_path_lists(apr_array_h
     {
       int i;
       struct rangelist_path *rp = apr_palloc(subpool, sizeof(*rp));
-      apr_hash_this(hi, (void *) &rp->path, NULL,
-                    (void *) &rp->rangelist);
+
+      rp->path = svn__apr_hash_index_key(hi);
+      rp->rangelist = svn__apr_hash_index_val(hi);
       APR_ARRAY_PUSH(rangelist_paths, struct rangelist_path *) = rp;
 
       /* We need to make local copies of the rangelist, since we will be

Modified: subversion/branches/fsfs-lock-many/subversion/libsvn_repos/replay.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-lock-many/subversion/libsvn_repos/replay.c?rev=1576824&r1=1576823&r2=1576824&view=diff
==============================================================================
--- subversion/branches/fsfs-lock-many/subversion/libsvn_repos/replay.c (original)
+++ subversion/branches/fsfs-lock-many/subversion/libsvn_repos/replay.c Wed Mar 12 17:18:20 2014
@@ -25,7 +25,6 @@
 
 #include <apr_hash.h>
 
-#include "svn_private_config.h"
 #include "svn_types.h"
 #include "svn_delta.h"
 #include "svn_hash.h"
@@ -36,7 +35,7 @@
 #include "svn_props.h"
 #include "svn_pools.h"
 #include "svn_path.h"
-
+#include "svn_private_config.h"
 #include "private/svn_fspath.h"
 #include "private/svn_repos_private.h"
 #include "private/svn_delta_private.h"
@@ -184,11 +183,10 @@ add_subdir(svn_fs_root_t *source_root,
 
   for (phi = apr_hash_first(pool, props); phi; phi = apr_hash_next(phi))
     {
-      const void *key;
-      void *val;
+      const char *key = svn__apr_hash_index_key(phi);
+      svn_string_t *val = svn__apr_hash_index_val(phi);
 
       svn_pool_clear(subpool);
-      apr_hash_this(phi, &key, NULL, &val);
       SVN_ERR(editor->change_dir_prop(*dir_baton, key, val, subpool));
     }
 
@@ -201,18 +199,13 @@ add_subdir(svn_fs_root_t *source_root,
     {
       svn_fs_path_change2_t *change;
       svn_boolean_t readable = TRUE;
-      svn_fs_dirent_t *dent;
+      svn_fs_dirent_t *dent = svn__apr_hash_index_val(hi);
       const char *copyfrom_path = NULL;
       svn_revnum_t copyfrom_rev = SVN_INVALID_REVNUM;
       const char *new_edit_path;
-      void *val;
 
       svn_pool_clear(subpool);
 
-      apr_hash_this(hi, NULL, NULL, &val);
-
-      dent = val;
-
       new_edit_path = svn_relpath_join(edit_path, dent->name, subpool);
 
       /* If a file or subdirectory of the copied directory is listed as a
@@ -309,9 +302,9 @@ add_subdir(svn_fs_root_t *source_root,
 
           for (phi = apr_hash_first(pool, props); phi; phi = apr_hash_next(phi))
             {
-              const void *key;
+              const char *key = svn__apr_hash_index_key(phi);
+              svn_string_t *val = svn__apr_hash_index_val(phi);
 
-              apr_hash_this(phi, &key, NULL, &val);
               SVN_ERR(editor->change_file_prop(file_baton, key, val, subpool));
             }
 
@@ -883,17 +876,11 @@ svn_repos_replay2(svn_fs_root_t *root,
   changed_paths = apr_hash_make(pool);
   for (hi = apr_hash_first(pool, fs_changes); hi; hi = apr_hash_next(hi))
     {
-      const void *key;
-      void *val;
-      apr_ssize_t keylen;
-      const char *path;
-      svn_fs_path_change2_t *change;
+      const char *path = svn__apr_hash_index_key(hi);
+      apr_ssize_t keylen = svn__apr_hash_index_klen(hi);
+      svn_fs_path_change2_t *change = svn__apr_hash_index_val(hi);
       svn_boolean_t allowed = TRUE;
 
-      apr_hash_this(hi, &key, &keylen, &val);
-      path = key;
-      change = val;
-
       if (authz_read_func)
         SVN_ERR(authz_read_func(&allowed, root, path, authz_read_baton,
                                 pool));
@@ -1515,17 +1502,11 @@ svn_repos__replay_ev2(svn_fs_root_t *roo
   for (hi = apr_hash_first(scratch_pool, fs_changes); hi;
         hi = apr_hash_next(hi))
     {
-      const void *key;
-      void *val;
-      apr_ssize_t keylen;
-      const char *path;
-      svn_fs_path_change2_t *change;
+      const char *path = svn__apr_hash_index_key(hi);
+      apr_ssize_t keylen = svn__apr_hash_index_klen(hi);
+      svn_fs_path_change2_t *change = svn__apr_hash_index_val(hi);
       svn_boolean_t allowed = TRUE;
 
-      apr_hash_this(hi, &key, &keylen, &val);
-      path = key;
-      change = val;
-
       if (authz_read_func)
         SVN_ERR(authz_read_func(&allowed, root, path, authz_read_baton,
                                 scratch_pool));

Modified: subversion/branches/fsfs-lock-many/subversion/libsvn_repos/reporter.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-lock-many/subversion/libsvn_repos/reporter.c?rev=1576824&r1=1576823&r2=1576824&view=diff
==============================================================================
--- subversion/branches/fsfs-lock-many/subversion/libsvn_repos/reporter.c (original)
+++ subversion/branches/fsfs-lock-many/subversion/libsvn_repos/reporter.c Wed Mar 12 17:18:20 2014
@@ -21,7 +21,6 @@
  * ====================================================================
  */
 
-#include "svn_private_config.h"
 #include "svn_dirent_uri.h"
 #include "svn_hash.h"
 #include "svn_path.h"
@@ -33,6 +32,7 @@
 #include "svn_pools.h"
 #include "svn_props.h"
 #include "repos.h"
+#include "svn_private_config.h"
 
 #include "private/svn_dep_compat.h"
 #include "private/svn_fspath.h"
@@ -603,10 +603,9 @@ delta_proplists(report_baton_t *b, svn_r
       /* So source, i.e. all new.  Transmit all target props. */
       for (hi = apr_hash_first(pool, t_props); hi; hi = apr_hash_next(hi))
         {
-          const void *key;
-          void *val;
+          const char *key = svn__apr_hash_index_key(hi);
+          svn_string_t *val = svn__apr_hash_index_val(hi);
 
-          apr_hash_this(hi, &key, NULL, &val);
           SVN_ERR(change_fn(b, object, key, val, pool));
         }
     }

Modified: subversion/branches/fsfs-lock-many/subversion/libsvn_repos/repos.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-lock-many/subversion/libsvn_repos/repos.c?rev=1576824&r1=1576823&r2=1576824&view=diff
==============================================================================
--- subversion/branches/fsfs-lock-many/subversion/libsvn_repos/repos.c (original)
+++ subversion/branches/fsfs-lock-many/subversion/libsvn_repos/repos.c Wed Mar 12 17:18:20 2014
@@ -23,7 +23,6 @@
 #include <apr_pools.h>
 #include <apr_file_io.h>
 
-#include "svn_private_config.h"
 #include "svn_pools.h"
 #include "svn_error.h"
 #include "svn_dirent_uri.h"
@@ -39,6 +38,7 @@
 
 #include "private/svn_repos_private.h"
 #include "private/svn_subr_private.h"
+#include "svn_private_config.h" /* for SVN_TEMPLATE_ROOT_DIR */
 
 #include "repos.h"
 

Modified: subversion/branches/fsfs-lock-many/subversion/libsvn_repos/rev_hunt.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-lock-many/subversion/libsvn_repos/rev_hunt.c?rev=1576824&r1=1576823&r2=1576824&view=diff
==============================================================================
--- subversion/branches/fsfs-lock-many/subversion/libsvn_repos/rev_hunt.c (original)
+++ subversion/branches/fsfs-lock-many/subversion/libsvn_repos/rev_hunt.c Wed Mar 12 17:18:20 2014
@@ -23,9 +23,8 @@
 
 
 #include <string.h>
-
-#include "svn_private_config.h"
 #include "svn_compat.h"
+#include "svn_private_config.h"
 #include "svn_hash.h"
 #include "svn_pools.h"
 #include "svn_error.h"
@@ -1249,16 +1248,14 @@ find_merged_revisions(apr_array_header_t
           for (hi = apr_hash_first(iterpool, old_pr->merged_mergeinfo); hi;
                hi = apr_hash_next(hi))
             {
+              const char *path = svn__apr_hash_index_key(hi);
+              svn_rangelist_t *rangelist = svn__apr_hash_index_val(hi);
               apr_pool_t *iterpool3;
-              svn_rangelist_t *rangelist;
-              const char *path;
               int j;
 
               svn_pool_clear(iterpool2);
               iterpool3 = svn_pool_create(iterpool2);
 
-              apr_hash_this(hi, (void *) &path, NULL, (void *) &rangelist);
-
               for (j = 0; j < rangelist->nelts; j++)
                 {
                   svn_merge_range_t *range = APR_ARRAY_IDX(rangelist, j,

Propchange: subversion/branches/fsfs-lock-many/subversion/libsvn_subr/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Wed Mar 12 17:18:20 2014
@@ -10,3 +10,5 @@ Debug
 libsvn_subr.def
 internal_statements.h
 errorcode.inc
+libsvn_subr.pc.in
+libsvn_subr.pc

Modified: subversion/branches/fsfs-lock-many/subversion/libsvn_subr/auth.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-lock-many/subversion/libsvn_subr/auth.c?rev=1576824&r1=1576823&r2=1576824&view=diff
==============================================================================
--- subversion/branches/fsfs-lock-many/subversion/libsvn_subr/auth.c (original)
+++ subversion/branches/fsfs-lock-many/subversion/libsvn_subr/auth.c Wed Mar 12 17:18:20 2014
@@ -26,13 +26,13 @@
 #include <apr_tables.h>
 #include <apr_strings.h>
 
-#include "svn_private_config.h"
 #include "svn_hash.h"
 #include "svn_types.h"
 #include "svn_string.h"
 #include "svn_error.h"
 #include "svn_auth.h"
 #include "svn_config.h"
+#include "svn_private_config.h"
 #include "svn_dso.h"
 #include "svn_version.h"
 #include "private/svn_auth_private.h"

Modified: subversion/branches/fsfs-lock-many/subversion/libsvn_subr/cache-membuffer.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-lock-many/subversion/libsvn_subr/cache-membuffer.c?rev=1576824&r1=1576823&r2=1576824&view=diff
==============================================================================
--- subversion/branches/fsfs-lock-many/subversion/libsvn_subr/cache-membuffer.c (original)
+++ subversion/branches/fsfs-lock-many/subversion/libsvn_subr/cache-membuffer.c Wed Mar 12 17:18:20 2014
@@ -811,7 +811,7 @@ free_spare_group(svn_membuffer_t *cache,
 
   /* add to chain of spares */
   group->header.next = cache->first_spare_group;
-  cache->first_spare_group = group - cache->directory;
+  cache->first_spare_group = (apr_uint32_t) (group - cache->directory);
 }
 
 /* Follow the group chain from GROUP in CACHE to its end and return the last
@@ -966,8 +966,8 @@ drop_entry(svn_membuffer_t *cache, entry
   entry_group_t *last_group
     = last_group_in_chain(cache, &cache->directory[group_index]);
   apr_uint32_t last_in_group
-    = (last_group - cache->directory) * GROUP_SIZE
-    + last_group->header.used - 1;
+    = (apr_uint32_t) ((last_group - cache->directory) * GROUP_SIZE
+    + last_group->header.used - 1);
 
   cache_level_t *level = get_cache_level(cache, entry);
 
@@ -1093,10 +1093,10 @@ get_group_index(svn_membuffer_t **cache,
 
   /* select the cache segment to use. they have all the same group_count.
    * Since key may not be well-distributed, pre-fold it to a smaller but
-   * "denser" ranger.  The divisors are primes larger than the largest
+   * "denser" ranger.  The modulus is a prime larger than the largest
    * counts. */
-  *cache = &segment0[(key[1] % APR_UINT64_C(2809637))
-         & (segment0->segment_count - 1)];
+  *cache = &segment0[(key[1] % APR_UINT64_C(2809637) + (key[0] / 37))
+                     & (segment0->segment_count - 1)];
   return (key[0] % APR_UINT64_C(5030895599)) % segment0->group_count;
 }
 
@@ -1108,8 +1108,15 @@ let_entry_age(svn_membuffer_t *cache, en
 {
   apr_uint32_t hits_removed = (entry->hit_count + 1) >> 1;
 
-  cache->hit_count -= hits_removed;
-  entry->hit_count -= hits_removed;
+  if (hits_removed)
+    {
+      cache->hit_count -= hits_removed;
+      entry->hit_count -= hits_removed;
+    }
+  else
+    {
+      entry->priority /= 2;
+    }
 }
 
 /* Given the GROUP_INDEX that shall contain an entry with the hash key
@@ -1204,9 +1211,11 @@ find_entry(svn_membuffer_t *cache,
               /* chain groups
                */
               new_group->header.chain_length = group->header.chain_length + 1;
-              new_group->header.previous = group - cache->directory;
+              new_group->header.previous = (apr_uint32_t) (group -
+                                                           cache->directory);
               new_group->header.next = NO_INDEX;
-              group->header.next = new_group - cache->directory;
+              group->header.next = (apr_uint32_t) (new_group -
+                                                   cache->directory);
               group = new_group;
             }
         }
@@ -1853,7 +1862,7 @@ select_level(svn_membuffer_t *cache,
       /* Large and somewhat important items go into L2. */
       entry_t dummy_entry = { { 0 } };
       dummy_entry.priority = priority;
-      dummy_entry.size = size;
+      dummy_entry.size = (apr_uint32_t) size;
 
       return ensure_data_insertable_l2(cache, &dummy_entry)
            ? &cache->l2
@@ -1900,7 +1909,7 @@ membuffer_cache_set_internal(svn_membuff
        * negative value.
        */
       cache->data_used += (apr_uint64_t)size - entry->size;
-      entry->size = size;
+      entry->size = (apr_uint32_t) size;
       entry->priority = priority;
 
 #ifdef SVN_DEBUG_CACHE_MEMBUFFER
@@ -1929,7 +1938,7 @@ membuffer_cache_set_internal(svn_membuff
        * the serialized item's (future) position within data buffer.
        */
       entry = find_entry(cache, group_index, to_find, TRUE);
-      entry->size = size;
+      entry->size = (apr_uint32_t) size;
       entry->offset = level->current_data;
       entry->priority = priority;
 
@@ -2362,7 +2371,7 @@ membuffer_cache_set_partial_internal(svn
                   /* Write the new entry.
                    */
                   entry = find_entry(cache, group_index, to_find, TRUE);
-                  entry->size = size;
+                  entry->size = (apr_uint32_t) size;
                   entry->offset = cache->l1.current_data;
                   if (size)
                     memcpy(cache->data + entry->offset, data, size);

Modified: subversion/branches/fsfs-lock-many/subversion/libsvn_subr/cmdline.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-lock-many/subversion/libsvn_subr/cmdline.c?rev=1576824&r1=1576823&r2=1576824&view=diff
==============================================================================
--- subversion/branches/fsfs-lock-many/subversion/libsvn_subr/cmdline.c (original)
+++ subversion/branches/fsfs-lock-many/subversion/libsvn_subr/cmdline.c Wed Mar 12 17:18:20 2014
@@ -43,7 +43,6 @@
 #include <apr_strings.h>        /* for apr_snprintf */
 #include <apr_pools.h>
 
-#include "svn_private_config.h"
 #include "svn_cmdline.h"
 #include "svn_ctype.h"
 #include "svn_dso.h"
@@ -67,6 +66,8 @@
 #include "private/svn_sorts_private.h"
 #include "private/svn_string_private.h"
 
+#include "svn_private_config.h"
+
 #include "win32_crashrpt.h"
 
 #if defined(WIN32) && defined(_MSC_VER) && (_MSC_VER < 1400)

Modified: subversion/branches/fsfs-lock-many/subversion/libsvn_subr/compat.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-lock-many/subversion/libsvn_subr/compat.c?rev=1576824&r1=1576823&r2=1576824&view=diff
==============================================================================
--- subversion/branches/fsfs-lock-many/subversion/libsvn_subr/compat.c (original)
+++ subversion/branches/fsfs-lock-many/subversion/libsvn_subr/compat.c Wed Mar 12 17:18:20 2014
@@ -24,7 +24,6 @@
 #include <apr_pools.h>
 #include <apr_strings.h>
 
-#include "svn_private_config.h"
 #include "svn_hash.h"
 #include "svn_types.h"
 #include "svn_error.h"

Modified: subversion/branches/fsfs-lock-many/subversion/libsvn_subr/config.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-lock-many/subversion/libsvn_subr/config.c?rev=1576824&r1=1576823&r2=1576824&view=diff
==============================================================================
--- subversion/branches/fsfs-lock-many/subversion/libsvn_subr/config.c (original)
+++ subversion/branches/fsfs-lock-many/subversion/libsvn_subr/config.c Wed Mar 12 17:18:20 2014
@@ -31,13 +31,12 @@
 
 #include <apr_general.h>
 #include <apr_lib.h>
-
-#include "svn_private_config.h"
 #include "svn_hash.h"
 #include "svn_error.h"
 #include "svn_pools.h"
 #include "config_impl.h"
 
+#include "svn_private_config.h"
 #include "private/svn_dep_compat.h"
 #include "private/svn_subr_private.h"
 

Modified: subversion/branches/fsfs-lock-many/subversion/libsvn_subr/config_auth.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-lock-many/subversion/libsvn_subr/config_auth.c?rev=1576824&r1=1576823&r2=1576824&view=diff
==============================================================================
--- subversion/branches/fsfs-lock-many/subversion/libsvn_subr/config_auth.c (original)
+++ subversion/branches/fsfs-lock-many/subversion/libsvn_subr/config_auth.c Wed Mar 12 17:18:20 2014
@@ -23,7 +23,6 @@
 
 
 
-#include "svn_private_config.h"
 #include "svn_dirent_uri.h"
 #include "svn_hash.h"
 #include "svn_io.h"
@@ -32,6 +31,8 @@
 
 #include "auth.h"
 
+#include "svn_private_config.h"
+
 #include "private/svn_auth_private.h"
 
 svn_error_t *

Modified: subversion/branches/fsfs-lock-many/subversion/libsvn_subr/config_file.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-lock-many/subversion/libsvn_subr/config_file.c?rev=1576824&r1=1576823&r2=1576824&view=diff
==============================================================================
--- subversion/branches/fsfs-lock-many/subversion/libsvn_subr/config_file.c (original)
+++ subversion/branches/fsfs-lock-many/subversion/libsvn_subr/config_file.c Wed Mar 12 17:18:20 2014
@@ -341,7 +341,7 @@ parse_option(int *pch, parse_context_t *
     {
       ch = EOF;
       err = svn_error_createf(SVN_ERR_MALFORMED_FILE, NULL,
-                              "line %d: Option must end with ':' or '='",
+                              _("line %d: Option must end with ':' or '='"),
                               ctx->line);
     }
   else
@@ -384,7 +384,7 @@ parse_section_name(int *pch, parse_conte
     {
       ch = EOF;
       err = svn_error_createf(SVN_ERR_MALFORMED_FILE, NULL,
-                              "line %d: Section header must end with ']'",
+                              _("line %d: Section header must end with ']'"),
                               ctx->line);
     }
   else
@@ -551,7 +551,7 @@ svn_config__parse_file(svn_config_t *cfg
     {
       /* Add the filename to the error stack. */
       err = svn_error_createf(err->apr_err, err,
-                              "Error while parsing config file: %s:",
+                              _("Error while parsing config file: %s:"),
                               svn_dirent_local_style(file, scratch_pool));
     }
 
@@ -593,8 +593,8 @@ svn_config__parse_stream(svn_config_t *c
             SVN_ERR(parse_section_name(&ch, ctx, scratch_pool));
           else
             return svn_error_createf(SVN_ERR_MALFORMED_FILE, NULL,
-                                     "line %d: Section header"
-                                     " must start in the first column",
+                                     _("line %d: Section header"
+                                       " must start in the first column"),
                                      ctx->line);
           break;
 
@@ -606,8 +606,8 @@ svn_config__parse_stream(svn_config_t *c
             }
           else
             return svn_error_createf(SVN_ERR_MALFORMED_FILE, NULL,
-                                     "line %d: Comment"
-                                     " must start in the first column",
+                                     _("line %d: Comment"
+                                       " must start in the first column"),
                                      ctx->line);
           break;
 
@@ -621,11 +621,11 @@ svn_config__parse_stream(svn_config_t *c
         default:
           if (svn_stringbuf_isempty(ctx->section))
             return svn_error_createf(SVN_ERR_MALFORMED_FILE, NULL,
-                                     "line %d: Section header expected",
+                                     _("line %d: Section header expected"),
                                      ctx->line);
           else if (count != 0)
             return svn_error_createf(SVN_ERR_MALFORMED_FILE, NULL,
-                                     "line %d: Option expected",
+                                     _("line %d: Option expected"),
                                      ctx->line);
           else
             SVN_ERR(parse_option(&ch, ctx, scratch_pool));

Modified: subversion/branches/fsfs-lock-many/subversion/libsvn_subr/config_win.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-lock-many/subversion/libsvn_subr/config_win.c?rev=1576824&r1=1576823&r2=1576824&view=diff
==============================================================================
--- subversion/branches/fsfs-lock-many/subversion/libsvn_subr/config_win.c (original)
+++ subversion/branches/fsfs-lock-many/subversion/libsvn_subr/config_win.c Wed Mar 12 17:18:20 2014
@@ -90,8 +90,8 @@ svn_config__win_config_path(const char *
                                folder_ucs2))
     return svn_error_create(SVN_ERR_BAD_FILENAME, NULL,
                           (system_path
-                           ? "Can't determine the system config path"
-                           : "Can't determine the user's config path"));
+                           ? _("Can't determine the system config path")
+                           : _("Can't determine the user's config path")));
 
   SVN_ERR(svn_utf__win32_utf16_to_utf8(&folder_utf8, folder_ucs2,
                                        NULL, scratch_pool));
@@ -134,7 +134,7 @@ parse_section(svn_config_t *cfg, HKEY hk
         }
       if (err != ERROR_SUCCESS)
         return svn_error_create(SVN_ERR_MALFORMED_FILE, NULL,
-                                "Can't enumerate registry values");
+                                _("Can't enumerate registry values"));
 
       /* Ignore option names that start with '#', see
          http://subversion.tigris.org/issues/show_bug.cgi?id=671 */
@@ -151,7 +151,7 @@ parse_section(svn_config_t *cfg, HKEY hk
             }
           if (err != ERROR_SUCCESS)
             return svn_error_create(SVN_ERR_MALFORMED_FILE, NULL,
-                                    "Can't read registry value data");
+                                    _("Can't read registry value data"));
 
           svn_config_set(cfg, section, option->data, value->data);
         }
@@ -188,7 +188,7 @@ svn_config__parse_registry(svn_config_t 
   else
     {
       return svn_error_createf(SVN_ERR_BAD_FILENAME, NULL,
-                               "Unrecognised registry path '%s'",
+                               _("Unrecognised registry path '%s'"),
                                svn_dirent_local_style(file, pool));
     }
 
@@ -200,11 +200,11 @@ svn_config__parse_registry(svn_config_t 
       const int is_enoent = APR_STATUS_IS_ENOENT(APR_FROM_OS_ERROR(err));
       if (!is_enoent)
         return svn_error_createf(SVN_ERR_BAD_FILENAME, NULL,
-                                 "Can't open registry key '%s'",
+                                 _("Can't open registry key '%s'"),
                                  svn_dirent_local_style(file, pool));
       else if (must_exist && is_enoent)
         return svn_error_createf(SVN_ERR_BAD_FILENAME, NULL,
-                                 "Can't find registry key '%s'",
+                                 _("Can't find registry key '%s'"),
                                  svn_dirent_local_style(file, pool));
       else
         return SVN_NO_ERROR;
@@ -242,7 +242,7 @@ svn_config__parse_registry(svn_config_t 
       if (err != ERROR_SUCCESS)
         {
           svn_err =  svn_error_create(SVN_ERR_MALFORMED_FILE, NULL,
-                                      "Can't enumerate registry keys");
+                                      _("Can't enumerate registry keys"));
           goto cleanup;
         }
 
@@ -252,7 +252,7 @@ svn_config__parse_registry(svn_config_t 
       if (err != ERROR_SUCCESS)
         {
           svn_err =  svn_error_create(SVN_ERR_MALFORMED_FILE, NULL,
-                                      "Can't open existing subkey");
+                                      _("Can't open existing subkey"));
           goto cleanup;
         }
 

Modified: subversion/branches/fsfs-lock-many/subversion/libsvn_subr/deprecated.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-lock-many/subversion/libsvn_subr/deprecated.c?rev=1576824&r1=1576823&r2=1576824&view=diff
==============================================================================
--- subversion/branches/fsfs-lock-many/subversion/libsvn_subr/deprecated.c (original)
+++ subversion/branches/fsfs-lock-many/subversion/libsvn_subr/deprecated.c Wed Mar 12 17:18:20 2014
@@ -34,7 +34,6 @@
    deprecated functions in this file. */
 #define SVN_DEPRECATED
 
-#include "svn_private_config.h"
 #include "svn_hash.h"
 #include "svn_subst.h"
 #include "svn_path.h"
@@ -53,6 +52,9 @@
 #include "private/svn_opt_private.h"
 #include "private/svn_mergeinfo_private.h"
 
+#include "svn_private_config.h"
+
+
 
 
 /*** Code. ***/

Modified: subversion/branches/fsfs-lock-many/subversion/libsvn_subr/dso.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-lock-many/subversion/libsvn_subr/dso.c?rev=1576824&r1=1576823&r2=1576824&view=diff
==============================================================================
--- subversion/branches/fsfs-lock-many/subversion/libsvn_subr/dso.c (original)
+++ subversion/branches/fsfs-lock-many/subversion/libsvn_subr/dso.c Wed Mar 12 17:18:20 2014
@@ -22,10 +22,10 @@
 #include <apr_thread_mutex.h>
 #include <apr_hash.h>
 
-#include "svn_private_config.h"
 #include "svn_hash.h"
 #include "svn_dso.h"
 #include "svn_pools.h"
+#include "svn_private_config.h"
 
 #include "private/svn_mutex.h"
 

Modified: subversion/branches/fsfs-lock-many/subversion/libsvn_subr/error.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-lock-many/subversion/libsvn_subr/error.c?rev=1576824&r1=1576823&r2=1576824&view=diff
==============================================================================
--- subversion/branches/fsfs-lock-many/subversion/libsvn_subr/error.c (original)
+++ subversion/branches/fsfs-lock-many/subversion/libsvn_subr/error.c Wed Mar 12 17:18:20 2014
@@ -86,15 +86,32 @@ svn_error__locate(const char *file, long
 /* Cleanup function for errors.  svn_error_clear () removes this so
    errors that are properly handled *don't* hit this code. */
 #if defined(SVN_DEBUG)
+/* GCC >= 4.6 has support for diagnostic pragmas that let us
+ * turn off warnings.  clang also supports the same pragmas */
+#if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6) \
+     || defined(__clang__))
+  #define IGNORING_UNUSED_WARNING
+  #pragma GCC diagnostic push
+  #pragma GCC diagnostic ignored "-Wunused-variable"
+#endif /* supports diagnostic pragmas */
 static apr_status_t err_abort(void *data)
 {
   svn_error_t *err = data;  /* For easy viewing in a debugger */
-  err = err; /* Fake a use for the variable to avoid compiler warnings */
+#ifndef IGNORING_UNUSED_WARNING
+  /* Fake a use for the variable to avoid compiler warnings if we can't turn
+   * them off via pragmas. */
+  err = err;
+#endif /* IGNORING_UNUSED_WARNING */
 
   if (!getenv("SVN_DBG_NO_ABORT_ON_ERROR_LEAK"))
     abort();
   return APR_SUCCESS;
 }
+#if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6) \
+     || defined(__clang__))
+  #undef IGNORING_UNUSED_WARNING
+  #pragma GCC diagnostic pop
+#endif /* supports diagnostic pragmas */
 #endif
 
 

Modified: subversion/branches/fsfs-lock-many/subversion/libsvn_subr/hash.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-lock-many/subversion/libsvn_subr/hash.c?rev=1576824&r1=1576823&r2=1576824&view=diff
==============================================================================
--- subversion/branches/fsfs-lock-many/subversion/libsvn_subr/hash.c (original)
+++ subversion/branches/fsfs-lock-many/subversion/libsvn_subr/hash.c Wed Mar 12 17:18:20 2014
@@ -31,7 +31,6 @@
 #include <apr_hash.h>
 #include <apr_file_io.h>
 
-#include "svn_private_config.h"
 #include "svn_types.h"
 #include "svn_string.h"
 #include "svn_error.h"
@@ -44,6 +43,8 @@
 #include "private/svn_sorts_private.h"
 #include "private/svn_subr_private.h"
 
+#include "svn_private_config.h"
+
 
 
 
@@ -621,7 +622,7 @@ hashfunc_compatible(const char *char_key
 #if SVN_UNALIGNED_ACCESS_IS_OK
     for (p = key, i = *klen; i >= 4; i-=4, p+=4)
       {
-        apr_uint32_t chunk = *(apr_uint32_t *)p;
+        apr_uint32_t chunk = *(const apr_uint32_t *)p;
 
         /* the ">> 17" part gives upper bits in the chunk a chance to make
            some impact as well */

Modified: subversion/branches/fsfs-lock-many/subversion/libsvn_subr/io.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-lock-many/subversion/libsvn_subr/io.c?rev=1576824&r1=1576823&r2=1576824&view=diff
==============================================================================
--- subversion/branches/fsfs-lock-many/subversion/libsvn_subr/io.c (original)
+++ subversion/branches/fsfs-lock-many/subversion/libsvn_subr/io.c Wed Mar 12 17:18:20 2014
@@ -51,7 +51,6 @@
 #include <fcntl.h>
 #endif
 
-#include "svn_private_config.h"
 #include "svn_hash.h"
 #include "svn_types.h"
 #include "svn_dirent_uri.h"
@@ -62,6 +61,7 @@
 #include "svn_pools.h"
 #include "svn_utf.h"
 #include "svn_config.h"
+#include "svn_private_config.h"
 #include "svn_ctype.h"
 
 #include "private/svn_atomic.h"

Modified: subversion/branches/fsfs-lock-many/subversion/libsvn_subr/mergeinfo.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-lock-many/subversion/libsvn_subr/mergeinfo.c?rev=1576824&r1=1576823&r2=1576824&view=diff
==============================================================================
--- subversion/branches/fsfs-lock-many/subversion/libsvn_subr/mergeinfo.c (original)
+++ subversion/branches/fsfs-lock-many/subversion/libsvn_subr/mergeinfo.c Wed Mar 12 17:18:20 2014
@@ -23,7 +23,6 @@
 #include <assert.h>
 #include <ctype.h>
 
-#include "svn_private_config.h"
 #include "svn_path.h"
 #include "svn_types.h"
 #include "svn_ctype.h"
@@ -38,6 +37,7 @@
 #include "private/svn_sorts_private.h"
 #include "private/svn_string_private.h"
 #include "private/svn_subr_private.h"
+#include "svn_private_config.h"
 #include "svn_hash.h"
 #include "private/svn_dep_compat.h"
 
@@ -49,7 +49,7 @@
    of IN1 and IN2 when trying to combine ranges.  If ranges with different
    inheritability are combined (CONSIDER_INHERITANCE must be FALSE for this
    to happen) the result is inheritable.  If both ranges are inheritable the
-   result is inheritable.  Only and if both ranges are non-inheritable is
+   result is inheritable.  And only if both ranges are non-inheritable
    the result is non-inheritable.
 
    Range overlapping detection algorithm from
@@ -270,7 +270,7 @@ combine_with_lastrange(const svn_merge_r
     {
       /* We are not considering inheritance so we can merge intersecting
          ranges of different inheritability.  Of course if the ranges
-         don't intersect at all we simply push NEW_RANGE only RANGELIST. */
+         don't intersect at all we simply push NEW_RANGE onto RANGELIST. */
       if (combine_ranges(&combined_range, lastrange, new_range, FALSE))
         {
           *lastrange = combined_range;
@@ -304,7 +304,7 @@ combine_with_lastrange(const svn_merge_r
             {
               case svn__no_intersection:
                 /* NEW_RANGE and *LASTRANGE *really* don't intersect so
-                   just push NEW_RANGE only RANGELIST. */
+                   just push NEW_RANGE onto RANGELIST. */
                 APR_ARRAY_PUSH(rangelist, svn_merge_range_t *) =
                   svn_merge_range_dup(new_range, result_pool);
                 sorted = (svn_sort_compare_ranges(&lastrange,
@@ -866,7 +866,7 @@ adjust_remaining_ranges(svn_rangelist_t 
                   ______________________________________________
                  |                                              |
                  M                 MODIFIED_RANGE               N
-                 |                 (!inhertiable)               |
+                 |                 (!inheritable)               |
                  |______________________________________________|
                                   |              |
                                   O  NEXT_RANGE  P
@@ -877,7 +877,7 @@ adjust_remaining_ranges(svn_rangelist_t 
                   _______________________________________________
                  |                |              |               |
                  M MODIFIED_RANGE O  NEXT_RANGE  P   NEW_RANGE   N
-                 | (!inhertiable) | (inheritable)| (!inheritable)|
+                 | (!inheritable) | (inheritable)| (!inheritable)|
                  |________________|______________|_______________|
               */
               svn_merge_range_t *new_modified_range =
@@ -969,7 +969,7 @@ svn_rangelist_merge2(svn_rangelist_t *ra
       if (res == 0)
         {
           /* Only when merging two non-inheritable ranges is the result also
-             non-inheritable.  In all other cases ensure an inheritiable
+             non-inheritable.  In all other cases ensure an inheritable
              result. */
           if (range->inheritable || change->inheritable)
             range->inheritable = TRUE;
@@ -1866,7 +1866,7 @@ svn_mergeinfo_intersect2(svn_mergeinfo_t
 
   /* ### TODO(reint): Do we care about the case when a path in one
      ### mergeinfo hash has inheritable mergeinfo, and in the other
-     ### has non-inhertiable mergeinfo?  It seems like that path
+     ### has non-inheritable mergeinfo?  It seems like that path
      ### itself should really be an intersection, while child paths
      ### should not be... */
   for (hi = apr_hash_first(scratch_pool, mergeinfo1);

Modified: subversion/branches/fsfs-lock-many/subversion/libsvn_subr/named_atomic.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-lock-many/subversion/libsvn_subr/named_atomic.c?rev=1576824&r1=1576823&r2=1576824&view=diff
==============================================================================
--- subversion/branches/fsfs-lock-many/subversion/libsvn_subr/named_atomic.c (original)
+++ subversion/branches/fsfs-lock-many/subversion/libsvn_subr/named_atomic.c Wed Mar 12 17:18:20 2014
@@ -428,7 +428,7 @@ svn_atomic_namespace__create(svn_atomic_
                            result_pool));
 
   /* Make sure the last user of our lock file will actually remove it.
-   * Please note that only the last file handle begin closed will actually
+   * Please note that only the last file handle being closed will actually
    * remove the underlying file (see docstring for apr_file_remove).
    */
   apr_pool_cleanup_register(result_pool, &new_ns->mutex,

Modified: subversion/branches/fsfs-lock-many/subversion/libsvn_subr/opt.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-lock-many/subversion/libsvn_subr/opt.c?rev=1576824&r1=1576823&r2=1576824&view=diff
==============================================================================
--- subversion/branches/fsfs-lock-many/subversion/libsvn_subr/opt.c (original)
+++ subversion/branches/fsfs-lock-many/subversion/libsvn_subr/opt.c Wed Mar 12 17:18:20 2014
@@ -34,7 +34,6 @@
 #include <apr_lib.h>
 #include <apr_file_info.h>
 
-#include "svn_private_config.h"
 #include "svn_hash.h"
 #include "svn_cmdline.h"
 #include "svn_version.h"
@@ -51,6 +50,7 @@
 #include "private/svn_opt_private.h"
 
 #include "opt.h"
+#include "svn_private_config.h"
 
 
 /*** Code. ***/

Modified: subversion/branches/fsfs-lock-many/subversion/libsvn_subr/properties.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-lock-many/subversion/libsvn_subr/properties.c?rev=1576824&r1=1576823&r2=1576824&view=diff
==============================================================================
--- subversion/branches/fsfs-lock-many/subversion/libsvn_subr/properties.c (original)
+++ subversion/branches/fsfs-lock-many/subversion/libsvn_subr/properties.c Wed Mar 12 17:18:20 2014
@@ -27,8 +27,6 @@
 #include <apr_hash.h>
 #include <apr_tables.h>
 #include <string.h>       /* for strncmp() */
-
-#include "svn_private_config.h"
 #include "svn_hash.h"
 #include "svn_string.h"
 #include "svn_props.h"

Modified: subversion/branches/fsfs-lock-many/subversion/libsvn_subr/simple_providers.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-lock-many/subversion/libsvn_subr/simple_providers.c?rev=1576824&r1=1576823&r2=1576824&view=diff
==============================================================================
--- subversion/branches/fsfs-lock-many/subversion/libsvn_subr/simple_providers.c (original)
+++ subversion/branches/fsfs-lock-many/subversion/libsvn_subr/simple_providers.c Wed Mar 12 17:18:20 2014
@@ -28,8 +28,6 @@
 /*** Includes. ***/
 
 #include <apr_pools.h>
-
-#include "svn_private_config.h"
 #include "svn_auth.h"
 #include "svn_dirent_uri.h"
 #include "svn_hash.h"
@@ -41,6 +39,8 @@
 
 #include "private/svn_auth_private.h"
 
+#include "svn_private_config.h"
+
 #include "auth.h"
 
 /*-----------------------------------------------------------------------*/

Modified: subversion/branches/fsfs-lock-many/subversion/libsvn_subr/sorts.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-lock-many/subversion/libsvn_subr/sorts.c?rev=1576824&r1=1576823&r2=1576824&view=diff
==============================================================================
--- subversion/branches/fsfs-lock-many/subversion/libsvn_subr/sorts.c (original)
+++ subversion/branches/fsfs-lock-many/subversion/libsvn_subr/sorts.c Wed Mar 12 17:18:20 2014
@@ -28,8 +28,6 @@
 #include <apr_tables.h>
 #include <stdlib.h>       /* for qsort()   */
 #include <assert.h>
-
-#include "svn_private_config.h"
 #include "svn_hash.h"
 #include "svn_path.h"
 #include "svn_sorts.h"
@@ -371,7 +369,7 @@ heap_is_less(svn_priority_queue__t *queu
   /* nelts is never negative */
   assert(lhs < (apr_size_t)queue->elements->nelts);
   assert(rhs < (apr_size_t)queue->elements->nelts);
-  return queue->compare_func((void *)lhs_value, (void *)rhs_value) < 0;
+  return queue->compare_func(lhs_value, rhs_value) < 0;
 }
 
 /* Exchange elements number LHS and RHS in QUEUE.

Modified: subversion/branches/fsfs-lock-many/subversion/libsvn_subr/sqlite3wrapper.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-lock-many/subversion/libsvn_subr/sqlite3wrapper.c?rev=1576824&r1=1576823&r2=1576824&view=diff
==============================================================================
--- subversion/branches/fsfs-lock-many/subversion/libsvn_subr/sqlite3wrapper.c (original)
+++ subversion/branches/fsfs-lock-many/subversion/libsvn_subr/sqlite3wrapper.c Wed Mar 12 17:18:20 2014
@@ -26,18 +26,19 @@
 #ifdef SVN_SQLITE_INLINE
 #  define SQLITE_OMIT_DEPRECATED
 #  define SQLITE_API static
-#  if __GNUC__ > 4 || (__GNUC__ == 4 && (__GNUC_MINOR__ >= 6 || __APPLE_CC__))
-#    if !__APPLE_CC__ || __GNUC_MINOR__ >= 6
-#      pragma GCC diagnostic push
-#    endif
+#  if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2)
 #    pragma GCC diagnostic ignored "-Wunreachable-code"
 #    pragma GCC diagnostic ignored "-Wunused-function"
 #    pragma GCC diagnostic ignored "-Wcast-qual"
 #    pragma GCC diagnostic ignored "-Wunused"
 #    pragma GCC diagnostic ignored "-Wshadow"
-#    if __APPLE_CC__
+#    if defined(__APPLE_CC__) || defined(__clang__)
 #      pragma GCC diagnostic ignored "-Wshorten-64-to-32"
 #    endif
+#    if defined(__clang__)
+#      pragma clang diagnostic ignored "-Wincompatible-pointer-types-discards-qualifiers"
+#      pragma clang diagnostic ignored "-Wmissing-variable-declarations"
+#    endif
 #  endif
 #  ifdef __APPLE__
 #    include <Availability.h>
@@ -52,9 +53,6 @@
 #  endif
 #  define SQLITE_DEFAULT_FILE_PERMISSIONS 0666
 #  include <sqlite3.c>
-#  if __GNUC__ > 4 || (__GNUC__ == 4 && (__GNUC_MINOR__ >= 6))
-#    pragma GCC diagnostic pop
-#  endif
 
 /* Expose the sqlite API vtable and the two missing functions */
 const sqlite3_api_routines *const svn_sqlite3__api_funcs = &sqlite3Apis;

Modified: subversion/branches/fsfs-lock-many/subversion/libsvn_subr/ssl_client_cert_providers.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-lock-many/subversion/libsvn_subr/ssl_client_cert_providers.c?rev=1576824&r1=1576823&r2=1576824&view=diff
==============================================================================
--- subversion/branches/fsfs-lock-many/subversion/libsvn_subr/ssl_client_cert_providers.c (original)
+++ subversion/branches/fsfs-lock-many/subversion/libsvn_subr/ssl_client_cert_providers.c Wed Mar 12 17:18:20 2014
@@ -29,8 +29,6 @@
 /*** Includes. ***/
 
 #include <apr_pools.h>
-
-#include "svn_private_config.h"
 #include "svn_hash.h"
 #include "svn_auth.h"
 #include "svn_error.h"

Modified: subversion/branches/fsfs-lock-many/subversion/libsvn_subr/ssl_client_cert_pw_providers.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-lock-many/subversion/libsvn_subr/ssl_client_cert_pw_providers.c?rev=1576824&r1=1576823&r2=1576824&view=diff
==============================================================================
--- subversion/branches/fsfs-lock-many/subversion/libsvn_subr/ssl_client_cert_pw_providers.c (original)
+++ subversion/branches/fsfs-lock-many/subversion/libsvn_subr/ssl_client_cert_pw_providers.c Wed Mar 12 17:18:20 2014
@@ -25,7 +25,6 @@
 
 #include <apr_pools.h>
 
-#include "svn_private_config.h"
 #include "svn_hash.h"
 #include "svn_auth.h"
 #include "svn_error.h"
@@ -34,6 +33,7 @@
 
 #include "private/svn_auth_private.h"
 
+#include "svn_private_config.h"
 
 /*-----------------------------------------------------------------------*/
 /* File provider                                                         */