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 [8/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_subr/hash.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_subr/hash.c?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_subr/hash.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_subr/hash.c Sat Mar 30 20:02:27 2013
@@ -96,11 +96,14 @@ hash_read(apr_hash_t *hash, svn_stream_t
   svn_stringbuf_t *buf;
   svn_boolean_t eof;
   apr_size_t len, keylen, vallen;
-  char c, *end, *keybuf, *valbuf;
+  char c, *keybuf, *valbuf;
   apr_pool_t *iterpool = svn_pool_create(pool);
 
   while (1)
     {
+      svn_error_t *err;
+      apr_uint64_t ui64;
+
       svn_pool_clear(iterpool);
 
       /* Read a key length line.  Might be END, though. */
@@ -119,10 +122,12 @@ hash_read(apr_hash_t *hash, svn_stream_t
       if ((buf->len >= 3) && (buf->data[0] == 'K') && (buf->data[1] == ' '))
         {
           /* Get the length of the key */
-          keylen = (size_t) strtoul(buf->data + 2, &end, 10);
-          if (keylen == (size_t) ULONG_MAX || *end != '\0')
-            return svn_error_create(SVN_ERR_MALFORMED_FILE, NULL,
+          err = svn_cstring_strtoui64(&ui64, buf->data + 2,
+                                      0, APR_SIZE_MAX, 10);
+          if (err)
+            return svn_error_create(SVN_ERR_MALFORMED_FILE, err,
                                     _("Serialized hash malformed"));
+          keylen = (apr_size_t)ui64;
 
           /* Now read that much into a buffer. */
           keybuf = apr_palloc(pool, keylen + 1);
@@ -141,10 +146,12 @@ hash_read(apr_hash_t *hash, svn_stream_t
 
           if ((buf->data[0] == 'V') && (buf->data[1] == ' '))
             {
-              vallen = (size_t) strtoul(buf->data + 2, &end, 10);
-              if (vallen == (size_t) ULONG_MAX || *end != '\0')
-                return svn_error_create(SVN_ERR_MALFORMED_FILE, NULL,
+              err = svn_cstring_strtoui64(&ui64, buf->data + 2,
+                                          0, APR_SIZE_MAX, 10);
+              if (err)
+                return svn_error_create(SVN_ERR_MALFORMED_FILE, err,
                                         _("Serialized hash malformed"));
+              vallen = (apr_size_t)ui64;
 
               valbuf = apr_palloc(iterpool, vallen + 1);
               SVN_ERR(svn_stream_read(stream, valbuf, &vallen));
@@ -169,10 +176,12 @@ hash_read(apr_hash_t *hash, svn_stream_t
                && (buf->data[0] == 'D') && (buf->data[1] == ' '))
         {
           /* Get the length of the key */
-          keylen = (size_t) strtoul(buf->data + 2, &end, 10);
-          if (keylen == (size_t) ULONG_MAX || *end != '\0')
-            return svn_error_create(SVN_ERR_MALFORMED_FILE, NULL,
+          err = svn_cstring_strtoui64(&ui64, buf->data + 2,
+                                      0, APR_SIZE_MAX, 10);
+          if (err)
+            return svn_error_create(SVN_ERR_MALFORMED_FILE, err,
                                     _("Serialized hash malformed"));
+          keylen = (apr_size_t)ui64;
 
           /* Now read that much into a buffer. */
           keybuf = apr_palloc(iterpool, keylen + 1);
@@ -230,11 +239,16 @@ hash_write(apr_hash_t *hash, apr_hash_t 
             continue;
         }
 
+      if (item->klen < 0)
+        return svn_error_create(SVN_ERR_MALFORMED_FILE, NULL,
+                                _("Cannot serialize negative length"));
+
       /* Write it out. */
       SVN_ERR(svn_stream_printf(stream, subpool,
-                                "K %" APR_SSIZE_T_FMT "\n%s\n"
+                                "K %" APR_SIZE_T_FMT "\n%s\n"
                                 "V %" APR_SIZE_T_FMT "\n",
-                                item->klen, (const char *) item->key,
+                                (apr_size_t) item->klen,
+                                (const char *) item->key,
                                 valstr->len));
       len = valstr->len;
       SVN_ERR(svn_stream_write(stream, valstr->data, &len));
@@ -501,31 +515,28 @@ svn_hash_from_cstring_keys(apr_hash_t **
     {
       const char *key =
         apr_pstrdup(pool, APR_ARRAY_IDX(keys, i, const char *));
-      apr_hash_set(hash, key, APR_HASH_KEY_STRING, key);
+      svn_hash_sets(hash, key, key);
     }
   *hash_p = hash;
   return SVN_NO_ERROR;
 }
 
 
-svn_error_t *
-svn_hash__clear(apr_hash_t *hash, apr_pool_t *pool)
+#if !APR_VERSION_AT_LEAST(1, 3, 0)
+void
+svn_hash__clear(apr_hash_t *hash)
 {
-#if APR_VERSION_AT_LEAST(1, 3, 0)
-  apr_hash_clear(hash);
-#else
   apr_hash_index_t *hi;
   const void *key;
   apr_ssize_t klen;
 
-  for (hi = apr_hash_first(pool, hash); hi; hi = apr_hash_next(hi))
+  for (hi = apr_hash_first(NULL, hash); hi; hi = apr_hash_next(hi))
     {
       apr_hash_this(hi, &key, &klen, NULL);
       apr_hash_set(hash, key, klen, NULL);
     }
-#endif
-  return SVN_NO_ERROR;
 }
+#endif
 
 
 
@@ -538,7 +549,7 @@ svn_hash__get_cstring(apr_hash_t *hash,
 {
   if (hash)
     {
-      const char *value = apr_hash_get(hash, key, APR_HASH_KEY_STRING);
+      const char *value = svn_hash_gets(hash, key);
       return value ? value : default_value;
     }
 

Modified: subversion/branches/fsfs-format7/subversion/libsvn_subr/io.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_subr/io.c?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_subr/io.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_subr/io.c Sat Mar 30 20:02:27 2013
@@ -51,6 +51,7 @@
 #include <arch/win32/apr_arch_file_io.h>
 #endif
 
+#include "svn_hash.h"
 #include "svn_types.h"
 #include "svn_dirent_uri.h"
 #include "svn_path.h"
@@ -2501,7 +2502,7 @@ svn_io_get_dirents3(apr_hash_t **dirents
               dirent->mtime = this_entry.mtime;
             }
 
-          apr_hash_set(*dirents, name, APR_HASH_KEY_STRING, dirent);
+          svn_hash_sets(*dirents, name, dirent);
         }
     }
 
@@ -2606,7 +2607,7 @@ svn_io_stat_dirent2(const svn_io_dirent2
           else
             SVN_ERR(err);
 
-          if (! apr_hash_get(dirents, requested_name, APR_HASH_KEY_STRING))
+          if (! svn_hash_gets(dirents, requested_name))
             {
               if (ignore_enoent)
                 {
@@ -2849,7 +2850,7 @@ svn_io_run_cmd(const char *path,
 {
   apr_proc_t cmd_proc;
 
-  SVN_ERR(svn_io_start_cmd2(&cmd_proc, path, cmd, args, inherit,
+  SVN_ERR(svn_io_start_cmd3(&cmd_proc, path, cmd, args, NULL, inherit,
                             FALSE, infile, FALSE, outfile, FALSE, errfile,
                             pool));
 
@@ -3019,8 +3020,7 @@ svn_io_run_diff3_3(int *exitcode,
     svn_config_t *cfg;
 
     SVN_ERR(svn_config_get_config(&config, pool));
-    cfg = config ? apr_hash_get(config, SVN_CONFIG_CATEGORY_CONFIG,
-                                APR_HASH_KEY_STRING) : NULL;
+    cfg = config ? svn_hash_gets(config, SVN_CONFIG_CATEGORY_CONFIG) : NULL;
     SVN_ERR(svn_config_get_bool(cfg, &has_arg, SVN_CONFIG_SECTION_HELPERS,
                                 SVN_CONFIG_OPTION_DIFF3_HAS_PROGRAM_ARG,
                                 TRUE));
@@ -3136,7 +3136,7 @@ svn_io_parse_mimetypes_file(apr_hash_t *
                * we know svn_cstring_split() allocated it in 'pool' for us. */
               char *ext = APR_ARRAY_IDX(tokens, i, char *);
               fileext_tolower(ext);
-              apr_hash_set(types, ext, APR_HASH_KEY_STRING, type);
+              svn_hash_sets(types, ext, type);
             }
         }
       if (eof)
@@ -3187,8 +3187,7 @@ svn_io_detect_mimetype2(const char **mim
                          svn_path_splitext sets it to "". */
       svn_path_splitext(NULL, (const char **)&path_ext, file, pool);
       fileext_tolower(path_ext);
-      if ((type_from_map = apr_hash_get(mimetype_map, path_ext,
-                                        APR_HASH_KEY_STRING)))
+      if ((type_from_map = svn_hash_gets(mimetype_map, path_ext)))
         {
           *mimetype = type_from_map;
           return SVN_NO_ERROR;

Modified: subversion/branches/fsfs-format7/subversion/libsvn_subr/mergeinfo.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_subr/mergeinfo.c?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_subr/mergeinfo.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_subr/mergeinfo.c Sat Mar 30 20:02:27 2013
@@ -649,11 +649,7 @@ svn_rangelist__combine_adjacent_ranges(s
           if (lastrange->inheritable == range->inheritable)
             {
               lastrange->end = MAX(range->end, lastrange->end);
-              if (i + 1 < rangelist->nelts)
-                memmove(rangelist->elts + (rangelist->elt_size * i),
-                        rangelist->elts + (rangelist->elt_size * (i + 1)),
-                        rangelist->elt_size * (rangelist->nelts - i));
-              rangelist->nelts--;
+              svn_sort__array_delete(rangelist, i, 1);
               i--;
             }
         }
@@ -1853,16 +1849,14 @@ svn_mergeinfo_intersect2(svn_mergeinfo_t
       svn_rangelist_t *rangelist2;
 
       svn_pool_clear(iterpool);
-      rangelist2 = apr_hash_get(mergeinfo2, path, APR_HASH_KEY_STRING);
+      rangelist2 = svn_hash_gets(mergeinfo2, path);
       if (rangelist2)
         {
           SVN_ERR(svn_rangelist_intersect(&rangelist2, rangelist1, rangelist2,
                                           consider_inheritance, iterpool));
           if (rangelist2->nelts > 0)
-            apr_hash_set(*mergeinfo,
-                         apr_pstrdup(result_pool, path),
-                         APR_HASH_KEY_STRING,
-                         svn_rangelist_dup(rangelist2, result_pool));
+            svn_hash_sets(*mergeinfo, apr_pstrdup(result_pool, path),
+                          svn_rangelist_dup(rangelist2, result_pool));
         }
     }
   svn_pool_destroy(iterpool);
@@ -1993,10 +1987,8 @@ svn_mergeinfo_catalog_dup(svn_mergeinfo_
       const char *key = svn__apr_hash_index_key(hi);
       svn_mergeinfo_t val = svn__apr_hash_index_val(hi);
 
-      apr_hash_set(new_mergeinfo_catalog,
-                   apr_pstrdup(pool, key),
-                   APR_HASH_KEY_STRING,
-                   svn_mergeinfo_dup(val, pool));
+      svn_hash_sets(new_mergeinfo_catalog, apr_pstrdup(pool, key),
+                    svn_mergeinfo_dup(val, pool));
     }
 
   return new_mergeinfo_catalog;
@@ -2131,7 +2123,7 @@ svn_mergeinfo__remove_empty_rangelists(s
 
           if (rangelist->nelts == 0)
             {
-              apr_hash_set(mergeinfo, path, APR_HASH_KEY_STRING, NULL);
+              svn_hash_sets(mergeinfo, path, NULL);
               removed_some_ranges = TRUE;
             }
         }
@@ -2160,7 +2152,7 @@ svn_mergeinfo__remove_prefix_from_catalo
       new_path = svn_fspath__skip_ancestor(prefix_path, original_path);
       SVN_ERR_ASSERT(new_path);
 
-      apr_hash_set(*out_catalog, new_path, APR_HASH_KEY_STRING, value);
+      svn_hash_sets(*out_catalog, new_path, value);
     }
 
   return SVN_NO_ERROR;
@@ -2187,9 +2179,9 @@ svn_mergeinfo__add_prefix_to_catalog(svn
       if (original_path[0] == '/')
         original_path++;
 
-      apr_hash_set(*out_catalog,
-                   svn_dirent_join(prefix_path, original_path, result_pool),
-                   APR_HASH_KEY_STRING, value);
+      svn_hash_sets(*out_catalog,
+                    svn_dirent_join(prefix_path, original_path, result_pool),
+                    value);
     }
 
   return SVN_NO_ERROR;
@@ -2215,10 +2207,9 @@ svn_mergeinfo__add_suffix_to_mergeinfo(s
       const char *fspath = svn__apr_hash_index_key(hi);
       svn_rangelist_t *rangelist = svn__apr_hash_index_val(hi);
 
-      apr_hash_set(*out_mergeinfo,
-                   svn_fspath__join(fspath, suffix_relpath, result_pool),
-                   APR_HASH_KEY_STRING,
-                   rangelist);
+      svn_hash_sets(*out_mergeinfo,
+                    svn_fspath__join(fspath, suffix_relpath, result_pool),
+                    rangelist);
     }
 
   return SVN_NO_ERROR;
@@ -2389,10 +2380,8 @@ svn_mergeinfo__filter_catalog_by_ranges(
                                                         result_pool,
                                                         scratch_pool));
       if (apr_hash_count(filtered_mergeinfo))
-        apr_hash_set(*filtered_cat,
-                     apr_pstrdup(result_pool, path),
-                     APR_HASH_KEY_STRING,
-                     filtered_mergeinfo);
+        svn_hash_sets(*filtered_cat,
+                      apr_pstrdup(result_pool, path), filtered_mergeinfo);
     }
 
   return SVN_NO_ERROR;
@@ -2436,10 +2425,8 @@ svn_mergeinfo__filter_mergeinfo_by_range
                         ! include_range, FALSE, result_pool));
 
               if (new_rangelist->nelts)
-                apr_hash_set(*filtered_mergeinfo,
-                             apr_pstrdup(result_pool, path),
-                             APR_HASH_KEY_STRING,
-                             new_rangelist);
+                svn_hash_sets(*filtered_mergeinfo,
+                              apr_pstrdup(result_pool, path), new_rangelist);
             }
         }
     }
@@ -2491,8 +2478,8 @@ svn_mergeinfo__adjust_mergeinfo_rangelis
             }
 
           if (adjusted_rangelist->nelts)
-            apr_hash_set(*adjusted_mergeinfo, apr_pstrdup(result_pool, path),
-                         APR_HASH_KEY_STRING, adjusted_rangelist);
+            svn_hash_sets(*adjusted_mergeinfo, apr_pstrdup(result_pool, path),
+                          adjusted_rangelist);
         }
     }
   return SVN_NO_ERROR;
@@ -2568,7 +2555,7 @@ svn_mergeinfo__mergeinfo_from_segments(s
 
       /* See if we already stored ranges for this path.  If not, make
          a new list.  */
-      path_ranges = apr_hash_get(mergeinfo, source_path, APR_HASH_KEY_STRING);
+      path_ranges = svn_hash_gets(mergeinfo, source_path);
       if (! path_ranges)
         path_ranges = apr_array_make(pool, 1, sizeof(range));
 
@@ -2585,7 +2572,7 @@ svn_mergeinfo__mergeinfo_from_segments(s
       range->end = segment->range_end;
       range->inheritable = TRUE;
       APR_ARRAY_PUSH(path_ranges, svn_merge_range_t *) = range;
-      apr_hash_set(mergeinfo, source_path, APR_HASH_KEY_STRING, path_ranges);
+      svn_hash_sets(mergeinfo, source_path, path_ranges);
     }
 
   *mergeinfo_p = mergeinfo;

Modified: subversion/branches/fsfs-format7/subversion/libsvn_subr/opt.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_subr/opt.c?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_subr/opt.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_subr/opt.c Sat Mar 30 20:02:27 2013
@@ -34,6 +34,7 @@
 #include <apr_lib.h>
 #include <apr_file_info.h>
 
+#include "svn_hash.h"
 #include "svn_cmdline.h"
 #include "svn_version.h"
 #include "svn_types.h"
@@ -978,7 +979,7 @@ svn_opt_parse_revprop(apr_hash_t **revpr
                              _("'%s' is not a valid Subversion property name"),
                              propname);
 
-  apr_hash_set(*revprop_table_p, propname, APR_HASH_KEY_STRING, propval);
+  svn_hash_sets(*revprop_table_p, propname, propval);
 
   return SVN_NO_ERROR;
 }

Modified: subversion/branches/fsfs-format7/subversion/libsvn_subr/pool.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_subr/pool.c?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_subr/pool.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_subr/pool.c Sat Mar 30 20:02:27 2013
@@ -130,8 +130,8 @@ svn_pool_create_allocator(svn_boolean_t 
   if (thread_safe)
     {
       apr_thread_mutex_t *mutex;
-      apr_thread_mutex_create (&mutex, APR_THREAD_MUTEX_DEFAULT, pool);
-      apr_allocator_mutex_set (allocator, mutex);
+      apr_thread_mutex_create(&mutex, APR_THREAD_MUTEX_DEFAULT, pool);
+      apr_allocator_mutex_set(allocator, mutex);
     }
 #endif
 

Modified: subversion/branches/fsfs-format7/subversion/libsvn_subr/properties.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_subr/properties.c?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_subr/properties.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_subr/properties.c Sat Mar 30 20:02:27 2013
@@ -27,6 +27,7 @@
 #include <apr_hash.h>
 #include <apr_tables.h>
 #include <string.h>       /* for strncmp() */
+#include "svn_hash.h"
 #include "svn_string.h"
 #include "svn_props.h"
 #include "svn_error.h"
@@ -331,7 +332,7 @@ svn_prop__patch(const apr_hash_t *origin
     {
       const svn_prop_t *p = &APR_ARRAY_IDX(prop_changes, i, svn_prop_t);
 
-      apr_hash_set(props, p->name, APR_HASH_KEY_STRING, p->value);
+      svn_hash_sets(props, p->name, p->value);
     }
   return props;
 }
@@ -429,7 +430,7 @@ svn_prop_array_to_hash(const apr_array_h
   for (i = 0; i < properties->nelts; i++)
     {
       const svn_prop_t *prop = &APR_ARRAY_IDX(properties, i, svn_prop_t);
-      apr_hash_set(prop_hash, prop->name, APR_HASH_KEY_STRING, prop->value);
+      svn_hash_sets(prop_hash, prop->name, prop->value);
     }
 
   return prop_hash;
@@ -497,7 +498,7 @@ svn_prop_get_value(const apr_hash_t *pro
   if (!props)
     return NULL;
 
-  str = apr_hash_get((apr_hash_t *)props, prop_name, APR_HASH_KEY_STRING);
+  str = svn_hash_gets((apr_hash_t *)props, prop_name);
 
   if (str)
     return str->data;

Modified: subversion/branches/fsfs-format7/subversion/libsvn_subr/simple_providers.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_subr/simple_providers.c?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_subr/simple_providers.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_subr/simple_providers.c Sat Mar 30 20:02:27 2013
@@ -81,10 +81,10 @@ svn_auth__simple_password_get(svn_boolea
 
   *done = FALSE;
 
-  str = apr_hash_get(creds, AUTHN_USERNAME_KEY, APR_HASH_KEY_STRING);
+  str = svn_hash_gets(creds, AUTHN_USERNAME_KEY);
   if (str && username && strcmp(str->data, username) == 0)
     {
-      str = apr_hash_get(creds, AUTHN_PASSWORD_KEY, APR_HASH_KEY_STRING);
+      str = svn_hash_gets(creds, AUTHN_PASSWORD_KEY);
       if (str && str->data)
         {
           *password = str->data;
@@ -107,8 +107,7 @@ svn_auth__simple_password_set(svn_boolea
                               svn_boolean_t non_interactive,
                               apr_pool_t *pool)
 {
-  apr_hash_set(creds, AUTHN_PASSWORD_KEY, APR_HASH_KEY_STRING,
-               svn_string_create(password, pool));
+  svn_hash_sets(creds, AUTHN_PASSWORD_KEY, svn_string_create(password, pool));
   *done = TRUE;
 
   return SVN_NO_ERROR;
@@ -123,7 +122,7 @@ simple_username_get(const char **usernam
                     svn_boolean_t non_interactive)
 {
   svn_string_t *str;
-  str = apr_hash_get(creds, AUTHN_USERNAME_KEY, APR_HASH_KEY_STRING);
+  str = svn_hash_gets(creds, AUTHN_USERNAME_KEY);
   if (str && str->data)
     {
       *username = str->data;
@@ -143,24 +142,18 @@ svn_auth__simple_creds_cache_get(void **
                                  const char *passtype,
                                  apr_pool_t *pool)
 {
-  const char *config_dir = apr_hash_get(parameters,
-                                        SVN_AUTH_PARAM_CONFIG_DIR,
-                                        APR_HASH_KEY_STRING);
-  svn_config_t *cfg = apr_hash_get(parameters,
-                                   SVN_AUTH_PARAM_CONFIG_CATEGORY_SERVERS,
-                                   APR_HASH_KEY_STRING);
-  const char *server_group = apr_hash_get(parameters,
-                                          SVN_AUTH_PARAM_SERVER_GROUP,
-                                          APR_HASH_KEY_STRING);
-  const char *username = apr_hash_get(parameters,
-                                      SVN_AUTH_PARAM_DEFAULT_USERNAME,
-                                      APR_HASH_KEY_STRING);
-  const char *password = apr_hash_get(parameters,
-                                      SVN_AUTH_PARAM_DEFAULT_PASSWORD,
-                                      APR_HASH_KEY_STRING);
-  svn_boolean_t non_interactive = apr_hash_get(parameters,
-                                               SVN_AUTH_PARAM_NON_INTERACTIVE,
-                                               APR_HASH_KEY_STRING) != NULL;
+  const char *config_dir = svn_hash_gets(parameters, SVN_AUTH_PARAM_CONFIG_DIR);
+  svn_config_t *cfg = svn_hash_gets(parameters,
+                                    SVN_AUTH_PARAM_CONFIG_CATEGORY_SERVERS);
+  const char *server_group = svn_hash_gets(parameters,
+                                           SVN_AUTH_PARAM_SERVER_GROUP);
+  const char *username = svn_hash_gets(parameters,
+                                       SVN_AUTH_PARAM_DEFAULT_USERNAME);
+  const char *password = svn_hash_gets(parameters,
+                                       SVN_AUTH_PARAM_DEFAULT_PASSWORD);
+  svn_boolean_t non_interactive = svn_hash_gets(parameters,
+                                                SVN_AUTH_PARAM_NON_INTERACTIVE)
+      != NULL;
   const char *default_username = NULL; /* Default username from cache. */
   const char *default_password = NULL; /* Default password from cache. */
 
@@ -191,7 +184,7 @@ svn_auth__simple_creds_cache_get(void **
       /* The password type in the auth data must match the
          mangler's type, otherwise the password must be
          interpreted by another provider. */
-      str = apr_hash_get(creds_hash, AUTHN_PASSTYPE_KEY, APR_HASH_KEY_STRING);
+      str = svn_hash_gets(creds_hash, AUTHN_PASSTYPE_KEY);
       if (str && str->data)
         if (passtype && (0 == strcmp(str->data, passtype)))
           have_passtype = TRUE;
@@ -319,16 +312,14 @@ svn_auth__simple_creds_cache_set(svn_boo
   const char *config_dir;
   svn_error_t *err;
   svn_boolean_t dont_store_passwords =
-    apr_hash_get(parameters,
-                 SVN_AUTH_PARAM_DONT_STORE_PASSWORDS,
-                 APR_HASH_KEY_STRING) != NULL;
-  svn_boolean_t non_interactive = apr_hash_get(parameters,
-                                               SVN_AUTH_PARAM_NON_INTERACTIVE,
-                                               APR_HASH_KEY_STRING) != NULL;
+    svn_hash_gets(parameters, SVN_AUTH_PARAM_DONT_STORE_PASSWORDS) != NULL;
+  svn_boolean_t non_interactive = svn_hash_gets(parameters,
+                                                SVN_AUTH_PARAM_NON_INTERACTIVE)
+      != NULL;
   svn_boolean_t no_auth_cache =
-    (! creds->may_save) || (apr_hash_get(parameters,
-                                         SVN_AUTH_PARAM_NO_AUTH_CACHE,
-                                         APR_HASH_KEY_STRING) != NULL);
+    (! creds->may_save) || (svn_hash_gets(parameters,
+                                          SVN_AUTH_PARAM_NO_AUTH_CACHE)
+                            != NULL);
 
   /* Make sure we've been passed a passtype. */
   SVN_ERR_ASSERT(passtype != NULL);
@@ -338,14 +329,12 @@ svn_auth__simple_creds_cache_set(svn_boo
   if (no_auth_cache)
     return SVN_NO_ERROR;
 
-  config_dir = apr_hash_get(parameters,
-                            SVN_AUTH_PARAM_CONFIG_DIR,
-                            APR_HASH_KEY_STRING);
+  config_dir = svn_hash_gets(parameters, SVN_AUTH_PARAM_CONFIG_DIR);
 
   /* Put the username into the credentials hash. */
   creds_hash = apr_hash_make(pool);
-  apr_hash_set(creds_hash, AUTHN_USERNAME_KEY, APR_HASH_KEY_STRING,
-               svn_string_create(creds->username, pool));
+  svn_hash_sets(creds_hash, AUTHN_USERNAME_KEY,
+                svn_string_create(creds->username, pool));
 
   /* Don't store passwords in any form if the user has told
    * us not to do so. */
@@ -371,9 +360,7 @@ svn_auth__simple_creds_cache_set(svn_boo
           may_save_password = FALSE;
 #else
           const char *store_plaintext_passwords =
-            apr_hash_get(parameters,
-                         SVN_AUTH_PARAM_STORE_PLAINTEXT_PASSWORDS,
-                         APR_HASH_KEY_STRING);
+            svn_hash_gets(parameters, SVN_AUTH_PARAM_STORE_PLAINTEXT_PASSWORDS);
           simple_provider_baton_t *b =
             (simple_provider_baton_t *)provider_baton;
 
@@ -393,9 +380,8 @@ svn_auth__simple_creds_cache_set(svn_boo
                    *
                    * Check for a cached answer before prompting. */
                   svn_boolean_t *cached_answer;
-                  cached_answer = apr_hash_get(b->plaintext_answers,
-                                               realmstring,
-                                               APR_HASH_KEY_STRING);
+                  cached_answer = svn_hash_gets(b->plaintext_answers,
+                                                realmstring);
                   if (cached_answer != NULL)
                     may_save_password = *cached_answer;
                   else
@@ -421,8 +407,8 @@ svn_auth__simple_creds_cache_set(svn_boo
                       cached_answer = apr_palloc(cached_answer_pool,
                                                  sizeof(svn_boolean_t));
                       *cached_answer = may_save_password;
-                      apr_hash_set(b->plaintext_answers, realmstring,
-                                   APR_HASH_KEY_STRING, cached_answer);
+                      svn_hash_sets(b->plaintext_answers, realmstring,
+                                    cached_answer);
                     }
                 }
               else
@@ -475,8 +461,8 @@ svn_auth__simple_creds_cache_set(svn_boo
           if (*saved && passtype)
             /* Store the password type with the auth data, so that we
                know which provider owns the password. */
-            apr_hash_set(creds_hash, AUTHN_PASSTYPE_KEY, APR_HASH_KEY_STRING,
-                         svn_string_create(passtype, pool));
+            svn_hash_sets(creds_hash, AUTHN_PASSTYPE_KEY,
+                          svn_string_create(passtype, pool));
         }
     }
 
@@ -620,7 +606,8 @@ svn_auth__simple_cleanup_walk(svn_auth_b
             }
 
           {
-            const svn_string_t *realm = svn_hash_gets(file_data, SVN_CONFIG_REALMSTRING_KEY);
+            const svn_string_t *realm = svn_hash_gets(file_data,
+                                                      SVN_CONFIG_REALMSTRING_KEY);
             svn_boolean_t delete_file = FALSE;
 
             if (! realm)
@@ -724,16 +711,14 @@ prompt_for_simple_creds(svn_auth_cred_si
      so. */
   if (first_time)
     {
-      default_username = apr_hash_get(parameters,
-                                      SVN_AUTH_PARAM_DEFAULT_USERNAME,
-                                      APR_HASH_KEY_STRING);
+      default_username = svn_hash_gets(parameters,
+                                       SVN_AUTH_PARAM_DEFAULT_USERNAME);
 
       /* No default username?  Try the auth cache. */
       if (! default_username)
         {
-          const char *config_dir = apr_hash_get(parameters,
-                                                SVN_AUTH_PARAM_CONFIG_DIR,
-                                                APR_HASH_KEY_STRING);
+          const char *config_dir = svn_hash_gets(parameters,
+                                                 SVN_AUTH_PARAM_CONFIG_DIR);
           apr_hash_t *creds_hash = NULL;
           svn_string_t *str;
           svn_error_t *err;
@@ -743,8 +728,7 @@ prompt_for_simple_creds(svn_auth_cred_si
           svn_error_clear(err);
           if (! err && creds_hash)
             {
-              str = apr_hash_get(creds_hash, AUTHN_USERNAME_KEY,
-                                 APR_HASH_KEY_STRING);
+              str = svn_hash_gets(creds_hash, AUTHN_USERNAME_KEY);
               if (str && str->data)
                 default_username = str->data;
             }
@@ -753,12 +737,10 @@ prompt_for_simple_creds(svn_auth_cred_si
       /* Still no default username?  Try the 'servers' file. */
       if (! default_username)
         {
-          svn_config_t *cfg = apr_hash_get(parameters,
-                                           SVN_AUTH_PARAM_CONFIG_CATEGORY_SERVERS,
-                                           APR_HASH_KEY_STRING);
-          const char *server_group = apr_hash_get(parameters,
-                                                  SVN_AUTH_PARAM_SERVER_GROUP,
-                                                  APR_HASH_KEY_STRING);
+          svn_config_t *cfg = svn_hash_gets(parameters,
+                                            SVN_AUTH_PARAM_CONFIG_CATEGORY_SERVERS);
+          const char *server_group = svn_hash_gets(parameters,
+                                                   SVN_AUTH_PARAM_SERVER_GROUP);
           default_username =
             svn_config_get_server_setting(cfg, server_group,
                                           SVN_CONFIG_OPTION_USERNAME,
@@ -769,9 +751,8 @@ prompt_for_simple_creds(svn_auth_cred_si
       if (! default_username)
         default_username = svn_user_get_name(pool);
 
-      default_password = apr_hash_get(parameters,
-                                      SVN_AUTH_PARAM_DEFAULT_PASSWORD,
-                                      APR_HASH_KEY_STRING);
+      default_password = svn_hash_gets(parameters,
+                                       SVN_AUTH_PARAM_DEFAULT_PASSWORD);
     }
 
   /* If we have defaults, just build the cred here and return it.
@@ -809,9 +790,8 @@ simple_prompt_first_creds(void **credent
 {
   simple_prompt_provider_baton_t *pb = provider_baton;
   simple_prompt_iter_baton_t *ibaton = apr_pcalloc(pool, sizeof(*ibaton));
-  const char *no_auth_cache = apr_hash_get(parameters,
-                                           SVN_AUTH_PARAM_NO_AUTH_CACHE,
-                                           APR_HASH_KEY_STRING);
+  const char *no_auth_cache = svn_hash_gets(parameters,
+                                            SVN_AUTH_PARAM_NO_AUTH_CACHE);
 
   SVN_ERR(prompt_for_simple_creds((svn_auth_cred_simple_t **) credentials_p,
                                   pb, parameters, realmstring, TRUE,
@@ -836,9 +816,8 @@ simple_prompt_next_creds(void **credenti
 {
   simple_prompt_iter_baton_t *ib = iter_baton;
   simple_prompt_provider_baton_t *pb = provider_baton;
-  const char *no_auth_cache = apr_hash_get(parameters,
-                                           SVN_AUTH_PARAM_NO_AUTH_CACHE,
-                                           APR_HASH_KEY_STRING);
+  const char *no_auth_cache = svn_hash_gets(parameters,
+                                            SVN_AUTH_PARAM_NO_AUTH_CACHE);
 
   if ((pb->retry_limit >= 0) && (ib->retries >= pb->retry_limit))
     {

Modified: subversion/branches/fsfs-format7/subversion/libsvn_subr/sorts.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_subr/sorts.c?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_subr/sorts.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_subr/sorts.c Sat Mar 30 20:02:27 2013
@@ -28,6 +28,7 @@
 #include <apr_tables.h>
 #include <stdlib.h>       /* for qsort()   */
 #include <assert.h>
+#include "svn_hash.h"
 #include "svn_path.h"
 #include "svn_sorts.h"
 #include "svn_error.h"

Modified: subversion/branches/fsfs-format7/subversion/libsvn_subr/ssl_client_cert_providers.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_subr/ssl_client_cert_providers.c?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_subr/ssl_client_cert_providers.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_subr/ssl_client_cert_providers.c Sat Mar 30 20:02:27 2013
@@ -29,6 +29,7 @@
 /*** Includes. ***/
 
 #include <apr_pools.h>
+#include "svn_hash.h"
 #include "svn_auth.h"
 #include "svn_error.h"
 #include "svn_config.h"
@@ -48,12 +49,10 @@ ssl_client_cert_file_first_credentials(v
                                        const char *realmstring,
                                        apr_pool_t *pool)
 {
-  svn_config_t *cfg = apr_hash_get(parameters,
-                                   SVN_AUTH_PARAM_CONFIG_CATEGORY_SERVERS,
-                                   APR_HASH_KEY_STRING);
-  const char *server_group = apr_hash_get(parameters,
-                                          SVN_AUTH_PARAM_SERVER_GROUP,
-                                          APR_HASH_KEY_STRING);
+  svn_config_t *cfg = svn_hash_gets(parameters,
+                                    SVN_AUTH_PARAM_CONFIG_CATEGORY_SERVERS);
+  const char *server_group = svn_hash_gets(parameters,
+                                           SVN_AUTH_PARAM_SERVER_GROUP);
   const char *cert_file;
 
   cert_file =
@@ -139,9 +138,8 @@ ssl_client_cert_prompt_first_cred(void *
   ssl_client_cert_prompt_provider_baton_t *pb = provider_baton;
   ssl_client_cert_prompt_iter_baton_t *ib =
     apr_pcalloc(pool, sizeof(*ib));
-  const char *no_auth_cache = apr_hash_get(parameters,
-                                           SVN_AUTH_PARAM_NO_AUTH_CACHE,
-                                           APR_HASH_KEY_STRING);
+  const char *no_auth_cache = svn_hash_gets(parameters,
+                                            SVN_AUTH_PARAM_NO_AUTH_CACHE);
 
   SVN_ERR(pb->prompt_func((svn_auth_cred_ssl_client_cert_t **) credentials_p,
                           pb->prompt_baton, realmstring, ! no_auth_cache,
@@ -165,9 +163,8 @@ ssl_client_cert_prompt_next_cred(void **
                                  apr_pool_t *pool)
 {
   ssl_client_cert_prompt_iter_baton_t *ib = iter_baton;
-  const char *no_auth_cache = apr_hash_get(parameters,
-                                           SVN_AUTH_PARAM_NO_AUTH_CACHE,
-                                           APR_HASH_KEY_STRING);
+  const char *no_auth_cache = svn_hash_gets(parameters,
+                                            SVN_AUTH_PARAM_NO_AUTH_CACHE);
 
   if ((ib->pb->retry_limit >= 0) && (ib->retries >= ib->pb->retry_limit))
     {

Modified: subversion/branches/fsfs-format7/subversion/libsvn_subr/ssl_client_cert_pw_providers.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_subr/ssl_client_cert_pw_providers.c?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_subr/ssl_client_cert_pw_providers.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_subr/ssl_client_cert_pw_providers.c Sat Mar 30 20:02:27 2013
@@ -25,6 +25,7 @@
 
 #include <apr_pools.h>
 
+#include "svn_hash.h"
 #include "svn_auth.h"
 #include "svn_error.h"
 #include "svn_config.h"
@@ -74,7 +75,7 @@ svn_auth__ssl_client_cert_pw_get(svn_boo
                                  apr_pool_t *pool)
 {
   svn_string_t *str;
-  str = apr_hash_get(creds, AUTHN_PASSPHRASE_KEY, APR_HASH_KEY_STRING);
+  str = svn_hash_gets(creds, AUTHN_PASSPHRASE_KEY);
   if (str && str->data)
     {
       *passphrase = str->data;
@@ -97,8 +98,8 @@ svn_auth__ssl_client_cert_pw_set(svn_boo
                                  svn_boolean_t non_interactive,
                                  apr_pool_t *pool)
 {
-  apr_hash_set(creds, AUTHN_PASSPHRASE_KEY, APR_HASH_KEY_STRING,
-               svn_string_create(passphrase, pool));
+  svn_hash_sets(creds, AUTHN_PASSPHRASE_KEY,
+                svn_string_create(passphrase, pool));
   *done = TRUE;
   return SVN_NO_ERROR;
 }
@@ -113,15 +114,13 @@ svn_auth__ssl_client_cert_pw_cache_get(v
                                        const char *passtype,
                                        apr_pool_t *pool)
 {
-  svn_config_t *cfg = apr_hash_get(parameters,
-                                   SVN_AUTH_PARAM_CONFIG_CATEGORY_SERVERS,
-                                   APR_HASH_KEY_STRING);
-  const char *server_group = apr_hash_get(parameters,
-                                          SVN_AUTH_PARAM_SERVER_GROUP,
-                                          APR_HASH_KEY_STRING);
-  svn_boolean_t non_interactive = apr_hash_get(parameters,
-                                               SVN_AUTH_PARAM_NON_INTERACTIVE,
-                                               APR_HASH_KEY_STRING) != NULL;
+  svn_config_t *cfg = svn_hash_gets(parameters,
+                                    SVN_AUTH_PARAM_CONFIG_CATEGORY_SERVERS);
+  const char *server_group = svn_hash_gets(parameters,
+                                           SVN_AUTH_PARAM_SERVER_GROUP);
+  svn_boolean_t non_interactive = svn_hash_gets(parameters,
+                                                SVN_AUTH_PARAM_NON_INTERACTIVE)
+      != NULL;
   const char *password =
     svn_config_get_server_setting(cfg, server_group,
                                   SVN_CONFIG_OPTION_SSL_CLIENT_CERT_PASSWORD,
@@ -130,9 +129,8 @@ svn_auth__ssl_client_cert_pw_cache_get(v
     {
       svn_error_t *err;
       apr_hash_t *creds_hash = NULL;
-      const char *config_dir = apr_hash_get(parameters,
-                                            SVN_AUTH_PARAM_CONFIG_DIR,
-                                            APR_HASH_KEY_STRING);
+      const char *config_dir = svn_hash_gets(parameters,
+                                             SVN_AUTH_PARAM_CONFIG_DIR);
 
       /* Try to load passphrase from the auth/ cache. */
       err = svn_config_read_auth_data(&creds_hash,
@@ -179,25 +177,20 @@ svn_auth__ssl_client_cert_pw_cache_set(s
   const char *config_dir;
   svn_error_t *err;
   svn_boolean_t dont_store_passphrase =
-    apr_hash_get(parameters,
-                 SVN_AUTH_PARAM_DONT_STORE_SSL_CLIENT_CERT_PP,
-                 APR_HASH_KEY_STRING) != NULL;
-  svn_boolean_t non_interactive = apr_hash_get(parameters,
-                                               SVN_AUTH_PARAM_NON_INTERACTIVE,
-                                               APR_HASH_KEY_STRING) != NULL;
+    svn_hash_gets(parameters, SVN_AUTH_PARAM_DONT_STORE_SSL_CLIENT_CERT_PP)
+    != NULL;
+  svn_boolean_t non_interactive =
+      svn_hash_gets(parameters, SVN_AUTH_PARAM_NON_INTERACTIVE) != NULL;
   svn_boolean_t no_auth_cache =
-    (! creds->may_save) || (apr_hash_get(parameters,
-                                         SVN_AUTH_PARAM_NO_AUTH_CACHE,
-                                         APR_HASH_KEY_STRING) != NULL);
+    (! creds->may_save)
+    || (svn_hash_gets(parameters, SVN_AUTH_PARAM_NO_AUTH_CACHE) != NULL);
 
   *saved = FALSE;
 
   if (no_auth_cache)
     return SVN_NO_ERROR;
 
-  config_dir = apr_hash_get(parameters,
-                            SVN_AUTH_PARAM_CONFIG_DIR,
-                            APR_HASH_KEY_STRING);
+  config_dir = svn_hash_gets(parameters, SVN_AUTH_PARAM_CONFIG_DIR);
   creds_hash = apr_hash_make(pool);
 
   /* Don't store passphrase in any form if the user has told
@@ -222,9 +215,8 @@ svn_auth__ssl_client_cert_pw_cache_set(s
           may_save_passphrase = FALSE;
 #else
           const char *store_ssl_client_cert_pp_plaintext =
-            apr_hash_get(parameters,
-                         SVN_AUTH_PARAM_STORE_SSL_CLIENT_CERT_PP_PLAINTEXT,
-                         APR_HASH_KEY_STRING);
+            svn_hash_gets(parameters,
+                          SVN_AUTH_PARAM_STORE_SSL_CLIENT_CERT_PP_PLAINTEXT);
           ssl_client_cert_pw_file_provider_baton_t *b =
             (ssl_client_cert_pw_file_provider_baton_t *)provider_baton;
 
@@ -248,8 +240,7 @@ svn_auth__ssl_client_cert_pw_cache_set(s
                      "cached answer is no" and "no answer has been
                      cached yet". */
                   svn_boolean_t *cached_answer =
-                    apr_hash_get(b->plaintext_answers, realmstring,
-                                 APR_HASH_KEY_STRING);
+                    svn_hash_gets(b->plaintext_answers, realmstring);
 
                   if (cached_answer != NULL)
                     {
@@ -279,8 +270,8 @@ svn_auth__ssl_client_cert_pw_cache_set(s
                       cached_answer = apr_palloc(cached_answer_pool,
                                                  sizeof(*cached_answer));
                       *cached_answer = may_save_passphrase;
-                      apr_hash_set(b->plaintext_answers, realmstring,
-                                   APR_HASH_KEY_STRING, cached_answer);
+                      svn_hash_sets(b->plaintext_answers, realmstring,
+                                    cached_answer);
                     }
                 }
               else
@@ -317,9 +308,8 @@ svn_auth__ssl_client_cert_pw_cache_set(s
 
           if (*saved && passtype)
             {
-              apr_hash_set(creds_hash, AUTHN_PASSTYPE_KEY,
-                           APR_HASH_KEY_STRING,
-                           svn_string_create(passtype, pool));
+              svn_hash_sets(creds_hash, AUTHN_PASSTYPE_KEY,
+                            svn_string_create(passtype, pool));
             }
 
           /* Save credentials to disk. */
@@ -445,9 +435,8 @@ ssl_client_cert_pw_prompt_first_cred(voi
   ssl_client_cert_pw_prompt_provider_baton_t *pb = provider_baton;
   ssl_client_cert_pw_prompt_iter_baton_t *ib =
     apr_pcalloc(pool, sizeof(*ib));
-  const char *no_auth_cache = apr_hash_get(parameters,
-                                           SVN_AUTH_PARAM_NO_AUTH_CACHE,
-                                           APR_HASH_KEY_STRING);
+  const char *no_auth_cache = svn_hash_gets(parameters,
+                                            SVN_AUTH_PARAM_NO_AUTH_CACHE);
 
   SVN_ERR(pb->prompt_func((svn_auth_cred_ssl_client_cert_pw_t **)
                           credentials_p, pb->prompt_baton, realmstring,
@@ -471,9 +460,8 @@ ssl_client_cert_pw_prompt_next_cred(void
                                     apr_pool_t *pool)
 {
   ssl_client_cert_pw_prompt_iter_baton_t *ib = iter_baton;
-  const char *no_auth_cache = apr_hash_get(parameters,
-                                           SVN_AUTH_PARAM_NO_AUTH_CACHE,
-                                           APR_HASH_KEY_STRING);
+  const char *no_auth_cache = svn_hash_gets(parameters,
+                                            SVN_AUTH_PARAM_NO_AUTH_CACHE);
 
   if ((ib->pb->retry_limit >= 0) && (ib->retries >= ib->pb->retry_limit))
     {

Modified: subversion/branches/fsfs-format7/subversion/libsvn_subr/ssl_server_trust_providers.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_subr/ssl_server_trust_providers.c?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_subr/ssl_server_trust_providers.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_subr/ssl_server_trust_providers.c Sat Mar 30 20:02:27 2013
@@ -24,6 +24,7 @@
 
 #include <apr_pools.h>
 
+#include "svn_hash.h"
 #include "svn_auth.h"
 #include "svn_error.h"
 #include "svn_config.h"
@@ -50,13 +51,10 @@ ssl_server_trust_file_first_credentials(
                                         const char *realmstring,
                                         apr_pool_t *pool)
 {
-  apr_uint32_t *failures = apr_hash_get(parameters,
-                                        SVN_AUTH_PARAM_SSL_SERVER_FAILURES,
-                                        APR_HASH_KEY_STRING);
+  apr_uint32_t *failures = svn_hash_gets(parameters,
+                                         SVN_AUTH_PARAM_SSL_SERVER_FAILURES);
   const svn_auth_ssl_server_cert_info_t *cert_info =
-    apr_hash_get(parameters,
-                 SVN_AUTH_PARAM_SSL_SERVER_CERT_INFO,
-                 APR_HASH_KEY_STRING);
+    svn_hash_gets(parameters, SVN_AUTH_PARAM_SSL_SERVER_CERT_INFO);
   apr_hash_t *creds_hash = NULL;
   const char *config_dir;
   svn_error_t *error = SVN_NO_ERROR;
@@ -65,9 +63,7 @@ ssl_server_trust_file_first_credentials(
   *iter_baton = NULL;
 
   /* Check if this is a permanently accepted certificate */
-  config_dir = apr_hash_get(parameters,
-                            SVN_AUTH_PARAM_CONFIG_DIR,
-                            APR_HASH_KEY_STRING);
+  config_dir = svn_hash_gets(parameters, SVN_AUTH_PARAM_CONFIG_DIR);
   error =
     svn_config_read_auth_data(&creds_hash, SVN_AUTH_CRED_SSL_SERVER_TRUST,
                               realmstring, config_dir, pool);
@@ -77,11 +73,9 @@ ssl_server_trust_file_first_credentials(
       svn_string_t *trusted_cert, *this_cert, *failstr;
       apr_uint32_t last_failures = 0;
 
-      trusted_cert = apr_hash_get(creds_hash, AUTHN_ASCII_CERT_KEY,
-                                  APR_HASH_KEY_STRING);
+      trusted_cert = svn_hash_gets(creds_hash, AUTHN_ASCII_CERT_KEY);
       this_cert = svn_string_create(cert_info->ascii_cert, pool);
-      failstr = apr_hash_get(creds_hash, AUTHN_FAILURES_KEY,
-                             APR_HASH_KEY_STRING);
+      failstr = svn_hash_gets(creds_hash, AUTHN_FAILURES_KEY);
 
       if (failstr)
         {
@@ -131,20 +125,17 @@ ssl_server_trust_file_save_credentials(s
   if (! creds->may_save)
     return SVN_NO_ERROR;
 
-  config_dir = apr_hash_get(parameters,
-                            SVN_AUTH_PARAM_CONFIG_DIR,
-                            APR_HASH_KEY_STRING);
-
-  cert_info = apr_hash_get(parameters,
-                           SVN_AUTH_PARAM_SSL_SERVER_CERT_INFO,
-                           APR_HASH_KEY_STRING);
+  config_dir = svn_hash_gets(parameters, SVN_AUTH_PARAM_CONFIG_DIR);
+
+  cert_info = svn_hash_gets(parameters, SVN_AUTH_PARAM_SSL_SERVER_CERT_INFO);
 
   creds_hash = apr_hash_make(pool);
-  apr_hash_set(creds_hash, AUTHN_ASCII_CERT_KEY, APR_HASH_KEY_STRING,
-               svn_string_create(cert_info->ascii_cert, pool));
-  apr_hash_set(creds_hash, AUTHN_FAILURES_KEY, APR_HASH_KEY_STRING,
-               svn_string_createf(pool, "%lu", (unsigned long)
-                                  creds->accepted_failures));
+  svn_hash_sets(creds_hash, AUTHN_ASCII_CERT_KEY,
+                svn_string_create(cert_info->ascii_cert, pool));
+  svn_hash_sets(creds_hash,
+                AUTHN_FAILURES_KEY,
+                svn_string_createf(pool, "%lu",
+                                   (unsigned long)creds->accepted_failures));
 
   SVN_ERR(svn_config_write_auth_data(creds_hash,
                                      SVN_AUTH_CRED_SSL_SERVER_TRUST,
@@ -198,16 +189,12 @@ ssl_server_trust_prompt_first_cred(void 
                                    apr_pool_t *pool)
 {
   ssl_server_trust_prompt_provider_baton_t *pb = provider_baton;
-  apr_uint32_t *failures = apr_hash_get(parameters,
-                                        SVN_AUTH_PARAM_SSL_SERVER_FAILURES,
-                                        APR_HASH_KEY_STRING);
-  const char *no_auth_cache = apr_hash_get(parameters,
-                                           SVN_AUTH_PARAM_NO_AUTH_CACHE,
-                                           APR_HASH_KEY_STRING);
+  apr_uint32_t *failures = svn_hash_gets(parameters,
+                                         SVN_AUTH_PARAM_SSL_SERVER_FAILURES);
+  const char *no_auth_cache = svn_hash_gets(parameters,
+                                            SVN_AUTH_PARAM_NO_AUTH_CACHE);
   const svn_auth_ssl_server_cert_info_t *cert_info =
-    apr_hash_get(parameters,
-                 SVN_AUTH_PARAM_SSL_SERVER_CERT_INFO,
-                 APR_HASH_KEY_STRING);
+    svn_hash_gets(parameters, SVN_AUTH_PARAM_SSL_SERVER_CERT_INFO);
   svn_boolean_t may_save = (!no_auth_cache
                             && !(*failures & SVN_AUTH_SSL_OTHER));
 

Modified: subversion/branches/fsfs-format7/subversion/libsvn_subr/stream.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_subr/stream.c?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_subr/stream.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_subr/stream.c Sat Mar 30 20:02:27 2013
@@ -1783,6 +1783,19 @@ seek_handler_lazyopen(void *baton,
   return SVN_NO_ERROR;
 }
 
+/* Implements svn_stream__is_buffered_fn_t */
+static svn_boolean_t
+is_buffered_lazyopen(void *baton)
+{
+  lazyopen_baton_t *b = baton;
+
+  /* No lazy open as we cannot handle an open error. */
+  if (!b->real_stream)
+    return FALSE;
+
+  return svn_stream__is_buffered(b->real_stream);
+}
+
 svn_stream_t *
 svn_stream_lazyopen_create(svn_stream_lazyopen_func_t open_func,
                            void *open_baton,
@@ -1803,6 +1816,7 @@ svn_stream_lazyopen_create(svn_stream_la
   svn_stream_set_close(stream, close_handler_lazyopen);
   svn_stream_set_mark(stream, mark_handler_lazyopen);
   svn_stream_set_seek(stream, seek_handler_lazyopen);
+  svn_stream__set_is_buffered(stream, is_buffered_lazyopen);
   
   return stream;
 }

Modified: subversion/branches/fsfs-format7/subversion/libsvn_subr/subst.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_subr/subst.c?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_subr/subst.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_subr/subst.c Sat Mar 30 20:02:27 2013
@@ -33,6 +33,7 @@
 #include <apr_file_io.h>
 #include <apr_strings.h>
 
+#include "svn_hash.h"
 #include "svn_cmdline.h"
 #include "svn_types.h"
 #include "svn_string.h"
@@ -254,23 +255,23 @@ svn_subst_build_keywords(svn_subst_keywo
    * only if the relevant keyword was present in keywords_val, otherwise
    * leaving that slot untouched. */
 
-  val = apr_hash_get(kwhash, SVN_KEYWORD_REVISION_LONG, APR_HASH_KEY_STRING);
+  val = svn_hash_gets(kwhash, SVN_KEYWORD_REVISION_LONG);
   if (val)
     kw->revision = val;
 
-  val = apr_hash_get(kwhash, SVN_KEYWORD_DATE_LONG, APR_HASH_KEY_STRING);
+  val = svn_hash_gets(kwhash, SVN_KEYWORD_DATE_LONG);
   if (val)
     kw->date = val;
 
-  val = apr_hash_get(kwhash, SVN_KEYWORD_AUTHOR_LONG, APR_HASH_KEY_STRING);
+  val = svn_hash_gets(kwhash, SVN_KEYWORD_AUTHOR_LONG);
   if (val)
     kw->author = val;
 
-  val = apr_hash_get(kwhash, SVN_KEYWORD_URL_LONG, APR_HASH_KEY_STRING);
+  val = svn_hash_gets(kwhash, SVN_KEYWORD_URL_LONG);
   if (val)
     kw->url = val;
 
-  val = apr_hash_get(kwhash, SVN_KEYWORD_ID, APR_HASH_KEY_STRING);
+  val = svn_hash_gets(kwhash, SVN_KEYWORD_ID);
   if (val)
     kw->id = val;
 
@@ -304,12 +305,9 @@ svn_subst_build_keywords2(apr_hash_t **k
           svn_string_t *revision_val;
 
           revision_val = keyword_printf("%r", rev, url, date, author, pool);
-          apr_hash_set(*kw, SVN_KEYWORD_REVISION_LONG,
-                       APR_HASH_KEY_STRING, revision_val);
-          apr_hash_set(*kw, SVN_KEYWORD_REVISION_MEDIUM,
-                       APR_HASH_KEY_STRING, revision_val);
-          apr_hash_set(*kw, SVN_KEYWORD_REVISION_SHORT,
-                       APR_HASH_KEY_STRING, revision_val);
+          svn_hash_sets(*kw, SVN_KEYWORD_REVISION_LONG, revision_val);
+          svn_hash_sets(*kw, SVN_KEYWORD_REVISION_MEDIUM, revision_val);
+          svn_hash_sets(*kw, SVN_KEYWORD_REVISION_SHORT, revision_val);
         }
       else if ((! strcmp(keyword, SVN_KEYWORD_DATE_LONG))
                || (! svn_cstring_casecmp(keyword, SVN_KEYWORD_DATE_SHORT)))
@@ -317,10 +315,8 @@ svn_subst_build_keywords2(apr_hash_t **k
           svn_string_t *date_val;
 
           date_val = keyword_printf("%D", rev, url, date, author, pool);
-          apr_hash_set(*kw, SVN_KEYWORD_DATE_LONG,
-                       APR_HASH_KEY_STRING, date_val);
-          apr_hash_set(*kw, SVN_KEYWORD_DATE_SHORT,
-                       APR_HASH_KEY_STRING, date_val);
+          svn_hash_sets(*kw, SVN_KEYWORD_DATE_LONG, date_val);
+          svn_hash_sets(*kw, SVN_KEYWORD_DATE_SHORT, date_val);
         }
       else if ((! strcmp(keyword, SVN_KEYWORD_AUTHOR_LONG))
                || (! svn_cstring_casecmp(keyword, SVN_KEYWORD_AUTHOR_SHORT)))
@@ -328,10 +324,8 @@ svn_subst_build_keywords2(apr_hash_t **k
           svn_string_t *author_val;
 
           author_val = keyword_printf("%a", rev, url, date, author, pool);
-          apr_hash_set(*kw, SVN_KEYWORD_AUTHOR_LONG,
-                       APR_HASH_KEY_STRING, author_val);
-          apr_hash_set(*kw, SVN_KEYWORD_AUTHOR_SHORT,
-                       APR_HASH_KEY_STRING, author_val);
+          svn_hash_sets(*kw, SVN_KEYWORD_AUTHOR_LONG, author_val);
+          svn_hash_sets(*kw, SVN_KEYWORD_AUTHOR_SHORT, author_val);
         }
       else if ((! strcmp(keyword, SVN_KEYWORD_URL_LONG))
                || (! svn_cstring_casecmp(keyword, SVN_KEYWORD_URL_SHORT)))
@@ -339,10 +333,8 @@ svn_subst_build_keywords2(apr_hash_t **k
           svn_string_t *url_val;
 
           url_val = keyword_printf("%u", rev, url, date, author, pool);
-          apr_hash_set(*kw, SVN_KEYWORD_URL_LONG,
-                       APR_HASH_KEY_STRING, url_val);
-          apr_hash_set(*kw, SVN_KEYWORD_URL_SHORT,
-                       APR_HASH_KEY_STRING, url_val);
+          svn_hash_sets(*kw, SVN_KEYWORD_URL_LONG, url_val);
+          svn_hash_sets(*kw, SVN_KEYWORD_URL_SHORT, url_val);
         }
       else if ((! svn_cstring_casecmp(keyword, SVN_KEYWORD_ID)))
         {
@@ -350,8 +342,7 @@ svn_subst_build_keywords2(apr_hash_t **k
 
           id_val = keyword_printf("%b %r %d %a", rev, url, date, author,
                                   pool);
-          apr_hash_set(*kw, SVN_KEYWORD_ID,
-                       APR_HASH_KEY_STRING, id_val);
+          svn_hash_sets(*kw, SVN_KEYWORD_ID, id_val);
         }
       else if ((! svn_cstring_casecmp(keyword, SVN_KEYWORD_HEADER)))
         {
@@ -359,8 +350,7 @@ svn_subst_build_keywords2(apr_hash_t **k
 
           header_val = keyword_printf("%u %r %d %a", rev, url, date, author,
                                       pool);
-          apr_hash_set(*kw, SVN_KEYWORD_HEADER,
-                       APR_HASH_KEY_STRING, header_val);
+          svn_hash_sets(*kw, SVN_KEYWORD_HEADER, header_val);
         }
     }
 
@@ -559,7 +549,7 @@ match_keyword(char *buf,
     keyword_name[i] = buf[i + 1];
   keyword_name[i] = '\0';
 
-  return apr_hash_get(keywords, keyword_name, APR_HASH_KEY_STRING) != NULL;
+  return svn_hash_gets(keywords, keyword_name) != NULL;
 }
 
 /* Try to translate keyword *KEYWORD_NAME in BUF (whose length is LEN):
@@ -595,7 +585,7 @@ translate_keyword(char *buf,
   if (! keywords)
     return FALSE;
 
-  value = apr_hash_get(keywords, keyword_name, APR_HASH_KEY_STRING);
+  value = svn_hash_gets(keywords, keyword_name);
 
   if (value)
     {
@@ -1448,9 +1438,8 @@ stream_translated(svn_stream_t *stream,
               void *val;
 
               apr_hash_this(hi, &key, NULL, &val);
-              apr_hash_set(copy, apr_pstrdup(result_pool, key),
-                           APR_HASH_KEY_STRING,
-                           svn_string_dup(val, result_pool));
+              svn_hash_sets(copy, apr_pstrdup(result_pool, key),
+                            svn_string_dup(val, result_pool));
             }
           svn_pool_destroy(subpool);
 

Modified: subversion/branches/fsfs-format7/subversion/libsvn_subr/types.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_subr/types.c?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_subr/types.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_subr/types.c Sat Mar 30 20:02:27 2013
@@ -24,6 +24,7 @@
 #include <apr_pools.h>
 #include <apr_uuid.h>
 
+#include "svn_hash.h"
 #include "svn_types.h"
 #include "svn_error.h"
 #include "svn_string.h"
@@ -121,37 +122,6 @@ svn_depth_from_word(const char *word)
   return svn_depth_unknown;
 }
 
-svn_node_kind_t
-svn__node_kind_from_kind(svn_kind_t kind)
-{
-  switch (kind)
-    {
-    case svn_kind_unknown:  return svn_node_unknown;
-    case svn_kind_none:     return svn_node_none;
-    case svn_kind_file:     return svn_node_file;
-    case svn_kind_dir:      return svn_node_dir;
-    case svn_kind_symlink:  return svn_node_file;
-    default: SVN_ERR_MALFUNCTION_NO_RETURN();
-    }
-}
-
-svn_kind_t
-svn__kind_from_node_kind(svn_node_kind_t kind,
-                         svn_boolean_t is_symlink)
-{
-  if (is_symlink)
-    return svn_kind_symlink;
-
-  switch (kind)
-    {
-    case svn_node_unknown:  return svn_kind_unknown;
-    case svn_node_none:     return svn_kind_none;
-    case svn_node_file:     return svn_kind_file;
-    case svn_node_dir:      return svn_kind_dir;
-    default: SVN_ERR_MALFUNCTION_NO_RETURN();
-    }
-}
-
 const char *
 svn_node_kind_to_word(svn_node_kind_t kind)
 {
@@ -163,6 +133,8 @@ svn_node_kind_to_word(svn_node_kind_t ki
       return "file";
     case svn_node_dir:
       return "dir";
+    case svn_node_symlink:
+      return "symlink";
     case svn_node_unknown:
     default:
       return "unknown";
@@ -182,6 +154,8 @@ svn_node_kind_from_word(const char *word
     return svn_node_file;
   else if (strcmp(word, "dir") == 0)
     return svn_node_dir;
+  else if (strcmp(word, "symlink") == 0)
+    return svn_node_symlink;
   else
     /* This also handles word == "unknown" */
     return svn_node_unknown;
@@ -339,9 +313,8 @@ svn_log_entry_dup(const svn_log_entry_t 
 
           apr_hash_this(hi, &key, NULL, &change);
 
-          apr_hash_set(new_entry->changed_paths2, apr_pstrdup(pool, key),
-                       APR_HASH_KEY_STRING,
-                       svn_log_changed_path2_dup(change, pool));
+          svn_hash_sets(new_entry->changed_paths2, apr_pstrdup(pool, key),
+                        svn_log_changed_path2_dup(change, pool));
         }
     }
 

Modified: subversion/branches/fsfs-format7/subversion/libsvn_subr/username_providers.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_subr/username_providers.c?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_subr/username_providers.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_subr/username_providers.c Sat Mar 30 20:02:27 2013
@@ -28,6 +28,7 @@
 /*** Includes. ***/
 
 #include <apr_pools.h>
+#include "svn_hash.h"
 #include "svn_auth.h"
 #include "svn_error.h"
 #include "svn_utf.h"
@@ -54,12 +55,10 @@ username_first_creds(void **credentials,
                      const char *realmstring,
                      apr_pool_t *pool)
 {
-  const char *config_dir = apr_hash_get(parameters,
-                                        SVN_AUTH_PARAM_CONFIG_DIR,
-                                        APR_HASH_KEY_STRING);
-  const char *username = apr_hash_get(parameters,
-                                      SVN_AUTH_PARAM_DEFAULT_USERNAME,
-                                      APR_HASH_KEY_STRING);
+  const char *config_dir = svn_hash_gets(parameters,
+                                         SVN_AUTH_PARAM_CONFIG_DIR);
+  const char *username = svn_hash_gets(parameters,
+                                       SVN_AUTH_PARAM_DEFAULT_USERNAME);
   svn_boolean_t may_save = !! username;
   svn_error_t *err;
 
@@ -78,8 +77,7 @@ username_first_creds(void **credentials,
       svn_error_clear(err);
       if (! err && creds_hash)
         {
-          svn_string_t *str = apr_hash_get(creds_hash, AUTHN_USERNAME_KEY,
-                                           APR_HASH_KEY_STRING);
+          svn_string_t *str = svn_hash_gets(creds_hash, AUTHN_USERNAME_KEY);
           if (str && str->data)
             username = str->data;
         }
@@ -123,14 +121,12 @@ username_save_creds(svn_boolean_t *saved
   if (! creds->may_save)
     return SVN_NO_ERROR;
 
-  config_dir = apr_hash_get(parameters,
-                            SVN_AUTH_PARAM_CONFIG_DIR,
-                            APR_HASH_KEY_STRING);
+  config_dir = svn_hash_gets(parameters, SVN_AUTH_PARAM_CONFIG_DIR);
 
   /* Put the credentials in a hash and save it to disk */
   creds_hash = apr_hash_make(pool);
-  apr_hash_set(creds_hash, AUTHN_USERNAME_KEY, APR_HASH_KEY_STRING,
-               svn_string_create(creds->username, pool));
+  svn_hash_sets(creds_hash, AUTHN_USERNAME_KEY,
+                svn_string_create(creds->username, pool));
   err = svn_config_write_auth_data(creds_hash, SVN_AUTH_CRED_USERNAME,
                                    realmstring, config_dir, pool);
   svn_error_clear(err);
@@ -200,9 +196,7 @@ prompt_for_username_creds(svn_auth_cred_
 
   /* If we're allowed to check for default usernames, do so. */
   if (first_time)
-    def_username = apr_hash_get(parameters,
-                                SVN_AUTH_PARAM_DEFAULT_USERNAME,
-                                APR_HASH_KEY_STRING);
+    def_username = svn_hash_gets(parameters, SVN_AUTH_PARAM_DEFAULT_USERNAME);
 
   /* If we have defaults, just build the cred here and return it.
    *
@@ -238,9 +232,8 @@ username_prompt_first_creds(void **crede
 {
   username_prompt_provider_baton_t *pb = provider_baton;
   username_prompt_iter_baton_t *ibaton = apr_pcalloc(pool, sizeof(*ibaton));
-  const char *no_auth_cache = apr_hash_get(parameters,
-                                           SVN_AUTH_PARAM_NO_AUTH_CACHE,
-                                           APR_HASH_KEY_STRING);
+  const char *no_auth_cache = svn_hash_gets(parameters,
+                                            SVN_AUTH_PARAM_NO_AUTH_CACHE);
 
   SVN_ERR(prompt_for_username_creds
           ((svn_auth_cred_username_t **) credentials_p, pb,
@@ -266,9 +259,8 @@ username_prompt_next_creds(void **creden
 {
   username_prompt_iter_baton_t *ib = iter_baton;
   username_prompt_provider_baton_t *pb = provider_baton;
-  const char *no_auth_cache = apr_hash_get(parameters,
-                                           SVN_AUTH_PARAM_NO_AUTH_CACHE,
-                                           APR_HASH_KEY_STRING);
+  const char *no_auth_cache = svn_hash_gets(parameters,
+                                            SVN_AUTH_PARAM_NO_AUTH_CACHE);
 
   if ((pb->retry_limit >= 0) && (ib->retries >= pb->retry_limit))
     {

Modified: subversion/branches/fsfs-format7/subversion/libsvn_subr/utf.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_subr/utf.c?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_subr/utf.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_subr/utf.c Sat Mar 30 20:02:27 2013
@@ -32,6 +32,7 @@
 #include <apr_xlate.h>
 #include <apr_atomic.h>
 
+#include "svn_hash.h"
 #include "svn_string.h"
 #include "svn_error.h"
 #include "svn_pools.h"
@@ -292,9 +293,8 @@ get_xlate_handle_node_internal(xlate_han
       xlate_handle_node_t *old_node = NULL;
 
       /* 2nd level: hash lookup */
-      xlate_handle_node_t **old_node_p = apr_hash_get(xlate_handle_hash,
-                                                      userdata_key,
-                                                      APR_HASH_KEY_STRING);
+      xlate_handle_node_t **old_node_p = svn_hash_gets(xlate_handle_hash,
+                                                       userdata_key);
       if (old_node_p)
         old_node = *old_node_p;
       if (old_node)
@@ -388,9 +388,7 @@ static svn_error_t *
 put_xlate_handle_node_internal(xlate_handle_node_t *node,
                                const char *userdata_key)
 {
-  xlate_handle_node_t **node_p = apr_hash_get(xlate_handle_hash,
-                                              userdata_key,
-                                              APR_HASH_KEY_STRING);
+  xlate_handle_node_t **node_p = svn_hash_gets(xlate_handle_hash, userdata_key);
   if (node_p == NULL)
     {
       userdata_key = apr_pstrdup(apr_hash_pool_get(xlate_handle_hash),
@@ -398,8 +396,7 @@ put_xlate_handle_node_internal(xlate_han
       node_p = apr_palloc(apr_hash_pool_get(xlate_handle_hash),
                           sizeof(*node_p));
       *node_p = NULL;
-      apr_hash_set(xlate_handle_hash, userdata_key,
-                    APR_HASH_KEY_STRING, node_p);
+      svn_hash_sets(xlate_handle_hash, userdata_key, node_p);
     }
   node->next = *node_p;
   *node_p = node;

Modified: subversion/branches/fsfs-format7/subversion/libsvn_subr/utf_validate.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_subr/utf_validate.c?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_subr/utf_validate.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_subr/utf_validate.c Sat Mar 30 20:02:27 2013
@@ -308,6 +308,13 @@ first_non_fsm_start_char_cstring(const c
       return data;
 
   /* Scan the input one machine word at a time. */
+#ifndef SVN_UTF_NO_UNINITIALISED_ACCESS
+  /* This may read allocated but initialised bytes beyond the
+     terminating null.  Any such bytes are always readable and this
+     code operates correctly whatever the uninitialised values happen
+     to be.  However memory checking tools such as valgrind and GCC
+     4.8's address santitizer will object so this bit of code can be
+     disabled at compile time. */
   for (; ; data += sizeof(apr_uintptr_t))
     {
       /* Check for non-ASCII chars: */
@@ -320,6 +327,7 @@ first_non_fsm_start_char_cstring(const c
       if ((chunk & SVN__BIT_7_SET) != SVN__BIT_7_SET)
         break;
     }
+#endif
 
   /* The remaining odd bytes will be examined the naive way: */
   for (; ; ++data)
@@ -352,6 +360,10 @@ svn_boolean_t
 svn_utf__cstring_is_valid(const char *data)
 {
   int state = FSM_START;
+
+  if (!data)
+    return FALSE;
+
   data = first_non_fsm_start_char_cstring(data);
 
   while (*data)
@@ -368,6 +380,10 @@ svn_utf__is_valid(const char *data, apr_
 {
   const char *end = data + len;
   int state = FSM_START;
+
+  if (!data)
+    return FALSE;
+
   data = first_non_fsm_start_char(data, len);
 
   while (data < end)

Modified: subversion/branches/fsfs-format7/subversion/libsvn_subr/version.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_subr/version.c?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_subr/version.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_subr/version.c Sat Mar 30 20:02:27 2013
@@ -206,7 +206,9 @@ svn_version__parse_version_string(svn_ve
     svn_cstring_split(version_string, ".", FALSE, result_pool);
 
   if ((pieces->nelts < 2) || (pieces->nelts > 3))
-    return svn_error_create(SVN_ERR_MALFORMED_VERSION_STRING, NULL, NULL);
+    return svn_error_createf(SVN_ERR_MALFORMED_VERSION_STRING, NULL,
+                             _("Failed to parse version number string '%s'"),
+                             version_string);
 
   version = apr_pcalloc(result_pool, sizeof(*version));
   version->tag = "";
@@ -215,11 +217,15 @@ svn_version__parse_version_string(svn_ve
   err = svn_cstring_atoi(&(version->major),
                          APR_ARRAY_IDX(pieces, 0, const char *));
   if (err)
-    return svn_error_create(SVN_ERR_MALFORMED_VERSION_STRING, err, NULL);
+    return svn_error_createf(SVN_ERR_MALFORMED_VERSION_STRING, err,
+                             _("Failed to parse version number string '%s'"),
+                             version_string);
   err = svn_cstring_atoi(&(version->minor),
                          APR_ARRAY_IDX(pieces, 1, const char *));
   if (err)
-    return svn_error_create(SVN_ERR_MALFORMED_VERSION_STRING, err, NULL);
+    return svn_error_createf(SVN_ERR_MALFORMED_VERSION_STRING, err,
+                             _("Failed to parse version number string '%s'"),
+                             version_string);
 
   /* If there's a third component, we'll parse it, too.  But we don't
      require that it be present. */
@@ -234,10 +240,17 @@ svn_version__parse_version_string(svn_ve
         }
       err = svn_cstring_atoi(&(version->patch), piece);
       if (err)
-        return svn_error_create(SVN_ERR_MALFORMED_VERSION_STRING,
-                                err, NULL);
+        return svn_error_createf(SVN_ERR_MALFORMED_VERSION_STRING, err,
+                                 _("Failed to parse version number string '%s'"
+                                  ),
+                                 version_string);
     }
 
+  if (version->major < 0 || version->minor < 0 || version->patch < 0)
+    return svn_error_createf(SVN_ERR_MALFORMED_VERSION_STRING, err,
+                             _("Failed to parse version number string '%s'"),
+                             version_string);
+
   *version_p = version;
   return SVN_NO_ERROR;
 }

Modified: subversion/branches/fsfs-format7/subversion/libsvn_subr/win32_crashrpt.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_subr/win32_crashrpt.c?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_subr/win32_crashrpt.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_subr/win32_crashrpt.c Sat Mar 30 20:02:27 2013
@@ -33,6 +33,7 @@ typedef int win32_crashrpt__dummy;
 #include <direct.h>
 #include <stdio.h>
 #include <stdlib.h>
+#include <time.h>
 
 #include "svn_version.h"
 

Modified: subversion/branches/fsfs-format7/subversion/libsvn_subr/win32_crypto.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_subr/win32_crypto.c?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_subr/win32_crypto.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_subr/win32_crypto.c Sat Mar 30 20:02:27 2013
@@ -34,6 +34,7 @@ typedef int win32_crypto__dummy;
 #include <apr_base64.h>
 #include "svn_auth.h"
 #include "svn_error.h"
+#include "svn_hash.h"
 #include "svn_utf.h"
 #include "svn_config.h"
 #include "svn_user.h"
@@ -435,13 +436,10 @@ windows_ssl_server_trust_first_credentia
                                            const char *realmstring,
                                            apr_pool_t *pool)
 {
-  apr_uint32_t *failures = apr_hash_get(parameters,
-                                        SVN_AUTH_PARAM_SSL_SERVER_FAILURES,
-                                        APR_HASH_KEY_STRING);
+  apr_uint32_t *failures = svn_hash_gets(parameters,
+                                         SVN_AUTH_PARAM_SSL_SERVER_FAILURES);
   const svn_auth_ssl_server_cert_info_t *cert_info =
-    apr_hash_get(parameters,
-                 SVN_AUTH_PARAM_SSL_SERVER_CERT_INFO,
-                 APR_HASH_KEY_STRING);
+    svn_hash_gets(parameters, SVN_AUTH_PARAM_SSL_SERVER_CERT_INFO);
 
   *credentials = NULL;
   *iter_baton = NULL;

Modified: subversion/branches/fsfs-format7/subversion/libsvn_subr/xml.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_subr/xml.c?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_subr/xml.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_subr/xml.c Sat Mar 30 20:02:27 2013
@@ -27,6 +27,7 @@
 #include <assert.h>
 
 #include "svn_private_config.h"         /* for SVN_HAVE_OLD_EXPAT */
+#include "svn_hash.h"
 #include "svn_pools.h"
 #include "svn_xml.h"
 #include "svn_error.h"
@@ -533,7 +534,7 @@ svn_xml_ap_to_hash(va_list ap, apr_pool_
   while ((key = va_arg(ap, char *)) != NULL)
     {
       const char *val = va_arg(ap, const char *);
-      apr_hash_set(ht, key, APR_HASH_KEY_STRING, val);
+      svn_hash_sets(ht, key, val);
     }
 
   return ht;

Modified: subversion/branches/fsfs-format7/subversion/libsvn_wc/adm_crawler.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_wc/adm_crawler.c?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_wc/adm_crawler.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_wc/adm_crawler.c Sat Mar 30 20:02:27 2013
@@ -30,6 +30,7 @@
 #include <apr_file_io.h>
 #include <apr_hash.h>
 
+#include "svn_hash.h"
 #include "svn_types.h"
 #include "svn_pools.h"
 #include "svn_wc.h"
@@ -102,7 +103,7 @@ svn_wc_restore(svn_wc_context_t *wc_ctx,
                apr_pool_t *scratch_pool)
 {
   svn_wc__db_status_t status;
-  svn_kind_t kind;
+  svn_node_kind_t kind;
   svn_node_kind_t disk_kind;
   const svn_checksum_t *checksum;
 
@@ -124,9 +125,9 @@ svn_wc_restore(svn_wc_context_t *wc_ctx,
   if (status != svn_wc__db_status_normal
       && !((status == svn_wc__db_status_added 
             || status == svn_wc__db_status_incomplete)
-           && (kind == svn_kind_dir
-               || (kind == svn_kind_file && checksum != NULL)
-               /* || (kind == svn_kind_symlink && target)*/)))
+           && (kind == svn_node_dir
+               || (kind == svn_node_file && checksum != NULL)
+               /* || (kind == svn_node_symlink && target)*/)))
     {
       return svn_error_createf(SVN_ERR_WC_PATH_UNEXPECTED_STATUS, NULL,
                                _("The node '%s' can not be restored."),
@@ -134,7 +135,7 @@ svn_wc_restore(svn_wc_context_t *wc_ctx,
                                                       scratch_pool));
     }
 
-  if (kind == svn_kind_file || kind == svn_kind_symlink)
+  if (kind == svn_node_file || kind == svn_node_symlink)
     SVN_ERR(restore_file(wc_ctx->db, local_abspath, use_commit_times,
                          FALSE /*mark_resolved_text_conflict*/,
                          scratch_pool));
@@ -154,20 +155,20 @@ svn_wc_restore(svn_wc_context_t *wc_ctx,
 static svn_error_t *
 restore_node(svn_wc__db_t *db,
              const char *local_abspath,
-             svn_kind_t kind,
+             svn_node_kind_t kind,
              svn_boolean_t use_commit_times,
              svn_wc_notify_func2_t notify_func,
              void *notify_baton,
              apr_pool_t *scratch_pool)
 {
-  if (kind == svn_kind_file || kind == svn_kind_symlink)
+  if (kind == svn_node_file || kind == svn_node_symlink)
     {
       /* Recreate file from text-base; mark any text conflict as resolved */
       SVN_ERR(restore_file(db, local_abspath, use_commit_times,
                            TRUE /*mark_resolved_text_conflict*/,
                            scratch_pool));
     }
-  else if (kind == svn_kind_dir)
+  else if (kind == svn_node_dir)
     {
       /* Recreating a directory is just a mkdir */
       SVN_ERR(svn_io_dir_make(local_abspath, APR_OS_DEFAULT, scratch_pool));
@@ -369,10 +370,10 @@ report_revisions_and_depths(svn_wc__db_t
 
       /* Is the entry NOT on the disk? We may be able to restore it.  */
       if (restore_files
-          && apr_hash_get(dirents, child, APR_HASH_KEY_STRING) == NULL)
+          && svn_hash_gets(dirents, child) == NULL)
         {
           svn_wc__db_status_t wrk_status;
-          svn_kind_t wrk_kind;
+          svn_node_kind_t wrk_kind;
           const svn_checksum_t *checksum;
 
           SVN_ERR(svn_wc__db_read_info(&wrk_status, &wrk_kind, NULL, NULL,
@@ -385,7 +386,7 @@ report_revisions_and_depths(svn_wc__db_t
           if ((wrk_status == svn_wc__db_status_normal
                || wrk_status == svn_wc__db_status_added
                || wrk_status == svn_wc__db_status_incomplete)
-              && (wrk_kind == svn_kind_dir || checksum))
+              && (wrk_kind == svn_node_dir || checksum))
             {
               svn_node_kind_t dirent_kind;
 
@@ -426,8 +427,8 @@ report_revisions_and_depths(svn_wc__db_t
         ths->depth = svn_depth_infinity;
 
       /*** Files ***/
-      if (ths->kind == svn_kind_file ||
-               ths->kind == svn_kind_symlink)
+      if (ths->kind == svn_node_file
+          || ths->kind == svn_node_symlink)
         {
           if (report_everything)
             {
@@ -480,7 +481,7 @@ report_revisions_and_depths(svn_wc__db_t
         } /* end file case */
 
       /*** Directories (in recursive mode) ***/
-      else if (ths->kind == svn_kind_dir
+      else if (ths->kind == svn_node_dir
                && (depth > svn_depth_files
                    || depth == svn_depth_unknown))
         {
@@ -637,7 +638,7 @@ svn_wc_crawl_revisions5(svn_wc_context_t
   svn_revnum_t target_rev = SVN_INVALID_REVNUM;
   svn_boolean_t start_empty;
   svn_wc__db_status_t status;
-  svn_kind_t target_kind;
+  svn_node_kind_t target_kind;
   const char *repos_relpath, *repos_root_url;
   svn_depth_t target_depth;
   svn_wc__db_lock_t *target_lock;
@@ -705,7 +706,7 @@ svn_wc_crawl_revisions5(svn_wc_context_t
       && disk_kind == svn_node_none)
     {
       svn_wc__db_status_t wrk_status;
-      svn_kind_t wrk_kind;
+      svn_node_kind_t wrk_kind;
       const svn_checksum_t *checksum;
 
       err = svn_wc__db_read_info(&wrk_status, &wrk_kind, NULL, NULL, NULL,
@@ -721,7 +722,7 @@ svn_wc_crawl_revisions5(svn_wc_context_t
         {
           svn_error_clear(err);
           wrk_status = svn_wc__db_status_not_present;
-          wrk_kind = svn_kind_file;
+          wrk_kind = svn_node_file;
         }
       else
         SVN_ERR(err);
@@ -729,7 +730,7 @@ svn_wc_crawl_revisions5(svn_wc_context_t
       if ((wrk_status == svn_wc__db_status_normal
           || wrk_status == svn_wc__db_status_added
           || wrk_status == svn_wc__db_status_incomplete)
-          && (wrk_kind == svn_kind_dir || checksum))
+          && (wrk_kind == svn_node_dir || checksum))
         {
           SVN_ERR(restore_node(wc_ctx->db, local_abspath,
                                wrk_kind, use_commit_times,
@@ -752,7 +753,7 @@ svn_wc_crawl_revisions5(svn_wc_context_t
     SVN_ERR(reporter->set_path(report_baton, "", target_rev, report_depth,
                                start_empty, NULL, scratch_pool));
   }
-  if (target_kind == svn_kind_dir)
+  if (target_kind == svn_node_dir)
     {
       if (depth != svn_depth_empty)
         {
@@ -779,7 +780,7 @@ svn_wc_crawl_revisions5(svn_wc_context_t
         }
     }
 
-  else if (target_kind == svn_kind_file || target_kind == svn_kind_symlink)
+  else if (target_kind == svn_node_file || target_kind == svn_node_symlink)
     {
       const char *parent_abspath, *base;
       svn_wc__db_status_t parent_status;
@@ -1190,7 +1191,7 @@ svn_wc__internal_transmit_prop_deltas(sv
   apr_pool_t *iterpool = svn_pool_create(scratch_pool);
   int i;
   apr_array_header_t *propmods;
-  svn_kind_t kind;
+  svn_node_kind_t kind;
 
   SVN_ERR(svn_wc__db_read_kind(&kind, db, local_abspath,
                                FALSE /* allow_missing */,
@@ -1198,7 +1199,7 @@ svn_wc__internal_transmit_prop_deltas(sv
                                FALSE /* show_hidden */,
                                iterpool));
 
-  if (kind == svn_kind_none)
+  if (kind == svn_node_none)
     return svn_error_createf(SVN_ERR_WC_PATH_NOT_FOUND, NULL,
                              _("The node '%s' was not found."),
                              svn_dirent_local_style(local_abspath, iterpool));
@@ -1214,7 +1215,7 @@ svn_wc__internal_transmit_prop_deltas(sv
 
       svn_pool_clear(iterpool);
 
-      if (kind == svn_kind_file)
+      if (kind == svn_node_file)
         SVN_ERR(editor->change_file_prop(baton, p->name, p->value,
                                          iterpool));
       else

Modified: subversion/branches/fsfs-format7/subversion/libsvn_wc/adm_files.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_wc/adm_files.c?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_wc/adm_files.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_wc/adm_files.c Sat Mar 30 20:02:27 2013
@@ -171,7 +171,7 @@ svn_wc__text_base_path_to_read(const cha
                                apr_pool_t *scratch_pool)
 {
   svn_wc__db_status_t status;
-  svn_kind_t kind;
+  svn_node_kind_t kind;
   const svn_checksum_t *checksum;
 
   SVN_ERR(svn_wc__db_read_pristine_info(&status, &kind, NULL, NULL, NULL, NULL,
@@ -180,7 +180,7 @@ svn_wc__text_base_path_to_read(const cha
                                         scratch_pool, scratch_pool));
 
   /* Sanity */
-  if (kind != svn_kind_file)
+  if (kind != svn_node_file)
     return svn_error_createf(SVN_ERR_NODE_UNEXPECTED_KIND, NULL,
                              _("Can only get the pristine contents of files; "
                                "'%s' is not a file"),
@@ -224,7 +224,7 @@ svn_wc__get_pristine_contents(svn_stream
                               apr_pool_t *scratch_pool)
 {
   svn_wc__db_status_t status;
-  svn_kind_t kind;
+  svn_node_kind_t kind;
   const svn_checksum_t *sha1_checksum;
 
   if (size)
@@ -236,7 +236,7 @@ svn_wc__get_pristine_contents(svn_stream
                                         scratch_pool, scratch_pool));
 
   /* Sanity */
-  if (kind != svn_kind_file)
+  if (kind != svn_node_file)
     return svn_error_createf(SVN_ERR_NODE_UNEXPECTED_KIND, NULL,
                              _("Can only get the pristine contents of files; "
                                "'%s' is not a file"),

Modified: subversion/branches/fsfs-format7/subversion/libsvn_wc/adm_ops.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_wc/adm_ops.c?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_wc/adm_ops.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_wc/adm_ops.c Sat Mar 30 20:02:27 2013
@@ -55,6 +55,7 @@
 
 #include "svn_private_config.h"
 #include "private/svn_subr_private.h"
+#include "private/svn_dep_compat.h"
 
 
 struct svn_wc_committed_queue_t
@@ -113,7 +114,7 @@ process_committed_leaf(svn_wc__db_t *db,
                        const char *local_abspath,
                        svn_boolean_t via_recurse,
                        svn_wc__db_status_t status,
-                       svn_kind_t kind,
+                       svn_node_kind_t kind,
                        svn_boolean_t prop_mods,
                        const svn_checksum_t *old_checksum,
                        svn_revnum_t new_revnum,
@@ -133,7 +134,7 @@ process_committed_leaf(svn_wc__db_t *db,
   {
     const char *adm_abspath;
 
-    if (kind == svn_kind_dir)
+    if (kind == svn_node_dir)
       adm_abspath = local_abspath;
     else
       adm_abspath = svn_dirent_dirname(local_abspath, scratch_pool);
@@ -167,7 +168,7 @@ process_committed_leaf(svn_wc__db_t *db,
                  || status == svn_wc__db_status_incomplete
                  || status == svn_wc__db_status_added);
 
-  if (kind != svn_kind_dir)
+  if (kind != svn_node_dir)
     {
       /* If we sent a delta (meaning: post-copy modification),
          then this file will appear in the queue and so we should have
@@ -241,7 +242,7 @@ svn_wc__process_committed_internal(svn_w
                                    apr_pool_t *scratch_pool)
 {
   svn_wc__db_status_t status;
-  svn_kind_t kind;
+  svn_node_kind_t kind;
   const svn_checksum_t *old_checksum;
   svn_boolean_t prop_mods;
 
@@ -264,7 +265,7 @@ svn_wc__process_committed_internal(svn_w
                                  scratch_pool));
 
   /* Only check for recursion on nodes that have children */
-  if (kind != svn_kind_file
+  if (kind != svn_node_file
       || status == svn_wc__db_status_not_present
       || status == svn_wc__db_status_excluded
       || status == svn_wc__db_status_server_excluded
@@ -296,7 +297,7 @@ svn_wc__process_committed_internal(svn_w
           this_abspath = svn_dirent_join(local_abspath, name, iterpool);
 
           sha1_checksum = NULL;
-          cqi = apr_hash_get(queue->queue, this_abspath, APR_HASH_KEY_STRING);
+          cqi = svn_hash_gets(queue->queue, this_abspath);
 
           if (cqi != NULL)
             sha1_checksum = cqi->sha1_checksum;
@@ -341,7 +342,7 @@ svn_wc__prop_array_to_hash(const apr_arr
     {
       const svn_prop_t *prop = APR_ARRAY_IDX(props, i, const svn_prop_t *);
       if (prop->value != NULL)
-        apr_hash_set(prophash, prop->name, APR_HASH_KEY_STRING, prop->value);
+        svn_hash_sets(prophash, prop->name, prop->value);
     }
 
   return prophash;
@@ -392,7 +393,7 @@ svn_wc_queue_committed3(svn_wc_committed
   cqi->sha1_checksum = sha1_checksum;
   cqi->new_dav_cache = svn_wc__prop_array_to_hash(wcprop_changes, queue->pool);
 
-  apr_hash_set(queue->queue, local_abspath, APR_HASH_KEY_STRING, cqi);
+  svn_hash_sets(queue->queue, local_abspath, cqi);
 
   return SVN_NO_ERROR;
 }
@@ -487,16 +488,15 @@ svn_wc_process_committed_queue2(svn_wc_c
                                     wc_ctx->db, cqi->local_abspath,
                                     iterpool, iterpool));
 
-      if (! apr_hash_get(run_wqs, wcroot_abspath, APR_HASH_KEY_STRING))
+      if (! svn_hash_gets(run_wqs, wcroot_abspath))
         {
           wcroot_abspath = apr_pstrdup(scratch_pool, wcroot_abspath);
-          apr_hash_set(run_wqs, wcroot_abspath, APR_HASH_KEY_STRING,
-                       wcroot_abspath);
+          svn_hash_sets(run_wqs, wcroot_abspath, wcroot_abspath);
         }
     }
 
   /* Make sure nothing happens if this function is called again.  */
-  SVN_ERR(svn_hash__clear(queue->queue, iterpool));
+  apr_hash_clear(queue->queue);
 
   /* Ok; everything is committed now. Now we can start calling callbacks */
 
@@ -579,7 +579,7 @@ check_can_add_to_parent(const char **rep
 {
   const char *parent_abspath = svn_dirent_dirname(local_abspath, scratch_pool);
   svn_wc__db_status_t parent_status;
-  svn_kind_t parent_kind;
+  svn_node_kind_t parent_kind;
   svn_error_t *err;
 
   SVN_ERR(svn_wc__write_check(db, parent_abspath, scratch_pool));
@@ -612,7 +612,7 @@ check_can_add_to_parent(const char **rep
                           svn_dirent_local_style(local_abspath,
                                                  scratch_pool));
     }
-  else if (parent_kind != svn_kind_dir)
+  else if (parent_kind != svn_node_dir)
     return svn_error_createf(SVN_ERR_NODE_UNEXPECTED_KIND, NULL,
                              _("Can't schedule an addition of '%s'"
                                " below a not-directory node"),
@@ -1385,8 +1385,7 @@ svn_wc__internal_changelist_match(svn_wc
     }
 
   return (changelist
-            && apr_hash_get((apr_hash_t *)clhash, changelist,
-                            APR_HASH_KEY_STRING) != NULL);
+            && svn_hash_gets((apr_hash_t *)clhash, changelist) != NULL);
 }