You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2013/03/30 21:02:33 UTC

svn commit: r1462850 [6/14] - in /subversion/branches/fsfs-format7: ./ build/ build/ac-macros/ build/generator/ contrib/client-side/svncopy/ notes/ subversion/bindings/javahl/native/ subversion/bindings/javahl/src/org/apache/subversion/javahl/ subversi...

Modified: subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/low_level.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/low_level.c?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/low_level.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/low_level.c Sat Mar 30 20:02:27 2013
@@ -20,10 +20,8 @@
  * ====================================================================
  */
 
-#include <apr_md5.h>
-#include <apr_sha1.h>
-
 #include "svn_private_config.h"
+#include "svn_hash.h"
 #include "svn_pools.h"
 #include "svn_sorts.h"
 #include "private/svn_string_private.h"
@@ -227,7 +225,7 @@ read_header_block(apr_hash_t **headers,
 
       /* 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;
@@ -382,7 +380,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,
@@ -394,7 +392,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, SVN_FS_FS__KIND_FILE)
@@ -409,14 +407,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,
@@ -424,7 +422,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,
@@ -432,7 +430,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,
@@ -445,13 +443,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);
@@ -477,7 +475,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;
@@ -501,18 +499,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;

Modified: subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/revprops.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/revprops.c?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/revprops.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/revprops.c Sat Mar 30 20:02:27 2013
@@ -301,7 +301,7 @@ log_revprop_cache_init_warning(svn_fs_t 
                                svn_error_t *underlying_err,
                                const char *message)
 {
-  svn_error_t *err = svn_error_createf(SVN_ERR_FS_REPPROP_CACHE_INIT_FAILURE,
+  svn_error_t *err = svn_error_createf(SVN_ERR_FS_REVPROP_CACHE_INIT_FAILURE,
                                        underlying_err,
                                        message, fs->path);
 
@@ -842,7 +842,7 @@ read_pack_revprop(packed_revprops_t **re
 
   /* the file content should be available now */
   if (!result->packed_revprops)
-    return svn_error_createf(SVN_ERR_FS_PACKED_REPPROP_READ_FAILURE, NULL,
+    return svn_error_createf(SVN_ERR_FS_PACKED_REVPROP_READ_FAILURE, NULL,
                   _("Failed to read revprop pack file for rev %ld"), rev);
 
   /* parse it. RESULT will be complete afterwards. */

Modified: subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/temp_serializer.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/temp_serializer.c?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/temp_serializer.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/temp_serializer.c Sat Mar 30 20:02:27 2013
@@ -290,7 +290,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 */
@@ -878,10 +878,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/fsfs-format7/subversion/libsvn_fs_fs/transaction.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/transaction.c?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/transaction.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/transaction.c Sat Mar 30 20:02:27 2013
@@ -1246,7 +1246,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. */
@@ -1606,7 +1606,7 @@ svn_fs_fs__add_change(svn_fs_t *fs,
   change->copyfrom_rev = copyfrom_rev;
   change->copyfrom_path = apr_pstrdup(pool, copyfrom_path);
 
-  apr_hash_set(changes, path, APR_HASH_KEY_STRING, change);
+  svn_hash_sets(changes, path, change);
   SVN_ERR(svn_fs_fs__write_changes(svn_stream_from_aprfile2(file, TRUE, pool),
                                    fs, changes, FALSE, pool));
 
@@ -2961,6 +2961,51 @@ write_final_changed_path_info(apr_off_t 
   return SVN_NO_ERROR;
 }
 
+/* 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. */
@@ -3034,7 +3079,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
@@ -3171,14 +3216,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;
@@ -3269,6 +3313,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, txn_id, new_rev, start_node_id,
                               start_copy_id, pool));
 
@@ -3521,7 +3566,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;
 }

Modified: subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/tree.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/tree.c?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/tree.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/tree.c Sat Mar 30 20:02:27 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"
@@ -592,12 +593,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;
     }
 
@@ -1379,7 +1378,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;
 }
@@ -1480,7 +1479,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,
@@ -2208,6 +2207,67 @@ fs_dir_optimal_order(apr_array_header_t 
   return SVN_NO_ERROR;
 }
 
+/* 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
@@ -2222,6 +2282,8 @@ fs_make_dir(svn_fs_root_t *root,
   dag_node_t *sub_dir;
   const svn_fs_fs__id_part_t *txn_id = root_txn_id(root);
 
+  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,
                     TRUE, pool));
@@ -2475,6 +2537,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),
@@ -2522,7 +2586,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)
@@ -2573,6 +2637,8 @@ fs_make_file(svn_fs_root_t *root,
   dag_node_t *child;
   const svn_fs_fs__id_part_t *txn_id = root_txn_id(root);
 
+  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,
                     TRUE, pool));
@@ -3776,8 +3842,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);
@@ -3802,10 +3867,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);
             }
         }
 
@@ -3897,8 +3960,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,
@@ -4069,8 +4131,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));
@@ -4358,23 +4419,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'",
@@ -4382,17 +4461,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/fsfs-format7/subversion/libsvn_fs_util/fs-util.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_fs_util/fs-util.c?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_fs_util/fs-util.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_fs_util/fs-util.c Sat Mar 30 20:02:27 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/fsfs-format7/subversion/libsvn_ra/compat.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_ra/compat.c?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_ra/compat.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_ra/compat.c Sat Mar 30 20:02:27 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/fsfs-format7/subversion/libsvn_ra/deprecated.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_ra/deprecated.c?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_ra/deprecated.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_ra/deprecated.c Sat Mar 30 20:02:27 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/fsfs-format7/subversion/libsvn_ra/ra_loader.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_ra/ra_loader.c?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_ra/ra_loader.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_ra/ra_loader.c Sat Mar 30 20:02:27 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/fsfs-format7/subversion/libsvn_ra_local/ra_plugin.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_ra_local/ra_plugin.c?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_ra_local/ra_plugin.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_ra_local/ra_plugin.c Sat Mar 30 20:02:27 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/fsfs-format7/subversion/libsvn_ra_serf/blame.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/blame.c?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/blame.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/blame.c Sat Mar 30 20:02:27 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/fsfs-format7/subversion/libsvn_ra_serf/blncache.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/blncache.c?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/blncache.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/blncache.c Sat Mar 30 20:02:27 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/fsfs-format7/subversion/libsvn_ra_serf/commit.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/commit.c?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/commit.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/commit.c Sat Mar 30 20:02:27 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/fsfs-format7/subversion/libsvn_ra_serf/getlocations.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/getlocations.c?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/getlocations.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/getlocations.c Sat Mar 30 20:02:27 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/fsfs-format7/subversion/libsvn_ra_serf/getlocationsegments.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/getlocationsegments.c?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/getlocationsegments.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/getlocationsegments.c Sat Mar 30 20:02:27 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/fsfs-format7/subversion/libsvn_ra_serf/getlocks.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/getlocks.c?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/getlocks.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/getlocks.c Sat Mar 30 20:02:27 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/fsfs-format7/subversion/libsvn_ra_serf/inherited_props.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/inherited_props.c?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/inherited_props.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/inherited_props.c Sat Mar 30 20:02:27 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);

Modified: subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/log.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/log.c?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/log.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/log.c Sat Mar 30 20:02:27 2013
@@ -26,6 +26,7 @@
 #include <apr_uri.h>
 #include <serf.h>
 
+#include "svn_hash.h"
 #include "svn_pools.h"
 #include "svn_ra.h"
 #include "svn_dav.h"
@@ -177,7 +178,7 @@ collect_revprop(apr_hash_t *revprops,
     }
 
   /* Caller has ensured PROPNAME has sufficient lifetime.  */
-  apr_hash_set(revprops, propname, APR_HASH_KEY_STRING, decoded);
+  svn_hash_sets(revprops, propname, decoded);
 
   return SVN_NO_ERROR;
 }
@@ -202,8 +203,8 @@ collect_path(apr_hash_t *paths,
   lcp->copyfrom_rev = SVN_INVALID_REVNUM;
 
   /* COPYFROM_* are only recorded for ADDED_PATH and REPLACED_PATH.  */
-  copyfrom_path = apr_hash_get(attrs, "copyfrom-path", APR_HASH_KEY_STRING);
-  copyfrom_rev = apr_hash_get(attrs, "copyfrom-rev", APR_HASH_KEY_STRING);
+  copyfrom_path = svn_hash_gets(attrs, "copyfrom-path");
+  copyfrom_rev = svn_hash_gets(attrs, "copyfrom-rev");
   if (copyfrom_path && copyfrom_rev)
     {
       svn_revnum_t rev = SVN_STR_TO_REV(copyfrom_rev);
@@ -215,18 +216,14 @@ collect_path(apr_hash_t *paths,
         }
     }
 
-  lcp->node_kind = svn_node_kind_from_word(apr_hash_get(
-                                             attrs, "node-kind",
-                                             APR_HASH_KEY_STRING));
-  lcp->text_modified = svn_tristate__from_word(apr_hash_get(
-                                                 attrs, "text-mods",
-                                                 APR_HASH_KEY_STRING));
-  lcp->props_modified = svn_tristate__from_word(apr_hash_get(
-                                                  attrs, "prop-mods",
-                                                  APR_HASH_KEY_STRING));
+  lcp->node_kind = svn_node_kind_from_word(svn_hash_gets(attrs, "node-kind"));
+  lcp->text_modified = svn_tristate__from_word(svn_hash_gets(attrs,
+                                                             "text-mods"));
+  lcp->props_modified = svn_tristate__from_word(svn_hash_gets(attrs,
+                                                              "prop-mods"));
 
   path = apr_pstrmemdup(result_pool, cdata->data, cdata->len);
-  apr_hash_set(paths, path, APR_HASH_KEY_STRING, lcp);
+  svn_hash_sets(paths, path, lcp);
 
   return SVN_NO_ERROR;
 }
@@ -297,7 +294,7 @@ log_closed(svn_ra_serf__xml_estate_t *xe
                                                         "subtractive-merge",
                                                         FALSE);
 
-      rev_str = apr_hash_get(attrs, "revision", APR_HASH_KEY_STRING);
+      rev_str = svn_hash_gets(attrs, "revision");
       if (rev_str)
         log_entry->revision = SVN_STR_TO_REV(rev_str);
       else
@@ -335,8 +332,7 @@ log_closed(svn_ra_serf__xml_estate_t *xe
           SVN_ERR(collect_revprop(log_ctx->collect_revprops,
                                   SVN_PROP_REVISION_AUTHOR,
                                   cdata,
-                                  apr_hash_get(attrs, "encoding",
-                                               APR_HASH_KEY_STRING)));
+                                  svn_hash_gets(attrs, "encoding")));
         }
     }
   else if (leaving_state == DATE)
@@ -346,8 +342,7 @@ log_closed(svn_ra_serf__xml_estate_t *xe
           SVN_ERR(collect_revprop(log_ctx->collect_revprops,
                                   SVN_PROP_REVISION_DATE,
                                   cdata,
-                                  apr_hash_get(attrs, "encoding",
-                                               APR_HASH_KEY_STRING)));
+                                  svn_hash_gets(attrs, "encoding")));
         }
     }
   else if (leaving_state == COMMENT)
@@ -357,8 +352,7 @@ log_closed(svn_ra_serf__xml_estate_t *xe
           SVN_ERR(collect_revprop(log_ctx->collect_revprops,
                                   SVN_PROP_REVISION_LOG,
                                   cdata,
-                                  apr_hash_get(attrs, "encoding",
-                                               APR_HASH_KEY_STRING)));
+                                  svn_hash_gets(attrs, "encoding")));
         }
     }
   else if (leaving_state == REVPROP)
@@ -368,9 +362,9 @@ log_closed(svn_ra_serf__xml_estate_t *xe
       SVN_ERR(collect_revprop(
                 log_ctx->collect_revprops,
                 apr_pstrdup(result_pool,
-                            apr_hash_get(attrs, "name", APR_HASH_KEY_STRING)),
+                            svn_hash_gets(attrs, "name")),
                 cdata,
-                apr_hash_get(attrs, "encoding", APR_HASH_KEY_STRING)
+                svn_hash_gets(attrs, "encoding")
                 ));
     }
   else if (leaving_state == HAS_CHILDREN)

Modified: subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/merge.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/merge.c?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/merge.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/merge.c Sat Mar 30 20:02:27 2013
@@ -27,6 +27,7 @@
 
 #include <serf.h>
 
+#include "svn_hash.h"
 #include "svn_pools.h"
 #include "svn_ra.h"
 #include "svn_dav.h"
@@ -160,7 +161,7 @@ merge_closed(svn_ra_serf__xml_estate_t *
     {
       const char *rtype;
 
-      rtype = apr_hash_get(attrs, "resourcetype", APR_HASH_KEY_STRING);
+      rtype = svn_hash_gets(attrs, "resourcetype");
 
       /* rtype can only be "baseline" or "collection" (or NULL). We can
          keep this check simple.  */
@@ -168,7 +169,7 @@ merge_closed(svn_ra_serf__xml_estate_t *
         {
           const char *rev_str;
 
-          rev_str = apr_hash_get(attrs, "revision", APR_HASH_KEY_STRING);
+          rev_str = svn_hash_gets(attrs, "revision");
           if (rev_str)
             merge_ctx->commit_info->revision = SVN_STR_TO_REV(rev_str);
           else
@@ -176,16 +177,15 @@ merge_closed(svn_ra_serf__xml_estate_t *
 
           merge_ctx->commit_info->date =
               apr_pstrdup(merge_ctx->pool,
-                          apr_hash_get(attrs, "date", APR_HASH_KEY_STRING));
+                          svn_hash_gets(attrs, "date"));
 
           merge_ctx->commit_info->author =
               apr_pstrdup(merge_ctx->pool,
-                          apr_hash_get(attrs, "author", APR_HASH_KEY_STRING));
+                          svn_hash_gets(attrs, "author"));
 
           merge_ctx->commit_info->post_commit_err =
              apr_pstrdup(merge_ctx->pool,
-                         apr_hash_get(attrs,
-                                      "post-commit-err", APR_HASH_KEY_STRING));
+                         svn_hash_gets(attrs, "post-commit-err"));
         }
       else
         {
@@ -193,7 +193,7 @@ merge_closed(svn_ra_serf__xml_estate_t *
 
           href = svn_urlpath__skip_ancestor(
                    merge_ctx->merge_url,
-                   apr_hash_get(attrs, "href", APR_HASH_KEY_STRING));
+                   svn_hash_gets(attrs, "href"));
 
           if (href == NULL)
             return svn_error_createf(SVN_ERR_RA_DAV_REQUEST_FAILED, NULL,
@@ -209,8 +209,7 @@ merge_closed(svn_ra_serf__xml_estate_t *
               const char *checked_in;
               svn_string_t checked_in_str;
 
-              checked_in = apr_hash_get(attrs,
-                                        "checked-in", APR_HASH_KEY_STRING);
+              checked_in = svn_hash_gets(attrs, "checked-in");
               checked_in_str.data = checked_in;
               checked_in_str.len = strlen(checked_in);
 

Modified: subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/mergeinfo.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/mergeinfo.c?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/mergeinfo.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/mergeinfo.c Sat Mar 30 20:02:27 2013
@@ -24,6 +24,7 @@
 #include <apr_tables.h>
 #include <apr_xml.h>
 
+#include "svn_hash.h"
 #include "svn_mergeinfo.h"
 #include "svn_path.h"
 #include "svn_ra.h"
@@ -93,8 +94,8 @@ mergeinfo_closed(svn_ra_serf__xml_estate
   if (leaving_state == MERGEINFO_ITEM)
     {
       /* Placed here from the child elements.  */
-      const char *path = apr_hash_get(attrs, "path", APR_HASH_KEY_STRING);
-      const char *info = apr_hash_get(attrs, "info", APR_HASH_KEY_STRING);
+      const char *path = svn_hash_gets(attrs, "path");
+      const char *info = svn_hash_gets(attrs, "info");
 
       if (path != NULL && info != NULL)
         {
@@ -108,10 +109,9 @@ mergeinfo_closed(svn_ra_serf__xml_estate
           SVN_ERR(svn_mergeinfo_parse(&path_mergeinfo, info,
                                       mergeinfo_ctx->pool));
 
-          apr_hash_set(mergeinfo_ctx->result_catalog,
-                       apr_pstrdup(mergeinfo_ctx->pool, path),
-                       APR_HASH_KEY_STRING,
-                       path_mergeinfo);
+          svn_hash_sets(mergeinfo_ctx->result_catalog,
+                        apr_pstrdup(mergeinfo_ctx->pool, path),
+                        path_mergeinfo);
         }
     }
   else

Modified: subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/options.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/options.c?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/options.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/options.c Sat Mar 30 20:02:27 2013
@@ -177,7 +177,8 @@ capabilities_headers_iterator_callback(v
         {
           /* The server doesn't know what repository we're referring
              to, so it can't just say capability_yes. */
-          if (!svn_hash_gets(session->capabilities, SVN_RA_CAPABILITY_MERGEINFO))
+          if (!svn_hash_gets(session->capabilities,
+                             SVN_RA_CAPABILITY_MERGEINFO))
             {
               svn_hash_sets(session->capabilities, SVN_RA_CAPABILITY_MERGEINFO,
                             capability_server_yes);
@@ -203,7 +204,7 @@ capabilities_headers_iterator_callback(v
           svn_hash_sets(session->capabilities,
                         SVN_RA_CAPABILITY_INHERITED_PROPS, capability_yes);
         }
-      if (svn_cstring_match_list(SVN_DAV_NS_DAV_SVN_GET_FILE_REVS_REVERSE,
+      if (svn_cstring_match_list(SVN_DAV_NS_DAV_SVN_REVERSE_FILE_REVS,
                                  vals))
         {
           svn_hash_sets(session->capabilities,
@@ -532,17 +533,14 @@ svn_ra_serf__has_capability(svn_ra_sessi
       return SVN_NO_ERROR;
     }
 
-  cap_result = apr_hash_get(serf_sess->capabilities,
-                            capability,
-                            APR_HASH_KEY_STRING);
+  cap_result = svn_hash_gets(serf_sess->capabilities, capability);
 
   /* If any capability is unknown, they're all unknown, so ask. */
   if (cap_result == NULL)
     SVN_ERR(svn_ra_serf__exchange_capabilities(serf_sess, NULL, pool));
 
   /* Try again, now that we've fetched the capabilities. */
-  cap_result = apr_hash_get(serf_sess->capabilities,
-                            capability, APR_HASH_KEY_STRING);
+  cap_result = svn_hash_gets(serf_sess->capabilities, capability);
 
   /* Some capabilities depend on the repository as well as the server. */
   if (cap_result == capability_server_yes)

Modified: subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/property.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/property.c?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/property.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/property.c Sat Mar 30 20:02:27 2013
@@ -25,6 +25,7 @@
 
 #include <serf.h>
 
+#include "svn_hash.h"
 #include "svn_path.h"
 #include "svn_base64.h"
 #include "svn_xml.h"
@@ -262,8 +263,7 @@ propfind_closed(svn_ra_serf__xml_estate_
     }
   else if (leaving_state == PROPVAL)
     {
-      const char *encoding = apr_hash_get(attrs, "V:encoding",
-                                          APR_HASH_KEY_STRING);
+      const char *encoding = svn_hash_gets(attrs, "V:encoding");
       const svn_string_t *val_str;
       apr_hash_t *gathered;
       const char *path;
@@ -303,15 +303,15 @@ propfind_closed(svn_ra_serf__xml_estate_
       gathered = svn_ra_serf__xml_gather_since(xes, RESPONSE);
 
       /* These will be dup'd into CTX->POOL, as necessary.  */
-      path = apr_hash_get(gathered, "path", APR_HASH_KEY_STRING);
+      path = svn_hash_gets(gathered, "path");
       if (path == NULL)
         path = ctx->path;
 
-      ns = apr_hash_get(attrs, "ns", APR_HASH_KEY_STRING);
+      ns = svn_hash_gets(attrs, "ns");
       name = apr_pstrdup(ctx->pool,
-                         apr_hash_get(attrs, "name", APR_HASH_KEY_STRING));
+                         svn_hash_gets(attrs, "name"));
 
-      altvalue = apr_hash_get(attrs, "altvalue", APR_HASH_KEY_STRING);
+      altvalue = svn_hash_gets(attrs, "altvalue");
       if (altvalue != NULL)
         val_str = svn_string_create(altvalue, ctx->pool);
 
@@ -330,7 +330,7 @@ propfind_closed(svn_ra_serf__xml_estate_
       /* If we've squirreled away a note that says we want to ignore
          these properties, we'll do so.  Otherwise, we need to copy
          them from the temporary hash into the ctx->ret_props hash. */
-      if (! apr_hash_get(gathered, "ignore-prop", APR_HASH_KEY_STRING))
+      if (! svn_hash_gets(gathered, "ignore-prop"))
         {
           SVN_ERR(svn_ra_serf__walk_all_paths(ctx->ps_props, ctx->rev,
                                               copy_into_ret_props, ctx,
@@ -357,14 +357,14 @@ svn_ra_serf__get_ver_prop_string(apr_has
   ver_props = apr_hash_get(props, &rev, sizeof(rev));
   if (ver_props)
     {
-      path_props = apr_hash_get(ver_props, path, APR_HASH_KEY_STRING);
+      path_props = svn_hash_gets(ver_props, path);
 
       if (path_props)
         {
-          ns_props = apr_hash_get(path_props, ns, APR_HASH_KEY_STRING);
+          ns_props = svn_hash_gets(path_props, ns);
           if (ns_props)
             {
-              val = apr_hash_get(ns_props, name, APR_HASH_KEY_STRING);
+              val = svn_hash_gets(ns_props, name);
             }
         }
     }
@@ -426,28 +426,28 @@ svn_ra_serf__set_ver_prop(apr_hash_t *pr
                    ver_props);
     }
 
-  path_props = apr_hash_get(ver_props, path, APR_HASH_KEY_STRING);
+  path_props = svn_hash_gets(ver_props, path);
 
   if (!path_props)
     {
       path_props = apr_hash_make(pool);
       path = apr_pstrdup(pool, path);
-      apr_hash_set(ver_props, path, APR_HASH_KEY_STRING, path_props);
+      svn_hash_sets(ver_props, path, path_props);
 
       /* todo: we know that we'll fail the next check, but fall through
        * for now for simplicity's sake.
        */
     }
 
-  ns_props = apr_hash_get(path_props, ns, APR_HASH_KEY_STRING);
+  ns_props = svn_hash_gets(path_props, ns);
   if (!ns_props)
     {
       ns_props = apr_hash_make(pool);
       ns = apr_pstrdup(pool, ns);
-      apr_hash_set(path_props, ns, APR_HASH_KEY_STRING, ns_props);
+      svn_hash_sets(path_props, ns, ns_props);
     }
 
-  apr_hash_set(ns_props, name, APR_HASH_KEY_STRING, val);
+  svn_hash_sets(ns_props, name, val);
 }
 
 void
@@ -691,7 +691,7 @@ svn_ra_serf__fetch_node_props(apr_hash_t
   ver_props = apr_hash_get(multiprops, &revision, sizeof(revision));
   if (ver_props != NULL)
     {
-      *results = apr_hash_get(ver_props, url, APR_HASH_KEY_STRING);
+      *results = svn_hash_gets(ver_props, url);
       if (*results != NULL)
         return SVN_NO_ERROR;
     }
@@ -760,7 +760,7 @@ svn_ra_serf__walk_all_props(apr_hash_t *
   if (!ver_props)
     return SVN_NO_ERROR;
 
-  path_props = apr_hash_get(ver_props, name, APR_HASH_KEY_STRING);
+  path_props = svn_hash_gets(ver_props, name);
   if (!path_props)
     return SVN_NO_ERROR;
 
@@ -883,7 +883,7 @@ set_flat_props(void *baton,
 
   prop_name = svn_ra_serf__svnname_from_wirename(ns, name, result_pool);
   if (prop_name != NULL)
-    apr_hash_set(props, prop_name, APR_HASH_KEY_STRING, value);
+    svn_hash_sets(props, prop_name, value);
 
   return SVN_NO_ERROR;
 }
@@ -933,7 +933,7 @@ select_revprops(void *baton,
       return SVN_NO_ERROR;
     }
 
-  apr_hash_set(revprops, prop_name, APR_HASH_KEY_STRING, val);
+  svn_hash_sets(revprops, prop_name, val);
 
   return SVN_NO_ERROR;
 }
@@ -1203,7 +1203,7 @@ svn_ra_serf__get_stable_url(const char *
 
 
 svn_error_t *
-svn_ra_serf__get_resource_type(svn_kind_t *kind,
+svn_ra_serf__get_resource_type(svn_node_kind_t *kind,
                                apr_hash_t *props)
 {
   apr_hash_t *dav_props;
@@ -1221,11 +1221,11 @@ svn_ra_serf__get_resource_type(svn_kind_
 
   if (strcmp(res_type, "collection") == 0)
     {
-      *kind = svn_kind_dir;
+      *kind = svn_node_dir;
     }
   else
     {
-      *kind = svn_kind_file;
+      *kind = svn_node_file;
     }
 
   return SVN_NO_ERROR;

Modified: subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/ra_serf.h
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/ra_serf.h?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/ra_serf.h (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/ra_serf.h Sat Mar 30 20:02:27 2013
@@ -40,6 +40,7 @@
 
 #include "private/svn_dav_protocol.h"
 #include "private/svn_subr_private.h"
+#include "private/svn_editor.h"
 
 #include "blncache.h"
 
@@ -1301,7 +1302,7 @@ svn_ra_serf__set_prop(apr_hash_t *props,
                       const svn_string_t *val, apr_pool_t *pool);
 
 svn_error_t *
-svn_ra_serf__get_resource_type(svn_kind_t *kind,
+svn_ra_serf__get_resource_type(svn_node_kind_t *kind,
                                apr_hash_t *props);
 
 

Modified: subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/serf.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/serf.c?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/serf.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/serf.c Sat Mar 30 20:02:27 2013
@@ -151,10 +151,8 @@ load_config(svn_ra_serf__session_t *sess
 
   if (config_hash)
     {
-      config = apr_hash_get(config_hash, SVN_CONFIG_CATEGORY_SERVERS,
-                            APR_HASH_KEY_STRING);
-      config_client = apr_hash_get(config_hash, SVN_CONFIG_CATEGORY_CONFIG,
-                                   APR_HASH_KEY_STRING);
+      config = svn_hash_gets(config_hash, SVN_CONFIG_CATEGORY_SERVERS);
+      config_client = svn_hash_gets(config_hash, SVN_CONFIG_CATEGORY_CONFIG);
     }
   else
     {
@@ -609,7 +607,7 @@ svn_ra_serf__rev_prop(svn_ra_session_t *
 
   SVN_ERR(svn_ra_serf__rev_proplist(session, rev, &props, pool));
 
-  *value = apr_hash_get(props, name, APR_HASH_KEY_STRING);
+  *value = svn_hash_gets(props, name);
 
   return SVN_NO_ERROR;
 }
@@ -673,14 +671,11 @@ svn_ra_serf__check_path(svn_ra_session_t
     }
   else
     {
-      svn_kind_t res_kind;
-
       /* Any other error, raise to caller. */
       if (err)
         return svn_error_trace(err);
 
-      SVN_ERR(svn_ra_serf__get_resource_type(&res_kind, props));
-      *kind = svn__node_kind_from_kind(res_kind);
+      SVN_ERR(svn_ra_serf__get_resource_type(kind, props));
     }
 
   return SVN_NO_ERROR;
@@ -809,7 +804,7 @@ path_dirent_walker(void *baton,
       base_name = svn_path_uri_decode(svn_urlpath__basename(path, pool),
                                       pool);
 
-      apr_hash_set(dirents->base_paths, base_name, APR_HASH_KEY_STRING, entry);
+      svn_hash_sets(dirents->base_paths, base_name, entry);
     }
 
   dwb.entry = entry;
@@ -956,11 +951,11 @@ svn_ra_serf__stat(svn_ra_session_t *ra_s
 static svn_error_t *
 resource_is_directory(apr_hash_t *props)
 {
-  svn_kind_t kind;
+  svn_node_kind_t kind;
 
   SVN_ERR(svn_ra_serf__get_resource_type(&kind, props));
 
-  if (kind != svn_kind_dir)
+  if (kind != svn_node_dir)
     {
       return svn_error_create(SVN_ERR_FS_NOT_DIRECTORY, NULL,
                               _("Can't get entries of non-directory"));
@@ -1056,8 +1051,8 @@ svn_ra_serf__get_dir(svn_ra_session_t *r
                                                                session, pool),
                                               pool, pool));
 
-          SVN_ERR(svn_hash__clear(dirent_walk.full_paths, pool));
-          SVN_ERR(svn_hash__clear(dirent_walk.base_paths, pool));
+          apr_hash_clear(dirent_walk.full_paths);
+          apr_hash_clear(dirent_walk.base_paths);
 
           SVN_ERR(svn_ra_serf__walk_all_paths(props, SVN_INVALID_REVNUM,
                                               path_dirent_walker,

Modified: subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/update.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/update.c?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/update.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/update.c Sat Mar 30 20:02:27 2013
@@ -31,6 +31,7 @@
 
 #include <serf.h>
 
+#include "svn_hash.h"
 #include "svn_pools.h"
 #include "svn_ra.h"
 #include "svn_dav.h"
@@ -471,7 +472,7 @@ update_closed(svn_ra_serf__xml_estate_t 
 
   if (leaving_state == TARGET_REVISION)
     {
-      const char *rev = apr_hash_get(attrs, "rev", APR_HASH_KEY_STRING);
+      const char *rev = svn_hash_gets(attrs, "rev");
 
       SVN_ERR(ctx->update_editor->set_target_revision(ctx->update_baton,
                                                       SVN_STR_TO_REV(rev),
@@ -1687,8 +1688,7 @@ start_report(svn_ra_serf__xml_parser_t *
       info->base_name = info->dir->base_name;
       info->name = info->dir->name;
 
-      info->dir->repos_relpath = apr_hash_get(ctx->switched_paths, "",
-                                              APR_HASH_KEY_STRING);
+      info->dir->repos_relpath = svn_hash_gets(ctx->switched_paths, "");
 
       if (!info->dir->repos_relpath)
         SVN_ERR(svn_ra_serf__get_relative_path(&info->dir->repos_relpath,
@@ -1742,8 +1742,7 @@ start_report(svn_ra_serf__xml_parser_t *
                                    dir->pool);
       info->name = dir->name;
 
-      dir->repos_relpath = apr_hash_get(ctx->switched_paths, dir->name,
-                                        APR_HASH_KEY_STRING);
+      dir->repos_relpath = svn_hash_gets(ctx->switched_paths, dir->name);
 
       if (!dir->repos_relpath)
         dir->repos_relpath = svn_relpath_join(dir->parent_dir->repos_relpath,
@@ -2247,8 +2246,7 @@ end_report(svn_ra_serf__xml_parser_t *pa
                                         info->pool);
         }
 
-      info->lock_token = apr_hash_get(ctx->lock_path_tokens, info->name,
-                                      APR_HASH_KEY_STRING);
+      info->lock_token = svn_hash_gets(ctx->lock_path_tokens, info->name);
 
       if (info->lock_token && !info->fetch_props)
         info->fetch_props = TRUE;
@@ -2267,8 +2265,7 @@ end_report(svn_ra_serf__xml_parser_t *pa
           /* If this file is switched vs the editor root we should provide
              its real url instead of the one calculated from the session root.
            */
-          repos_relpath = apr_hash_get(ctx->switched_paths, info->name,
-                                       APR_HASH_KEY_STRING);
+          repos_relpath = svn_hash_gets(ctx->switched_paths, info->name);
 
           if (!repos_relpath)
             {
@@ -2279,8 +2276,7 @@ end_report(svn_ra_serf__xml_parser_t *pa
                   SVN_ERR_ASSERT(*svn_relpath_dirname(info->name, info->pool)
                                     == '\0');
 
-                  repos_relpath = apr_hash_get(ctx->switched_paths, "",
-                                               APR_HASH_KEY_STRING);
+                  repos_relpath = svn_hash_gets(ctx->switched_paths, "");
                 }
               else
                 repos_relpath = svn_relpath_join(info->dir->repos_relpath,
@@ -2582,10 +2578,9 @@ set_path(void *report_baton,
 
   if (lock_token)
     {
-      apr_hash_set(report->lock_path_tokens,
-                   apr_pstrdup(report->pool, path),
-                   APR_HASH_KEY_STRING,
-                   apr_pstrdup(report->pool, lock_token));
+      svn_hash_sets(report->lock_path_tokens,
+                    apr_pstrdup(report->pool, path),
+                    apr_pstrdup(report->pool, lock_token));
     }
 
   return SVN_NO_ERROR;
@@ -2657,16 +2652,16 @@ link_path(void *report_baton,
   /* Store the switch roots to allow generating repos_relpaths from just
      the working copy paths. (Needed for HTTPv2) */
   path = apr_pstrdup(report->pool, path);
-  apr_hash_set(report->switched_paths, path, APR_HASH_KEY_STRING,
-               apr_pstrdup(report->pool, link+1));
+  svn_hash_sets(report->switched_paths,
+                path, apr_pstrdup(report->pool, link + 1));
 
   if (!*path)
     report->root_is_switched = TRUE;
 
   if (lock_token)
     {
-      apr_hash_set(report->lock_path_tokens, path, APR_HASH_KEY_STRING,
-                   apr_pstrdup(report->pool, lock_token));
+      svn_hash_sets(report->lock_path_tokens,
+                    path, apr_pstrdup(report->pool, lock_token));
     }
 
   return APR_SUCCESS;
@@ -3455,7 +3450,7 @@ try_get_wc_contents(svn_boolean_t *found
     }
 
 
-  svn_props = apr_hash_get(props, SVN_DAV_PROP_NS_DAV, APR_HASH_KEY_STRING);
+  svn_props = svn_hash_gets(props, SVN_DAV_PROP_NS_DAV);
   if (!svn_props)
     {
       /* No properties -- therefore no checksum property -- in response. */
@@ -3507,7 +3502,7 @@ svn_ra_serf__get_file(svn_ra_session_t *
   svn_ra_serf__connection_t *conn;
   const char *fetch_url;
   apr_hash_t *fetch_props;
-  svn_kind_t res_kind;
+  svn_node_kind_t res_kind;
   const svn_ra_serf__dav_props_t *which_props;
 
   /* What connection should we go on? */
@@ -3553,7 +3548,7 @@ svn_ra_serf__get_file(svn_ra_session_t *
 
   /* Verify that resource type is not collection. */
   SVN_ERR(svn_ra_serf__get_resource_type(&res_kind, fetch_props));
-  if (res_kind != svn_kind_file)
+  if (res_kind != svn_node_file)
     {
       return svn_error_create(SVN_ERR_FS_NOT_FILE, NULL,
                               _("Can't get text contents of a directory"));

Modified: subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/util.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/util.c?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/util.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/util.c Sat Mar 30 20:02:27 2013
@@ -35,6 +35,7 @@
 
 #include <expat.h>
 
+#include "svn_hash.h"
 #include "svn_dirent_uri.h"
 #include "svn_path.h"
 #include "svn_private_config.h"
@@ -191,12 +192,12 @@ static char *
 convert_organisation_to_str(apr_hash_t *org, apr_pool_t *pool)
 {
   return apr_psprintf(pool, "%s, %s, %s, %s, %s (%s)",
-                      (char*)apr_hash_get(org, "OU", APR_HASH_KEY_STRING),
-                      (char*)apr_hash_get(org, "O", APR_HASH_KEY_STRING),
-                      (char*)apr_hash_get(org, "L", APR_HASH_KEY_STRING),
-                      (char*)apr_hash_get(org, "ST", APR_HASH_KEY_STRING),
-                      (char*)apr_hash_get(org, "C", APR_HASH_KEY_STRING),
-                      (char*)apr_hash_get(org, "E", APR_HASH_KEY_STRING));
+                      (char*)svn_hash_gets(org, "OU"),
+                      (char*)svn_hash_gets(org, "O"),
+                      (char*)svn_hash_gets(org, "L"),
+                      (char*)svn_hash_gets(org, "ST"),
+                      (char*)svn_hash_gets(org, "C"),
+                      (char*)svn_hash_gets(org, "E"));
 }
 
 /* This function is called on receiving a ssl certificate of a server when
@@ -234,17 +235,15 @@ ssl_server_cert(void *baton, int failure
   issuer = serf_ssl_cert_issuer(cert, scratch_pool);
   serf_cert = serf_ssl_cert_certificate(cert, scratch_pool);
 
-  cert_info.hostname = apr_hash_get(subject, "CN", APR_HASH_KEY_STRING);
-  san = apr_hash_get(serf_cert, "subjectAltName", APR_HASH_KEY_STRING);
-  cert_info.fingerprint = apr_hash_get(serf_cert, "sha1", APR_HASH_KEY_STRING);
+  cert_info.hostname = svn_hash_gets(subject, "CN");
+  san = svn_hash_gets(serf_cert, "subjectAltName");
+  cert_info.fingerprint = svn_hash_gets(serf_cert, "sha1");
   if (! cert_info.fingerprint)
     cert_info.fingerprint = apr_pstrdup(scratch_pool, "<unknown>");
-  cert_info.valid_from = apr_hash_get(serf_cert, "notBefore",
-                         APR_HASH_KEY_STRING);
+  cert_info.valid_from = svn_hash_gets(serf_cert, "notBefore");
   if (! cert_info.valid_from)
     cert_info.valid_from = apr_pstrdup(scratch_pool, "[invalid date]");
-  cert_info.valid_until = apr_hash_get(serf_cert, "notAfter",
-                          APR_HASH_KEY_STRING);
+  cert_info.valid_until = svn_hash_gets(serf_cert, "notAfter");
   if (! cert_info.valid_until)
     cert_info.valid_until = apr_pstrdup(scratch_pool, "[invalid date]");
   cert_info.issuer_dname = convert_organisation_to_str(issuer, scratch_pool);
@@ -1776,7 +1775,7 @@ svn_ra_serf__credentials_callback(char *
           (void) save_error(session,
                             svn_error_create(
                               SVN_ERR_AUTHN_FAILED, NULL,
-                              _("No more credentials or we tried too many"
+                              _("No more credentials or we tried too many "
                                 "times.\nAuthentication failed")));
           return SVN_ERR_AUTHN_FAILED;
         }
@@ -2266,8 +2265,7 @@ svn_ra_serf__discover_vcc(const char **v
           *vcc_url = svn_prop_get_value(ns_props,
                                         "version-controlled-configuration");
 
-          ns_props = apr_hash_get(props,
-                                  SVN_DAV_PROP_NS_DAV, APR_HASH_KEY_STRING);
+          ns_props = svn_hash_gets(props, SVN_DAV_PROP_NS_DAV);
           relative_path = svn_prop_get_value(ns_props,
                                              "baseline-relative-path");
           uuid = svn_prop_get_value(ns_props, "repository-uuid");

Modified: subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/xml.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/xml.c?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/xml.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/xml.c Sat Mar 30 20:02:27 2013
@@ -26,6 +26,7 @@
 #include <apr_uri.h>
 #include <serf.h>
 
+#include "svn_hash.h"
 #include "svn_pools.h"
 #include "svn_ra.h"
 #include "svn_dav.h"
@@ -560,9 +561,9 @@ svn_ra_serf__xml_note(svn_ra_serf__xml_e
   /* In all likelihood, NAME is a string constant. But we can't really
      be sure. And it isn't like we're storing a billion of these into
      the state pool.  */
-  apr_hash_set(scan->attrs,
-               apr_pstrdup(scan->state_pool, name), APR_HASH_KEY_STRING,
-               apr_pstrdup(scan->state_pool, value));
+  svn_hash_sets(scan->attrs,
+                apr_pstrdup(scan->state_pool, name),
+                apr_pstrdup(scan->state_pool, value));
 }
 
 
@@ -675,8 +676,8 @@ svn_ra_serf__xml_cb_start(svn_ra_serf__x
                 }
 
               if (value)
-                apr_hash_set(new_xes->attrs, name, APR_HASH_KEY_STRING,
-                             apr_pstrdup(new_pool, value));
+                svn_hash_sets(new_xes->attrs, name,
+                              apr_pstrdup(new_pool, value));
             }
         }
     }