subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From prabh...@apache.org
Subject svn commit: r1464833 [6/11] - in /subversion/branches/verify-keep-going: ./ build/ build/generator/ contrib/client-side/svncopy/ notes/ subversion/bindings/javahl/native/ subversion/bindings/javahl/src/org/apache/subversion/javahl/ subversion/bindings/...
Date Fri, 05 Apr 2013 05:29:34 GMT
Modified: subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/log.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/log.c?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/log.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/log.c Fri Apr  5 05:29:29 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/verify-keep-going/subversion/libsvn_ra_serf/merge.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/merge.c?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/merge.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/merge.c Fri Apr  5 05:29:29 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/verify-keep-going/subversion/libsvn_ra_serf/mergeinfo.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/mergeinfo.c?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/mergeinfo.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/mergeinfo.c Fri Apr  5 05:29:29 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/verify-keep-going/subversion/libsvn_ra_serf/options.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/options.c?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/options.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/options.c Fri Apr  5 05:29:29 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/verify-keep-going/subversion/libsvn_ra_serf/property.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/property.c?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/property.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/property.c Fri Apr  5 05:29:29 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;
 }

Modified: subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/ra_serf.h
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/ra_serf.h?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/ra_serf.h (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/ra_serf.h Fri Apr  5 05:29:29 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"
 

Modified: subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/serf.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/serf.c?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/serf.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/serf.c Fri Apr  5 05:29:29 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;
 }
@@ -806,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;
@@ -1053,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/verify-keep-going/subversion/libsvn_ra_serf/update.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/update.c?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/update.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/update.c Fri Apr  5 05:29:29 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. */

Modified: subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/util.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/util.c?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/util.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/util.c Fri Apr  5 05:29:29 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/verify-keep-going/subversion/libsvn_ra_serf/xml.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/xml.c?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/xml.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_ra_serf/xml.c Fri Apr  5 05:29:29 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));
             }
         }
     }

Modified: subversion/branches/verify-keep-going/subversion/libsvn_ra_svn/client.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_ra_svn/client.c?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_ra_svn/client.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_ra_svn/client.c Fri Apr  5 05:29:29 2013
@@ -32,6 +32,7 @@
 #include <apr_network_io.h>
 #include <apr_uri.h>
 
+#include "svn_hash.h"
 #include "svn_types.h"
 #include "svn_string.h"
 #include "svn_dirent_uri.h"
@@ -388,8 +389,7 @@ static svn_error_t *find_tunnel_agent(co
   int n;
 
   /* Look up the tunnel specification in config. */
-  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_config_get(cfg, &val, SVN_CONFIG_SECTION_TUNNELS, tunnel, NULL);
 
   /* We have one predefined tunnel scheme, if it isn't overridden by config. */
@@ -750,12 +750,10 @@ static svn_error_t *ra_svn_open(svn_ra_s
   else
     tunnel_argv = NULL;
 
-  cfg_client = config ? apr_hash_get(config,
-                                     SVN_CONFIG_CATEGORY_CONFIG,
-                                     APR_HASH_KEY_STRING) : NULL;
-  cfg = config ? apr_hash_get(config,
-                              SVN_CONFIG_CATEGORY_SERVERS,
-                              APR_HASH_KEY_STRING) : NULL;
+  cfg_client = config
+               ? svn_hash_gets(config, SVN_CONFIG_CATEGORY_CONFIG)
+               : NULL;
+  cfg = config ? svn_hash_gets(config, SVN_CONFIG_CATEGORY_SERVERS) : NULL;
   svn_auth_set_parameter(callbacks->auth_baton,
                          SVN_AUTH_PARAM_CONFIG_CATEGORY_CONFIG, cfg_client);
   svn_auth_set_parameter(callbacks->auth_baton,
@@ -990,9 +988,8 @@ static svn_error_t *ra_svn_commit(svn_ra
   ra_svn_commit_callback_baton_t *ccb;
   apr_hash_index_t *hi;
   apr_pool_t *iterpool;
-  const svn_string_t *log_msg = apr_hash_get(revprop_table,
-                                             SVN_PROP_REVISION_LOG,
-                                             APR_HASH_KEY_STRING);
+  const svn_string_t *log_msg = svn_hash_gets(revprop_table,
+                                              SVN_PROP_REVISION_LOG);
 
   /* If we're sending revprops other than svn:log, make sure the server won't
      silently ignore them. */
@@ -1007,14 +1004,10 @@ static svn_error_t *ra_svn_commit(svn_ra
   if (svn_ra_svn_has_capability(conn, SVN_RA_SVN_CAP_COMMIT_REVPROPS) &&
       svn_ra_svn_has_capability(conn, SVN_RA_SVN_CAP_EPHEMERAL_TXNPROPS))
     {
-      apr_hash_set(revprop_table,
-                   SVN_PROP_TXN_CLIENT_COMPAT_VERSION,
-                   APR_HASH_KEY_STRING,
-                   svn_string_create(SVN_VER_NUMBER, pool));
-      apr_hash_set(revprop_table,
-                   SVN_PROP_TXN_USER_AGENT,
-                   APR_HASH_KEY_STRING,
-                   svn_string_create(sess_baton->useragent, pool));
+      svn_hash_sets(revprop_table, SVN_PROP_TXN_CLIENT_COMPAT_VERSION,
+                    svn_string_create(SVN_VER_NUMBER, pool));
+      svn_hash_sets(revprop_table, SVN_PROP_TXN_USER_AGENT,
+                    svn_string_create(sess_baton->useragent, pool));
     }
 
   /* Tell the server we're starting the commit.
@@ -1123,10 +1116,9 @@ parse_iproplist(apr_array_header_t **inh
         {
           const char *name = svn__apr_hash_index_key(hi);
           svn_string_t *value = svn__apr_hash_index_val(hi);
-          apr_hash_set(new_iprop->prop_hash,
-                       apr_pstrdup(result_pool, name),
-                       APR_HASH_KEY_STRING,
-                       svn_string_dup(value, result_pool));
+          svn_hash_sets(new_iprop->prop_hash,
+                        apr_pstrdup(result_pool, name),
+                        svn_string_dup(value, result_pool));
         }
       APR_ARRAY_PUSH(*inherited_props, svn_prop_inherited_item_t *) =
         new_iprop;
@@ -1292,7 +1284,7 @@ static svn_error_t *ra_svn_get_dir(svn_r
       else
         SVN_ERR(svn_time_from_cstring(&dirent->time, cdate, pool));
       dirent->last_author = cauthor;
-      apr_hash_set(*dirents, name, APR_HASH_KEY_STRING, dirent);
+      svn_hash_sets(*dirents, name, dirent);
     }
 
   return SVN_NO_ERROR;
@@ -1360,8 +1352,7 @@ static svn_error_t *ra_svn_get_mergeinfo
           SVN_ERR(svn_mergeinfo_parse(&for_path, to_parse, pool));
           /* Correct for naughty servers that send "relative" paths
              with leading slashes! */
-          apr_hash_set(*catalog, path[0] == '/' ? path + 1 : path,
-                       APR_HASH_KEY_STRING, for_path);
+          svn_hash_sets(*catalog, path[0] == '/' ? path + 1 :path, for_path);
         }
     }
 
@@ -1624,7 +1615,7 @@ static svn_error_t *ra_svn_log(svn_ra_se
               change->node_kind = svn_node_kind_from_word(kind_str);
               change->text_modified = optbool_to_tristate(text_mods);
               change->props_modified = optbool_to_tristate(prop_mods);
-              apr_hash_set(cphash, cpath, APR_HASH_KEY_STRING, change);
+              svn_hash_sets(cphash, cpath, change);
             }
         }
       else
@@ -1641,22 +1632,22 @@ static svn_error_t *ra_svn_log(svn_ra_se
           log_entry->has_children = has_children;
           log_entry->subtractive_merge = subtractive_merge;
           if (rplist)
-            SVN_ERR(svn_ra_svn_parse_proplist(rplist, pool,
+            SVN_ERR(svn_ra_svn_parse_proplist(rplist, iterpool,
                                               &log_entry->revprops));
           if (log_entry->revprops == NULL)
-            log_entry->revprops = apr_hash_make(pool);
+            log_entry->revprops = apr_hash_make(iterpool);
           if (revprops == NULL)
             {
               /* Caller requested all revprops; set author/date/log. */
               if (author)
-                apr_hash_set(log_entry->revprops, SVN_PROP_REVISION_AUTHOR,
-                             APR_HASH_KEY_STRING, author);
+                svn_hash_sets(log_entry->revprops, SVN_PROP_REVISION_AUTHOR,
+                              author);
               if (date)
-                apr_hash_set(log_entry->revprops, SVN_PROP_REVISION_DATE,
-                             APR_HASH_KEY_STRING, date);
+                svn_hash_sets(log_entry->revprops, SVN_PROP_REVISION_DATE,
+                              date);
               if (message)
-                apr_hash_set(log_entry->revprops, SVN_PROP_REVISION_LOG,
-                             APR_HASH_KEY_STRING, message);
+                svn_hash_sets(log_entry->revprops, SVN_PROP_REVISION_LOG,
+                              message);
             }
           else
             {
@@ -1665,14 +1656,14 @@ static svn_error_t *ra_svn_log(svn_ra_se
                 {
                   name = APR_ARRAY_IDX(revprops, i, char *);
                   if (author && strcmp(name, SVN_PROP_REVISION_AUTHOR) == 0)
-                    apr_hash_set(log_entry->revprops, SVN_PROP_REVISION_AUTHOR,
-                                 APR_HASH_KEY_STRING, author);
+                    svn_hash_sets(log_entry->revprops,
+                                  SVN_PROP_REVISION_AUTHOR, author);
                   if (date && strcmp(name, SVN_PROP_REVISION_DATE) == 0)
-                    apr_hash_set(log_entry->revprops, SVN_PROP_REVISION_DATE,
-                                 APR_HASH_KEY_STRING, date);
+                    svn_hash_sets(log_entry->revprops,
+                                  SVN_PROP_REVISION_DATE, date);
                   if (message && strcmp(name, SVN_PROP_REVISION_LOG) == 0)
-                    apr_hash_set(log_entry->revprops, SVN_PROP_REVISION_LOG,
-                                 APR_HASH_KEY_STRING, message);
+                    svn_hash_sets(log_entry->revprops,
+                                  SVN_PROP_REVISION_LOG, message);
                 }
             }
           SVN_ERR(receiver(receiver_baton, log_entry, iterpool));
@@ -2487,13 +2478,13 @@ static svn_error_t *ra_svn_get_locks(svn
       */
       if ((strcmp(abs_path, lock->path) == 0) || (depth == svn_depth_infinity))
         {
-          apr_hash_set(*locks, lock->path, APR_HASH_KEY_STRING, lock);
+          svn_hash_sets(*locks, lock->path, lock);
         }
       else if ((depth == svn_depth_files) || (depth == svn_depth_immediates))
         {
           const char *relpath = svn_fspath__skip_ancestor(abs_path, lock->path);
           if (relpath && (svn_path_component_count(relpath) == 1))
-            apr_hash_set(*locks, lock->path, APR_HASH_KEY_STRING, lock);
+            svn_hash_sets(*locks, lock->path, lock);
         }
     }
 

Modified: subversion/branches/verify-keep-going/subversion/libsvn_ra_svn/editorp.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_ra_svn/editorp.c?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_ra_svn/editorp.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_ra_svn/editorp.c Fri Apr  5 05:29:29 2013
@@ -28,6 +28,7 @@
 #include <apr_general.h>
 #include <apr_strings.h>
 
+#include "svn_hash.h"
 #include "svn_types.h"
 #include "svn_string.h"
 #include "svn_error.h"
@@ -499,7 +500,7 @@ static ra_svn_token_entry_t *store_token
   entry->is_file = is_file;
   entry->dstream = NULL;
   entry->pool = pool;
-  apr_hash_set(ds->tokens, entry->token, APR_HASH_KEY_STRING, entry);
+  svn_hash_sets(ds->tokens, entry->token, entry);
   return entry;
 }
 
@@ -507,7 +508,7 @@ static svn_error_t *lookup_token(ra_svn_
                                  svn_boolean_t is_file,
                                  ra_svn_token_entry_t **entry)
 {
-  *entry = apr_hash_get(ds->tokens, token, APR_HASH_KEY_STRING);
+  *entry = svn_hash_gets(ds->tokens, token);
   if (!*entry || (*entry)->is_file != is_file)
     return svn_error_create(SVN_ERR_RA_SVN_MALFORMED_DATA, NULL,
                             _("Invalid file or dir token during edit"));
@@ -646,7 +647,7 @@ static svn_error_t *ra_svn_handle_close_
 
   /* Close the directory and destroy the baton. */
   SVN_CMD_ERR(ds->editor->close_directory(entry->baton, pool));
-  apr_hash_set(ds->tokens, token, APR_HASH_KEY_STRING, NULL);
+  svn_hash_sets(ds->tokens, token, NULL);
   svn_pool_destroy(entry->pool);
   return SVN_NO_ERROR;
 }
@@ -816,7 +817,7 @@ static svn_error_t *ra_svn_handle_close_
 
   /* Close the file and destroy the baton. */
   SVN_CMD_ERR(ds->editor->close_file(entry->baton, text_checksum, pool));
-  apr_hash_set(ds->tokens, token, APR_HASH_KEY_STRING, NULL);
+  svn_hash_sets(ds->tokens, token, NULL);
   if (--ds->file_refs == 0)
     svn_pool_clear(ds->file_pool);
   return SVN_NO_ERROR;

Modified: subversion/branches/verify-keep-going/subversion/libsvn_ra_svn/marshal.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_ra_svn/marshal.c?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_ra_svn/marshal.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_ra_svn/marshal.c Fri Apr  5 05:29:29 2013
@@ -32,6 +32,7 @@
 #include <apr_lib.h>
 #include <apr_strings.h>
 
+#include "svn_hash.h"
 #include "svn_types.h"
 #include "svn_string.h"
 #include "svn_error.h"
@@ -155,7 +156,7 @@ svn_error_t *svn_ra_svn_set_capabilities
         return svn_error_create(SVN_ERR_RA_SVN_MALFORMED_DATA, NULL,
                                 _("Capability entry is not a word"));
       word = apr_pstrdup(conn->pool, item->u.word);
-      apr_hash_set(conn->capabilities, word, APR_HASH_KEY_STRING, word);
+      svn_hash_sets(conn->capabilities, word, word);
     }
   return SVN_NO_ERROR;
 }
@@ -171,8 +172,7 @@ svn_ra_svn__set_shim_callbacks(svn_ra_sv
 svn_boolean_t svn_ra_svn_has_capability(svn_ra_svn_conn_t *conn,
                                         const char *capability)
 {
-  return (apr_hash_get(conn->capabilities, capability,
-                       APR_HASH_KEY_STRING) != NULL);
+  return (svn_hash_gets(conn->capabilities, capability) != NULL);
 }
 
 int
@@ -1659,7 +1659,7 @@ svn_error_t *svn_ra_svn_parse_proplist(c
         return svn_error_create(SVN_ERR_RA_SVN_MALFORMED_DATA, NULL,
                                 _("Proplist element not a list"));
       SVN_ERR(svn_ra_svn_parse_tuple(elt->u.list, pool, "cs", &name, &value));
-      apr_hash_set(*props, name, APR_HASH_KEY_STRING, value);
+      svn_hash_sets(*props, name, value);
     }
 
   return SVN_NO_ERROR;
@@ -1777,7 +1777,7 @@ svn_error_t *svn_ra_svn_handle_commands2
   apr_hash_t *cmd_hash = apr_hash_make(subpool);
 
   for (command = commands; command->cmdname; command++)
-    apr_hash_set(cmd_hash, command->cmdname, APR_HASH_KEY_STRING, command);
+    svn_hash_sets(cmd_hash, command->cmdname, command);
 
   while (1)
     {
@@ -1794,7 +1794,7 @@ svn_error_t *svn_ra_svn_handle_commands2
             }
           return err;
         }
-      command = apr_hash_get(cmd_hash, cmdname, APR_HASH_KEY_STRING);
+      command = svn_hash_gets(cmd_hash, cmdname);
 
       if (command)
         err = (*command->handler)(conn, iterpool, params, baton);

Modified: subversion/branches/verify-keep-going/subversion/libsvn_ra_svn/ra_svn.h
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_ra_svn/ra_svn.h?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_ra_svn/ra_svn.h (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_ra_svn/ra_svn.h Fri Apr  5 05:29:29 2013
@@ -36,6 +36,8 @@ extern "C" {
 #include "svn_ra.h"
 #include "svn_ra_svn.h"
 
+#include "private/svn_ra_svn_private.h"
+
 /* Callback function that indicates if a svn_ra_svn__stream_t has pending
  * data.
  */

Modified: subversion/branches/verify-keep-going/subversion/libsvn_repos/authz.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_repos/authz.c?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_repos/authz.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_repos/authz.c Fri Apr  5 05:29:29 2013
@@ -26,6 +26,7 @@
 #include <apr_pools.h>
 #include <apr_file_io.h>
 
+#include "svn_hash.h"
 #include "svn_pools.h"
 #include "svn_error.h"
 #include "svn_dirent_uri.h"
@@ -512,8 +513,7 @@ authz_group_walk(svn_config_t *cfg,
         {
           /* A circular dependency between groups is a Bad Thing.  We
              don't do authz with invalid ACL files. */
-          if (apr_hash_get(checked_groups, &group_user[1],
-                           APR_HASH_KEY_STRING))
+          if (svn_hash_gets(checked_groups, &group_user[1]))
             return svn_error_createf(SVN_ERR_AUTHZ_INVALID_CONFIG,
                                      NULL,
                                      "Circular dependency between "
@@ -521,8 +521,7 @@ authz_group_walk(svn_config_t *cfg,
                                      &group_user[1], group);
 
           /* Add group to hash of checked groups. */
-          apr_hash_set(checked_groups, &group_user[1],
-                       APR_HASH_KEY_STRING, "");
+          svn_hash_sets(checked_groups, &group_user[1], "");
 
           /* Recurse on that group. */
           SVN_ERR(authz_group_walk(cfg, &group_user[1],
@@ -531,8 +530,7 @@ authz_group_walk(svn_config_t *cfg,
           /* Remove group from hash of checked groups, so that we don't
              incorrectly report an error if we see it again as part of
              another group. */
-          apr_hash_set(checked_groups, &group_user[1],
-                       APR_HASH_KEY_STRING, NULL);
+          svn_hash_sets(checked_groups, &group_user[1], NULL);
         }
       else if (*group_user == '&')
         {
@@ -871,29 +869,9 @@ authz_retrieve_config_repo(svn_config_t 
  * don't have a repos relative URL in PATH. */
 static svn_error_t *
 authz_retrieve_config(svn_config_t **cfg_p, const char *path,
-                      svn_boolean_t must_exist, const char *repos_root,
-                      apr_pool_t *pool)
+                      svn_boolean_t must_exist, apr_pool_t *pool)
 {
-  if (svn_path_is_repos_relative_url(path))
-    {
-      const char *dirent;
-      svn_error_t *err;
-      apr_pool_t *scratch_pool = svn_pool_create(pool);
-
-      err = svn_path_resolve_repos_relative_url(&dirent, path,
-                                                repos_root, scratch_pool);
-      dirent = svn_dirent_canonicalize(dirent, scratch_pool);
-
-      if (err == SVN_NO_ERROR) 
-        err = authz_retrieve_config_repo(cfg_p, dirent, must_exist, pool,
-                                         scratch_pool);
-
-      /* Close the repos and streams we opened. */
-      svn_pool_destroy(scratch_pool);
-
-      return err;
-    }
-  else if (svn_path_is_url(path))
+  if (svn_path_is_url(path))
     {
       const char *dirent;
       svn_error_t *err;
@@ -958,15 +936,13 @@ authz_copy_groups(svn_authz_t *authz, sv
 svn_error_t *
 svn_repos__authz_read(svn_authz_t **authz_p, const char *path,
                       const char *groups_path, svn_boolean_t must_exist,
-                      svn_boolean_t accept_urls, const char *repos_root,
-                      apr_pool_t *pool)
+                      svn_boolean_t accept_urls, apr_pool_t *pool)
 {
   svn_authz_t *authz = apr_palloc(pool, sizeof(*authz));
 
   /* Load the authz file */
   if (accept_urls)
-    SVN_ERR(authz_retrieve_config(&authz->cfg, path, must_exist, repos_root,
-                                  pool));
+    SVN_ERR(authz_retrieve_config(&authz->cfg, path, must_exist, pool));
   else
     SVN_ERR(svn_config_read2(&authz->cfg, path, must_exist, TRUE, pool));
 
@@ -978,7 +954,7 @@ svn_repos__authz_read(svn_authz_t **auth
       /* Load the groups file */
       if (accept_urls)
         SVN_ERR(authz_retrieve_config(&groups_cfg, groups_path, must_exist,
-                                      repos_root, pool));
+                                      pool));
       else
         SVN_ERR(svn_config_read2(&groups_cfg, groups_path, must_exist,
                                  TRUE, pool));
@@ -1008,10 +984,10 @@ svn_repos__authz_read(svn_authz_t **auth
 svn_error_t *
 svn_repos_authz_read2(svn_authz_t **authz_p, const char *path,
                       const char *groups_path, svn_boolean_t must_exist,
-                      const char *repos_root, apr_pool_t *pool)
+                      apr_pool_t *pool)
 {
   return svn_repos__authz_read(authz_p, path, groups_path, must_exist,
-                               TRUE, repos_root, pool);
+                               TRUE, pool);
 }
 
 

Modified: subversion/branches/verify-keep-going/subversion/libsvn_repos/commit.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_repos/commit.c?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_repos/commit.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_repos/commit.c Fri Apr  5 05:29:29 2013
@@ -26,6 +26,7 @@
 #include <apr_pools.h>
 #include <apr_file_io.h>
 
+#include "svn_hash.h"
 #include "svn_compat.h"
 #include "svn_pools.h"
 #include "svn_error.h"
@@ -35,6 +36,7 @@
 #include "svn_fs.h"
 #include "svn_repos.h"
 #include "svn_checksum.h"
+#include "svn_ctype.h"
 #include "svn_props.h"
 #include "svn_mergeinfo.h"
 #include "svn_private_config.h"
@@ -257,6 +259,78 @@ make_dir_baton(struct edit_baton *edit_b
   return db;
 }
 
+/* Return a copy of PATH, allocated from POOL, for which control
+   characters have been escaped using the form \NNN (where NNN is the
+   octal representation of the byte's ordinal value).  */
+static const char *
+illegal_path_escape(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 (! svn_ctype_iscntrl(c))
+        continue;
+
+      /* If we got here, we're looking at a character that isn't
+         supported by the (or at least, our) URI encoding scheme.  We
+         need to escape this character.  */
+
+      /* 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;
+    }
+
+  /* If we didn't encode anything, we don't need to duplicate the string. */
+  if (retstr->len == 0)
+    return path;
+
+  /* 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;
+}
+
+/* Reject paths which contain control characters (related to issue #4340). */
+static svn_error_t *
+check_valid_path(const char *path,
+                 apr_pool_t *pool)
+{
+  const char *c;
+
+  for (c = path; *c; c++)
+    {
+      if (svn_ctype_iscntrl(*c))
+        return svn_error_createf(SVN_ERR_FS_PATH_SYNTAX, NULL,
+           _("Invalid control character '0x%02x' in path '%s'"),
+           (unsigned char)*c, illegal_path_escape(path, pool));
+    }
+
+  return SVN_NO_ERROR;
+}
 
 /* This function is the shared guts of add_file() and add_directory(),
    which see for the meanings of the parameters.  The only extra
@@ -277,6 +351,8 @@ add_file_or_directory(const char *path,
   svn_boolean_t was_copied = FALSE;
   const char *full_path;
 
+  SVN_ERR(check_valid_path(path, pool));
+
   full_path = svn_fspath__join(eb->base_path,
                                svn_relpath_canonicalize(path, pool), pool);
 
@@ -1333,8 +1409,7 @@ svn_repos__get_commit_ev2(svn_editor_t *
   /* Can the user modify the repository at all?  */
   /* ### check against AUTHZ.  */
 
-  author = apr_hash_get(revprops, SVN_PROP_REVISION_AUTHOR,
-                        APR_HASH_KEY_STRING);
+  author = svn_hash_gets(revprops, SVN_PROP_REVISION_AUTHOR);
 
   eb = apr_palloc(result_pool, sizeof(*eb));
   eb->repos = repos;

Modified: subversion/branches/verify-keep-going/subversion/libsvn_repos/delta.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_repos/delta.c?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_repos/delta.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_repos/delta.c Fri Apr  5 05:29:29 2013
@@ -24,6 +24,7 @@
 
 #include <apr_hash.h>
 
+#include "svn_hash.h"
 #include "svn_types.h"
 #include "svn_delta.h"
 #include "svn_fs.h"
@@ -506,8 +507,7 @@ delta_proplists(struct context *c,
                                            pool));
 
           /* Transmit the committed-date. */
-          committed_date = apr_hash_get(r_props, SVN_PROP_REVISION_DATE,
-                                        APR_HASH_KEY_STRING);
+          committed_date = svn_hash_gets(r_props, SVN_PROP_REVISION_DATE);
           if (committed_date || source_path)
             {
               SVN_ERR(change_fn(c, object, SVN_PROP_ENTRY_COMMITTED_DATE,
@@ -515,8 +515,7 @@ delta_proplists(struct context *c,
             }
 
           /* Transmit the last-author. */
-          last_author = apr_hash_get(r_props, SVN_PROP_REVISION_AUTHOR,
-                                     APR_HASH_KEY_STRING);
+          last_author = svn_hash_gets(r_props, SVN_PROP_REVISION_AUTHOR);
           if (last_author || source_path)
             {
               SVN_ERR(change_fn(c, object, SVN_PROP_ENTRY_LAST_AUTHOR,
@@ -1020,7 +1019,7 @@ delta_dirs(struct context *c,
             }
 
           /*  Remove the entry from the source_hash. */
-          apr_hash_set(s_entries, key, APR_HASH_KEY_STRING, NULL);
+          svn_hash_sets(s_entries, key, NULL);
         }
       else
         {

Modified: subversion/branches/verify-keep-going/subversion/libsvn_repos/deprecated.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_repos/deprecated.c?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_repos/deprecated.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_repos/deprecated.c Fri Apr  5 05:29:29 2013
@@ -28,6 +28,7 @@
 
 #include "svn_repos.h"
 #include "svn_compat.h"
+#include "svn_hash.h"
 #include "svn_props.h"
 
 #include "svn_private_config.h"
@@ -56,13 +57,11 @@ svn_repos_get_commit_editor4(const svn_d
 {
   apr_hash_t *revprop_table = apr_hash_make(pool);
   if (user)
-    apr_hash_set(revprop_table, SVN_PROP_REVISION_AUTHOR,
-                 APR_HASH_KEY_STRING,
-                 svn_string_create(user, pool));
+    svn_hash_sets(revprop_table, SVN_PROP_REVISION_AUTHOR,
+                  svn_string_create(user, 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_repos_get_commit_editor5(editor, edit_baton, repos, txn,
                                       repos_url, base_path, revprop_table,
                                       commit_callback, commit_baton,
@@ -1035,5 +1034,5 @@ svn_repos_authz_read(svn_authz_t **authz
                      svn_boolean_t must_exist, apr_pool_t *pool)
 {
   return svn_repos__authz_read(authz_p, file, NULL, must_exist,
-                               FALSE, NULL, pool);
+                               FALSE, pool);
 }

Modified: subversion/branches/verify-keep-going/subversion/libsvn_repos/dump.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_repos/dump.c?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_repos/dump.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_repos/dump.c Fri Apr  5 05:29:29 2013
@@ -471,9 +471,8 @@ dump_node(struct edit_baton *eb,
          dumped. */
       if (!eb->verify && eb->notify_func && eb->oldest_dumped_rev > 1)
         {
-          svn_string_t *mergeinfo_str = apr_hash_get(prophash,
-                                                     SVN_PROP_MERGEINFO,
-                                                     APR_HASH_KEY_STRING);
+          svn_string_t *mergeinfo_str = svn_hash_gets(prophash,
+                                                      SVN_PROP_MERGEINFO);
           if (mergeinfo_str)
             {
               svn_mergeinfo_t mergeinfo, old_mergeinfo;
@@ -655,7 +654,7 @@ delete_entry(const char *path,
   const char *mypath = apr_pstrdup(pb->pool, path);
 
   /* remember this path needs to be deleted. */
-  apr_hash_set(pb->deleted_entries, mypath, APR_HASH_KEY_STRING, pb);
+  svn_hash_sets(pb->deleted_entries, mypath, pb);
 
   return SVN_NO_ERROR;
 }
@@ -677,7 +676,7 @@ add_directory(const char *path,
     = make_dir_baton(path, copyfrom_path, copyfrom_rev, eb, pb, TRUE, pool);
 
   /* This might be a replacement -- is the path already deleted? */
-  val = apr_hash_get(pb->deleted_entries, path, APR_HASH_KEY_STRING);
+  val = svn_hash_gets(pb->deleted_entries, path);
 
   /* Detect an add-with-history. */
   is_copy = ARE_VALID_COPY_ARGS(copyfrom_path, copyfrom_rev);
@@ -693,7 +692,7 @@ add_directory(const char *path,
 
   if (val)
     /* Delete the path, it's now been dumped. */
-    apr_hash_set(pb->deleted_entries, path, APR_HASH_KEY_STRING, NULL);
+    svn_hash_sets(pb->deleted_entries, path, NULL);
 
   new_db->written_out = TRUE;
 
@@ -780,7 +779,7 @@ add_file(const char *path,
   svn_boolean_t is_copy = FALSE;
 
   /* This might be a replacement -- is the path already deleted? */
-  val = apr_hash_get(pb->deleted_entries, path, APR_HASH_KEY_STRING);
+  val = svn_hash_gets(pb->deleted_entries, path);
 
   /* Detect add-with-history. */
   is_copy = ARE_VALID_COPY_ARGS(copyfrom_path, copyfrom_rev);
@@ -796,7 +795,7 @@ add_file(const char *path,
 
   if (val)
     /* delete the path, it's now been dumped. */
-    apr_hash_set(pb->deleted_entries, path, APR_HASH_KEY_STRING, NULL);
+    svn_hash_sets(pb->deleted_entries, path, NULL);
 
   *file_baton = NULL;  /* muhahahaha */
   return SVN_NO_ERROR;
@@ -1042,15 +1041,13 @@ write_revision_record(svn_stream_t *stre
   /* Run revision date properties through the time conversion to
      canonicalize them. */
   /* ### Remove this when it is no longer needed for sure. */
-  datevalue = apr_hash_get(props, SVN_PROP_REVISION_DATE,
-                           APR_HASH_KEY_STRING);
+  datevalue = svn_hash_gets(props, SVN_PROP_REVISION_DATE);
   if (datevalue)
     {
       SVN_ERR(svn_time_from_cstring(&timetemp, datevalue->data, pool));
       datevalue = svn_string_create(svn_time_to_cstring(timetemp, pool),
                                     pool);
-      apr_hash_set(props, SVN_PROP_REVISION_DATE, APR_HASH_KEY_STRING,
-                   datevalue);
+      svn_hash_sets(props, SVN_PROP_REVISION_DATE, datevalue);
     }
 
   encoded_prophash = svn_stringbuf_create_ensure(0, pool);
@@ -1367,18 +1364,18 @@ notify_verification_error(svn_revnum_t r
                           void *notify_baton,
                           apr_pool_t *pool)
 {
-  if (notify_func)
-    {
-      svn_repos_notify_t *notify_failure;
-      notify_failure = svn_repos_notify_create(svn_repos_notify_failure, pool);
-      notify_failure->err = err;
-      notify_failure->revision = rev;
-      notify_func(notify_baton, notify_failure, pool);
-    }
+   if (notify_func)
+   {
+     svn_repos_notify_t *notify_failure;
+     notify_failure = svn_repos_notify_create(svn_repos_notify_failure, pool);
+     notify_failure->err = err;
+     notify_failure->revision = rev;
+     notify_func(notify_baton, notify_failure, pool);
+   }
 }
 
 /* Verify revision REV in file system FS. */
-static svn_error_t *
+svn_error_t *
 verify_one_revision(svn_fs_t *fs,
                     svn_revnum_t rev,
                     svn_repos_notify_func_t notify_func,
@@ -1390,7 +1387,7 @@ verify_one_revision(svn_fs_t *fs,
 {
   const svn_delta_editor_t *dump_editor;
   void *dump_edit_baton;
-
+ 
   svn_fs_root_t *to_root;
   apr_hash_t *props;
   const svn_delta_editor_t *cancel_editor;
@@ -1419,11 +1416,13 @@ verify_one_revision(svn_fs_t *fs,
   /* While our editor close_edit implementation is a no-op, we still
      do this for completeness. */
   SVN_ERR(cancel_editor->close_edit(cancel_edit_baton, scratchpool));
-
+ 
   SVN_ERR(svn_fs_revision_proplist(&props, fs, rev, scratchpool));
-
+ 
   return SVN_NO_ERROR;
 }
+ 
+
 
 /* Baton type used for forwarding notifications from FS API to REPOS API. */
 struct verify_fs2_notify_func_baton_t
@@ -1469,6 +1468,7 @@ svn_repos_verify_fs3(svn_repos_t *repos,
   svn_repos_notify_t *notify;
   svn_fs_progress_notify_func_t verify_notify = NULL;
   struct verify_fs2_notify_func_baton_t *verify_notify_baton = NULL;
+
   svn_error_t *err;
   svn_boolean_t found_corruption = FALSE;
 
@@ -1505,13 +1505,13 @@ svn_repos_verify_fs3(svn_repos_t *repos,
       verify_notify_baton->notify_func = notify_func;
       verify_notify_baton->notify_baton = notify_baton;
       verify_notify_baton->notify
-        = svn_repos_notify_create(svn_repos_notify_verify_struc_rev, pool);
+        = svn_repos_notify_create(svn_repos_notify_verify_rev_structure, pool);
     }
 
   /* Verify global metadata and backend-specific data first. */
-  err= svn_fs_verify(svn_fs_path(fs, pool), start_rev, end_rev,
-                     verify_notify, verify_notify_baton,
-                     cancel_func, cancel_baton, pool);
+  err = svn_fs_verify(svn_fs_path(fs, pool), start_rev, end_rev,
+                      verify_notify, verify_notify_baton,
+                      cancel_func, cancel_baton, pool);
 
   if (err && !keep_going)
     {
@@ -1524,7 +1524,7 @@ svn_repos_verify_fs3(svn_repos_t *repos,
                                svn_dirent_local_style(svn_repos_path(repos,
                                                                      pool),
                                                       pool));
-    }
+      }
   else
     {
       if (err)
@@ -1534,6 +1534,13 @@ svn_repos_verify_fs3(svn_repos_t *repos,
 
   for (rev = start_rev; rev <= end_rev; rev++)
     {
+      const svn_delta_editor_t *dump_editor;
+      void *dump_edit_baton;
+      const svn_delta_editor_t *cancel_editor;
+      void *cancel_edit_baton;
+      svn_fs_root_t *to_root;
+      apr_hash_t *props;
+
       svn_error_t *err;
 
       svn_pool_clear(iterpool);
@@ -1542,8 +1549,6 @@ svn_repos_verify_fs3(svn_repos_t *repos,
       err = verify_one_revision(fs, rev, notify_func, notify_baton, start_rev,
                                 cancel_func, cancel_baton, iterpool);
 
-      SVN_ERR(svn_fs_verify_rev(fs, rev, iterpool));
-
       if (err)
         {
           found_corruption = TRUE;
@@ -1556,6 +1561,33 @@ svn_repos_verify_fs3(svn_repos_t *repos,
           else
             break;
         }
+      /* Get cancellable dump editor, but with our close_directory handler. */
+      SVN_ERR(get_dump_editor(&dump_editor, &dump_edit_baton,
+                              fs, rev, "",
+                              svn_stream_empty(iterpool),
+                              NULL, NULL,
+                              verify_close_directory,
+                              notify_func, notify_baton,
+                              start_rev,
+                              FALSE, TRUE, /* use_deltas, verify */
+                              iterpool));
+      SVN_ERR(svn_delta_get_cancellation_editor(cancel_func, cancel_baton,
+                                                dump_editor, dump_edit_baton,
+                                                &cancel_editor,
+                                                &cancel_edit_baton,
+                                                iterpool));
+
+      SVN_ERR(svn_fs_revision_root(&to_root, fs, rev, iterpool));
+      SVN_ERR(svn_fs_verify_root(to_root, iterpool));
+
+      SVN_ERR(svn_repos_replay2(to_root, "", SVN_INVALID_REVNUM, FALSE,
+                                cancel_editor, cancel_edit_baton,
+                                NULL, NULL, iterpool));
+      /* While our editor close_edit implementation is a no-op, we still
+         do this for completeness. */
+      SVN_ERR(cancel_editor->close_edit(cancel_edit_baton, iterpool));
+
+      SVN_ERR(svn_fs_revision_proplist(&props, fs, rev, iterpool));
 
       if (notify_func)
         {
@@ -1580,5 +1612,6 @@ svn_repos_verify_fs3(svn_repos_t *repos,
                              svn_dirent_local_style(svn_repos_path(repos,
                                                                    pool),
                                                     pool));
+
   return SVN_NO_ERROR;
 }

Modified: subversion/branches/verify-keep-going/subversion/libsvn_repos/fs-wrap.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_repos/fs-wrap.c?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_repos/fs-wrap.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_repos/fs-wrap.c Fri Apr  5 05:29:29 2013
@@ -24,6 +24,7 @@
 #include <string.h>
 #include <ctype.h>
 
+#include "svn_hash.h"
 #include "svn_pools.h"
 #include "svn_error.h"
 #include "svn_fs.h"
@@ -108,9 +109,7 @@ svn_repos_fs_begin_txn_for_commit2(svn_f
 {
   apr_array_header_t *revprops;
   const char *txn_name;
-  svn_string_t *author = apr_hash_get(revprop_table,
-                                      SVN_PROP_REVISION_AUTHOR,
-                                      APR_HASH_KEY_STRING);
+  svn_string_t *author = svn_hash_gets(revprop_table, SVN_PROP_REVISION_AUTHOR);
 
   /* Begin the transaction, ask for the fs to do on-the-fly lock checks.
      We fetch its name, too, so the start-commit hook can use it.  */
@@ -142,13 +141,11 @@ svn_repos_fs_begin_txn_for_commit(svn_fs
 {
   apr_hash_t *revprop_table = apr_hash_make(pool);
   if (author)
-    apr_hash_set(revprop_table, SVN_PROP_REVISION_AUTHOR,
-                 APR_HASH_KEY_STRING,
-                 svn_string_create(author, pool));
+    svn_hash_sets(revprop_table, SVN_PROP_REVISION_AUTHOR,
+                  svn_string_create(author, 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_repos_fs_begin_txn_for_commit2(txn_p, repos, rev, revprop_table,
                                             pool);
 }
@@ -442,17 +439,13 @@ svn_repos_fs_revision_proplist(apr_hash_
 
       /* If they exist, we only copy svn:author and svn:date into the
          'real' hashtable being returned. */
-      value = apr_hash_get(tmphash, SVN_PROP_REVISION_AUTHOR,
-                           APR_HASH_KEY_STRING);
+      value = svn_hash_gets(tmphash, SVN_PROP_REVISION_AUTHOR);
       if (value)
-        apr_hash_set(*table_p, SVN_PROP_REVISION_AUTHOR,
-                     APR_HASH_KEY_STRING, value);
+        svn_hash_sets(*table_p, SVN_PROP_REVISION_AUTHOR, value);
 
-      value = apr_hash_get(tmphash, SVN_PROP_REVISION_DATE,
-                           APR_HASH_KEY_STRING);
+      value = svn_hash_gets(tmphash, SVN_PROP_REVISION_DATE);
       if (value)
-        apr_hash_set(*table_p, SVN_PROP_REVISION_DATE,
-                     APR_HASH_KEY_STRING, value);
+        svn_hash_sets(*table_p, SVN_PROP_REVISION_DATE, value);
     }
   else /* wholly readable revision */
     {
@@ -587,8 +580,8 @@ get_locks_callback(void *baton,
 
   /* If we can read this lock path, add the lock to the return hash. */
   if (readable)
-    apr_hash_set(b->locks, apr_pstrdup(hash_pool, lock->path),
-                 APR_HASH_KEY_STRING, svn_lock_dup(lock, hash_pool));
+    svn_hash_sets(b->locks, apr_pstrdup(hash_pool, lock->path),
+                  svn_lock_dup(lock, hash_pool));
 
   return SVN_NO_ERROR;
 }
@@ -777,8 +770,7 @@ svn_repos_fs_get_inherited_props(apr_arr
               if (propval)
                 {
                   parent_properties = apr_hash_make(result_pool);
-                  apr_hash_set(parent_properties, propname,
-                               APR_HASH_KEY_STRING, propval);
+                  svn_hash_sets(parent_properties, propname, propval);
                 }
             }
           else

Modified: subversion/branches/verify-keep-going/subversion/libsvn_repos/hooks.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_repos/hooks.c?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_repos/hooks.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_repos/hooks.c Fri Apr  5 05:29:29 2013
@@ -27,6 +27,7 @@
 #include <apr_pools.h>
 #include <apr_file_io.h>
 
+#include "svn_hash.h"
 #include "svn_error.h"
 #include "svn_dirent_uri.h"
 #include "svn_path.h"
@@ -239,11 +240,10 @@ run_hook_cmd(svn_string_t **result,
    * whether a default environment is defined. */
   if (hooks_env)
     {
-      hook_env = apr_hash_get(hooks_env, name, APR_HASH_KEY_STRING);
+      hook_env = svn_hash_gets(hooks_env, name);
       if (hook_env == NULL)
-        hook_env = apr_hash_get(hooks_env,
-                                SVN_REPOS__HOOKS_ENV_DEFAULT_SECTION,
-                                APR_HASH_KEY_STRING);
+        hook_env = svn_hash_gets(hooks_env,
+                                 SVN_REPOS__HOOKS_ENV_DEFAULT_SECTION);
     }
     
   err = svn_io_start_cmd3(&cmd_proc, ".", cmd, args,

Modified: subversion/branches/verify-keep-going/subversion/libsvn_repos/load-fs-vtable.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_repos/load-fs-vtable.c?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_repos/load-fs-vtable.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_repos/load-fs-vtable.c Fri Apr  5 05:29:29 2013
@@ -23,6 +23,7 @@
 
 
 #include "svn_private_config.h"
+#include "svn_hash.h"
 #include "svn_pools.h"
 #include "svn_error.h"
 #include "svn_fs.h"
@@ -213,7 +214,7 @@ prefix_mergeinfo_paths(svn_string_t **me
       path = svn_fspath__canonicalize(svn_relpath_join(parent_dir,
                                                        merge_source, pool),
                                       pool);
-      apr_hash_set(prefixed_mergeinfo, path, APR_HASH_KEY_STRING, rangelist);
+      svn_hash_sets(prefixed_mergeinfo, path, rangelist);
     }
   return svn_mergeinfo_to_string(mergeinfo_val, prefixed_mergeinfo, pool);
 }
@@ -321,8 +322,7 @@ renumber_mergeinfo_revs(svn_string_t **f
           if (SVN_IS_VALID_REVNUM(rev_from_map))
             range->end = rev_from_map;
         }
-      apr_hash_set(final_mergeinfo, merge_source,
-                   APR_HASH_KEY_STRING, rangelist);
+      svn_hash_sets(final_mergeinfo, merge_source, rangelist);
     }
 
   if (predates_stream_mergeinfo)
@@ -366,8 +366,7 @@ make_node_baton(struct node_baton **node
   nb->kind = svn_node_unknown;
 
   /* Then add info from the headers.  */
-  if ((val = apr_hash_get(headers, SVN_REPOS_DUMPFILE_NODE_PATH,
-                          APR_HASH_KEY_STRING)))
+  if ((val = svn_hash_gets(headers, SVN_REPOS_DUMPFILE_NODE_PATH)))
   {
     val = svn_relpath_canonicalize(val, pool);
     if (rb->pb->parent_dir)
@@ -376,8 +375,7 @@ make_node_baton(struct node_baton **node
       nb->path = val;
   }
 
-  if ((val = apr_hash_get(headers, SVN_REPOS_DUMPFILE_NODE_KIND,
-                          APR_HASH_KEY_STRING)))
+  if ((val = svn_hash_gets(headers, SVN_REPOS_DUMPFILE_NODE_KIND)))
     {
       if (! strcmp(val, "file"))
         nb->kind = svn_node_file;
@@ -386,8 +384,7 @@ make_node_baton(struct node_baton **node
     }
 
   nb->action = (enum svn_node_action)(-1);  /* an invalid action code */
-  if ((val = apr_hash_get(headers, SVN_REPOS_DUMPFILE_NODE_ACTION,
-                          APR_HASH_KEY_STRING)))
+  if ((val = svn_hash_gets(headers, SVN_REPOS_DUMPFILE_NODE_ACTION)))
     {
       if (! strcmp(val, "change"))
         nb->action = svn_node_action_change;
@@ -400,13 +397,11 @@ make_node_baton(struct node_baton **node
     }
 
   nb->copyfrom_rev = SVN_INVALID_REVNUM;
-  if ((val = apr_hash_get(headers, SVN_REPOS_DUMPFILE_NODE_COPYFROM_REV,
-                          APR_HASH_KEY_STRING)))
+  if ((val = svn_hash_gets(headers, SVN_REPOS_DUMPFILE_NODE_COPYFROM_REV)))
     {
       nb->copyfrom_rev = SVN_STR_TO_REV(val);
     }
-  if ((val = apr_hash_get(headers, SVN_REPOS_DUMPFILE_NODE_COPYFROM_PATH,
-                          APR_HASH_KEY_STRING)))
+  if ((val = svn_hash_gets(headers, SVN_REPOS_DUMPFILE_NODE_COPYFROM_PATH)))
     {
       val = svn_relpath_canonicalize(val, pool);
       if (rb->pb->parent_dir)
@@ -415,22 +410,21 @@ make_node_baton(struct node_baton **node
         nb->copyfrom_path = val;
     }
 
-  if ((val = apr_hash_get(headers, SVN_REPOS_DUMPFILE_TEXT_CONTENT_CHECKSUM,
-                          APR_HASH_KEY_STRING)))
+  if ((val = svn_hash_gets(headers, SVN_REPOS_DUMPFILE_TEXT_CONTENT_CHECKSUM)))
     {
       SVN_ERR(svn_checksum_parse_hex(&nb->result_checksum, svn_checksum_md5,
                                      val, pool));
     }
 
-  if ((val = apr_hash_get(headers, SVN_REPOS_DUMPFILE_TEXT_DELTA_BASE_CHECKSUM,
-                          APR_HASH_KEY_STRING)))
+  if ((val = svn_hash_gets(headers,
+                           SVN_REPOS_DUMPFILE_TEXT_DELTA_BASE_CHECKSUM)))
     {
       SVN_ERR(svn_checksum_parse_hex(&nb->base_checksum, svn_checksum_md5, val,
                                      pool));
     }
 
-  if ((val = apr_hash_get(headers, SVN_REPOS_DUMPFILE_TEXT_COPY_SOURCE_CHECKSUM,
-                          APR_HASH_KEY_STRING)))
+  if ((val = svn_hash_gets(headers,
+                           SVN_REPOS_DUMPFILE_TEXT_COPY_SOURCE_CHECKSUM)))
     {
       SVN_ERR(svn_checksum_parse_hex(&nb->copy_source_checksum,
                                      svn_checksum_md5, val, pool));
@@ -455,8 +449,7 @@ make_revision_baton(apr_hash_t *headers,
   rb->pool = pool;
   rb->rev = SVN_INVALID_REVNUM;
 
-  if ((val = apr_hash_get(headers, SVN_REPOS_DUMPFILE_REVISION_NUMBER,
-                          APR_HASH_KEY_STRING)))
+  if ((val = svn_hash_gets(headers, SVN_REPOS_DUMPFILE_REVISION_NUMBER)))
     {
       rb->rev = SVN_STR_TO_REV(val);
 
@@ -481,6 +474,18 @@ new_revision_record(void **revision_bato
   svn_revnum_t head_rev;
 
   rb = make_revision_baton(headers, pb, pool);
+
+  /* ### If we're filtering revisions, and this is one we've skipped,
+     ### and we've skipped it because it has a revision number younger
+     ### than the youngest in our acceptable range, then should we
+     ### just bail out here? */
+  /*
+  if (rb->skipped && (rb->rev > pb->end_rev))
+    return svn_error_createf(SVN_ERR_CEASE_INVOCATION, 0,
+                             _("Finished processing acceptable load "
+                               "revision range"));
+  */
+
   SVN_ERR(svn_fs_youngest_rev(&head_rev, pb->fs, pool));
 
   /* FIXME: This is a lame fallback loading multiple segments of dump in

Modified: subversion/branches/verify-keep-going/subversion/libsvn_repos/load.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_repos/load.c?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_repos/load.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_repos/load.c Fri Apr  5 05:29:29 2013
@@ -22,6 +22,7 @@
 
 
 #include "svn_private_config.h"
+#include "svn_hash.h"
 #include "svn_pools.h"
 #include "svn_error.h"
 #include "svn_fs.h"
@@ -127,7 +128,7 @@ read_header_block(svn_stream_t *stream,
       value = header_str->data + i;
 
       /* Store name/value in hash. */
-      apr_hash_set(*headers, name, APR_HASH_KEY_STRING, value);
+      svn_hash_sets(*headers, name, value);
     }
 
   return SVN_NO_ERROR;
@@ -493,8 +494,7 @@ svn_repos_parse_dumpstream3(svn_stream_t
       /*** Handle the various header blocks. ***/
 
       /* Is this a revision record? */
-      if (apr_hash_get(headers, SVN_REPOS_DUMPFILE_REVISION_NUMBER,
-                       APR_HASH_KEY_STRING))
+      if (svn_hash_gets(headers, SVN_REPOS_DUMPFILE_REVISION_NUMBER))
         {
           /* If we already have a rev_baton open, we need to close it
              and clear the per-revision subpool. */
@@ -509,8 +509,7 @@ svn_repos_parse_dumpstream3(svn_stream_t
                                                  revpool));
         }
       /* Or is this, perhaps, a node record? */
-      else if (apr_hash_get(headers, SVN_REPOS_DUMPFILE_NODE_PATH,
-                            APR_HASH_KEY_STRING))
+      else if (svn_hash_gets(headers, SVN_REPOS_DUMPFILE_NODE_PATH))
         {
           SVN_ERR(parse_fns->new_node_record(&node_baton,
                                              headers,
@@ -519,16 +518,14 @@ svn_repos_parse_dumpstream3(svn_stream_t
           found_node = TRUE;
         }
       /* Or is this the repos UUID? */
-      else if ((value = apr_hash_get(headers, SVN_REPOS_DUMPFILE_UUID,
-                                     APR_HASH_KEY_STRING)))
+      else if ((value = svn_hash_gets(headers, SVN_REPOS_DUMPFILE_UUID)))
         {
           SVN_ERR(parse_fns->uuid_record(value, parse_baton, pool));
         }
       /* Or perhaps a dumpfile format? */
       /* ### TODO: use parse_format_version */
-      else if ((value = apr_hash_get(headers,
-                                     SVN_REPOS_DUMPFILE_MAGIC_HEADER,
-                                     APR_HASH_KEY_STRING)))
+      else if ((value = svn_hash_gets(headers,
+                                      SVN_REPOS_DUMPFILE_MAGIC_HEADER)))
         {
           /* ### someday, switch modes of operation here. */
           SVN_ERR(svn_cstring_atoi(&version, value));
@@ -547,24 +544,18 @@ svn_repos_parse_dumpstream3(svn_stream_t
          and Text-content-length fields, but always have a properties
          block in a block with Content-Length > 0 */
 
-      content_length = apr_hash_get(headers,
-                                    SVN_REPOS_DUMPFILE_CONTENT_LENGTH,
-                                    APR_HASH_KEY_STRING);
-      prop_cl = apr_hash_get(headers,
-                             SVN_REPOS_DUMPFILE_PROP_CONTENT_LENGTH,
-                             APR_HASH_KEY_STRING);
-      text_cl = apr_hash_get(headers,
-                             SVN_REPOS_DUMPFILE_TEXT_CONTENT_LENGTH,
-                             APR_HASH_KEY_STRING);
+      content_length = svn_hash_gets(headers,
+                                     SVN_REPOS_DUMPFILE_CONTENT_LENGTH);
+      prop_cl = svn_hash_gets(headers, SVN_REPOS_DUMPFILE_PROP_CONTENT_LENGTH);
+      text_cl = svn_hash_gets(headers, SVN_REPOS_DUMPFILE_TEXT_CONTENT_LENGTH);
       old_v1_with_cl =
         version == 1 && content_length && ! prop_cl && ! text_cl;
 
       /* Is there a props content-block to parse? */
       if (prop_cl || old_v1_with_cl)
         {
-          const char *delta = apr_hash_get(headers,
-                                           SVN_REPOS_DUMPFILE_PROP_DELTA,
-                                           APR_HASH_KEY_STRING);
+          const char *delta = svn_hash_gets(headers,
+                                            SVN_REPOS_DUMPFILE_PROP_DELTA);
           svn_boolean_t is_delta = (delta && strcmp(delta, "true") == 0);
 
           /* First, remove all node properties, unless this is a delta
@@ -586,9 +577,8 @@ svn_repos_parse_dumpstream3(svn_stream_t
       /* Is there a text content-block to parse? */
       if (text_cl)
         {
-          const char *delta = apr_hash_get(headers,
-                                           SVN_REPOS_DUMPFILE_TEXT_DELTA,
-                                           APR_HASH_KEY_STRING);
+          const char *delta = svn_hash_gets(headers,
+                                            SVN_REPOS_DUMPFILE_TEXT_DELTA);
           svn_boolean_t is_delta = FALSE;
           if (! deltas_are_text)
             is_delta = (delta && strcmp(delta, "true") == 0);
@@ -623,9 +613,8 @@ svn_repos_parse_dumpstream3(svn_stream_t
                                     - actual_prop_length;
 
           if (cl_value ||
-              ((node_kind = apr_hash_get(headers,
-                                         SVN_REPOS_DUMPFILE_NODE_KIND,
-                                         APR_HASH_KEY_STRING))
+              ((node_kind = svn_hash_gets(headers,
+                                          SVN_REPOS_DUMPFILE_NODE_KIND))
                && strcmp(node_kind, "file") == 0)
              )
             SVN_ERR(parse_text_block(stream,



Mime
View raw message