You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by pr...@apache.org on 2013/04/05 07:29:34 UTC

svn commit: r1464833 [5/11] - in /subversion/branches/verify-keep-going: ./ build/ build/generator/ contrib/client-side/svncopy/ notes/ subversion/bindings/javahl/native/ subversion/bindings/javahl/src/org/apache/subversion/javahl/ subversion/bindings/...

Modified: subversion/branches/verify-keep-going/subversion/libsvn_fs_base/bdb/changes-table.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_fs_base/bdb/changes-table.c?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_fs_base/bdb/changes-table.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_fs_base/bdb/changes-table.c Fri Apr  5 05:29:29 2013
@@ -25,6 +25,7 @@
 #include <apr_hash.h>
 #include <apr_tables.h>
 
+#include "svn_hash.h"
 #include "svn_fs.h"
 #include "svn_pools.h"
 #include "svn_path.h"
@@ -132,7 +133,7 @@ fold_change(apr_hash_t *changes,
   svn_fs_path_change2_t *old_change, *new_change;
   const char *path;
 
-  if ((old_change = apr_hash_get(changes, change->path, APR_HASH_KEY_STRING)))
+  if ((old_change = svn_hash_gets(changes, change->path)))
     {
       /* This path already exists in the hash, so we have to merge
          this change into the already existing one. */
@@ -244,7 +245,7 @@ fold_change(apr_hash_t *changes,
     }
 
   /* Add (or update) this path. */
-  apr_hash_set(changes, path, APR_HASH_KEY_STRING, new_change);
+  svn_hash_sets(changes, path, new_change);
 
   return SVN_NO_ERROR;
 }

Modified: subversion/branches/verify-keep-going/subversion/libsvn_fs_base/bdb/env.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_fs_base/bdb/env.c?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_fs_base/bdb/env.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_fs_base/bdb/env.c Fri Apr  5 05:29:29 2013
@@ -31,6 +31,7 @@
 #include <apr_strings.h>
 #include <apr_hash.h>
 
+#include "svn_hash.h"
 #include "svn_path.h"
 #include "svn_pools.h"
 #include "svn_utf.h"

Modified: subversion/branches/verify-keep-going/subversion/libsvn_fs_base/dag.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_fs_base/dag.c?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_fs_base/dag.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_fs_base/dag.c Fri Apr  5 05:29:29 2013
@@ -350,7 +350,7 @@ dir_entry_id_from_node(const svn_fs_id_t
 
   SVN_ERR(svn_fs_base__dag_dir_entries(&entries, parent, trail, pool));
   if (entries)
-    dirent = apr_hash_get(entries, name, APR_HASH_KEY_STRING);
+    dirent = svn_hash_gets(entries, name);
   else
     dirent = NULL;
 
@@ -421,7 +421,7 @@ set_entry(dag_node_t *parent,
     entries = apr_hash_make(pool);
 
   /* Now, add our new entry to the entries list. */
-  apr_hash_set(entries, name, APR_HASH_KEY_STRING, id);
+  svn_hash_sets(entries, name, id);
 
   /* Finally, replace the old entries list with the new one. */
   SVN_ERR(svn_fs_base__unparse_entries_skel(&entries_skel, entries,
@@ -910,7 +910,7 @@ svn_fs_base__dag_delete(dag_node_t *pare
 
   /* Find NAME in the ENTRIES skel.  */
   if (entries)
-    id = apr_hash_get(entries, name, APR_HASH_KEY_STRING);
+    id = svn_hash_gets(entries, name);
 
   /* If we never found ID in ENTRIES (perhaps because there are no
      ENTRIES, perhaps because ID just isn't in the existing ENTRIES
@@ -929,7 +929,7 @@ svn_fs_base__dag_delete(dag_node_t *pare
                                              trail, pool));
 
   /* Remove this entry from its parent's entries list. */
-  apr_hash_set(entries, name, APR_HASH_KEY_STRING, NULL);
+  svn_hash_sets(entries, name, NULL);
 
   /* Replace the old entries list with the new one. */
   {
@@ -1593,12 +1593,11 @@ svn_fs_base__dag_commit_txn(svn_revnum_t
   *new_rev = SVN_INVALID_REVNUM;
   SVN_ERR(svn_fs_bdb__put_rev(new_rev, fs, &revision, trail, pool));
 
-  if (apr_hash_get(txnprops, SVN_FS__PROP_TXN_CHECK_OOD, APR_HASH_KEY_STRING))
+  if (svn_hash_gets(txnprops, SVN_FS__PROP_TXN_CHECK_OOD))
     SVN_ERR(svn_fs_base__set_txn_prop
             (fs, txn_id, SVN_FS__PROP_TXN_CHECK_OOD, NULL, trail, pool));
 
-  if (apr_hash_get(txnprops, SVN_FS__PROP_TXN_CHECK_LOCKS,
-                   APR_HASH_KEY_STRING))
+  if (svn_hash_gets(txnprops, SVN_FS__PROP_TXN_CHECK_LOCKS))
     SVN_ERR(svn_fs_base__set_txn_prop
             (fs, txn_id, SVN_FS__PROP_TXN_CHECK_LOCKS, NULL, trail, pool));
 

Modified: subversion/branches/verify-keep-going/subversion/libsvn_fs_base/fs.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_fs_base/fs.c?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_fs_base/fs.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_fs_base/fs.c Fri Apr  5 05:29:29 2013
@@ -28,6 +28,7 @@
 #include <apr_pools.h>
 #include <apr_file_io.h>
 
+#include "svn_hash.h"
 #include "svn_pools.h"
 #include "svn_fs.h"
 #include "svn_path.h"
@@ -446,9 +447,7 @@ bdb_write_config(svn_fs_t *fs)
 
       if (fs->config)
         {
-          value = apr_hash_get(fs->config,
-                               dbconfig_options[i].config_key,
-                               APR_HASH_KEY_STRING);
+          value = svn_hash_gets(fs->config, dbconfig_options[i].config_key);
         }
 
       SVN_ERR(svn_io_file_write_full(dbconfig_file,
@@ -472,9 +471,8 @@ bdb_write_config(svn_fs_t *fs)
 }
 
 static svn_error_t *
-base_bdb_verify_rev(svn_fs_t *fs,
-                    svn_revnum_t revision,
-                    apr_pool_t *scratch_pool)
+base_bdb_verify_root(svn_fs_root_t *root,
+                     apr_pool_t *scratch_pool)
 {
   /* Verifying is currently a no op for BDB. */
   return SVN_NO_ERROR;
@@ -509,7 +507,7 @@ static fs_vtable_t fs_vtable = {
   svn_fs_base__unlock,
   svn_fs_base__get_lock,
   svn_fs_base__get_locks,
-  base_bdb_verify_rev,
+  base_bdb_verify_root,
   base_bdb_freeze,
   base_bdb_set_errcall,
 };
@@ -684,14 +682,11 @@ base_create(svn_fs_t *fs, const char *pa
   /* See if compatibility with older versions was explicitly requested. */
   if (fs->config)
     {
-      if (apr_hash_get(fs->config, SVN_FS_CONFIG_PRE_1_4_COMPATIBLE,
-                                   APR_HASH_KEY_STRING))
+      if (svn_hash_gets(fs->config, SVN_FS_CONFIG_PRE_1_4_COMPATIBLE))
         format = 1;
-      else if (apr_hash_get(fs->config, SVN_FS_CONFIG_PRE_1_5_COMPATIBLE,
-                                        APR_HASH_KEY_STRING))
+      else if (svn_hash_gets(fs->config, SVN_FS_CONFIG_PRE_1_5_COMPATIBLE))
         format = 2;
-      else if (apr_hash_get(fs->config, SVN_FS_CONFIG_PRE_1_6_COMPATIBLE,
-                                        APR_HASH_KEY_STRING))
+      else if (svn_hash_gets(fs->config, SVN_FS_CONFIG_PRE_1_6_COMPATIBLE))
         format = 3;
     }
 
@@ -1386,6 +1381,15 @@ base_get_description(void)
   return _("Module for working with a Berkeley DB repository.");
 }
 
+static svn_error_t *
+base_set_svn_fs_open(svn_fs_t *fs,
+                     svn_error_t *(*svn_fs_open_)(svn_fs_t **,
+                                                  const char *,
+                                                  apr_hash_t *,
+                                                  apr_pool_t *))
+{
+  return SVN_NO_ERROR;
+}
 
 
 /* Base FS library vtable, used by the FS loader library. */
@@ -1402,7 +1406,8 @@ static fs_library_vtable_t library_vtabl
   base_bdb_recover,
   base_bdb_pack,
   base_bdb_logfiles,
-  svn_fs_base__id_parse
+  svn_fs_base__id_parse,
+  base_set_svn_fs_open
 };
 
 svn_error_t *

Modified: subversion/branches/verify-keep-going/subversion/libsvn_fs_base/lock.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_fs_base/lock.c?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_fs_base/lock.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_fs_base/lock.c Fri Apr  5 05:29:29 2013
@@ -21,6 +21,7 @@
  */
 
 
+#include "svn_hash.h"
 #include "svn_pools.h"
 #include "svn_error.h"
 #include "svn_fs.h"
@@ -37,6 +38,7 @@
 #include "../libsvn_fs/fs-loader.h"
 #include "private/svn_fs_util.h"
 #include "private/svn_subr_private.h"
+#include "private/svn_dep_compat.h"
 
 
 /* Add LOCK and its associated LOCK_TOKEN (associated with PATH) as
@@ -474,9 +476,11 @@ svn_fs_base__get_locks(svn_fs_t *fs,
   while (1)
     {
       apr_size_t len, skel_len;
-      char c, *end, *skel_buf;
+      char c, *skel_buf;
       svn_skel_t *lock_skel;
       svn_lock_t *lock;
+      apr_uint64_t ui64;
+      svn_error_t *err;
 
       svn_pool_clear(iterpool);
 
@@ -484,9 +488,10 @@ svn_fs_base__get_locks(svn_fs_t *fs,
       SVN_ERR(svn_stream_readline(stream, &buf, "\n", &eof, iterpool));
       if (eof)
         break;
-      skel_len = (size_t) strtoul(buf->data, &end, 10);
-      if (skel_len == (size_t) ULONG_MAX || *end != '\0')
-        return svn_error_create(SVN_ERR_MALFORMED_FILE, NULL, NULL);
+      err = svn_cstring_strtoui64(&ui64, buf->data, 0, APR_SIZE_MAX, 10);
+      if (err)
+        return svn_error_create(SVN_ERR_MALFORMED_FILE, err, NULL);
+      skel_len = (apr_size_t)ui64;
 
       /* Now read that much into a buffer. */
       skel_buf = apr_palloc(pool, skel_len + 1);
@@ -541,8 +546,7 @@ verify_lock(svn_fs_t *fs,
        _("User '%s' does not own lock on path '%s' (currently locked by '%s')"),
        fs->access_ctx->username, lock->path, lock->owner);
 
-  else if (apr_hash_get(fs->access_ctx->lock_tokens, lock->token,
-                        APR_HASH_KEY_STRING) == NULL)
+  else if (svn_hash_gets(fs->access_ctx->lock_tokens, lock->token) == NULL)
     return svn_error_createf
       (SVN_ERR_FS_BAD_LOCK_TOKEN, NULL,
        _("Cannot verify lock on path '%s'; no matching lock-token available"),

Modified: subversion/branches/verify-keep-going/subversion/libsvn_fs_base/revs-txns.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_fs_base/revs-txns.c?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_fs_base/revs-txns.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_fs_base/revs-txns.c Fri Apr  5 05:29:29 2013
@@ -230,7 +230,7 @@ svn_fs_base__revision_prop(svn_string_t 
                                  FALSE, pool));
 
   /* And then the prop from that list (if there was a list). */
-  *value_p = apr_hash_get(table, propname, APR_HASH_KEY_STRING);
+  *value_p = svn_hash_gets(table, propname);
 
   return SVN_NO_ERROR;
 }
@@ -262,8 +262,7 @@ svn_fs_base__set_rev_prop(svn_fs_t *fs,
   if (old_value_p)
     {
       const svn_string_t *wanted_value = *old_value_p;
-      const svn_string_t *present_value = apr_hash_get(txn->proplist, name,
-                                                       APR_HASH_KEY_STRING);
+      const svn_string_t *present_value = svn_hash_gets(txn->proplist, name);
       if ((!wanted_value != !present_value)
           || (wanted_value && present_value
               && !svn_string_compare(wanted_value, present_value)))
@@ -276,7 +275,7 @@ svn_fs_base__set_rev_prop(svn_fs_t *fs,
         }
       /* Fall through. */
     }
-  apr_hash_set(txn->proplist, name, APR_HASH_KEY_STRING, value);
+  svn_hash_sets(txn->proplist, name, value);
 
   /* Overwrite the revision. */
   return put_txn(fs, txn, txn_id, trail, pool);
@@ -537,7 +536,7 @@ svn_fs_base__txn_prop(svn_string_t **val
                                  FALSE, pool));
 
   /* And then the prop from that list (if there was a list). */
-  *value_p = apr_hash_get(table, propname, APR_HASH_KEY_STRING);
+  *value_p = svn_hash_gets(table, propname);
 
   return SVN_NO_ERROR;
 }
@@ -575,7 +574,7 @@ svn_fs_base__set_txn_prop(svn_fs_t *fs,
     txn->proplist = apr_hash_make(pool);
 
   /* Set the property. */
-  apr_hash_set(txn->proplist, name, APR_HASH_KEY_STRING, value);
+  svn_hash_sets(txn->proplist, name, value);
 
   /* Now overwrite the transaction. */
   return put_txn(fs, txn, txn_name, trail, pool);

Modified: subversion/branches/verify-keep-going/subversion/libsvn_fs_base/tree.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_fs_base/tree.c?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_fs_base/tree.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_fs_base/tree.c Fri Apr  5 05:29:29 2013
@@ -39,6 +39,7 @@
 #include <string.h>
 #include <assert.h>
 #include "svn_private_config.h"
+#include "svn_hash.h"
 #include "svn_pools.h"
 #include "svn_error.h"
 #include "svn_path.h"
@@ -160,7 +161,7 @@ dag_node_cache_get(svn_fs_root_t *root,
     return NULL;
 
   /* Look in the cache for our desired item. */
-  cache_item = apr_hash_get(brd->node_cache, path, APR_HASH_KEY_STRING);
+  cache_item = svn_hash_gets(brd->node_cache, path);
   if (cache_item)
     return svn_fs_base__dag_dup(cache_item->node, pool);
 
@@ -208,7 +209,7 @@ dag_node_cache_set(svn_fs_root_t *root,
      root, and that only happens once under that root.  So, we'll be a
      little bit sloppy here, and count on callers doing the right
      thing. */
-  cache_item = apr_hash_get(brd->node_cache, path, APR_HASH_KEY_STRING);
+  cache_item = svn_hash_gets(brd->node_cache, path);
   if (cache_item)
     {
       /* ### This section is somehow broken.  I don't know how, but it
@@ -250,9 +251,8 @@ dag_node_cache_set(svn_fs_root_t *root,
     {
       /* No room.  Expire the oldest thing. */
       cache_path = brd->node_cache_keys[brd->node_cache_idx];
-      cache_item = apr_hash_get(brd->node_cache, cache_path,
-                                APR_HASH_KEY_STRING);
-      apr_hash_set(brd->node_cache, cache_path, APR_HASH_KEY_STRING, NULL);
+      cache_item = svn_hash_gets(brd->node_cache, cache_path);
+      svn_hash_sets(brd->node_cache, cache_path, NULL);
       cache_pool = cache_item->pool;
       svn_pool_clear(cache_pool);
     }
@@ -269,7 +269,7 @@ dag_node_cache_set(svn_fs_root_t *root,
 
   /* Now add it to the cache. */
   cache_path = apr_pstrdup(cache_pool, path);
-  apr_hash_set(brd->node_cache, cache_path, APR_HASH_KEY_STRING, cache_item);
+  svn_hash_sets(brd->node_cache, cache_path, cache_item);
   brd->node_cache_keys[brd->node_cache_idx] = cache_path;
 
   /* Advance the cache pointer. */
@@ -309,11 +309,10 @@ txn_body_txn_root(void *baton,
   /* Look for special txn props that represent the 'flags' behavior of
      the transaction. */
   SVN_ERR(svn_fs_base__txn_proplist_in_trail(&txnprops, svn_txn_id, trail));
-  if (apr_hash_get(txnprops, SVN_FS__PROP_TXN_CHECK_OOD, APR_HASH_KEY_STRING))
+  if (svn_hash_gets(txnprops, SVN_FS__PROP_TXN_CHECK_OOD))
     flags |= SVN_FS_TXN_CHECK_OOD;
 
-  if (apr_hash_get(txnprops, SVN_FS__PROP_TXN_CHECK_LOCKS,
-                   APR_HASH_KEY_STRING))
+  if (svn_hash_gets(txnprops, SVN_FS__PROP_TXN_CHECK_LOCKS))
     flags |= SVN_FS_TXN_CHECK_LOCKS;
 
   root = make_txn_root(fs, svn_txn_id, txn->base_rev, flags, trail->pool);
@@ -1191,8 +1190,7 @@ txn_body_node_prop(void *baton,
                                         trail, trail->pool));
   *(args->value_p) = NULL;
   if (proplist)
-    *(args->value_p) = apr_hash_get(proplist, args->propname,
-                                    APR_HASH_KEY_STRING);
+    *(args->value_p) = svn_hash_gets(proplist, args->propname);
   return SVN_NO_ERROR;
 }
 
@@ -1304,7 +1302,7 @@ txn_body_change_node_prop(void *baton,
     proplist = apr_hash_make(trail->pool);
 
   /* Set the property. */
-  apr_hash_set(proplist, args->name, APR_HASH_KEY_STRING, args->value);
+  svn_hash_sets(proplist, args->name, args->value);
 
   /* Overwrite the node's proplist. */
   SVN_ERR(svn_fs_base__dag_set_proplist(parent_path->node, proplist,
@@ -2527,7 +2525,7 @@ verify_locks(const char *txn_name,
         continue;
 
       /* Fetch the change associated with our path.  */
-      change = apr_hash_get(changes, path, APR_HASH_KEY_STRING);
+      change = svn_hash_gets(changes, path);
 
       /* What does it mean to succeed at lock verification for a given
          path?  For an existing file or directory getting modified
@@ -5000,7 +4998,7 @@ txn_body_get_mergeinfo_data_and_entries(
 
           SVN_ERR(svn_fs_base__dag_get_proplist(&plist, child_node,
                                                 trail, iterpool));
-          pval = apr_hash_get(plist, SVN_PROP_MERGEINFO, APR_HASH_KEY_STRING);
+          pval = svn_hash_gets(plist, SVN_PROP_MERGEINFO);
           if (! pval)
             {
               svn_string_t *id_str = svn_fs_base__id_unparse(child_id,
@@ -5024,11 +5022,10 @@ txn_body_get_mergeinfo_data_and_entries(
             }
           else
             {
-              apr_hash_set(args->result_catalog,
-                           svn_fspath__join(args->node_path, dirent->name,
-                                            result_pool),
-                           APR_HASH_KEY_STRING,
-                           child_mergeinfo);
+              svn_hash_sets(args->result_catalog,
+                            svn_fspath__join(args->node_path, dirent->name,
+                                             result_pool),
+                            child_mergeinfo);
             }
         }
 
@@ -5048,10 +5045,9 @@ txn_body_get_mergeinfo_data_and_entries(
                                          "but is not a directory"),
                                        id_str->data);
             }
-          apr_hash_set(args->children_atop_mergeinfo_trees,
-                       apr_pstrdup(children_pool, dirent->name),
-                       APR_HASH_KEY_STRING,
-                       svn_fs_base__dag_dup(child_node, children_pool));
+          svn_hash_sets(args->children_atop_mergeinfo_trees,
+                        apr_pstrdup(children_pool, dirent->name),
+                        svn_fs_base__dag_dup(child_node, children_pool));
         }
     }
 
@@ -5177,8 +5173,7 @@ txn_body_get_mergeinfo_for_path(void *ba
   svn_pool_destroy(iterpool);
 
   SVN_ERR(svn_fs_base__dag_get_proplist(&proplist, node, trail, trail->pool));
-  mergeinfo_string = apr_hash_get(proplist, SVN_PROP_MERGEINFO,
-                                  APR_HASH_KEY_STRING);
+  mergeinfo_string = svn_hash_gets(proplist, SVN_PROP_MERGEINFO);
   if (! mergeinfo_string)
     {
       svn_string_t *id_str =
@@ -5295,9 +5290,8 @@ get_mergeinfos_for_paths(svn_fs_root_t *
                                      txn_body_get_mergeinfo_for_path,
                                      &gmfp_args, FALSE, iterpool));
       if (path_mergeinfo)
-        apr_hash_set(result_catalog, apr_pstrdup(result_pool, path),
-                     APR_HASH_KEY_STRING,
-                     path_mergeinfo);
+        svn_hash_sets(result_catalog, apr_pstrdup(result_pool, path),
+                      path_mergeinfo);
 
       /* If we're including descendants, do so. */
       if (include_descendants)

Modified: subversion/branches/verify-keep-going/subversion/libsvn_fs_fs/caching.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_fs_fs/caching.c?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_fs_fs/caching.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_fs_fs/caching.c Fri Apr  5 05:29:29 2013
@@ -38,14 +38,48 @@
 #include "private/svn_debug.h"
 #include "private/svn_subr_private.h"
 
+/* Take the ORIGINAL string and replace all occurrences of ":" without
+ * limiting the key space.  Allocate the result in POOL.
+ */
+static const char *
+normalize_key_part(const char *original,
+                   apr_pool_t *pool)
+{
+  apr_size_t i;
+  apr_size_t len = strlen(original);
+  svn_stringbuf_t *normalized = svn_stringbuf_create_ensure(len, pool);
+
+  for (i = 0; i < len; ++i)
+    {
+      char c = original[i];
+      switch (c)
+        {
+        case ':': svn_stringbuf_appendbytes(normalized, "%_", 2);
+                  break;
+        case '%': svn_stringbuf_appendbytes(normalized, "%%", 2);
+                  break;
+        default : svn_stringbuf_appendbyte(normalized, c);
+        }
+    }
+
+  return normalized->data;
+}
+
 /* Return a memcache in *MEMCACHE_P for FS if it's configured to use
    memcached, or NULL otherwise.  Also, sets *FAIL_STOP to a boolean
    indicating whether cache errors should be returned to the caller or
-   just passed to the FS warning handler.  Use FS->pool for allocating
-   the memcache, and POOL for temporary allocations. */
+   just passed to the FS warning handler.
+
+   *CACHE_TXDELTAS, *CACHE_FULLTEXTS and *CACHE_REVPROPS flags will be set
+   according to FS->CONFIG.  *CACHE_NAMESPACE receives the cache prefix
+   to use.
+   
+   Use FS->pool for allocating the memcache and CACHE_NAMESPACE, and POOL
+   for temporary allocations. */
 static svn_error_t *
 read_config(svn_memcache_t **memcache_p,
             svn_boolean_t *fail_stop,
+            const char **cache_namespace,
             svn_boolean_t *cache_txdeltas,
             svn_boolean_t *cache_fulltexts,
             svn_boolean_t *cache_revprops,
@@ -57,6 +91,22 @@ read_config(svn_memcache_t **memcache_p,
   SVN_ERR(svn_cache__make_memcache_from_config(memcache_p, ffd->config,
                                               fs->pool));
 
+  /* No cache namespace by default.  I.e. all FS instances share the
+   * cached data.  If you specify different namespaces, the data will
+   * share / compete for the same cache memory but keys will not match
+   * across namespaces and, thus, cached data will not be shared between
+   * namespaces.
+   *
+   * Since the namespace will be concatenated with other elements to form
+   * the complete key prefix, we must make sure that the resulting string
+   * is unique and cannot be created by any other combination of elements.
+   */
+  *cache_namespace
+    = normalize_key_part(svn_hash__get_cstring(fs->config,
+                                               SVN_FS_CONFIG_FSFS_CACHE_NS,
+                                               ""),
+                         pool);
+
   /* don't cache text deltas by default.
    * Once we reconstructed the fulltexts from the deltas,
    * these deltas are rarely re-used. Therefore, only tools
@@ -294,7 +344,8 @@ svn_fs_fs__initialize_caches(svn_fs_t *f
   fs_fs_data_t *ffd = fs->fsap_data;
   const char *prefix = apr_pstrcat(pool,
                                    "fsfs:", fs->uuid,
-                                   "/", fs->path, ":",
+                                   "/", normalize_key_part(fs->path, pool),
+                                   ":",
                                    (char *)NULL);
   svn_memcache_t *memcache;
   svn_membuffer_t *membuffer;
@@ -302,16 +353,20 @@ svn_fs_fs__initialize_caches(svn_fs_t *f
   svn_boolean_t cache_txdeltas;
   svn_boolean_t cache_fulltexts;
   svn_boolean_t cache_revprops;
+  const char *cache_namespace;
 
   /* Evaluating the cache configuration. */
   SVN_ERR(read_config(&memcache,
                       &no_handler,
+                      &cache_namespace,
                       &cache_txdeltas,
                       &cache_fulltexts,
                       &cache_revprops,
                       fs,
                       pool));
 
+  prefix = apr_pstrcat(pool, "ns:", cache_namespace, ":", prefix, NULL);
+
   membuffer = svn_cache__get_global_membuffer_cache();
 
   /* Make the cache for revision roots.  For the vast majority of

Modified: subversion/branches/verify-keep-going/subversion/libsvn_fs_fs/fs.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_fs_fs/fs.c?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_fs_fs/fs.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_fs_fs/fs.c Fri Apr  5 05:29:29 2013
@@ -184,7 +184,7 @@ static fs_vtable_t fs_vtable = {
   svn_fs_fs__unlock,
   svn_fs_fs__get_lock,
   svn_fs_fs__get_locks,
-  svn_fs_fs__verify_rev,
+  svn_fs_fs__verify_root,
   fs_freeze,
   fs_set_errcall
 };
@@ -400,6 +400,17 @@ fs_get_description(void)
   return _("Module for working with a plain file (FSFS) repository.");
 }
 
+static svn_error_t *
+fs_set_svn_fs_open(svn_fs_t *fs,
+                   svn_error_t *(*svn_fs_open_)(svn_fs_t **,
+                                                const char *,
+                                                apr_hash_t *,
+                                                apr_pool_t *))
+{
+  fs_fs_data_t *ffd = fs->fsap_data;
+  ffd->svn_fs_open_ = svn_fs_open_;
+  return SVN_NO_ERROR;
+}
 
 
 /* Base FS library vtable, used by the FS loader library. */
@@ -416,7 +427,9 @@ static fs_library_vtable_t library_vtabl
   fs_get_description,
   svn_fs_fs__recover,
   fs_pack,
-  fs_logfiles
+  fs_logfiles,
+  NULL /* parse_id */,
+  fs_set_svn_fs_open
 };
 
 svn_error_t *

Modified: subversion/branches/verify-keep-going/subversion/libsvn_fs_fs/fs.h
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_fs_fs/fs.h?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_fs_fs/fs.h (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_fs_fs/fs.h Fri Apr  5 05:29:29 2013
@@ -362,6 +362,10 @@ typedef struct fs_fs_data_t
   /* Maximum number of length of the linear part at the top of the
    * deltification history after which skip deltas will be used. */
   apr_int64_t max_linear_deltification;
+
+  /* Pointer to svn_fs_open. */
+  svn_error_t *(*svn_fs_open_)(svn_fs_t **, const char *, apr_hash_t *,
+                               apr_pool_t *);
 } fs_fs_data_t;
 
 

Modified: subversion/branches/verify-keep-going/subversion/libsvn_fs_fs/fs_fs.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_fs_fs/fs_fs.c?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_fs_fs/fs_fs.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_fs_fs/fs_fs.c Fri Apr  5 05:29:29 2013
@@ -1796,7 +1796,7 @@ static svn_error_t * read_header_block(a
 
       /* header_str is safely in our pool, so we can use bits of it as
          key and value. */
-      apr_hash_set(*headers, name, APR_HASH_KEY_STRING, value);
+      svn_hash_sets(*headers, name, value);
     }
 
   return SVN_NO_ERROR;
@@ -2355,7 +2355,7 @@ svn_fs_fs__read_noderev(node_revision_t 
   noderev = apr_pcalloc(pool, sizeof(*noderev));
 
   /* Read the node-rev id. */
-  value = apr_hash_get(headers, HEADER_ID, APR_HASH_KEY_STRING);
+  value = svn_hash_gets(headers, HEADER_ID);
   if (value == NULL)
       /* ### More information: filename/offset coordinates */
       return svn_error_create(SVN_ERR_FS_CORRUPT, NULL,
@@ -2367,7 +2367,7 @@ svn_fs_fs__read_noderev(node_revision_t 
   noderev_id = value; /* for error messages later */
 
   /* Read the type. */
-  value = apr_hash_get(headers, HEADER_TYPE, APR_HASH_KEY_STRING);
+  value = svn_hash_gets(headers, HEADER_TYPE);
 
   if ((value == NULL) ||
       (strcmp(value, KIND_FILE) != 0 && strcmp(value, KIND_DIR)))
@@ -2380,14 +2380,14 @@ svn_fs_fs__read_noderev(node_revision_t 
     : svn_node_dir;
 
   /* Read the 'count' field. */
-  value = apr_hash_get(headers, HEADER_COUNT, APR_HASH_KEY_STRING);
+  value = svn_hash_gets(headers, HEADER_COUNT);
   if (value)
     SVN_ERR(svn_cstring_atoi(&noderev->predecessor_count, value));
   else
     noderev->predecessor_count = 0;
 
   /* Get the properties location. */
-  value = apr_hash_get(headers, HEADER_PROPS, APR_HASH_KEY_STRING);
+  value = svn_hash_gets(headers, HEADER_PROPS);
   if (value)
     {
       SVN_ERR(read_rep_offsets(&noderev->prop_rep, value,
@@ -2395,7 +2395,7 @@ svn_fs_fs__read_noderev(node_revision_t 
     }
 
   /* Get the data location. */
-  value = apr_hash_get(headers, HEADER_TEXT, APR_HASH_KEY_STRING);
+  value = svn_hash_gets(headers, HEADER_TEXT);
   if (value)
     {
       SVN_ERR(read_rep_offsets(&noderev->data_rep, value,
@@ -2404,7 +2404,7 @@ svn_fs_fs__read_noderev(node_revision_t 
     }
 
   /* Get the created path. */
-  value = apr_hash_get(headers, HEADER_CPATH, APR_HASH_KEY_STRING);
+  value = svn_hash_gets(headers, HEADER_CPATH);
   if (value == NULL)
     {
       return svn_error_createf(SVN_ERR_FS_CORRUPT, NULL,
@@ -2417,13 +2417,13 @@ svn_fs_fs__read_noderev(node_revision_t 
     }
 
   /* Get the predecessor ID. */
-  value = apr_hash_get(headers, HEADER_PRED, APR_HASH_KEY_STRING);
+  value = svn_hash_gets(headers, HEADER_PRED);
   if (value)
     noderev->predecessor_id = svn_fs_fs__id_parse(value, strlen(value),
                                                   pool);
 
   /* Get the copyroot. */
-  value = apr_hash_get(headers, HEADER_COPYROOT, APR_HASH_KEY_STRING);
+  value = svn_hash_gets(headers, HEADER_COPYROOT);
   if (value == NULL)
     {
       noderev->copyroot_path = apr_pstrdup(pool, noderev->created_path);
@@ -2449,7 +2449,7 @@ svn_fs_fs__read_noderev(node_revision_t 
     }
 
   /* Get the copyfrom. */
-  value = apr_hash_get(headers, HEADER_COPYFROM, APR_HASH_KEY_STRING);
+  value = svn_hash_gets(headers, HEADER_COPYFROM);
   if (value == NULL)
     {
       noderev->copyfrom_path = NULL;
@@ -2473,18 +2473,18 @@ svn_fs_fs__read_noderev(node_revision_t 
     }
 
   /* Get whether this is a fresh txn root. */
-  value = apr_hash_get(headers, HEADER_FRESHTXNRT, APR_HASH_KEY_STRING);
+  value = svn_hash_gets(headers, HEADER_FRESHTXNRT);
   noderev->is_fresh_txn_root = (value != NULL);
 
   /* Get the mergeinfo count. */
-  value = apr_hash_get(headers, HEADER_MINFO_CNT, APR_HASH_KEY_STRING);
+  value = svn_hash_gets(headers, HEADER_MINFO_CNT);
   if (value)
     SVN_ERR(svn_cstring_atoi64(&noderev->mergeinfo_count, value));
   else
     noderev->mergeinfo_count = 0;
 
   /* Get whether *this* node has mergeinfo. */
-  value = apr_hash_get(headers, HEADER_MINFO_HERE, APR_HASH_KEY_STRING);
+  value = svn_hash_gets(headers, HEADER_MINFO_HERE);
   noderev->has_mergeinfo = (value != NULL);
 
   *noderev_p = noderev;
@@ -2801,7 +2801,7 @@ get_fs_id_at_offset(svn_fs_id_t **id_p,
   /* In error messages, the offset is relative to the pack file,
      not to the rev file. */
 
-  node_id_str = apr_hash_get(headers, HEADER_ID, APR_HASH_KEY_STRING);
+  node_id_str = svn_hash_gets(headers, HEADER_ID);
 
   if (node_id_str == NULL)
     return svn_error_createf(SVN_ERR_FS_CORRUPT, NULL,
@@ -5544,7 +5544,7 @@ parse_dir_entries(apr_hash_t **entries_p
 
       dirent->id = svn_fs_fs__id_parse(str, strlen(str), pool);
 
-      apr_hash_set(*entries_p, dirent->name, APR_HASH_KEY_STRING, dirent);
+      svn_hash_sets(*entries_p, dirent->name, dirent);
     }
 
   return SVN_NO_ERROR;
@@ -5638,7 +5638,7 @@ svn_fs_fs__rep_contents_dir_entry(svn_fs
                                           scratch_pool));
 
       /* find desired entry and return a copy in POOL, if found */
-      entry = apr_hash_get(entries, name, APR_HASH_KEY_STRING);
+      entry = svn_hash_gets(entries, name);
       if (entry != NULL)
         {
           entry_copy = apr_palloc(result_pool, sizeof(*entry_copy));
@@ -6622,7 +6622,7 @@ svn_fs_fs__change_txn_props(svn_fs_txn_t
     {
       svn_prop_t *prop = &APR_ARRAY_IDX(props, i, svn_prop_t);
 
-      apr_hash_set(txn_prop, prop->name, APR_HASH_KEY_STRING, prop->value);
+      svn_hash_sets(txn_prop, prop->name, prop->value);
     }
 
   /* Create a new version of the file and write out the new props. */
@@ -8262,6 +8262,51 @@ write_current(svn_fs_t *fs, svn_revnum_t
   return move_into_place(tmp_name, name, name, pool);
 }
 
+/* Open a new svn_fs_t handle to FS, set that handle's concept of "current
+   youngest revision" to NEW_REV, and call svn_fs_fs__verify_root() on
+   NEW_REV's revision root.
+
+   Intended to be called as the very last step in a commit before 'current'
+   is bumped.  This implies that we are holding the write lock. */
+static svn_error_t *
+verify_as_revision_before_current_plus_plus(svn_fs_t *fs,
+                                            svn_revnum_t new_rev,
+                                            apr_pool_t *pool)
+{
+#ifdef SVN_DEBUG
+  fs_fs_data_t *ffd = fs->fsap_data;
+  svn_fs_t *ft; /* fs++ == ft */
+  svn_fs_root_t *root;
+  fs_fs_data_t *ft_ffd;
+  apr_hash_t *fs_config;
+
+  SVN_ERR_ASSERT(ffd->svn_fs_open_);
+
+  /* make sure FT does not simply return data cached by other instances
+   * but actually retrieves it from disk at least once.
+   */
+  fs_config = apr_hash_make(pool);
+  svn_hash_sets(fs_config, SVN_FS_CONFIG_FSFS_CACHE_NS,
+                           svn_uuid_generate(pool));
+  SVN_ERR(ffd->svn_fs_open_(&ft, fs->path,
+                            fs_config,
+                            pool));
+  ft_ffd = ft->fsap_data;
+  /* Don't let FT consult rep-cache.db, either. */
+  ft_ffd->rep_sharing_allowed = FALSE;
+
+  /* Time travel! */
+  ft_ffd->youngest_rev_cache = new_rev;
+
+  SVN_ERR(svn_fs_fs__revision_root(&root, ft, new_rev, pool));
+  SVN_ERR_ASSERT(root->is_txn_root == FALSE && root->rev == new_rev);
+  SVN_ERR_ASSERT(ft_ffd->youngest_rev_cache == new_rev);
+  SVN_ERR(svn_fs_fs__verify_root(root, pool));
+#endif /* SVN_DEBUG */
+
+  return SVN_NO_ERROR;
+}
+
 /* Update the 'current' file to hold the correct next node and copy_ids
    from transaction TXN_ID in filesystem FS.  The current revision is
    set to REV.  Perform temporary allocations in POOL. */
@@ -8336,7 +8381,7 @@ verify_locks(svn_fs_t *fs,
         continue;
 
       /* Fetch the change associated with our path.  */
-      change = apr_hash_get(changes, path, APR_HASH_KEY_STRING);
+      change = svn_hash_gets(changes, path);
 
       /* What does it mean to succeed at lock verification for a given
          path?  For an existing file or directory getting modified
@@ -8455,14 +8500,13 @@ commit_body(void *baton, apr_pool_t *poo
   txnprop_list = apr_array_make(pool, 3, sizeof(svn_prop_t));
   prop.value = NULL;
 
-  if (apr_hash_get(txnprops, SVN_FS__PROP_TXN_CHECK_OOD, APR_HASH_KEY_STRING))
+  if (svn_hash_gets(txnprops, SVN_FS__PROP_TXN_CHECK_OOD))
     {
       prop.name = SVN_FS__PROP_TXN_CHECK_OOD;
       APR_ARRAY_PUSH(txnprop_list, svn_prop_t) = prop;
     }
 
-  if (apr_hash_get(txnprops, SVN_FS__PROP_TXN_CHECK_LOCKS,
-                   APR_HASH_KEY_STRING))
+  if (svn_hash_gets(txnprops, SVN_FS__PROP_TXN_CHECK_LOCKS))
     {
       prop.name = SVN_FS__PROP_TXN_CHECK_LOCKS;
       APR_ARRAY_PUSH(txnprop_list, svn_prop_t) = prop;
@@ -8533,6 +8577,7 @@ commit_body(void *baton, apr_pool_t *poo
                           old_rev_filename, pool));
 
   /* Update the 'current' file. */
+  SVN_ERR(verify_as_revision_before_current_plus_plus(cb->fs, new_rev, pool));
   SVN_ERR(write_final_current(cb->fs, cb->txn->id, new_rev, start_node_id,
                               start_copy_id, pool));
 
@@ -8670,7 +8715,7 @@ write_revision_zero(svn_fs_t *fs)
   date.data = svn_time_to_cstring(apr_time_now(), fs->pool);
   date.len = strlen(date.data);
   proplist = apr_hash_make(fs->pool);
-  apr_hash_set(proplist, SVN_PROP_REVISION_DATE, APR_HASH_KEY_STRING, &date);
+  svn_hash_sets(proplist, SVN_PROP_REVISION_DATE, &date);
   return set_revision_proplist(fs, 0, proplist, fs->pool);
 }
 
@@ -8686,17 +8731,13 @@ svn_fs_fs__create(svn_fs_t *fs,
   /* See if compatibility with older versions was explicitly requested. */
   if (fs->config)
     {
-      if (apr_hash_get(fs->config, SVN_FS_CONFIG_PRE_1_4_COMPATIBLE,
-                                   APR_HASH_KEY_STRING))
+      if (svn_hash_gets(fs->config, SVN_FS_CONFIG_PRE_1_4_COMPATIBLE))
         format = 1;
-      else if (apr_hash_get(fs->config, SVN_FS_CONFIG_PRE_1_5_COMPATIBLE,
-                                        APR_HASH_KEY_STRING))
+      else if (svn_hash_gets(fs->config, SVN_FS_CONFIG_PRE_1_5_COMPATIBLE))
         format = 2;
-      else if (apr_hash_get(fs->config, SVN_FS_CONFIG_PRE_1_6_COMPATIBLE,
-                                        APR_HASH_KEY_STRING))
+      else if (svn_hash_gets(fs->config, SVN_FS_CONFIG_PRE_1_6_COMPATIBLE))
         format = 3;
-      else if (apr_hash_get(fs->config, SVN_FS_CONFIG_PRE_1_8_COMPATIBLE,
-                                        APR_HASH_KEY_STRING))
+      else if (svn_hash_gets(fs->config, SVN_FS_CONFIG_PRE_1_8_COMPATIBLE))
         format = 4;
     }
   ffd->format = format;
@@ -8900,13 +8941,13 @@ recover_find_max_ids(svn_fs_t *fs, svn_r
                             pool));
 
   /* Check that this is a directory.  It should be. */
-  value = apr_hash_get(headers, HEADER_TYPE, APR_HASH_KEY_STRING);
+  value = svn_hash_gets(headers, HEADER_TYPE);
   if (value == NULL || strcmp(value, KIND_DIR) != 0)
     return svn_error_create(SVN_ERR_FS_CORRUPT, NULL,
                             _("Recovery encountered a non-directory node"));
 
   /* Get the data location.  No data location indicates an empty directory. */
-  value = apr_hash_get(headers, HEADER_TEXT, APR_HASH_KEY_STRING);
+  value = svn_hash_gets(headers, HEADER_TEXT);
   if (!value)
     return SVN_NO_ERROR;
   SVN_ERR(read_rep_offsets(&data_rep, value, NULL, FALSE, pool));
@@ -9361,7 +9402,7 @@ svn_fs_fs__get_node_origin(const svn_fs_
   if (node_origins)
     {
       svn_string_t *origin_id_str =
-        apr_hash_get(node_origins, node_id, APR_HASH_KEY_STRING);
+        svn_hash_gets(node_origins, node_id);
       if (origin_id_str)
         *origin_id = svn_fs_fs__id_parse(origin_id_str->data,
                                          origin_id_str->len, pool);
@@ -9396,7 +9437,7 @@ set_node_origins_for_file(svn_fs_t *fs,
   if (! origins_hash)
     origins_hash = apr_hash_make(pool);
 
-  old_node_rev_id = apr_hash_get(origins_hash, node_id, APR_HASH_KEY_STRING);
+  old_node_rev_id = svn_hash_gets(origins_hash, node_id);
 
   if (old_node_rev_id && !svn_string_compare(node_rev_id, old_node_rev_id))
     return svn_error_createf(SVN_ERR_FS_CORRUPT, NULL,
@@ -9405,7 +9446,7 @@ set_node_origins_for_file(svn_fs_t *fs,
                                "(%s)"),
                              node_id, old_node_rev_id->data, node_rev_id->data);
 
-  apr_hash_set(origins_hash, node_id, APR_HASH_KEY_STRING, node_rev_id);
+  svn_hash_sets(origins_hash, node_id, node_rev_id);
 
   /* Sure, there's a race condition here.  Two processes could be
      trying to add different cache elements to the same file at the
@@ -9586,7 +9627,7 @@ svn_fs_fs__revision_prop(svn_string_t **
   SVN_ERR(svn_fs__check_fs(fs, TRUE));
   SVN_ERR(svn_fs_fs__revision_proplist(&table, fs, rev, pool));
 
-  *value_p = apr_hash_get(table, propname, APR_HASH_KEY_STRING);
+  *value_p = svn_hash_gets(table, propname);
 
   return SVN_NO_ERROR;
 }
@@ -9615,8 +9656,7 @@ change_rev_prop_body(void *baton, apr_po
   if (cb->old_value_p)
     {
       const svn_string_t *wanted_value = *cb->old_value_p;
-      const svn_string_t *present_value = apr_hash_get(table, cb->name,
-                                                       APR_HASH_KEY_STRING);
+      const svn_string_t *present_value = svn_hash_gets(table, cb->name);
       if ((!wanted_value != !present_value)
           || (wanted_value && present_value
               && !svn_string_compare(wanted_value, present_value)))
@@ -9629,7 +9669,7 @@ change_rev_prop_body(void *baton, apr_po
         }
       /* Fall through. */
     }
-  apr_hash_set(table, cb->name, APR_HASH_KEY_STRING, cb->value);
+  svn_hash_sets(table, cb->name, cb->value);
 
   return set_revision_proplist(cb->fs, cb->rev, table, pool);
 }
@@ -9688,7 +9728,7 @@ svn_fs_fs__txn_prop(svn_string_t **value
   SVN_ERR(svn_fs__check_fs(fs, TRUE));
   SVN_ERR(svn_fs_fs__txn_proplist(&table, txn, pool));
 
-  *value_p = apr_hash_get(table, propname, APR_HASH_KEY_STRING);
+  *value_p = svn_hash_gets(table, propname);
 
   return SVN_NO_ERROR;
 }
@@ -10418,7 +10458,7 @@ svn_fs_fs__verify(svn_fs_t *fs,
       baton->notify_func = notify_func;
       baton->notify_baton = notify_baton;
       
-      /* tell the user that we are now read to do *something* */
+      /* tell the user that we are now ready to do *something* */
       if (notify_func)
         notify_func(SVN_INVALID_REVNUM, notify_baton, baton->pool);
 
@@ -10437,29 +10477,6 @@ svn_fs_fs__verify(svn_fs_t *fs,
   return SVN_NO_ERROR;
 }
 
-svn_error_t *
-svn_fs_fs__verify_rev(svn_fs_t *fs,
-                      svn_revnum_t revision,
-                      apr_pool_t *pool)
-{
-  svn_fs_root_t *root;
-
-  /* Issue #4129: bogus pred-counts and minfo-cnt's on the root node-rev
-     (and elsewhere).  This code makes more thorough checks than the
-     commit-time checks in validate_root_noderev(). */
-
-  /* ### TODO: Make sure caches are disabled.
-
-     When this code is called in the library, we want to ensure we
-     use the on-disk data --- rather than some data that was read
-     in the possibly-distance past and cached since. */
-  SVN_ERR(svn_fs_fs__revision_root(&root, fs, revision, pool));
-  SVN_ERR(svn_fs_fs__verify_root(root, pool));
-
-  return SVN_NO_ERROR;
-}
-
-
 
 /** Hotcopy. **/
 

Modified: subversion/branches/verify-keep-going/subversion/libsvn_fs_fs/fs_fs.h
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_fs_fs/fs_fs.h?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_fs_fs/fs_fs.h (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_fs_fs/fs_fs.h Fri Apr  5 05:29:29 2013
@@ -52,13 +52,6 @@ svn_error_t *svn_fs_fs__verify(svn_fs_t 
                                void *cancel_baton,
                                apr_pool_t *pool);
 
-/* Verify metadata of REVISION in filesystem FS.
- * Use POOL for temporary allocations. */
-svn_error_t *
-svn_fs_fs__verify_rev(svn_fs_t *fs,
-                      svn_revnum_t revision,
-                      apr_pool_t *pool);
-
 /* Copy the fsfs filesystem SRC_FS at SRC_PATH into a new copy DST_FS at
  * DST_PATH. If INCREMENTAL is TRUE, do not re-copy data which already
  * exists in DST_FS. Use POOL for temporary allocations. */

Modified: subversion/branches/verify-keep-going/subversion/libsvn_fs_fs/lock.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_fs_fs/lock.c?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_fs_fs/lock.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_fs_fs/lock.c Fri Apr  5 05:29:29 2013
@@ -105,7 +105,7 @@ hash_fetch(apr_hash_t *hash,
            const char *key,
            apr_pool_t *pool)
 {
-  svn_string_t *str = apr_hash_get(hash, key, APR_HASH_KEY_STRING);
+  svn_string_t *str = svn_hash_gets(hash, key);
   return str ? str->data : NULL;
 }
 
@@ -324,8 +324,8 @@ read_digest_file(apr_hash_t **children_p
 
       for (i = 0; i < kiddos->nelts; i++)
         {
-          apr_hash_set(*children_p, APR_ARRAY_IDX(kiddos, i, const char *),
-                       APR_HASH_KEY_STRING, (void *)1);
+          svn_hash_sets(*children_p, APR_ARRAY_IDX(kiddos, i, const char *),
+                        (void *)1);
         }
     }
   return SVN_NO_ERROR;
@@ -387,11 +387,9 @@ set_lock(const char *fs_path,
       else
         {
           /* If we already have an entry for this path, we're done. */
-          if (apr_hash_get(this_children, lock_digest_path,
-                           APR_HASH_KEY_STRING))
+          if (svn_hash_gets(this_children, lock_digest_path))
             break;
-          apr_hash_set(this_children, lock_digest_path,
-                       APR_HASH_KEY_STRING, (void *)1);
+          svn_hash_sets(this_children, lock_digest_path, (void *)1);
         }
       SVN_ERR(write_digest_file(this_children, this_lock, fs_path,
                                 digest_path, perms_reference, subpool));
@@ -448,7 +446,7 @@ delete_lock(svn_fs_t *fs,
         }
 
       if (child_to_kill)
-        apr_hash_set(this_children, child_to_kill, APR_HASH_KEY_STRING, NULL);
+        svn_hash_sets(this_children, child_to_kill, NULL);
 
       if (! (this_lock || apr_hash_count(this_children) != 0))
         {
@@ -690,8 +688,7 @@ verify_lock(svn_fs_t *fs,
        _("User '%s' does not own lock on path '%s' (currently locked by '%s')"),
        fs->access_ctx->username, lock->path, lock->owner);
 
-  else if (apr_hash_get(fs->access_ctx->lock_tokens, lock->token,
-                        APR_HASH_KEY_STRING) == NULL)
+  else if (svn_hash_gets(fs->access_ctx->lock_tokens, lock->token) == NULL)
     return svn_error_createf
       (SVN_ERR_FS_BAD_LOCK_TOKEN, NULL,
        _("Cannot verify lock on path '%s'; no matching lock-token available"),

Modified: subversion/branches/verify-keep-going/subversion/libsvn_fs_fs/temp_serializer.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_fs_fs/temp_serializer.c?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_fs_fs/temp_serializer.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_fs_fs/temp_serializer.c Fri Apr  5 05:29:29 2013
@@ -360,7 +360,7 @@ deserialize_dir(void *buffer, hash_data_
       svn_fs_fs__id_deserialize(entry, (svn_fs_id_t **)&entry->id);
 
       /* add the entry to the hash */
-      apr_hash_set(result, entry->name, APR_HASH_KEY_STRING, entry);
+      svn_hash_sets(result, entry->name, entry);
     }
 
   /* return the now complete hash */
@@ -949,10 +949,7 @@ slowly_replace_dir_entry(void **data,
                                              *data,
                                              hash_data->len,
                                              pool));
-  apr_hash_set(dir,
-               replace_baton->name,
-               APR_HASH_KEY_STRING,
-               replace_baton->new_entry);
+  svn_hash_sets(dir, replace_baton->name, replace_baton->new_entry);
 
   return svn_fs_fs__serialize_dir_entries(data, data_len, dir, pool);
 }

Modified: subversion/branches/verify-keep-going/subversion/libsvn_fs_fs/tree.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_fs_fs/tree.c?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_fs_fs/tree.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_fs_fs/tree.c Fri Apr  5 05:29:29 2013
@@ -41,6 +41,7 @@
 #include <apr_pools.h>
 #include <apr_hash.h>
 
+#include "svn_hash.h"
 #include "svn_private_config.h"
 #include "svn_pools.h"
 #include "svn_error.h"
@@ -115,6 +116,8 @@ typedef struct fs_rev_root_data_t
 
 typedef struct fs_txn_root_data_t
 {
+  const char *txn_id;
+
   /* Cache of txn DAG nodes (without their nested noderevs, because
    * it's mutable). Same keys/values as ffd->rev_node_cache. */
   svn_cache__t *txn_node_cache;
@@ -585,12 +588,10 @@ svn_fs_fs__txn_root(svn_fs_root_t **root
   SVN_ERR(svn_fs_fs__txn_proplist(&txnprops, txn, pool));
   if (txnprops)
     {
-      if (apr_hash_get(txnprops, SVN_FS__PROP_TXN_CHECK_OOD,
-                       APR_HASH_KEY_STRING))
+      if (svn_hash_gets(txnprops, SVN_FS__PROP_TXN_CHECK_OOD))
         flags |= SVN_FS_TXN_CHECK_OOD;
 
-      if (apr_hash_get(txnprops, SVN_FS__PROP_TXN_CHECK_LOCKS,
-                       APR_HASH_KEY_STRING))
+      if (svn_hash_gets(txnprops, SVN_FS__PROP_TXN_CHECK_LOCKS))
         flags |= SVN_FS_TXN_CHECK_LOCKS;
     }
 
@@ -1359,7 +1360,7 @@ fs_node_prop(svn_string_t **value_p,
   SVN_ERR(svn_fs_fs__dag_get_proplist(&proplist, node, pool));
   *value_p = NULL;
   if (proplist)
-    *value_p = apr_hash_get(proplist, propname, APR_HASH_KEY_STRING);
+    *value_p = svn_hash_gets(proplist, propname);
 
   return SVN_NO_ERROR;
 }
@@ -1460,7 +1461,7 @@ fs_change_node_prop(svn_fs_root_t *root,
     }
 
   /* Set the property. */
-  apr_hash_set(proplist, name, APR_HASH_KEY_STRING, value);
+  svn_hash_sets(proplist, name, value);
 
   /* Overwrite the node's proplist. */
   SVN_ERR(svn_fs_fs__dag_set_proplist(parent_path->node, proplist,
@@ -2177,6 +2178,67 @@ fs_dir_entries(apr_hash_t **table_p,
   return svn_fs_fs__dag_dir_entries(table_p, node, pool);
 }
 
+/* Return a copy of PATH, allocated from POOL, for which newlines
+   have been escaped using the form \NNN (where NNN is the
+   octal representation of the byte's ordinal value).  */
+static const char *
+escape_newline(const char *path, apr_pool_t *pool)
+{
+  svn_stringbuf_t *retstr;
+  apr_size_t i, copied = 0;
+  int c;
+
+  /* At least one control character:
+      strlen - 1 (control) + \ + N + N + N + null . */
+  retstr = svn_stringbuf_create_ensure(strlen(path) + 4, pool);
+  for (i = 0; path[i]; i++)
+    {
+      c = (unsigned char)path[i];
+      if (c != '\n')
+        continue;
+
+      /* First things first, copy all the good stuff that we haven't
+         yet copied into our output buffer. */
+      if (i - copied)
+        svn_stringbuf_appendbytes(retstr, path + copied,
+                                  i - copied);
+
+      /* Make sure buffer is big enough for '\' 'N' 'N' 'N' (and NUL) */
+      svn_stringbuf_ensure(retstr, retstr->len + 4);
+      /*### The backslash separator doesn't work too great with Windows,
+         but it's what we'll use for consistency with invalid utf8
+         formatting (until someone has a better idea) */
+      apr_snprintf(retstr->data + retstr->len, 5, "\\%03o", (unsigned char)c);
+      retstr->len += 4;
+
+      /* Finally, update our copy counter. */
+      copied = i + 1;
+    }
+
+  /* Anything left to copy? */
+  if (i - copied)
+    svn_stringbuf_appendbytes(retstr, path + copied, i - copied);
+
+  /* retstr is null-terminated either by apr_snprintf or the svn_stringbuf
+     functions. */
+
+  return retstr->data;
+}
+
+/* Raise an error if PATH contains a newline because FSFS cannot handle
+ * such paths. See issue #4340. */
+static svn_error_t *
+check_newline(const char *path, apr_pool_t *pool)
+{
+  char *c = strchr(path, '\n');
+
+  if (c)
+    return svn_error_createf(SVN_ERR_FS_PATH_SYNTAX, NULL,
+       _("Invalid control character '0x%02x' in path '%s'"),
+       (unsigned char)*c, escape_newline(path, pool));
+
+  return SVN_NO_ERROR;
+}
 
 /* Create a new directory named PATH in ROOT.  The new directory has
    no entries, and no properties.  ROOT must be the root of a
@@ -2191,6 +2253,8 @@ fs_make_dir(svn_fs_root_t *root,
   dag_node_t *sub_dir;
   const char *txn_id = root->txn;
 
+  SVN_ERR(check_newline(path, pool));
+
   path = svn_fs__canonicalize_abspath(path, pool);
   SVN_ERR(open_path(&parent_path, root, path, open_path_last_optional,
                     txn_id, pool));
@@ -2443,6 +2507,8 @@ fs_copy(svn_fs_root_t *from_root,
         const char *to_path,
         apr_pool_t *pool)
 {
+  SVN_ERR(check_newline(to_path, pool));
+
   return svn_error_trace(copy_helper(from_root,
                                      svn_fs__canonicalize_abspath(from_path,
                                                                   pool),
@@ -2490,7 +2556,7 @@ fs_copied_from(svn_revnum_t *rev_p,
      entry. */
   if (! root->is_txn_root) {
     fs_rev_root_data_t *frd = root->fsap_data;
-    copyfrom_str = apr_hash_get(frd->copyfrom_cache, path, APR_HASH_KEY_STRING);
+    copyfrom_str = svn_hash_gets(frd->copyfrom_cache, path);
   }
 
   if (copyfrom_str)
@@ -2541,6 +2607,8 @@ fs_make_file(svn_fs_root_t *root,
   dag_node_t *child;
   const char *txn_id = root->txn;
 
+  SVN_ERR(check_newline(path, pool));
+
   path = svn_fs__canonicalize_abspath(path, pool);
   SVN_ERR(open_path(&parent_path, root, path, open_path_last_optional,
                    txn_id, pool));
@@ -3751,8 +3819,7 @@ crawl_directory_dag_for_mergeinfo(svn_fs
           svn_error_t *err;
 
           SVN_ERR(svn_fs_fs__dag_get_proplist(&proplist, kid_dag, iterpool));
-          mergeinfo_string = apr_hash_get(proplist, SVN_PROP_MERGEINFO,
-                                          APR_HASH_KEY_STRING);
+          mergeinfo_string = svn_hash_gets(proplist, SVN_PROP_MERGEINFO);
           if (!mergeinfo_string)
             {
               svn_string_t *idstr = svn_fs_fs__id_unparse(dirent->id, iterpool);
@@ -3777,10 +3844,8 @@ crawl_directory_dag_for_mergeinfo(svn_fs
               }
           else
             {
-              apr_hash_set(result_catalog,
-                           apr_pstrdup(result_pool, kid_path),
-                           APR_HASH_KEY_STRING,
-                           kid_mergeinfo);
+              svn_hash_sets(result_catalog, apr_pstrdup(result_pool, kid_path),
+                            kid_mergeinfo);
             }
         }
 
@@ -3872,8 +3937,7 @@ get_mergeinfo_for_path_internal(svn_merg
 
   SVN_ERR(svn_fs_fs__dag_get_proplist(&proplist, nearest_ancestor->node,
                                       scratch_pool));
-  mergeinfo_string = apr_hash_get(proplist, SVN_PROP_MERGEINFO,
-                                  APR_HASH_KEY_STRING);
+  mergeinfo_string = svn_hash_gets(proplist, SVN_PROP_MERGEINFO);
   if (!mergeinfo_string)
     return svn_error_createf
       (SVN_ERR_FS_CORRUPT, NULL,
@@ -4044,8 +4108,7 @@ get_mergeinfos_for_paths(svn_fs_root_t *
         }
 
       if (path_mergeinfo)
-        apr_hash_set(result_catalog, path, APR_HASH_KEY_STRING,
-                     path_mergeinfo);
+        svn_hash_sets(result_catalog, path, path_mergeinfo);
       if (include_descendants)
         SVN_ERR(add_descendant_mergeinfo(result_catalog, root, path,
                                          result_pool, scratch_pool));
@@ -4181,6 +4244,8 @@ make_txn_root(svn_fs_root_t **root_p,
   root->txn_flags = flags;
   root->rev = base_rev;
 
+  frd->txn_id = txn;
+
   /* Because this cache actually tries to invalidate elements, keep
      the number of elements per page down.
 
@@ -4331,23 +4396,41 @@ svn_error_t *
 svn_fs_fs__verify_root(svn_fs_root_t *root,
                        apr_pool_t *pool)
 {
-  fs_rev_root_data_t *frd;
+  svn_fs_t *fs = root->fs;
+  dag_node_t *root_dir;
+
+  /* Issue #4129: bogus pred-counts and minfo-cnt's on the root node-rev
+     (and elsewhere).  This code makes more thorough checks than the
+     commit-time checks in validate_root_noderev(). */
+
+  /* Callers should disable caches by setting SVN_FS_CONFIG_FSFS_CACHE_NS;
+     see r1462436.
+
+     When this code is called in the library, we want to ensure we
+     use the on-disk data --- rather than some data that was read
+     in the possibly-distance past and cached since. */
 
   if (root->is_txn_root)
-    /* ### Not implemented */
-    return SVN_NO_ERROR;
-  frd = root->fsap_data;
+    {
+      fs_txn_root_data_t *frd = root->fsap_data;
+      SVN_ERR(svn_fs_fs__dag_txn_root(&root_dir, fs, frd->txn_id, pool));
+    }
+  else
+    {
+      fs_rev_root_data_t *frd = root->fsap_data;
+      root_dir = frd->root_dir;
+    }
 
   /* Recursively verify ROOT_DIR. */
-  SVN_ERR(verify_node(frd->root_dir, root->rev, pool));
+  SVN_ERR(verify_node(root_dir, root->rev, pool));
 
   /* Verify explicitly the predecessor of the root. */
   {
     const svn_fs_id_t *pred_id;
 
     /* Only r0 should have no predecessor. */
-    SVN_ERR(svn_fs_fs__dag_get_predecessor_id(&pred_id, frd->root_dir));
-    if (!!pred_id != !!root->rev)
+    SVN_ERR(svn_fs_fs__dag_get_predecessor_id(&pred_id, root_dir));
+    if (! root->is_txn_root && !!pred_id != !!root->rev)
       return svn_error_createf(SVN_ERR_FS_CORRUPT, NULL,
                                "r%ld's root node's predecessor is "
                                "unexpectedly '%s'",
@@ -4355,17 +4438,28 @@ svn_fs_fs__verify_root(svn_fs_root_t *ro
                                (pred_id
                                 ? svn_fs_fs__id_unparse(pred_id, pool)->data
                                 : "(null)"));
+    if (root->is_txn_root && !pred_id)
+      return svn_error_createf(SVN_ERR_FS_CORRUPT, NULL,
+                               "Transaction '%s''s root node's predecessor is "
+                               "unexpectedly NULL",
+                               root->txn);
 
     /* Check the predecessor's revision. */
     if (pred_id)
       {
         svn_revnum_t pred_rev = svn_fs_fs__id_rev(pred_id);
-        if (pred_rev+1 != root->rev)
+        if (! root->is_txn_root && pred_rev+1 != root->rev)
           /* Issue #4129. */
           return svn_error_createf(SVN_ERR_FS_CORRUPT, NULL,
                                    "r%ld's root node's predecessor is r%ld"
                                    " but should be r%ld",
                                    root->rev, pred_rev, root->rev - 1);
+        if (root->is_txn_root && pred_rev != root->rev)
+          return svn_error_createf(SVN_ERR_FS_CORRUPT, NULL,
+                                   "Transaction '%s''s root node's predecessor"
+                                   " is r%ld"
+                                   " but should be r%ld",
+                                   root->txn, pred_rev, root->rev);
       }
   }
 

Modified: subversion/branches/verify-keep-going/subversion/libsvn_fs_util/fs-util.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_fs_util/fs-util.c?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_fs_util/fs-util.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_fs_util/fs-util.c Fri Apr  5 05:29:29 2013
@@ -26,6 +26,7 @@
 #include <apr_pools.h>
 #include <apr_strings.h>
 
+#include "svn_hash.h"
 #include "svn_fs.h"
 #include "svn_dirent_uri.h"
 #include "svn_path.h"
@@ -213,8 +214,9 @@ svn_fs__append_to_merged_froms(svn_merge
       const char *path = svn__apr_hash_index_key(hi);
       svn_rangelist_t *rangelist = svn__apr_hash_index_val(hi);
 
-      apr_hash_set(*output, svn_fspath__join(path, rel_path, pool),
-                   APR_HASH_KEY_STRING, svn_rangelist_dup(rangelist, pool));
+      svn_hash_sets(*output,
+                    svn_fspath__join(path, rel_path, pool),
+                    svn_rangelist_dup(rangelist, pool));
     }
 
   return SVN_NO_ERROR;

Modified: subversion/branches/verify-keep-going/subversion/libsvn_ra/compat.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_ra/compat.c?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_ra/compat.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_ra/compat.c Fri Apr  5 05:29:29 2013
@@ -23,6 +23,7 @@
 
 #include <apr_pools.h>
 
+#include "svn_hash.h"
 #include "svn_error.h"
 #include "svn_pools.h"
 #include "svn_sorts.h"
@@ -91,7 +92,7 @@ prev_log_path(const char **prev_path_p,
   if (changed_paths)
     {
       /* See if PATH was explicitly changed in this revision. */
-      change = apr_hash_get(changed_paths, path, APR_HASH_KEY_STRING);
+      change = svn_hash_gets(changed_paths, path);
       if (change)
         {
           /* If PATH was not newly added in this revision, then it may or may

Modified: subversion/branches/verify-keep-going/subversion/libsvn_ra/deprecated.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_ra/deprecated.c?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_ra/deprecated.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_ra/deprecated.c Fri Apr  5 05:29:29 2013
@@ -26,6 +26,7 @@
    deprecated functions in this file. */
 #define SVN_DEPRECATED
 
+#include "svn_hash.h"
 #include "svn_ra.h"
 #include "svn_path.h"
 #include "svn_compat.h"
@@ -218,9 +219,8 @@ svn_error_t *svn_ra_get_commit_editor2(s
 {
   apr_hash_t *revprop_table = apr_hash_make(pool);
   if (log_msg)
-    apr_hash_set(revprop_table, SVN_PROP_REVISION_LOG,
-                 APR_HASH_KEY_STRING,
-                 svn_string_create(log_msg, pool));
+    svn_hash_sets(revprop_table, SVN_PROP_REVISION_LOG,
+                  svn_string_create(log_msg, pool));
   return svn_ra_get_commit_editor3(session, editor, edit_baton, revprop_table,
                                    commit_callback, commit_baton,
                                    lock_tokens, keep_locks, pool);

Modified: subversion/branches/verify-keep-going/subversion/libsvn_ra/ra_loader.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_ra/ra_loader.c?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_ra/ra_loader.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_ra/ra_loader.c Fri Apr  5 05:29:29 2013
@@ -33,6 +33,7 @@
 #include <apr_hash.h>
 #include <apr_uri.h>
 
+#include "svn_hash.h"
 #include "svn_version.h"
 #include "svn_types.h"
 #include "svn_error.h"
@@ -319,8 +320,7 @@ svn_error_t *svn_ra_open4(svn_ra_session
   if (config)
     {
       /* Grab the 'servers' config. */
-      servers = apr_hash_get(config, SVN_CONFIG_CATEGORY_SERVERS,
-                             APR_HASH_KEY_STRING);
+      servers = svn_hash_gets(config, SVN_CONFIG_CATEGORY_SERVERS);
       if (servers)
         {
           /* First, look in the global section. */
@@ -733,7 +733,7 @@ svn_error_t *svn_ra_get_file(svn_ra_sess
                              apr_hash_t **props,
                              apr_pool_t *pool)
 {
-  SVN_ERR_ASSERT(*path != '/');
+  SVN_ERR_ASSERT(svn_relpath_is_canonical(path));
   return session->vtable->get_file(session, path, revision, stream,
                                    fetched_rev, props, pool);
 }
@@ -747,7 +747,7 @@ svn_error_t *svn_ra_get_dir2(svn_ra_sess
                              apr_uint32_t dirent_fields,
                              apr_pool_t *pool)
 {
-  SVN_ERR_ASSERT(*path != '/');
+  SVN_ERR_ASSERT(svn_relpath_is_canonical(path));
   return session->vtable->get_dir(session, dirents, fetched_rev, props,
                                   path, revision, dirent_fields, pool);
 }
@@ -767,7 +767,7 @@ svn_error_t *svn_ra_get_mergeinfo(svn_ra
   for (i = 0; i < paths->nelts; i++)
     {
       const char *path = APR_ARRAY_IDX(paths, i, const char *);
-      SVN_ERR_ASSERT(*path != '/');
+      SVN_ERR_ASSERT(svn_relpath_is_canonical(path));
     }
 
   /* Check server Merge Tracking capability. */
@@ -892,7 +892,7 @@ svn_error_t *svn_ra_get_log2(svn_ra_sess
       for (i = 0; i < paths->nelts; i++)
         {
           const char *path = APR_ARRAY_IDX(paths, i, const char *);
-          SVN_ERR_ASSERT(*path != '/');
+          SVN_ERR_ASSERT(svn_relpath_is_canonical(path));
         }
     }
 
@@ -911,7 +911,7 @@ svn_error_t *svn_ra_check_path(svn_ra_se
                                svn_node_kind_t *kind,
                                apr_pool_t *pool)
 {
-  SVN_ERR_ASSERT(*path != '/');
+  SVN_ERR_ASSERT(svn_relpath_is_canonical(path));
   return session->vtable->check_path(session, path, revision, kind, pool);
 }
 
@@ -921,7 +921,7 @@ svn_error_t *svn_ra_stat(svn_ra_session_
                          svn_dirent_t **dirent,
                          apr_pool_t *pool)
 {
-  SVN_ERR_ASSERT(*path != '/');
+  SVN_ERR_ASSERT(svn_relpath_is_canonical(path));
   return session->vtable->stat(session, path, revision, dirent, pool);
 }
 
@@ -966,7 +966,7 @@ svn_error_t *svn_ra_get_locations(svn_ra
 {
   svn_error_t *err;
 
-  SVN_ERR_ASSERT(*path != '/');
+  SVN_ERR_ASSERT(svn_relpath_is_canonical(path));
   err = session->vtable->get_locations(session, locations, path,
                                        peg_revision, location_revisions, pool);
   if (err && (err->apr_err == SVN_ERR_RA_NOT_IMPLEMENTED))
@@ -993,7 +993,7 @@ svn_ra_get_location_segments(svn_ra_sess
 {
   svn_error_t *err;
 
-  SVN_ERR_ASSERT(*path != '/');
+  SVN_ERR_ASSERT(svn_relpath_is_canonical(path));
   err = session->vtable->get_location_segments(session, path, peg_revision,
                                                start_rev, end_rev,
                                                receiver, receiver_baton, pool);
@@ -1021,7 +1021,7 @@ svn_error_t *svn_ra_get_file_revs2(svn_r
 {
   svn_error_t *err;
 
-  SVN_ERR_ASSERT(*path != '/');
+  SVN_ERR_ASSERT(svn_relpath_is_canonical(path));
 
   if (include_merged_revisions)
     SVN_ERR(svn_ra__assert_mergeinfo_capable_server(session, NULL, pool));
@@ -1054,7 +1054,7 @@ svn_error_t *svn_ra_lock(svn_ra_session_
     {
       const char *path = svn__apr_hash_index_key(hi);
 
-      SVN_ERR_ASSERT(*path != '/');
+      SVN_ERR_ASSERT(svn_relpath_is_canonical(path));
     }
 
   if (comment && ! svn_xml_is_xml_safe(comment, strlen(comment)))
@@ -1079,7 +1079,7 @@ svn_error_t *svn_ra_unlock(svn_ra_sessio
     {
       const char *path = svn__apr_hash_index_key(hi);
 
-      SVN_ERR_ASSERT(*path != '/');
+      SVN_ERR_ASSERT(svn_relpath_is_canonical(path));
     }
 
   return session->vtable->unlock(session, path_tokens, break_lock,
@@ -1091,7 +1091,7 @@ svn_error_t *svn_ra_get_lock(svn_ra_sess
                              const char *path,
                              apr_pool_t *pool)
 {
-  SVN_ERR_ASSERT(*path != '/');
+  SVN_ERR_ASSERT(svn_relpath_is_canonical(path));
   return session->vtable->get_lock(session, lock, path, pool);
 }
 
@@ -1101,7 +1101,7 @@ svn_error_t *svn_ra_get_locks2(svn_ra_se
                                svn_depth_t depth,
                                apr_pool_t *pool)
 {
-  SVN_ERR_ASSERT(*path != '/');
+  SVN_ERR_ASSERT(svn_relpath_is_canonical(path));
   SVN_ERR_ASSERT((depth == svn_depth_empty) ||
                  (depth == svn_depth_files) ||
                  (depth == svn_depth_immediates) ||
@@ -1273,7 +1273,7 @@ svn_ra_get_deleted_rev(svn_ra_session_t 
   svn_error_t *err;
 
   /* Path must be relative. */
-  SVN_ERR_ASSERT(*path != '/');
+  SVN_ERR_ASSERT(svn_relpath_is_canonical(path));
 
   if (!SVN_IS_VALID_REVNUM(peg_revision))
     return svn_error_createf(SVN_ERR_CLIENT_BAD_REVISION, NULL,
@@ -1312,7 +1312,7 @@ svn_ra_get_inherited_props(svn_ra_sessio
   svn_boolean_t iprop_capable;
 
   /* Path must be relative. */
-  SVN_ERR_ASSERT(*path != '/');
+  SVN_ERR_ASSERT(svn_relpath_is_canonical(path));
 
   SVN_ERR(svn_ra_has_capability(session, &iprop_capable,
                                 SVN_RA_CAPABILITY_INHERITED_PROPS,
@@ -1510,7 +1510,7 @@ svn_ra_get_ra_library(svn_ra_plugin_t **
 
           SVN_ERR(compat_initfunc(SVN_RA_ABI_VERSION, load_pool, ht));
 
-          *library = apr_hash_get(ht, scheme, APR_HASH_KEY_STRING);
+          *library = svn_hash_gets(ht, scheme);
 
           /* The library may support just a subset of the schemes listed,
              so we have to check here too. */

Modified: subversion/branches/verify-keep-going/subversion/libsvn_ra_local/ra_plugin.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_ra_local/ra_plugin.c?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_ra_local/ra_plugin.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_ra_local/ra_plugin.c Fri Apr  5 05:29:29 2013
@@ -22,6 +22,7 @@
  */
 
 #include "ra_local.h"
+#include "svn_hash.h"
 #include "svn_ra.h"
 #include "svn_fs.h"
 #include "svn_delta.h"
@@ -143,8 +144,7 @@ cache_init(void *baton, apr_pool_t *pool
   const char *memory_cache_size_str;
 
   if (config_hash)
-    config = apr_hash_get(config_hash, SVN_CONFIG_CATEGORY_CONFIG,
-                          APR_HASH_KEY_STRING);
+    config = svn_hash_gets(config_hash, SVN_CONFIG_CATEGORY_CONFIG);
   svn_config_get(config, &memory_cache_size_str, SVN_CONFIG_SECTION_MISCELLANY,
                  SVN_CONFIG_OPTION_MEMORY_CACHE_SIZE, NULL);
   if (memory_cache_size_str)
@@ -752,10 +752,10 @@ svn_ra_local__get_commit_editor(svn_ra_s
 
   /* Copy the revprops table so we can add the username. */
   revprop_table = apr_hash_copy(pool, revprop_table);
-  apr_hash_set(revprop_table, SVN_PROP_REVISION_AUTHOR, APR_HASH_KEY_STRING,
-               svn_string_create(sess->username, pool));
-  apr_hash_set(revprop_table, SVN_PROP_TXN_CLIENT_COMPAT_VERSION,
-               APR_HASH_KEY_STRING, svn_string_create(SVN_VER_NUMBER, pool));
+  svn_hash_sets(revprop_table, SVN_PROP_REVISION_AUTHOR,
+                svn_string_create(sess->username, pool));
+  svn_hash_sets(revprop_table, SVN_PROP_TXN_CLIENT_COMPAT_VERSION,
+                svn_string_create(SVN_VER_NUMBER, pool));
 
   /* Get the repos commit-editor */
   return svn_repos_get_commit_editor5
@@ -1078,24 +1078,14 @@ get_node_props(apr_hash_t **props,
                                            &cmt_author, root, path,
                                            scratch_pool));
 
-      apr_hash_set(*props,
-                   SVN_PROP_ENTRY_COMMITTED_REV,
-                   APR_HASH_KEY_STRING,
-                   svn_string_createf(result_pool, "%ld", cmt_rev));
-      apr_hash_set(*props,
-                   SVN_PROP_ENTRY_COMMITTED_DATE,
-                   APR_HASH_KEY_STRING,
-                   cmt_date ? svn_string_create(cmt_date,
-                                                result_pool) : NULL);
-      apr_hash_set(*props,
-                   SVN_PROP_ENTRY_LAST_AUTHOR,
-                   APR_HASH_KEY_STRING,
-                   cmt_author ? svn_string_create(cmt_author,
-                                                  result_pool) : NULL);
-      apr_hash_set(*props,
-                   SVN_PROP_ENTRY_UUID,
-                   APR_HASH_KEY_STRING,
-                   svn_string_create(sess->uuid, result_pool));
+      svn_hash_sets(*props, SVN_PROP_ENTRY_COMMITTED_REV,
+                    svn_string_createf(result_pool, "%ld", cmt_rev));
+      svn_hash_sets(*props, SVN_PROP_ENTRY_COMMITTED_DATE, cmt_date ?
+                    svn_string_create(cmt_date, result_pool) :NULL);
+      svn_hash_sets(*props, SVN_PROP_ENTRY_LAST_AUTHOR, cmt_author ?
+                    svn_string_create(cmt_author, result_pool) :NULL);
+      svn_hash_sets(*props, SVN_PROP_ENTRY_UUID,
+                    svn_string_create(sess->uuid, result_pool));
 
       /* We have no 'wcprops' in ra_local, but might someday. */
     }
@@ -1274,7 +1264,7 @@ svn_ra_local__get_dir(svn_ra_session_t *
             }
 
           /* Store. */
-          apr_hash_set(*dirents, entryname, APR_HASH_KEY_STRING, entry);
+          svn_hash_sets(*dirents, entryname, entry);
         }
       svn_pool_destroy(subpool);
     }
@@ -1654,8 +1644,8 @@ svn_ra_local__get_commit_ev2(svn_editor_
 
   /* Copy the REVPROPS and insert the author/username.  */
   revprops = apr_hash_copy(scratch_pool, revprops);
-  apr_hash_set(revprops, SVN_PROP_REVISION_AUTHOR, APR_HASH_KEY_STRING,
-               svn_string_create(sess->username, scratch_pool));
+  svn_hash_sets(revprops, SVN_PROP_REVISION_AUTHOR,
+                svn_string_create(sess->username, scratch_pool));
 
   return svn_error_trace(svn_repos__get_commit_ev2(
                            editor, sess->repos, NULL /* authz */,

Modified: subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/blame.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/blame.c?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/blame.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/blame.c Fri Apr  5 05:29:29 2013
@@ -24,6 +24,7 @@
 #include <apr_uri.h>
 #include <serf.h>
 
+#include "svn_hash.h"
 #include "svn_pools.h"
 #include "svn_ra.h"
 #include "svn_dav.h"
@@ -144,10 +145,9 @@ blame_opened(svn_ra_serf__xml_estate_t *
       svn_txdelta_window_handler_t txdelta;
       void *txdelta_baton;
 
-      path = apr_hash_get(gathered, "path", APR_HASH_KEY_STRING);
-      rev = apr_hash_get(gathered, "rev", APR_HASH_KEY_STRING);
-      merged_revision = apr_hash_get(gathered,
-                                     "merged-revision", APR_HASH_KEY_STRING);
+      path = svn_hash_gets(gathered, "path");
+      rev = svn_hash_gets(gathered, "rev");
+      merged_revision = svn_hash_gets(gathered, "merged-revision");
 
       SVN_ERR(blame_ctx->file_rev(blame_ctx->file_rev_baton,
                                   path, SVN_STR_TO_REV(rev),
@@ -188,8 +188,8 @@ blame_closed(svn_ra_serf__xml_estate_t *
           const char *path;
           const char *rev;
 
-          path = apr_hash_get(attrs, "path", APR_HASH_KEY_STRING);
-          rev = apr_hash_get(attrs, "rev", APR_HASH_KEY_STRING);
+          path = svn_hash_gets(attrs, "path");
+          rev = svn_hash_gets(attrs, "rev");
 
           /* Send a "no content" notification.  */
           SVN_ERR(blame_ctx->file_rev(blame_ctx->file_rev_baton,
@@ -219,7 +219,7 @@ blame_closed(svn_ra_serf__xml_estate_t *
                      || leaving_state == REMOVE_PROP);
 
       name = apr_pstrdup(blame_ctx->state_pool,
-                         apr_hash_get(attrs, "name", APR_HASH_KEY_STRING));
+                         svn_hash_gets(attrs, "name"));
 
       if (leaving_state == REMOVE_PROP)
         {
@@ -227,8 +227,7 @@ blame_closed(svn_ra_serf__xml_estate_t *
         }
       else
         {
-          const char *encoding = apr_hash_get(attrs,
-                                              "encoding", APR_HASH_KEY_STRING);
+          const char *encoding = svn_hash_gets(attrs, "encoding");
 
           if (encoding && strcmp(encoding, "base64") == 0)
             value = svn_base64_decode_string(cdata, blame_ctx->state_pool);
@@ -238,7 +237,7 @@ blame_closed(svn_ra_serf__xml_estate_t *
 
       if (leaving_state == REV_PROP)
         {
-          apr_hash_set(blame_ctx->rev_props, name, APR_HASH_KEY_STRING, value);
+          svn_hash_sets(blame_ctx->rev_props, name, value);
         }
       else
         {

Modified: subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/blncache.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/blncache.c?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/blncache.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/blncache.c Fri Apr  5 05:29:29 2013
@@ -23,6 +23,7 @@
 
 #include <apr_pools.h>
 
+#include "svn_hash.h"
 #include "svn_dirent_uri.h"
 #include "svn_types.h"
 #include "svn_pools.h"
@@ -161,8 +162,7 @@ svn_ra_serf__blncache_get_baseline_info(
                                         const char *baseline_url,
                                         apr_pool_t *pool)
 {
-  baseline_info_t *info = apr_hash_get(blncache->baseline_info, baseline_url,
-                                       APR_HASH_KEY_STRING);
+  baseline_info_t *info = svn_hash_gets(blncache->baseline_info, baseline_url);
   if (info)
     {
       *bc_url_p = apr_pstrdup(pool, info->bc_url);

Modified: subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/commit.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/commit.c?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/commit.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/commit.c Fri Apr  5 05:29:29 2013
@@ -24,6 +24,7 @@
 #include <apr_uri.h>
 #include <serf.h>
 
+#include "svn_hash.h"
 #include "svn_pools.h"
 #include "svn_ra.h"
 #include "svn_dav.h"
@@ -797,11 +798,9 @@ maybe_set_lock_token_header(serf_bucket_
   if (! (relpath && commit_ctx->lock_tokens))
     return SVN_NO_ERROR;
 
-  if (! apr_hash_get(commit_ctx->deleted_entries, relpath,
-                     APR_HASH_KEY_STRING))
+  if (! svn_hash_gets(commit_ctx->deleted_entries, relpath))
     {
-      token = apr_hash_get(commit_ctx->lock_tokens, relpath,
-                           APR_HASH_KEY_STRING);
+      token = svn_hash_gets(commit_ctx->lock_tokens, relpath);
       if (token)
         {
           const char *token_header;
@@ -1107,8 +1106,7 @@ setup_delete_headers(serf_bucket_t *head
 
   if (ctx->lock_token_hash)
     {
-      ctx->lock_token = apr_hash_get(ctx->lock_token_hash, ctx->path,
-                                     APR_HASH_KEY_STRING);
+      ctx->lock_token = svn_hash_gets(ctx->lock_token_hash, ctx->path);
 
       if (ctx->lock_token)
         {
@@ -1307,8 +1305,8 @@ open_root(void *edit_baton,
       post_response_ctx_t *prc;
       const char *rel_path;
       svn_boolean_t post_with_revprops
-        = (apr_hash_get(ctx->session->supported_posts, "create-txn-with-props",
-                        APR_HASH_KEY_STRING) != NULL);
+        = (NULL != svn_hash_gets(ctx->session->supported_posts,
+                                 "create-txn-with-props"));
 
       /* Create our activity URL now on the server. */
       handler = apr_pcalloc(ctx->pool, sizeof(*handler));
@@ -1594,9 +1592,8 @@ delete_entry(const char *path,
       return svn_error_trace(return_response_err(handler));
     }
 
-  apr_hash_set(dir->commit->deleted_entries,
-               apr_pstrdup(dir->commit->pool, path), APR_HASH_KEY_STRING,
-               (void*)1);
+  svn_hash_sets(dir->commit->deleted_entries,
+                apr_pstrdup(dir->commit->pool, path), (void *)1);
 
   return SVN_NO_ERROR;
 }
@@ -1890,8 +1887,7 @@ add_file(const char *path,
 
   while (deleted_parent && deleted_parent[0] != '\0')
     {
-      if (apr_hash_get(dir->commit->deleted_entries,
-                       deleted_parent, APR_HASH_KEY_STRING))
+      if (svn_hash_gets(dir->commit->deleted_entries, deleted_parent))
         {
           break;
         }
@@ -2303,14 +2299,12 @@ svn_ra_serf__get_commit_editor(svn_ra_se
                                       pool));
   if (supports_ephemeral_props)
     {
-      apr_hash_set(ctx->revprop_table,
-                   apr_pstrdup(pool, SVN_PROP_TXN_CLIENT_COMPAT_VERSION),
-                   APR_HASH_KEY_STRING,
-                   svn_string_create(SVN_VER_NUMBER, pool));
-      apr_hash_set(ctx->revprop_table,
-                   apr_pstrdup(pool, SVN_PROP_TXN_USER_AGENT),
-                   APR_HASH_KEY_STRING,
-                   svn_string_create(session->useragent, pool));
+      svn_hash_sets(ctx->revprop_table,
+                    apr_pstrdup(pool, SVN_PROP_TXN_CLIENT_COMPAT_VERSION),
+                    svn_string_create(SVN_VER_NUMBER, pool));
+      svn_hash_sets(ctx->revprop_table,
+                    apr_pstrdup(pool, SVN_PROP_TXN_USER_AGENT),
+                    svn_string_create(session->useragent, pool));
     }
 
   ctx->callback = callback;

Modified: subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/getlocations.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/getlocations.c?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/getlocations.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/getlocations.c Fri Apr  5 05:29:29 2013
@@ -27,6 +27,7 @@
 
 #include <serf.h>
 
+#include "svn_hash.h"
 #include "svn_path.h"
 #include "svn_pools.h"
 #include "svn_ra.h"
@@ -89,8 +90,8 @@ getloc_closed(svn_ra_serf__xml_estate_t 
 
   SVN_ERR_ASSERT(leaving_state == LOCATION);
 
-  revstr = apr_hash_get(attrs, "rev", APR_HASH_KEY_STRING);
-  path = apr_hash_get(attrs, "path", APR_HASH_KEY_STRING);
+  revstr = svn_hash_gets(attrs, "rev");
+  path = svn_hash_gets(attrs, "path");
   if (revstr != NULL && path != NULL)
     {
       svn_revnum_t rev = SVN_STR_TO_REV(revstr);

Modified: subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/getlocationsegments.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/getlocationsegments.c?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/getlocationsegments.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/getlocationsegments.c Fri Apr  5 05:29:29 2013
@@ -27,6 +27,7 @@
 #include <apr_uri.h>
 #include <serf.h>
 
+#include "svn_hash.h"
 #include "svn_pools.h"
 #include "svn_ra.h"
 #include "svn_xml.h"
@@ -87,9 +88,9 @@ gls_closed(svn_ra_serf__xml_estate_t *xe
 
   SVN_ERR_ASSERT(leaving_state == SEGMENT);
 
-  path = apr_hash_get(attrs, "path", APR_HASH_KEY_STRING);
-  start_str = apr_hash_get(attrs, "range-start", APR_HASH_KEY_STRING);
-  end_str = apr_hash_get(attrs, "range-end", APR_HASH_KEY_STRING);
+  path = svn_hash_gets(attrs, "path");
+  start_str = svn_hash_gets(attrs, "range-start");
+  end_str = svn_hash_gets(attrs, "range-end");
 
   /* The transition table said these must exist.  */
   SVN_ERR_ASSERT(start_str && end_str);

Modified: subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/getlocks.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/getlocks.c?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/getlocks.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/getlocks.c Fri Apr  5 05:29:29 2013
@@ -27,6 +27,7 @@
 
 #include <serf.h>
 
+#include "svn_hash.h"
 #include "svn_path.h"
 #include "svn_pools.h"
 #include "svn_ra.h"
@@ -114,7 +115,7 @@ getlocks_closed(svn_ra_serf__xml_estate_
 
   if (leaving_state == LOCK)
     {
-      const char *path = apr_hash_get(attrs, "path", APR_HASH_KEY_STRING);
+      const char *path = svn_hash_gets(attrs, "path");
       svn_boolean_t save_lock = FALSE;
 
       /* Filter out unwanted paths.  Since Subversion only allows
@@ -153,25 +154,22 @@ getlocks_closed(svn_ra_serf__xml_estate_
              them may have not been sent, so the value will be NULL.  */
 
           lock.path = path;
-          lock.token = apr_hash_get(attrs, "token", APR_HASH_KEY_STRING);
-          lock.owner = apr_hash_get(attrs, "owner", APR_HASH_KEY_STRING);
-          lock.comment = apr_hash_get(attrs, "comment", APR_HASH_KEY_STRING);
+          lock.token = svn_hash_gets(attrs, "token");
+          lock.owner = svn_hash_gets(attrs, "owner");
+          lock.comment = svn_hash_gets(attrs, "comment");
 
-          date = apr_hash_get(attrs, SVN_DAV__CREATIONDATE,
-                              APR_HASH_KEY_STRING);
+          date = svn_hash_gets(attrs, SVN_DAV__CREATIONDATE);
           if (date)
             SVN_ERR(svn_time_from_cstring(&lock.creation_date, date,
                                           scratch_pool));
 
-          date = apr_hash_get(attrs, "expirationdate",
-                              APR_HASH_KEY_STRING);
+          date = svn_hash_gets(attrs, "expirationdate");
           if (date)
             SVN_ERR(svn_time_from_cstring(&lock.expiration_date, date,
                                           scratch_pool));
 
           result_lock = svn_lock_dup(&lock, lock_ctx->pool);
-          apr_hash_set(lock_ctx->hash, result_lock->path, APR_HASH_KEY_STRING,
-                       result_lock);
+          svn_hash_sets(lock_ctx->hash, result_lock->path, result_lock);
         }
     }
   else

Modified: subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/inherited_props.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/inherited_props.c?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/inherited_props.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/inherited_props.c Fri Apr  5 05:29:29 2013
@@ -25,6 +25,7 @@
 #include <apr_tables.h>
 #include <apr_xml.h>
 
+#include "svn_hash.h"
 #include "svn_path.h"
 #include "svn_ra.h"
 #include "svn_string.h"
@@ -183,11 +184,10 @@ end_element(svn_ra_serf__xml_parser_t *p
                                                 iprops_ctx->pool);
         }
 
-      apr_hash_set(iprops_ctx->curr_iprop->prop_hash,
-                   apr_pstrdup(iprops_ctx->pool,
-                               iprops_ctx->curr_propname->data),
-                   APR_HASH_KEY_STRING,
-                   prop_val);
+      svn_hash_sets(iprops_ctx->curr_iprop->prop_hash,
+                    apr_pstrdup(iprops_ctx->pool,
+                                iprops_ctx->curr_propname->data),
+                    prop_val);
       /* Clear current propname and propval in the event there are
          multiple properties on the current path. */
       svn_stringbuf_setempty(iprops_ctx->curr_propname);