Modified: 
subversion/branches/reuse-ra-session/subversion/svndumpfilter/svndumpfilter.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/svndumpfilter/svndumpfilter.c?rev=1702504&r1=1702503&r2=1702504&view=diff
==============================================================================
--- 
subversion/branches/reuse-ra-session/subversion/svndumpfilter/svndumpfilter.c 
(original)
+++ 
subversion/branches/reuse-ra-session/subversion/svndumpfilter/svndumpfilter.c 
Fri Sep 11 15:51:30 2015
@@ -640,7 +640,7 @@ new_node_record(void **node_baton,
               cf_orig_rev = SVN_STR_TO_REV(val);
               cf_renum_val = apr_hash_get(pb->renumber_history,
                                           &cf_orig_rev,
-                                          sizeof(svn_revnum_t));
+                                          sizeof(cf_orig_rev));
               if (! (cf_renum_val && SVN_IS_VALID_REVNUM(cf_renum_val->rev)))
                 return svn_error_createf
                   (SVN_ERR_NODE_UNEXPECTED_KIND, NULL,
@@ -730,14 +730,14 @@ adjust_mergeinfo(svn_string_t **final_va
                                                        svn_merge_range_t *);
 
               revmap_start = apr_hash_get(pb->renumber_history,
-                                          &range->start, sizeof(svn_revnum_t));
+                                          &range->start, sizeof(range->start));
               if (! (revmap_start && SVN_IS_VALID_REVNUM(revmap_start->rev)))
                 return svn_error_createf
                   (SVN_ERR_NODE_UNEXPECTED_KIND, NULL,
                    _("No valid revision range 'start' in filtered stream"));
 
               revmap_end = apr_hash_get(pb->renumber_history,
-                                        &range->end, sizeof(svn_revnum_t));
+                                        &range->end, sizeof(range->end));
               if (! (revmap_end && SVN_IS_VALID_REVNUM(revmap_end->rev)))
                 return svn_error_createf
                   (SVN_ERR_NODE_UNEXPECTED_KIND, NULL,

Modified: 
subversion/branches/reuse-ra-session/subversion/svnfsfs/load-index-cmd.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/svnfsfs/load-index-cmd.c?rev=1702504&r1=1702503&r2=1702504&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/svnfsfs/load-index-cmd.c 
(original)
+++ subversion/branches/reuse-ra-session/subversion/svnfsfs/load-index-cmd.c 
Fri Sep 11 15:51:30 2015
@@ -54,13 +54,15 @@ str_to_item_type(unsigned *type,
                            _("Unknown item type '%s'"), str);
 }
 
-/* Parse the hex string given as const char * at IDX in TOKENS and return
- * its value in *VALUE_P.  Check for index overflows and non-hex chars.
+/* Parse the string given as const char * at IDX in TOKENS and return its
+ * value in *VALUE_P.  Assume that the string an integer with base RADIX.
+ * Check for index overflows and non-hex chars.
  */
 static svn_error_t *
 token_to_i64(apr_int64_t *value_p,
              apr_array_header_t *tokens,
-             int idx)
+             int idx,
+             int radix)
 {
   const char *hex;
   char *end;
@@ -75,7 +77,7 @@ token_to_i64(apr_int64_t *value_p,
 
   /* hex -> int conversion */
   hex = APR_ARRAY_IDX(tokens, idx, const char *);
-  value = apr_strtoi64(hex, &end, 16);
+  value = apr_strtoi64(hex, &end, radix);
 
   /* Has the whole token be parsed without error? */
   if (errno || *end != '\0')
@@ -102,11 +104,13 @@ parse_index_line(svn_fs_fs__p2l_entry_t
   apr_int64_t value;
 
   /* Parse the hex columns. */
-  SVN_ERR(token_to_i64(&value, tokens, 0));
+  SVN_ERR(token_to_i64(&value, tokens, 0, 16));
   result->offset = (apr_off_t)value;
-  SVN_ERR(token_to_i64(&value, tokens, 1));
+  SVN_ERR(token_to_i64(&value, tokens, 1, 16));
   result->size = (apr_off_t)value;
-  SVN_ERR(token_to_i64(&value, tokens, 4));
+
+  /* Parse the rightmost colum that we care of. */
+  SVN_ERR(token_to_i64(&value, tokens, 4, 10));
   result->item.number = (apr_uint64_t)value;
 
   /* We now know that there were at least 5 columns.
@@ -183,6 +187,7 @@ subcommand__load_index(apr_getopt_t *os,
   svn_stream_t *input;
 
   SVN_ERR(svn_stream_for_stdin(&input, pool));
+  input = svn_stream_wrap_buffered_read(input, pool);
   SVN_ERR(load_index(opt_state->repository_path, input, pool));
 
   return SVN_NO_ERROR;

Modified: subversion/branches/reuse-ra-session/subversion/svnfsfs/stats-cmd.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/svnfsfs/stats-cmd.c?rev=1702504&r1=1702503&r2=1702504&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/svnfsfs/stats-cmd.c 
(original)
+++ subversion/branches/reuse-ra-session/subversion/svnfsfs/stats-cmd.c Fri Sep 
11 15:51:30 2015
@@ -20,6 +20,8 @@
  * ====================================================================
  */
 
+#include <assert.h>
+
 #include "svn_fs.h"
 #include "svn_pools.h"
 #include "svn_sorts.h"
@@ -47,10 +49,10 @@ print_two_power(int i,
    */
   const char *si_prefixes = " kMGTPEZY";
 
-  int number = (1 << (i % 10));
-  int thousands = i / 10;
+  int number = (i >= 0) ? (1 << (i % 10)) : 0;
+  int thousands = (i >= 0) ? (i / 10) : 0;
 
-  char si_prefix = ((thousands >= 0) && (thousands < strlen(si_prefixes)))
+  char si_prefix = (thousands < strlen(si_prefixes))
                  ? si_prefixes[thousands]
                  : '?';
 
@@ -235,6 +237,10 @@ print_extensions_by_changes(svn_fs_fs__s
     {
       svn_fs_fs__extension_info_t *info
         = APR_ARRAY_IDX(data, i, svn_fs_fs__extension_info_t *);
+
+      /* If there are elements, then their count cannot be 0. */
+      assert(stats->file_histogram.total.count);
+
       sum += info->node_histogram.total.count;
       printf(_("%11s %20s (%2d%%) representations\n"),
              info->extension,
@@ -243,11 +249,28 @@ print_extensions_by_changes(svn_fs_fs__s
                    stats->file_histogram.total.count));
     }
 
-  printf(_("%11s %20s (%2d%%) representations\n"),
-         "(others)",
-         svn__ui64toa_sep(stats->file_histogram.total.count - sum, ',', pool),
-         (int)((stats->file_histogram.total.count - sum) * 100 /
-               stats->file_histogram.total.count));
+  if (stats->file_histogram.total.count)
+    {
+      printf(_("%11s %20s (%2d%%) representations\n"),
+             "(others)",
+             svn__ui64toa_sep(stats->file_histogram.total.count - sum, ',',
+                              pool),
+             (int)((stats->file_histogram.total.count - sum) * 100 /
+                   stats->file_histogram.total.count));
+    }
+}
+
+/* Calculate a percentage, handling edge cases. */
+static int
+get_percentage(apr_uint64_t part,
+               apr_uint64_t total)
+{
+  /* This include total == 0. */
+  if (part >= total)
+    return 100;
+
+  /* Standard case. */
+  return (int)(part * 100.0 / total);
 }
 
 /* Print the (up to) 16 extensions in STATS with the largest total size of
@@ -269,15 +292,20 @@ print_extensions_by_nodes(svn_fs_fs__sta
       printf(_("%11s %20s (%2d%%) bytes\n"),
              info->extension,
              svn__ui64toa_sep(info->node_histogram.total.sum, ',', pool),
-             (int)(info->node_histogram.total.sum * 100 /
-                   stats->file_histogram.total.sum));
+             get_percentage(info->node_histogram.total.sum,
+                            stats->file_histogram.total.sum));
     }
 
-  printf(_("%11s %20s (%2d%%) bytes\n"),
-         "(others)",
-         svn__ui64toa_sep(stats->file_histogram.total.sum - sum, ',', pool),
-         (int)((stats->file_histogram.total.sum - sum) * 100 /
-               stats->file_histogram.total.sum));
+  if (stats->file_histogram.total.sum > sum)
+    {
+      /* Total sum can't be zero here. */
+      printf(_("%11s %20s (%2d%%) bytes\n"),
+             "(others)",
+             svn__ui64toa_sep(stats->file_histogram.total.sum - sum, ',',
+                              pool),
+             get_percentage(stats->file_histogram.total.sum - sum,
+                            stats->file_histogram.total.sum));
+    }
 }
 
 /* Print the (up to) 16 extensions in STATS with the largest total size of
@@ -299,16 +327,20 @@ print_extensions_by_reps(svn_fs_fs__stat
       printf(_("%11s %20s (%2d%%) bytes\n"),
              info->extension,
              svn__ui64toa_sep(info->rep_histogram.total.sum, ',', pool),
-             (int)(info->rep_histogram.total.sum * 100 /
-                   stats->rep_size_histogram.total.sum));
+             get_percentage(info->rep_histogram.total.sum,
+                            stats->rep_size_histogram.total.sum));
     }
 
-  printf(_("%11s %20s (%2d%%) bytes\n"),
-         "(others)",
-         svn__ui64toa_sep(stats->rep_size_histogram.total.sum - sum, ',',
-                          pool),
-         (int)((stats->rep_size_histogram.total.sum - sum) * 100 /
-               stats->rep_size_histogram.total.sum));
+  if (stats->rep_size_histogram.total.sum > sum)
+    {
+      /* Total sum can't be zero here. */
+      printf(_("%11s %20s (%2d%%) bytes\n"),
+             "(others)",
+             svn__ui64toa_sep(stats->rep_size_histogram.total.sum - sum, ',',
+                              pool),
+             get_percentage(stats->rep_size_histogram.total.sum - sum,
+                            stats->rep_size_histogram.total.sum));
+    }
 }
 
 /* Print per-extension histograms for the most frequent extensions in STATS.
@@ -343,7 +375,7 @@ print_stats(svn_fs_fs__stats_t *stats,
             apr_pool_t *pool)
 {
   /* print results */
-  printf("\nGlobal statistics:\n");
+  printf("\n\nGlobal statistics:\n");
   printf(_("%20s bytes in %12s revisions\n"
            "%20s bytes in %12s changes\n"
            "%20s bytes in %12s node revision records\n"

Modified: subversion/branches/reuse-ra-session/subversion/svnrdump/load_editor.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/svnrdump/load_editor.c?rev=1702504&r1=1702503&r2=1702504&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/svnrdump/load_editor.c 
(original)
+++ subversion/branches/reuse-ra-session/subversion/svnrdump/load_editor.c Fri 
Sep 11 15:51:30 2015
@@ -167,8 +167,7 @@ set_revision_mapping(apr_hash_t *rev_map
                                          sizeof(svn_revnum_t) * 2);
   mapped_revs[0] = from_rev;
   mapped_revs[1] = to_rev;
-  apr_hash_set(rev_map, mapped_revs,
-               sizeof(svn_revnum_t), mapped_revs + 1);
+  apr_hash_set(rev_map, mapped_revs, sizeof(*mapped_revs), mapped_revs + 1);
 }
 
 /* Return the revision to which FROM_REV maps in REV_MAP, or

Modified: subversion/branches/reuse-ra-session/subversion/svnserve/cyrus_auth.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/svnserve/cyrus_auth.c?rev=1702504&r1=1702503&r2=1702504&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/svnserve/cyrus_auth.c 
(original)
+++ subversion/branches/reuse-ra-session/subversion/svnserve/cyrus_auth.c Fri 
Sep 11 15:51:30 2015
@@ -199,7 +199,7 @@ static svn_error_t *try_auth(svn_ra_svn_
 
   while (result == SASL_CONTINUE)
     {
-      svn_ra_svn_item_t *item;
+      svn_ra_svn__item_t *item;
 
       arg = svn_string_ncreate(out, outlen, pool);
       /* Encode what we send to the client. */
@@ -213,7 +213,7 @@ static svn_error_t *try_auth(svn_ra_svn_
       if (item->kind != SVN_RA_SVN_STRING)
         return SVN_NO_ERROR;
 
-      in = item->u.string;
+      in = &item->u.string;
       if (use_base64)
         in = svn_base64_decode_string(in, pool);
 

Modified: subversion/branches/reuse-ra-session/subversion/svnserve/serve.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/svnserve/serve.c?rev=1702504&r1=1702503&r2=1702504&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/svnserve/serve.c (original)
+++ subversion/branches/reuse-ra-session/subversion/svnserve/serve.c Fri Sep 11 
15:51:30 2015
@@ -830,7 +830,7 @@ static svn_error_t *must_have_access(svn
  */
 
 static svn_error_t *set_path(svn_ra_svn_conn_t *conn, apr_pool_t *pool,
-                             apr_array_header_t *params, void *baton)
+                             svn_ra_svn__list_t *params, void *baton)
 {
   report_driver_baton_t *b = baton;
   const char *path, *lock_token, *depth_word;
@@ -840,8 +840,8 @@ static svn_error_t *set_path(svn_ra_svn_
   svn_boolean_t start_empty;
 
   SVN_ERR(svn_ra_svn__parse_tuple(params, pool, "crb?(?c)?w",
-                                 &path, &rev, &start_empty, &lock_token,
-                                 &depth_word));
+                                  &path, &rev, &start_empty, &lock_token,
+                                  &depth_word));
   if (depth_word)
     depth = svn_depth_from_word(depth_word);
   path = svn_relpath_canonicalize(path, pool);
@@ -857,7 +857,7 @@ static svn_error_t *set_path(svn_ra_svn_
 }
 
 static svn_error_t *delete_path(svn_ra_svn_conn_t *conn, apr_pool_t *pool,
-                                apr_array_header_t *params, void *baton)
+                                svn_ra_svn__list_t *params, void *baton)
 {
   report_driver_baton_t *b = baton;
   const char *path;
@@ -870,7 +870,7 @@ static svn_error_t *delete_path(svn_ra_s
 }
 
 static svn_error_t *link_path(svn_ra_svn_conn_t *conn, apr_pool_t *pool,
-                              apr_array_header_t *params, void *baton)
+                              svn_ra_svn__list_t *params, void *baton)
 {
   report_driver_baton_t *b = baton;
   const char *path, *url, *lock_token, *fs_path, *depth_word;
@@ -901,7 +901,7 @@ static svn_error_t *link_path(svn_ra_svn
 }
 
 static svn_error_t *finish_report(svn_ra_svn_conn_t *conn, apr_pool_t *pool,
-                                  apr_array_header_t *params, void *baton)
+                                  svn_ra_svn__list_t *params, void *baton)
 {
   report_driver_baton_t *b = baton;
 
@@ -912,8 +912,11 @@ static svn_error_t *finish_report(svn_ra
   return SVN_NO_ERROR;
 }
 
-static svn_error_t *abort_report(svn_ra_svn_conn_t *conn, apr_pool_t *pool,
-                                 apr_array_header_t *params, void *baton)
+static svn_error_t *
+abort_report(svn_ra_svn_conn_t *conn,
+             apr_pool_t *pool,
+             svn_ra_svn__list_t *params,
+             void *baton)
 {
   report_driver_baton_t *b = baton;
 
@@ -922,12 +925,12 @@ static svn_error_t *abort_report(svn_ra_
   return SVN_NO_ERROR;
 }
 
-static const svn_ra_svn_cmd_entry_t report_commands[] = {
+static const svn_ra_svn__cmd_entry_t report_commands[] = {
   { "set-path",      set_path },
   { "delete-path",   delete_path },
   { "link-path",     link_path },
-  { "finish-report", finish_report, TRUE },
-  { "abort-report",  abort_report,  TRUE },
+  { "finish-report", finish_report, NULL, TRUE },
+  { "abort-report",  abort_report,  NULL, TRUE },
   { NULL }
 };
 
@@ -1092,8 +1095,11 @@ get_props(apr_hash_t **props,
 }
 
 /* Set BATON->FS_PATH for the repository URL found in PARAMS. */
-static svn_error_t *reparent(svn_ra_svn_conn_t *conn, apr_pool_t *pool,
-                             apr_array_header_t *params, void *baton)
+static svn_error_t *
+reparent(svn_ra_svn_conn_t *conn,
+         apr_pool_t *pool,
+         svn_ra_svn__list_t *params,
+         void *baton)
 {
   server_baton_t *b = baton;
   const char *url;
@@ -1111,8 +1117,11 @@ static svn_error_t *reparent(svn_ra_svn_
   return SVN_NO_ERROR;
 }
 
-static svn_error_t *get_latest_rev(svn_ra_svn_conn_t *conn, apr_pool_t *pool,
-                                   apr_array_header_t *params, void *baton)
+static svn_error_t *
+get_latest_rev(svn_ra_svn_conn_t *conn,
+               apr_pool_t *pool,
+               svn_ra_svn__list_t *params,
+               void *baton)
 {
   server_baton_t *b = baton;
   svn_revnum_t rev;
@@ -1125,8 +1134,11 @@ static svn_error_t *get_latest_rev(svn_r
   return SVN_NO_ERROR;
 }
 
-static svn_error_t *get_dated_rev(svn_ra_svn_conn_t *conn, apr_pool_t *pool,
-                                  apr_array_header_t *params, void *baton)
+static svn_error_t *
+get_dated_rev(svn_ra_svn_conn_t *conn,
+              apr_pool_t *pool,
+              svn_ra_svn__list_t *params,
+              void *baton)
 {
   server_baton_t *b = baton;
   svn_revnum_t rev;
@@ -1171,8 +1183,11 @@ static svn_error_t *do_change_rev_prop(s
   return SVN_NO_ERROR;
 }
 
-static svn_error_t *change_rev_prop2(svn_ra_svn_conn_t *conn, apr_pool_t *pool,
-                                     apr_array_header_t *params, void *baton)
+static svn_error_t *
+change_rev_prop2(svn_ra_svn_conn_t *conn,
+                 apr_pool_t *pool,
+                 svn_ra_svn__list_t *params,
+                 void *baton)
 {
   server_baton_t *b = baton;
   svn_revnum_t rev;
@@ -1208,8 +1223,11 @@ static svn_error_t *change_rev_prop2(svn
   return SVN_NO_ERROR;
 }
 
-static svn_error_t *change_rev_prop(svn_ra_svn_conn_t *conn, apr_pool_t *pool,
-                                    apr_array_header_t *params, void *baton)
+static svn_error_t *
+change_rev_prop(svn_ra_svn_conn_t *conn,
+                apr_pool_t *pool,
+                svn_ra_svn__list_t *params,
+                void *baton)
 {
   server_baton_t *b = baton;
   svn_revnum_t rev;
@@ -1225,8 +1243,11 @@ static svn_error_t *change_rev_prop(svn_
   return SVN_NO_ERROR;
 }
 
-static svn_error_t *rev_proplist(svn_ra_svn_conn_t *conn, apr_pool_t *pool,
-                                 apr_array_header_t *params, void *baton)
+static svn_error_t *
+rev_proplist(svn_ra_svn_conn_t *conn,
+             apr_pool_t *pool,
+             svn_ra_svn__list_t *params,
+             void *baton)
 {
   server_baton_t *b = baton;
   svn_revnum_t rev;
@@ -1250,8 +1271,11 @@ static svn_error_t *rev_proplist(svn_ra_
   return SVN_NO_ERROR;
 }
 
-static svn_error_t *rev_prop(svn_ra_svn_conn_t *conn, apr_pool_t *pool,
-                             apr_array_header_t *params, void *baton)
+static svn_error_t *
+rev_prop(svn_ra_svn_conn_t *conn,
+         apr_pool_t *pool,
+         svn_ra_svn__list_t *params,
+         void *baton)
 {
   server_baton_t *b = baton;
   svn_revnum_t rev;
@@ -1291,14 +1315,15 @@ static svn_error_t *commit_done(const sv
 
 /* Add the LOCK_TOKENS (if any) to the filesystem access context,
  * checking path authorizations using the state in SB as we go.
- * LOCK_TOKENS is an array of svn_ra_svn_item_t structs.  Return a
+ * LOCK_TOKENS is an array of svn_ra_svn__item_t structs.  Return a
  * client error if LOCK_TOKENS is not a list of lists.  If a lock
  * violates the authz configuration, return SVN_ERR_RA_NOT_AUTHORIZED
  * to the client.  Use POOL for temporary allocations only.
  */
-static svn_error_t *add_lock_tokens(const apr_array_header_t *lock_tokens,
-                                    server_baton_t *sb,
-                                    apr_pool_t *pool)
+static svn_error_t *
+add_lock_tokens(const svn_ra_svn__list_t *lock_tokens,
+                server_baton_t *sb,
+                apr_pool_t *pool)
 {
   int i;
   svn_fs_access_t *fs_access;
@@ -1312,24 +1337,23 @@ static svn_error_t *add_lock_tokens(cons
   for (i = 0; i < lock_tokens->nelts; ++i)
     {
       const char *path, *token, *full_path;
-      svn_ra_svn_item_t *path_item, *token_item;
-      svn_ra_svn_item_t *item = &APR_ARRAY_IDX(lock_tokens, i,
-                                               svn_ra_svn_item_t);
+      svn_ra_svn__item_t *path_item, *token_item;
+      svn_ra_svn__item_t *item = &SVN_RA_SVN__LIST_ITEM(lock_tokens, i);
       if (item->kind != SVN_RA_SVN_LIST)
         return svn_error_create(SVN_ERR_RA_SVN_MALFORMED_DATA, NULL,
                                 "Lock tokens aren't a list of lists");
 
-      path_item = &APR_ARRAY_IDX(item->u.list, 0, svn_ra_svn_item_t);
+      path_item = &SVN_RA_SVN__LIST_ITEM(&item->u.list, 0);
       if (path_item->kind != SVN_RA_SVN_STRING)
         return svn_error_create(SVN_ERR_RA_SVN_MALFORMED_DATA, NULL,
                                 "Lock path isn't a string");
 
-      token_item = &APR_ARRAY_IDX(item->u.list, 1, svn_ra_svn_item_t);
+      token_item = &SVN_RA_SVN__LIST_ITEM(&item->u.list, 1);
       if (token_item->kind != SVN_RA_SVN_STRING)
         return svn_error_create(SVN_ERR_RA_SVN_MALFORMED_DATA, NULL,
                                 "Lock token isn't a string");
 
-      path = path_item->u.string->data;
+      path = path_item->u.string.data;
       full_path = svn_fspath__join(sb->repository->fs_path->data,
                                    svn_relpath_canonicalize(path, pool),
                                    pool);
@@ -1338,7 +1362,7 @@ static svn_error_t *add_lock_tokens(cons
         return error_create_and_log(SVN_ERR_RA_NOT_AUTHORIZED, NULL, NULL,
                                     sb);
 
-      token = token_item->u.string->data;
+      token = token_item->u.string.data;
       SVN_ERR(svn_fs_access_add_lock_token2(fs_access, path, token));
     }
 
@@ -1361,10 +1385,11 @@ lock_cb(void *baton,
 }
 
 /* Unlock the paths with lock tokens in LOCK_TOKENS, ignoring any errors.
-   LOCK_TOKENS contains svn_ra_svn_item_t elements, assumed to be lists. */
-static svn_error_t *unlock_paths(const apr_array_header_t *lock_tokens,
-                                 server_baton_t *sb,
-                                 apr_pool_t *pool)
+   LOCK_TOKENS contains svn_ra_svn__item_t elements, assumed to be lists. */
+static svn_error_t *
+unlock_paths(const svn_ra_svn__list_t *lock_tokens,
+             server_baton_t *sb,
+             apr_pool_t *pool)
 {
   int i;
   apr_pool_t *subpool = svn_pool_create(pool);
@@ -1373,18 +1398,18 @@ static svn_error_t *unlock_paths(const a
 
   for (i = 0; i < lock_tokens->nelts; ++i)
     {
-      svn_ra_svn_item_t *item, *path_item, *token_item;
+      svn_ra_svn__item_t *item, *path_item, *token_item;
       const char *path, *token, *full_path;
 
-      item = &APR_ARRAY_IDX(lock_tokens, i, svn_ra_svn_item_t);
-      path_item = &APR_ARRAY_IDX(item->u.list, 0, svn_ra_svn_item_t);
-      token_item = &APR_ARRAY_IDX(item->u.list, 1, svn_ra_svn_item_t);
+      item = &SVN_RA_SVN__LIST_ITEM(lock_tokens, i);
+      path_item = &SVN_RA_SVN__LIST_ITEM(&item->u.list, 0);
+      token_item = &SVN_RA_SVN__LIST_ITEM(&item->u.list, 1);
 
-      path = path_item->u.string->data;
+      path = path_item->u.string.data;
       full_path = svn_fspath__join(sb->repository->fs_path->data,
                                    svn_relpath_canonicalize(path, subpool),
                                    subpool);
-      token = token_item->u.string->data;
+      token = token_item->u.string.data;
       svn_hash_sets(targets, full_path, token);
     }
 
@@ -1401,17 +1426,20 @@ static svn_error_t *unlock_paths(const a
   return SVN_NO_ERROR;
 }
 
-static svn_error_t *commit(svn_ra_svn_conn_t *conn, apr_pool_t *pool,
-                           apr_array_header_t *params, void *baton)
+static svn_error_t *
+commit(svn_ra_svn_conn_t *conn,
+       apr_pool_t *pool,
+       svn_ra_svn__list_t *params,
+       void *baton)
 {
   server_baton_t *b = baton;
   const char *log_msg,
              *date = NULL,
              *author = NULL,
              *post_commit_err = NULL;
-  apr_array_header_t *lock_tokens;
+  svn_ra_svn__list_t *lock_tokens;
   svn_boolean_t keep_locks;
-  apr_array_header_t *revprop_list;
+  svn_ra_svn__list_t *revprop_list;
   apr_hash_t *revprop_table;
   const svn_delta_editor_t *editor;
   void *edit_baton;
@@ -1513,8 +1541,11 @@ static svn_error_t *commit(svn_ra_svn_co
   return SVN_NO_ERROR;
 }
 
-static svn_error_t *get_file(svn_ra_svn_conn_t *conn, apr_pool_t *pool,
-                             apr_array_header_t *params, void *baton)
+static svn_error_t *
+get_file(svn_ra_svn_conn_t *conn,
+         apr_pool_t *pool,
+         svn_ra_svn__list_t *params,
+         void *baton)
 {
   server_baton_t *b = baton;
   const char *path, *full_path, *hex_digest;
@@ -1637,8 +1668,11 @@ static svn_error_t *get_file(svn_ra_svn_
   return SVN_NO_ERROR;
 }
 
-static svn_error_t *get_dir(svn_ra_svn_conn_t *conn, apr_pool_t *pool,
-                            apr_array_header_t *params, void *baton)
+static svn_error_t *
+get_dir(svn_ra_svn_conn_t *conn,
+        apr_pool_t *pool,
+        svn_ra_svn__list_t *params,
+        void *baton)
 {
   server_baton_t *b = baton;
   const char *path, *full_path;
@@ -1651,8 +1685,8 @@ static svn_error_t *get_dir(svn_ra_svn_c
   svn_boolean_t want_props, want_contents;
   apr_uint64_t wants_inherited_props;
   apr_uint64_t dirent_fields;
-  apr_array_header_t *dirent_fields_list = NULL;
-  svn_ra_svn_item_t *elt;
+  svn_ra_svn__list_t *dirent_fields_list = NULL;
+  svn_ra_svn__item_t *elt;
   int i;
   authz_baton_t ab;
 
@@ -1677,7 +1711,7 @@ static svn_error_t *get_dir(svn_ra_svn_c
 
       for (i = 0; i < dirent_fields_list->nelts; ++i)
         {
-          elt = &APR_ARRAY_IDX(dirent_fields_list, i, svn_ra_svn_item_t);
+          elt = &SVN_RA_SVN__LIST_ITEM(dirent_fields_list, i);
 
           if (elt->kind != SVN_RA_SVN_WORD)
             return svn_error_create(SVN_ERR_RA_SVN_MALFORMED_DATA, NULL,
@@ -1838,8 +1872,11 @@ static svn_error_t *get_dir(svn_ra_svn_c
   return svn_ra_svn__write_tuple(conn, pool, "!))");
 }
 
-static svn_error_t *update(svn_ra_svn_conn_t *conn, apr_pool_t *pool,
-                           apr_array_header_t *params, void *baton)
+static svn_error_t *
+update(svn_ra_svn_conn_t *conn,
+       apr_pool_t *pool,
+       svn_ra_svn__list_t *params,
+       void *baton)
 {
   server_baton_t *b = baton;
   svn_revnum_t rev;
@@ -1893,8 +1930,11 @@ static svn_error_t *update(svn_ra_svn_co
   return SVN_NO_ERROR;
 }
 
-static svn_error_t *switch_cmd(svn_ra_svn_conn_t *conn, apr_pool_t *pool,
-                               apr_array_header_t *params, void *baton)
+static svn_error_t *
+switch_cmd(svn_ra_svn_conn_t *conn,
+           apr_pool_t *pool,
+           svn_ra_svn__list_t *params,
+           void *baton)
 {
   server_baton_t *b = baton;
   svn_revnum_t rev;
@@ -1943,8 +1983,11 @@ static svn_error_t *switch_cmd(svn_ra_sv
                        (ignore_ancestry != svn_tristate_false));
 }
 
-static svn_error_t *status(svn_ra_svn_conn_t *conn, apr_pool_t *pool,
-                           apr_array_header_t *params, void *baton)
+static svn_error_t *
+status(svn_ra_svn_conn_t *conn,
+       apr_pool_t *pool,
+       svn_ra_svn__list_t *params,
+       void *baton)
 {
   server_baton_t *b = baton;
   svn_revnum_t rev;
@@ -1979,8 +2022,11 @@ static svn_error_t *status(svn_ra_svn_co
                        depth, FALSE, FALSE);
 }
 
-static svn_error_t *diff(svn_ra_svn_conn_t *conn, apr_pool_t *pool,
-                         apr_array_header_t *params, void *baton)
+static svn_error_t *
+diff(svn_ra_svn_conn_t *conn,
+     apr_pool_t *pool,
+     svn_ra_svn__list_t *params,
+     void *baton)
 {
   server_baton_t *b = baton;
   svn_revnum_t rev;
@@ -2045,12 +2091,16 @@ static svn_error_t *diff(svn_ra_svn_conn
 
    ASSUMPTION: When performing a 'merge' with two URLs at different
    revisions, the client will call this command more than once. */
-static svn_error_t *get_mergeinfo(svn_ra_svn_conn_t *conn, apr_pool_t *pool,
-                                  apr_array_header_t *params, void *baton)
+static svn_error_t *
+get_mergeinfo(svn_ra_svn_conn_t *conn,
+              apr_pool_t *pool,
+              svn_ra_svn__list_t *params,
+              void *baton)
 {
   server_baton_t *b = baton;
   svn_revnum_t rev;
-  apr_array_header_t *paths, *canonical_paths;
+  svn_ra_svn__list_t *paths;
+  apr_array_header_t *canonical_paths;
   svn_mergeinfo_catalog_t mergeinfo;
   int i;
   apr_hash_index_t *hi;
@@ -2071,13 +2121,13 @@ static svn_error_t *get_mergeinfo(svn_ra
   canonical_paths = apr_array_make(pool, paths->nelts, sizeof(const char *));
   for (i = 0; i < paths->nelts; i++)
      {
-        svn_ra_svn_item_t *item = &APR_ARRAY_IDX(paths, i, svn_ra_svn_item_t);
+        svn_ra_svn__item_t *item = &SVN_RA_SVN__LIST_ITEM(paths, i);
         const char *full_path;
 
         if (item->kind != SVN_RA_SVN_STRING)
           return svn_error_create(SVN_ERR_RA_SVN_MALFORMED_DATA, NULL,
                                   _("Path is not a string"));
-        full_path = svn_relpath_canonicalize(item->u.string->data, pool);
+        full_path = svn_relpath_canonicalize(item->u.string.data, pool);
         full_path = svn_fspath__join(b->repository->fs_path->data, full_path, 
pool);
         APR_ARRAY_PUSH(canonical_paths, const char *) = full_path;
      }
@@ -2200,17 +2250,21 @@ static svn_error_t *log_receiver(void *b
   return SVN_NO_ERROR;
 }
 
-static svn_error_t *log_cmd(svn_ra_svn_conn_t *conn, apr_pool_t *pool,
-                            apr_array_header_t *params, void *baton)
+static svn_error_t *
+log_cmd(svn_ra_svn_conn_t *conn,
+        apr_pool_t *pool,
+        svn_ra_svn__list_t *params,
+        void *baton)
 {
   svn_error_t *err, *write_err;
   server_baton_t *b = baton;
   svn_revnum_t start_rev, end_rev;
   const char *full_path;
   svn_boolean_t send_changed_paths, strict_node, include_merged_revisions;
-  apr_array_header_t *paths, *full_paths, *revprop_items, *revprops;
+  apr_array_header_t *full_paths, *revprops;
+  svn_ra_svn__list_t *paths, *revprop_items;
   char *revprop_word;
-  svn_ra_svn_item_t *elt;
+  svn_ra_svn__item_t *elt;
   int i;
   apr_uint64_t limit, include_merged_revs_param;
   log_baton_t lb;
@@ -2243,11 +2297,11 @@ static svn_error_t *log_cmd(svn_ra_svn_c
                                 sizeof(char *));
       for (i = 0; i < revprop_items->nelts; i++)
         {
-          elt = &APR_ARRAY_IDX(revprop_items, i, svn_ra_svn_item_t);
+          elt = &SVN_RA_SVN__LIST_ITEM(revprop_items, i);
           if (elt->kind != SVN_RA_SVN_STRING)
             return svn_error_create(SVN_ERR_RA_SVN_MALFORMED_DATA, NULL,
                                     _("Log revprop entry not a string"));
-          APR_ARRAY_PUSH(revprops, const char *) = elt->u.string->data;
+          APR_ARRAY_PUSH(revprops, const char *) = elt->u.string.data;
         }
     }
   else
@@ -2265,11 +2319,11 @@ static svn_error_t *log_cmd(svn_ra_svn_c
   full_paths = apr_array_make(pool, paths->nelts, sizeof(const char *));
   for (i = 0; i < paths->nelts; i++)
     {
-      elt = &APR_ARRAY_IDX(paths, i, svn_ra_svn_item_t);
+      elt = &SVN_RA_SVN__LIST_ITEM(paths, i);
       if (elt->kind != SVN_RA_SVN_STRING)
         return svn_error_create(SVN_ERR_RA_SVN_MALFORMED_DATA, NULL,
                                 _("Log path entry not a string"));
-      full_path = svn_relpath_canonicalize(elt->u.string->data, pool),
+      full_path = svn_relpath_canonicalize(elt->u.string.data, pool),
       full_path = svn_fspath__join(b->repository->fs_path->data, full_path,
                                    pool);
       APR_ARRAY_PUSH(full_paths, const char *) = full_path;
@@ -2303,8 +2357,11 @@ static svn_error_t *log_cmd(svn_ra_svn_c
   return SVN_NO_ERROR;
 }
 
-static svn_error_t *check_path(svn_ra_svn_conn_t *conn, apr_pool_t *pool,
-                               apr_array_header_t *params, void *baton)
+static svn_error_t *
+check_path(svn_ra_svn_conn_t *conn,
+           apr_pool_t *pool,
+           svn_ra_svn__list_t *params,
+           void *baton)
 {
   server_baton_t *b = baton;
   svn_revnum_t rev;
@@ -2333,8 +2390,11 @@ static svn_error_t *check_path(svn_ra_sv
   return SVN_NO_ERROR;
 }
 
-static svn_error_t *stat_cmd(svn_ra_svn_conn_t *conn, apr_pool_t *pool,
-                             apr_array_header_t *params, void *baton)
+static svn_error_t *
+stat_cmd(svn_ra_svn_conn_t *conn,
+         apr_pool_t *pool,
+         svn_ra_svn__list_t *params,
+         void *baton)
 {
   server_baton_t *b = baton;
   svn_revnum_t rev;
@@ -2380,14 +2440,18 @@ static svn_error_t *stat_cmd(svn_ra_svn_
   return SVN_NO_ERROR;
 }
 
-static svn_error_t *get_locations(svn_ra_svn_conn_t *conn, apr_pool_t *pool,
-                                  apr_array_header_t *params, void *baton)
+static svn_error_t *
+get_locations(svn_ra_svn_conn_t *conn,
+              apr_pool_t *pool,
+              svn_ra_svn__list_t *params,
+              void *baton)
 {
   svn_error_t *err, *write_err;
   server_baton_t *b = baton;
   svn_revnum_t revision;
-  apr_array_header_t *location_revisions, *loc_revs_proto;
-  svn_ra_svn_item_t *elt;
+  apr_array_header_t *location_revisions;
+  svn_ra_svn__list_t *loc_revs_proto;
+  svn_ra_svn__item_t *elt;
   int i;
   const char *relative_path;
   svn_revnum_t peg_revision;
@@ -2411,7 +2475,7 @@ static svn_error_t *get_locations(svn_ra
                                       sizeof(svn_revnum_t));
   for (i = 0; i < loc_revs_proto->nelts; i++)
     {
-      elt = &APR_ARRAY_IDX(loc_revs_proto, i, svn_ra_svn_item_t);
+      elt = &SVN_RA_SVN__LIST_ITEM(loc_revs_proto, i);
       if (elt->kind != SVN_RA_SVN_NUMBER)
         return svn_error_create(SVN_ERR_RA_SVN_MALFORMED_DATA, NULL,
                                 "Get-locations location revisions entry "
@@ -2479,10 +2543,11 @@ static svn_error_t *gls_receiver(svn_loc
                                  segment->path);
 }
 
-static svn_error_t *get_location_segments(svn_ra_svn_conn_t *conn,
-                                          apr_pool_t *pool,
-                                          apr_array_header_t *params,
-                                          void *baton)
+static svn_error_t *
+get_location_segments(svn_ra_svn_conn_t *conn,
+                      apr_pool_t *pool,
+                      svn_ra_svn__list_t *params,
+                      void *baton)
 {
   svn_error_t *err, *write_err;
   server_baton_t *b = baton;
@@ -2644,8 +2709,11 @@ static svn_error_t *file_rev_handler(voi
   return SVN_NO_ERROR;
 }
 
-static svn_error_t *get_file_revs(svn_ra_svn_conn_t *conn, apr_pool_t *pool,
-                                  apr_array_header_t *params, void *baton)
+static svn_error_t *
+get_file_revs(svn_ra_svn_conn_t *conn,
+              apr_pool_t *pool,
+              svn_ra_svn__list_t *params,
+              void *baton)
 {
   server_baton_t *b = baton;
   svn_error_t *err, *write_err;
@@ -2697,8 +2765,11 @@ static svn_error_t *get_file_revs(svn_ra
   return SVN_NO_ERROR;
 }
 
-static svn_error_t *lock(svn_ra_svn_conn_t *conn, apr_pool_t *pool,
-                         apr_array_header_t *params, void *baton)
+static svn_error_t *
+lock(svn_ra_svn_conn_t *conn,
+     apr_pool_t *pool,
+     svn_ra_svn__list_t *params,
+     void *baton)
 {
   server_baton_t *b = baton;
   const char *path;
@@ -2771,11 +2842,14 @@ clear_lock_result_hash(apr_hash_t *resul
     }
 }
 
-static svn_error_t *lock_many(svn_ra_svn_conn_t *conn, apr_pool_t *pool,
-                              apr_array_header_t *params, void *baton)
+static svn_error_t *
+lock_many(svn_ra_svn_conn_t *conn,
+          apr_pool_t *pool,
+          svn_ra_svn__list_t *params,
+          void *baton)
 {
   server_baton_t *b = baton;
-  apr_array_header_t *path_revs;
+  svn_ra_svn__list_t *path_revs;
   const char *comment;
   svn_boolean_t steal_lock;
   int i;
@@ -2802,8 +2876,7 @@ static svn_error_t *lock_many(svn_ra_svn
     {
       const char *path, *full_path;
       svn_revnum_t current_rev;
-      svn_ra_svn_item_t *item = &APR_ARRAY_IDX(path_revs, i,
-                                               svn_ra_svn_item_t);
+      svn_ra_svn__item_t *item = &SVN_RA_SVN__LIST_ITEM(path_revs, i);
       svn_fs_lock_target_t *target;
 
       svn_pool_clear(subpool);
@@ -2812,7 +2885,7 @@ static svn_error_t *lock_many(svn_ra_svn
         return svn_error_create(SVN_ERR_RA_SVN_MALFORMED_DATA, NULL,
                                 "Lock requests should be list of lists");
 
-      SVN_ERR(svn_ra_svn__parse_tuple(item->u.list, subpool, "c(?r)", &path,
+      SVN_ERR(svn_ra_svn__parse_tuple(&item->u.list, subpool, "c(?r)", &path,
                                       &current_rev));
 
       full_path = svn_fspath__join(b->repository->fs_path->data,
@@ -2866,14 +2939,13 @@ static svn_error_t *lock_many(svn_ra_svn
     {
       const char *path, *full_path;
       svn_revnum_t current_rev;
-      svn_ra_svn_item_t *item = &APR_ARRAY_IDX(path_revs, i,
-                                               svn_ra_svn_item_t);
+      svn_ra_svn__item_t *item = &SVN_RA_SVN__LIST_ITEM(path_revs, i);
       struct lock_result_t *result;
 
       svn_pool_clear(subpool);
 
-      write_err = svn_ra_svn__parse_tuple(item->u.list, subpool, "c(?r)", 
&path,
-                                          &current_rev);
+      write_err = svn_ra_svn__parse_tuple(&item->u.list, subpool, "c(?r)",
+                                          &path, &current_rev);
       if (write_err)
         break;
 
@@ -2927,8 +2999,11 @@ static svn_error_t *lock_many(svn_ra_svn
   return SVN_NO_ERROR;
 }
 
-static svn_error_t *unlock(svn_ra_svn_conn_t *conn, apr_pool_t *pool,
-                           apr_array_header_t *params, void *baton)
+static svn_error_t *
+unlock(svn_ra_svn_conn_t *conn,
+       apr_pool_t *pool,
+       svn_ra_svn__list_t *params,
+       void *baton)
 {
   server_baton_t *b = baton;
   const char *path, *token, *full_path;
@@ -2954,12 +3029,15 @@ static svn_error_t *unlock(svn_ra_svn_co
   return SVN_NO_ERROR;
 }
 
-static svn_error_t *unlock_many(svn_ra_svn_conn_t *conn, apr_pool_t *pool,
-                                apr_array_header_t *params, void *baton)
+static svn_error_t *
+unlock_many(svn_ra_svn_conn_t *conn,
+            apr_pool_t *pool,
+            svn_ra_svn__list_t *params,
+            void *baton)
 {
   server_baton_t *b = baton;
   svn_boolean_t break_lock;
-  apr_array_header_t *unlock_tokens;
+  svn_ra_svn__list_t *unlock_tokens;
   int i;
   apr_pool_t *subpool;
   svn_error_t *err = SVN_NO_ERROR, *write_err = SVN_NO_ERROR;
@@ -2979,8 +3057,7 @@ static svn_error_t *unlock_many(svn_ra_s
   /* Parse the unlock requests from PATH_REVS into TARGETS. */
   for (i = 0; i < unlock_tokens->nelts; i++)
     {
-      svn_ra_svn_item_t *item = &APR_ARRAY_IDX(unlock_tokens, i,
-                                               svn_ra_svn_item_t);
+      svn_ra_svn__item_t *item = &SVN_RA_SVN__LIST_ITEM(unlock_tokens, i);
       const char *path, *full_path, *token;
 
       svn_pool_clear(subpool);
@@ -2989,7 +3066,7 @@ static svn_error_t *unlock_many(svn_ra_s
         return svn_error_create(SVN_ERR_RA_SVN_MALFORMED_DATA, NULL,
                                 "Unlock request should be a list of lists");
 
-      SVN_ERR(svn_ra_svn__parse_tuple(item->u.list, subpool, "c(?c)", &path,
+      SVN_ERR(svn_ra_svn__parse_tuple(&item->u.list, subpool, "c(?c)", &path,
                                       &token));
       if (!token)
         token = "";
@@ -3042,14 +3119,13 @@ static svn_error_t *unlock_many(svn_ra_s
   for (i = 0; i < unlock_tokens->nelts; ++i)
     {
       const char *path, *token, *full_path;
-      svn_ra_svn_item_t *item = &APR_ARRAY_IDX(unlock_tokens, i,
-                                               svn_ra_svn_item_t);
+      svn_ra_svn__item_t *item = &SVN_RA_SVN__LIST_ITEM(unlock_tokens, i);
       struct lock_result_t *result;
 
       svn_pool_clear(subpool);
 
-      write_err = svn_ra_svn__parse_tuple(item->u.list, subpool, "c(?c)", 
&path,
-                                          &token);
+      write_err = svn_ra_svn__parse_tuple(&item->u.list, subpool, "c(?c)",
+                                          &path, &token);
       if (write_err)
         break;
 
@@ -3096,8 +3172,11 @@ static svn_error_t *unlock_many(svn_ra_s
   return SVN_NO_ERROR;
 }
 
-static svn_error_t *get_lock(svn_ra_svn_conn_t *conn, apr_pool_t *pool,
-                             apr_array_header_t *params, void *baton)
+static svn_error_t *
+get_lock(svn_ra_svn_conn_t *conn,
+         apr_pool_t *pool,
+         svn_ra_svn__list_t *params,
+         void *baton)
 {
   server_baton_t *b = baton;
   const char *path;
@@ -3124,8 +3203,11 @@ static svn_error_t *get_lock(svn_ra_svn_
   return SVN_NO_ERROR;
 }
 
-static svn_error_t *get_locks(svn_ra_svn_conn_t *conn, apr_pool_t *pool,
-                              apr_array_header_t *params, void *baton)
+static svn_error_t *
+get_locks(svn_ra_svn_conn_t *conn,
+          apr_pool_t *pool,
+          svn_ra_svn__list_t *params,
+          void *baton)
 {
   server_baton_t *b = baton;
   const char *path;
@@ -3213,8 +3295,11 @@ static svn_error_t *replay_one_revision(
   return svn_ra_svn__write_cmd_finish_replay(conn, pool);
 }
 
-static svn_error_t *replay(svn_ra_svn_conn_t *conn, apr_pool_t *pool,
-                           apr_array_header_t *params, void *baton)
+static svn_error_t *
+replay(svn_ra_svn_conn_t *conn,
+       apr_pool_t *pool,
+       svn_ra_svn__list_t *params,
+       void *baton)
 {
   svn_revnum_t rev, low_water_mark;
   svn_boolean_t send_deltas;
@@ -3233,8 +3318,11 @@ static svn_error_t *replay(svn_ra_svn_co
   return SVN_NO_ERROR;
 }
 
-static svn_error_t *replay_range(svn_ra_svn_conn_t *conn, apr_pool_t *pool,
-                                 apr_array_header_t *params, void *baton)
+static svn_error_t *
+replay_range(svn_ra_svn_conn_t *conn,
+             apr_pool_t *pool,
+             svn_ra_svn__list_t *params,
+             void *baton)
 {
   svn_revnum_t start_rev, end_rev, rev, low_water_mark;
   svn_boolean_t send_deltas;
@@ -3281,7 +3369,7 @@ static svn_error_t *replay_range(svn_ra_
 static svn_error_t *
 get_deleted_rev(svn_ra_svn_conn_t *conn,
                 apr_pool_t *pool,
-                apr_array_header_t *params,
+                svn_ra_svn__list_t *params,
                 void *baton)
 {
   server_baton_t *b = baton;
@@ -3305,7 +3393,7 @@ get_deleted_rev(svn_ra_svn_conn_t *conn,
 static svn_error_t *
 get_inherited_props(svn_ra_svn_conn_t *conn,
                     apr_pool_t *pool,
-                    apr_array_header_t *params,
+                    svn_ra_svn__list_t *params,
                     void *baton)
 {
   server_baton_t *b = baton;
@@ -3369,7 +3457,7 @@ get_inherited_props(svn_ra_svn_conn_t *c
   return SVN_NO_ERROR;
 }
 
-static const svn_ra_svn_cmd_entry_t main_commands[] = {
+static const svn_ra_svn__cmd_entry_t main_commands[] = {
   { "reparent",        reparent },
   { "get-latest-rev",  get_latest_rev },
   { "get-dated-rev",   get_dated_rev },
@@ -3774,7 +3862,7 @@ construct_server_baton(server_baton_t **
   svn_error_t *err, *io_err;
   apr_uint64_t ver;
   const char *client_url, *ra_client_string, *client_string;
-  apr_array_header_t *caplist;
+  svn_ra_svn__list_t *caplist;
   apr_pool_t *conn_pool = svn_ra_svn__get_pool(conn);
   server_baton_t *b = apr_pcalloc(conn_pool, sizeof(*b));
   fs_warning_baton_t *warn_baton;
@@ -3840,7 +3928,7 @@ construct_server_baton(server_baton_t **
     return SVN_NO_ERROR;
 
   client_url = svn_uri_canonicalize(client_url, conn_pool);
-  SVN_ERR(svn_ra_svn_set_capabilities(conn, caplist));
+  SVN_ERR(svn_ra_svn__set_capabilities(conn, caplist));
 
   /* All released versions of Subversion support edit-pipeline,
    * so we do not accept connections from clients that do not. */
@@ -3851,20 +3939,20 @@ construct_server_baton(server_baton_t **
      they get handed to the start-commit hook).  While we could add a
      new interface to re-retrieve them from conn and convert the
      result to a list, it's simpler to just convert caplist by hand
-     here, since we already have it and turning 'svn_ra_svn_item_t's
+     here, since we already have it and turning 'svn_ra_svn__item_t's
      into 'const char *'s is pretty easy.
 
      We only record capabilities we care about.  The client may report
      more (because it doesn't know what the server cares about). */
   {
     int i;
-    svn_ra_svn_item_t *item;
+    svn_ra_svn__item_t *item;
 
     b->repository->capabilities = apr_array_make(conn_pool, 1,
                                                  sizeof(const char *));
     for (i = 0; i < caplist->nelts; i++)
       {
-        item = &APR_ARRAY_IDX(caplist, i, svn_ra_svn_item_t);
+        item = &SVN_RA_SVN__LIST_ITEM(caplist, i);
         /* ra_svn_set_capabilities() already type-checked for us */
         if (strcmp(item->u.word, SVN_RA_SVN_CAP_MERGEINFO) == 0)
           {
@@ -3983,7 +4071,7 @@ serve_interruptable(svn_boolean_t *termi
 {
   svn_boolean_t terminate = FALSE;
   svn_error_t *err = NULL;
-  const svn_ra_svn_cmd_entry_t *command;
+  const svn_ra_svn__cmd_entry_t *command;
   apr_pool_t *iterpool = svn_pool_create(pool);
 
   /* Prepare command parser. */

Modified: subversion/branches/reuse-ra-session/subversion/svnserve/svnserve.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/svnserve/svnserve.c?rev=1702504&r1=1702503&r2=1702504&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/svnserve/svnserve.c 
(original)
+++ subversion/branches/reuse-ra-session/subversion/svnserve/svnserve.c Fri Sep 
11 15:51:30 2015
@@ -211,6 +211,17 @@ void winservice_notify_stop(void)
 #define SVNSERVE_OPT_MAX_THREADS     272
 #define SVNSERVE_OPT_BLOCK_READ      273
 
+/* Text macro because we can't use #ifdef sections inside a N_("...")
+   macro expansion. */
+#ifdef CONNECTION_HAVE_THREAD_OPTION
+#define ONLY_AVAILABLE_WITH_THEADS \
+        "\n" \
+        "                             "\
+        "[used only with --threads]"
+#else
+#define ONLY_AVAILABLE_WITH_THEADS ""
+#endif
+
 static const apr_getopt_option_t svnserve__options[] =
   {
     {"daemon",           'd', 0, N_("daemon mode")},
@@ -317,33 +328,22 @@ static const apr_getopt_option_t svnserv
      * ### this option never exists when --service exists. */
     {"threads",          'T', 0, N_("use threads instead of fork "
                                     "[mode: daemon]")},
+#endif
+#if APR_HAS_THREADS
     {"min-threads",      SVNSERVE_OPT_MIN_THREADS, 1,
      N_("Minimum number of server threads, even if idle.\n"
         "                             "
-        "Caped to max-threads; minimum value is 0.\n"
-        "                             "
-        "Default is 1.\n"
+        "Capped to max-threads; minimum value is 0.\n"
         "                             "
-        "[used only with --threads]")},
-#if (APR_SIZEOF_VOIDP <= 4)
+        "Default is 1."
+        ONLY_AVAILABLE_WITH_THEADS)},
     {"max-threads",      SVNSERVE_OPT_MAX_THREADS, 1,
      N_("Maximum number of server threads, even if there\n"
         "                             "
         "are more connections.  Minimum value is 1.\n"
         "                             "
-        "Default is 64.\n"
-        "                             "
-        "[used only with --threads]")},
-#else
-    {"max-threads",      SVNSERVE_OPT_MAX_THREADS, 1,
-     N_("Maximum number of server threads, even if there\n"
-        "                             "
-        "are more connections.  Minimum value is 1.\n"
-        "                             "
-        "Default is 256.\n"
-        "                             "
-        "[used only with --threads]")},
-#endif
+        "Default is " APR_STRINGIFY(THREADPOOL_MAX_SIZE) "."
+        ONLY_AVAILABLE_WITH_THEADS)},
 #endif
     {"foreground",        SVNSERVE_OPT_FOREGROUND, 0,
      N_("run in foreground (useful for debugging)\n"

Modified: subversion/branches/reuse-ra-session/subversion/svnsync/svnsync.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/svnsync/svnsync.c?rev=1702504&r1=1702503&r2=1702504&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/svnsync/svnsync.c (original)
+++ subversion/branches/reuse-ra-session/subversion/svnsync/svnsync.c Fri Sep 
11 15:51:30 2015
@@ -71,6 +71,7 @@ enum svnsync__opt {
   svnsync_opt_trust_server_cert_failures_src,
   svnsync_opt_trust_server_cert_failures_dst,
   svnsync_opt_allow_non_empty,
+  svnsync_opt_skip_unchanged,
   svnsync_opt_steal_lock
 };
 
@@ -148,9 +149,14 @@ static const svn_opt_subcommand_desc2_t
          "if untrusted users/administrators may have write access to the\n"
          "DEST_URL repository.\n"
          "\n"
+         "Unless you need to trigger the destination repositoy's revprop\n"
+         "change hooks for all revision properties, it is recommended to use\n"
+         "the --skip-unchanged option for best performance.\n"
+         "\n"
          "Form 2 is deprecated syntax, equivalent to specifying 
\"-rREV[:REV2]\".\n"),
       { SVNSYNC_OPTS_DEFAULT, svnsync_opt_source_prop_encoding, 'q', 'r',
-        svnsync_opt_disable_locking, svnsync_opt_steal_lock, 'M' } },
+        svnsync_opt_disable_locking, svnsync_opt_steal_lock,
+        svnsync_opt_skip_unchanged, 'M' } },
     { "info", info_cmd, { 0 },
       N_("usage: svnsync info DEST_URL\n"
          "\n"
@@ -179,6 +185,8 @@ static const apr_getopt_option_t svnsync
                           "    'HEAD'       latest in repository") },
     {"allow-non-empty", svnsync_opt_allow_non_empty, 0,
                        N_("allow a non-empty destination repository") },
+    {"skip-unchanged", svnsync_opt_skip_unchanged, 0,
+                       N_("don't copy unchanged revision properties") },
     {"non-interactive", svnsync_opt_non_interactive, 0,
                        N_("do no interactive prompting (default is to prompt\n"
                           "                             "
@@ -303,6 +311,7 @@ typedef struct opt_baton_t {
   svn_boolean_t steal_lock;
   svn_boolean_t quiet;
   svn_boolean_t allow_non_empty;
+  svn_boolean_t skip_unchanged;
   svn_boolean_t version;
   svn_boolean_t help;
   svn_opt_revision_t start_rev;
@@ -422,6 +431,7 @@ typedef struct subcommand_baton_t {
   svn_ra_callbacks2_t sync_callbacks;
   svn_boolean_t quiet;
   svn_boolean_t allow_non_empty;
+  svn_boolean_t skip_unchanged; /* Enable optimization for revprop changes. */
   const char *to_url;
 
   /* initialize, synchronize, and copy-revprops only */
@@ -592,6 +602,10 @@ filter_props(int *filtered_count, apr_ha
  * and set *FILTERED_COUNT to the number of properties thus omitted.
  * REV_PROPS is a hash mapping (char *)propname to (svn_string_t *)propval.
  *
+ * If OLD_REV_PROPS is not NULL, skip all properties that did not change.
+ * Note that this implies that hook scripts won't be triggered anymore for
+ * those revprops that did not change.
+ *
  * All allocations will be done in a subpool of POOL.
  */
 static svn_error_t *
@@ -599,6 +613,7 @@ write_revprops(int *filtered_count,
                svn_ra_session_t *session,
                svn_revnum_t rev,
                apr_hash_t *rev_props,
+               apr_hash_t *old_rev_props,
                apr_pool_t *pool)
 {
   apr_pool_t *subpool = svn_pool_create(pool);
@@ -616,6 +631,17 @@ write_revprops(int *filtered_count,
       if (strncmp(propname, SVNSYNC_PROP_PREFIX,
                   sizeof(SVNSYNC_PROP_PREFIX) - 1) != 0)
         {
+          if (old_rev_props)
+            {
+              /* Skip the RA call for any no-op propset. */
+              const svn_string_t *old_value = svn_hash_gets(old_rev_props,
+                                                            propname);
+              if ((!old_value && !propval)
+                  || (old_value && propval
+                      && svn_string_compare(old_value, propval)))
+                continue;
+            }
+
           SVN_ERR(svn_ra_change_rev_prop2(session, rev, propname, NULL,
                                           propval, subpool));
         }
@@ -677,6 +703,10 @@ log_properties_normalized(int normalized
  * If SYNC is TRUE, then properties on the destination revision that
  * do not exist on the source revision will be removed.
  *
+ * If SKIP_UNCHANGED is TRUE, skip any no-op revprop changes. This also
+ * prevents hook scripts from firing for those unchanged revprops.  Has
+ * no effect if SYNC is FALSE.
+ *
  * If QUIET is FALSE, then log_properties_copied() is called to log that
  * properties were copied for revision REV.
  *
@@ -689,6 +719,7 @@ copy_revprops(svn_ra_session_t *from_ses
               svn_ra_session_t *to_session,
               svn_revnum_t rev,
               svn_boolean_t sync,
+              svn_boolean_t skip_unchanged,
               svn_boolean_t quiet,
               const char *source_prop_encoding,
               int *normalized_count,
@@ -714,7 +745,8 @@ copy_revprops(svn_ra_session_t *from_ses
                                      source_prop_encoding, pool));
 
   /* Copy all but the svn:svnsync properties. */
-  SVN_ERR(write_revprops(&filtered_count, to_session, rev, rev_props, pool));
+  SVN_ERR(write_revprops(&filtered_count, to_session, rev, rev_props,
+                         skip_unchanged ? existing_props : NULL, pool));
 
   /* Delete those properties that were in TARGET but not in SOURCE */
   if (sync)
@@ -750,6 +782,7 @@ make_subcommand_baton(opt_baton_t *opt_b
   b->sync_callbacks.open_tmp_file = open_tmp_file;
   b->sync_callbacks.auth_baton = opt_baton->sync_auth_baton;
   b->quiet = opt_baton->quiet;
+  b->skip_unchanged = opt_baton->skip_unchanged;
   b->allow_non_empty = opt_baton->allow_non_empty;
   b->to_url = to_url;
   b->source_prop_encoding = opt_baton->source_prop_encoding;
@@ -859,9 +892,9 @@ do_initialize(svn_ra_session_t *to_sessi
      LATEST is not 0, this really serves merely aesthetic and
      informational purposes, keeping the output of this command
      consistent while allowing folks to see what the latest revision is.  */
-  SVN_ERR(copy_revprops(from_session, to_session, latest, FALSE, baton->quiet,
-                        baton->source_prop_encoding, 
&normalized_rev_props_count,
-                        pool));
+  SVN_ERR(copy_revprops(from_session, to_session, latest, FALSE, FALSE,
+                        baton->quiet, baton->source_prop_encoding,
+                        &normalized_rev_props_count, pool));
 
   SVN_ERR(log_properties_normalized(normalized_rev_props_count, 0, pool));
 
@@ -1372,7 +1405,7 @@ replay_rev_finished(svn_revnum_t revisio
   rb->normalized_rev_props_count += normalized_count;
 
   SVN_ERR(write_revprops(&filtered_count, rb->to_session, revision, filtered,
-                         subpool));
+                         NULL, subpool));
 
   /* Remove all extra properties in TARGET. */
   SVN_ERR(remove_props_not_in_source(rb->to_session, revision,
@@ -1478,7 +1511,8 @@ do_synchronize(svn_ra_session_t *to_sess
           if (copying > last_merged)
             {
               SVN_ERR(copy_revprops(from_session, to_session, to_latest, TRUE,
-                                    baton->quiet, baton->source_prop_encoding,
+                                    baton->skip_unchanged, baton->quiet,
+                                    baton->source_prop_encoding,
                                     &normalized_rev_props_count, pool));
               last_merged = copying;
               last_merged_rev = svn_string_create
@@ -1649,7 +1683,8 @@ do_copy_revprops(svn_ra_session_t *to_se
     {
       int normalized_count;
       SVN_ERR(check_cancel(NULL));
-      SVN_ERR(copy_revprops(from_session, to_session, i, TRUE, baton->quiet,
+      SVN_ERR(copy_revprops(from_session, to_session, i, TRUE,
+                            baton->skip_unchanged, baton->quiet,
                             baton->source_prop_encoding, &normalized_count,
                             pool));
       normalized_rev_props_count += normalized_count;
@@ -2108,6 +2143,10 @@ sub_main(int *exit_code, int argc, const
             opt_baton.allow_non_empty = TRUE;
             break;
 
+          case svnsync_opt_skip_unchanged:
+            opt_baton.skip_unchanged = TRUE;
+            break;
+
           case 'q':
             opt_baton.quiet = TRUE;
             break;

Modified: subversion/branches/reuse-ra-session/subversion/tests/cmdline/README
URL: 
http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/tests/cmdline/README?rev=1702504&r1=1702503&r2=1702504&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/tests/cmdline/README 
(original)
+++ subversion/branches/reuse-ra-session/subversion/tests/cmdline/README Fri 
Sep 11 15:51:30 2015
@@ -12,7 +12,7 @@ command-line client.  It has no access t
 looks inside the .svn/ directory; it only performs actions that a
 human user would do.
 
-These tests require Python 2.5 or later.
+These tests require Python 2.7 or later.
 
   [ For more general information on Subversion's testing system,
     please read the README in subversion/tests/. ]
@@ -83,6 +83,133 @@ paths adjusted appropriately:
      Require valid-user
    </Location>
 
+   <Location /authz-test-work/anon>
+     DAV               svn
+     SVNParentPath 
/home/yourusernamehere/projects/svn/subversion/tests/cmdline/svn-test-work/local_tmp
+     AuthzSVNAccessFile 
/home/yourusernamehere/projects/svn/subversion/tests/cmdline/svn-test-work/authz
+     SVNListParentPath On
+     # This may seem unnecessary but granting access to everyone here is 
necessary
+     # to exercise a bug with httpd 2.3.x+.  The "Require all granted" syntax 
is
+     # new to 2.3.x+ which we can detect with the mod_authz_core.c module
+     # signature.  Use the "Allow from all" syntax with older versions for 
symmetry.
+     <IfModule mod_authz_core.c>
+       Require all granted
+     </IfModule>
+     <IfModule !mod_authz_core.c>
+       Allow from all
+     </IfMOdule>
+   </Location>
+   <Location /authz-test-work/mixed>
+     DAV               svn
+     SVNParentPath 
/home/yourusernamehere/projects/svn/subversion/tests/cmdline/svn-test-work/local_tmp
+     AuthzSVNAccessFile 
/home/yourusernamehere/projects/svn/subversion/tests/cmdline/svn-test-work/authz
+     SVNListParentPath On
+     AuthType          Basic
+     AuthName          "Subversion Repository"
+     AuthUserFile /usr/local/apache2/conf/users
+     Require           valid-user
+     Satisfy Any
+   </Location>
+   <Location /authz-test-work/mixed-noauthwhenanon>
+     DAV               svn
+     SVNParentPath 
/home/yourusernamehere/projects/svn/subversion/tests/cmdline/svn-test-work/local_tmp
+     AuthzSVNAccessFile 
/home/yourusernamehere/projects/svn/subversion/tests/cmdline/svn-test-work/authz
+     SVNListParentPath On
+     AuthType          Basic
+     AuthName          "Subversion Repository"
+     AuthUserFile /usr/local/apache2/conf/users
+     Require           valid-user
+     AuthzSVNNoAuthWhenAnonymousAllowed On
+   </Location>
+   <Location /authz-test-work/authn>
+     DAV               svn
+     SVNParentPath 
/home/yourusernamehere/projects/svn/subversion/tests/cmdline/svn-test-work/local_tmp
+     AuthzSVNAccessFile 
/home/yourusernamehere/projects/svn/subversion/tests/cmdline/svn-test-work/authz
+     SVNListParentPath On
+     AuthType          Basic
+     AuthName          "Subversion Repository"
+     AuthUserFile /usr/local/apache2/conf/users
+     Require           valid-user
+   </Location>
+   <Location /authz-test-work/authn-anonoff>
+     DAV               svn
+     SVNParentPath 
/home/yourusernamehere/projects/svn/subversion/tests/cmdline/svn-test-work/local_tmp
+     AuthzSVNAccessFile 
/home/yourusernamehere/projects/svn/subversion/tests/cmdline/svn-test-work/authz
+     SVNListParentPath On
+     AuthType          Basic
+     AuthName          "Subversion Repository"
+     AuthUserFile /usr/local/apache2/conf/users
+     Require           valid-user
+     AuthzSVNAnonymous Off
+   </Location>
+   <Location /authz-test-work/authn-lcuser>
+     DAV               svn
+     SVNParentPath 
/home/yourusernamehere/projects/svn/subversion/tests/cmdline/svn-test-work/local_tmp
+     AuthzSVNAccessFile 
/home/yourusernamehere/projects/svn/subversion/tests/cmdline/svn-test-work/authz
+     SVNListParentPath On
+     AuthType          Basic
+     AuthName          "Subversion Repository"
+     AuthUserFile /usr/local/apache2/conf/users
+     Require           valid-user
+     AuthzForceUsernameCase Lower
+   </Location>
+   <Location /authz-test-work/authn-lcuser>
+     DAV               svn
+     SVNParentPath 
/home/yourusernamehere/projects/svn/subversion/tests/cmdline/svn-test-work/local_tmp
+     AuthzSVNAccessFile 
/home/yourusernamehere/projects/svn/subversion/tests/cmdline/svn-test-work/authz
+     SVNListParentPath On
+     AuthType          Basic
+     AuthName          "Subversion Repository"
+     AuthUserFile /usr/local/apache2/conf/users
+     Require           valid-user
+     AuthzForceUsernameCase Lower
+   </Location>
+   <Location /authz-test-work/authn-group>
+     DAV               svn
+     SVNParentPath 
/home/yourusernamehere/projects/svn/subversion/tests/cmdline/svn-test-work/local_tmp
+     AuthzSVNAccessFile 
/home/yourusernamehere/projects/svn/subversion/tests/cmdline/svn-test-work/authz
+     SVNListParentPath On
+     AuthType          Basic
+     AuthName          "Subversion Repository"
+     AuthUserFile /usr/local/apache2/conf/users
+     AuthGroupFile /usr/local/apache2/conf/groups
+     Require           group random
+     AuthzSVNAuthoritative Off
+   </Location>
+   <IfModule mod_authz_core.c>
+     <Location /authz-test-work/sallrany>
+       DAV               svn
+       SVNParentPath 
/home/yourusernamehere/projects/svn/subversion/tests/cmdline/svn-test-work/local_tmp
+       AuthzSVNAccessFile 
/home/yourusernamehere/projects/svn/subversion/tests/cmdline/svn-test-work/authz
+       SVNListParentPath On
+       AuthType          Basic
+       AuthName          "Subversion Repository"
+       AuthUserFile /usr/local/apache2/conf/users
+       AuthzSendForbiddenOnFailure On
+       Satisfy All
+       <RequireAny>
+         Require valid-user
+         Require expr req('ALLOW') == '1'
+       </RequireAny>
+     </Location>
+     <Location /authz-test-work/sallrall>
+       DAV               svn
+       SVNParentPath 
/home/yourusernamehere/projects/svn/subversion/tests/cmdline/svn-test-work/local_tmp
+       AuthzSVNAccessFile 
/home/yourusernamehere/projects/svn/subversion/tests/cmdline/svn-test-work/authz
+       SVNListParentPath On
+       AuthType          Basic
+       AuthName          "Subversion Repository"
+       AuthUserFile /usr/local/apache2/conf/users
+       AuthzSendForbiddenOnFailure On
+       Satisfy All
+       <RequireAll>
+         Require valid-user
+         Require expr req('ALLOW') == '1'
+       </RequireAll>
+     </Location>
+   </IfModule>
+
+
    RedirectMatch permanent ^/svn-test-work/repositories/REDIRECT-PERM-(.*)$ 
/svn-test-work/repositories/$1
    RedirectMatch           ^/svn-test-work/repositories/REDIRECT-TEMP-(.*)$ 
/svn-test-work/repositories/$1
 
@@ -101,6 +228,15 @@ just drop the following 2-line snippet i
 ----------------------------
 jrandom:xCGl35kV9oWCY
 jconstant:xCGl35kV9oWCY
+JRANDOM:xCGl35kV9oWCY
+JCONSTANT:xCGl35kV9oWCY
+----------------------------
+
+and these lines into the
+/usr/local/apache/conf/groups file:
+----------------------------
+random: jrandom
+constant: jconstant
 ----------------------------
 
 Now, (re)start Apache and run the tests over mod_dav_svn.
@@ -138,6 +274,8 @@ Note [1]: It would be quite too much to
           ----------------------------
           jrandom:$apr1$3p1.....$FQW6RceW5QhJ2blWDQgKn0
           jconstant:$apr1$jp1.....$Usrqji1c9H6AbOxOGAzzb0
+          JRANDOM:$apr1$3p1.....$FQW6RceW5QhJ2blWDQgKn0
+          JCONSTANT:$apr1$jp1.....$Usrqji1c9H6AbOxOGAzzb0
           ----------------------------
 
 

Modified: 
subversion/branches/reuse-ra-session/subversion/tests/cmdline/authz_tests.py
URL: 
http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/tests/cmdline/authz_tests.py?rev=1702504&r1=1702503&r2=1702504&view=diff
==============================================================================
--- 
subversion/branches/reuse-ra-session/subversion/tests/cmdline/authz_tests.py 
(original)
+++ 
subversion/branches/reuse-ra-session/subversion/tests/cmdline/authz_tests.py 
Fri Sep 11 15:51:30 2015
@@ -587,7 +587,10 @@ def authz_log_and_tracing_test(sbox):
   ## cat
 
   # now see if we can look at the older version of rho
-  svntest.actions.run_and_verify_svn(None, expected_err,
+
+  expected_err2 = ".*svn: E195012: Unable to find repository location.*"
+
+  svntest.actions.run_and_verify_svn(None, expected_err2,
                                      'cat', '-r', '2', D_url+'/rho')
 
   if sbox.repo_url.startswith('http'):
@@ -604,10 +607,11 @@ def authz_log_and_tracing_test(sbox):
   svntest.actions.run_and_verify_svn(None, expected_err,
                                      'diff', '-r', 'HEAD', G_url+'/rho')
 
-  svntest.actions.run_and_verify_svn(None, expected_err,
+  # diff treats the unreadable path as indicating an add so no error
+  svntest.actions.run_and_verify_svn(None, [],
                                      'diff', '-r', '2', D_url+'/rho')
 
-  svntest.actions.run_and_verify_svn(None, expected_err,
+  svntest.actions.run_and_verify_svn(None, [],
                                      'diff', '-r', '2:4', D_url+'/rho')
 
 # test whether read access is correctly granted and denied
@@ -724,10 +728,8 @@ def authz_locking(sbox):
 
   if sbox.repo_url.startswith('http'):
     expected_err = ".*svn: E175013: .*[Ff]orbidden.*"
-    expected_status = 1
   else:
     expected_err = ".*svn: warning: W170001: Authorization failed.*"
-    expected_status = 0
 
   root_url = sbox.repo_url
   wc_dir = sbox.wc_dir
@@ -737,16 +739,16 @@ def authz_locking(sbox):
   mu_path = os.path.join(wc_dir, 'A', 'mu')
 
   # lock a file url, target is readonly: should fail
-  svntest.actions.run_and_verify_svn2(None, expected_err, expected_status,
-                                      'lock',
-                                      '-m', 'lock msg',
-                                      iota_url)
+  svntest.actions.run_and_verify_svn(None, expected_err,
+                                     'lock',
+                                     '-m', 'lock msg',
+                                     iota_url)
 
   # lock a file path, target is readonly: should fail
-  svntest.actions.run_and_verify_svn2(None, expected_err, expected_status,
-                                      'lock',
-                                      '-m', 'lock msg',
-                                      iota_path)
+  svntest.actions.run_and_verify_svn(None, expected_err,
+                                     'lock',
+                                     '-m', 'lock msg',
+                                     iota_path)
 
   # Test for issue 2700: we have write access in folder /A, but not in root.
   # Get a lock on /A/mu and try to commit it.
@@ -779,16 +781,16 @@ def authz_locking(sbox):
   svntest.actions.run_and_verify_info([{'Lock Token' : None}],
                                       sbox.ospath('A/mu'))
 
-  ### Crazy serf SVN_ERR_FS_LOCK_OWNER_MISMATCH warning! Issue 3801?
   if sbox.repo_url.startswith('http'):
     expected_err = ".*svn: warning: W160039: Unlock.*[Ff]orbidden.*"
-    expected_status = 0
+  else:
+    expected_err = ".*svn: warning: W170001: Authorization failed.*"
 
-  svntest.actions.run_and_verify_svn2(None, expected_err, expected_status,
-                                      'lock',
-                                      '-m', 'lock msg',
-                                      mu_path,
-                                      iota_path)
+  svntest.actions.run_and_verify_svn(None, expected_err,
+                                     'lock',
+                                     '-m', 'lock msg',
+                                     mu_path,
+                                     iota_path)
 
   # One path locked, one still unlocked
   svntest.actions.run_and_verify_info([{'Lock Token' : None}],

Modified: 
subversion/branches/reuse-ra-session/subversion/tests/cmdline/davautocheck.sh
URL: 
http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/tests/cmdline/davautocheck.sh?rev=1702504&r1=1702503&r2=1702504&view=diff
==============================================================================
--- 
subversion/branches/reuse-ra-session/subversion/tests/cmdline/davautocheck.sh 
(original)
+++ 
subversion/branches/reuse-ra-session/subversion/tests/cmdline/davautocheck.sh 
Fri Sep 11 15:51:30 2015
@@ -296,8 +296,6 @@ LOAD_MOD_AUTHN_CORE="$(get_loadmodule_co
     || fail "Authn_Core module not found."
 LOAD_MOD_AUTHZ_CORE="$(get_loadmodule_config mod_authz_core)" \
     || fail "Authz_Core module not found."
-LOAD_MOD_AUTHZ_HOST="$(get_loadmodule_config mod_authz_host)" \
-    || fail "Authz_Host module not found."
 LOAD_MOD_UNIXD=$(get_loadmodule_config mod_unixd) \
     || fail "UnixD module not found"
 }
@@ -305,6 +303,10 @@ LOAD_MOD_AUTHN_FILE="$(get_loadmodule_co
     || fail "Authn_File module not found."
 LOAD_MOD_AUTHZ_USER="$(get_loadmodule_config mod_authz_user)" \
     || fail "Authz_User module not found."
+LOAD_MOD_AUTHZ_GROUPFILE="$(get_loadmodule_config mod_authz_groupfile)" \
+    || fail "Authz_GroupFile module not found."
+LOAD_MOD_AUTHZ_HOST="$(get_loadmodule_config mod_authz_host)" \
+    || fail "Authz_Host module not found."
 }
 if [ ${APACHE_MPM:+set} ]; then
     LOAD_MOD_MPM=$(get_loadmodule_config mod_mpm_$APACHE_MPM) \
@@ -347,6 +349,7 @@ else
   BASE_URL="$BASE_URL:$HTTPD_PORT"
 fi
 HTTPD_USERS="$HTTPD_ROOT/users"
+HTTPD_GROUPS="$HTTPD_ROOT/groups"
 
 mkdir "$HTTPD_ROOT" \
   || fail "couldn't create temporary directory '$HTTPD_ROOT'"
@@ -408,6 +411,14 @@ say "Adding users for lock authenticatio
 $HTPASSWD -bc $HTTPD_USERS jrandom   rayjandom
 $HTPASSWD -b  $HTTPD_USERS jconstant rayjandom
 $HTPASSWD -b  $HTTPD_USERS __dumpster__ __loadster__
+$HTPASSWD -b  $HTTPD_USERS JRANDOM   rayjandom
+$HTPASSWD -b  $HTTPD_USERS JCONSTANT rayjandom
+
+say "Adding groups for mod_authz_svn tests"
+cat > "$HTTPD_GROUPS" <<__EOF__
+random: jrandom
+constant: jconstant
+__EOF__
 
 touch $HTTPD_MIME_TYPES
 
@@ -431,7 +442,9 @@ $LOAD_MOD_AUTHN_CORE
 $LOAD_MOD_AUTHN_FILE
 $LOAD_MOD_AUTHZ_CORE
 $LOAD_MOD_AUTHZ_USER
+$LOAD_MOD_AUTHZ_GROUPFILE
 $LOAD_MOD_AUTHZ_HOST
+$LOAD_MOD_ACCESS_COMPAT
 LoadModule          authz_svn_module "$MOD_AUTHZ_SVN"
 LoadModule          dontdothat_module "$MOD_DONTDOTHAT"
 
@@ -537,6 +550,147 @@ CustomLog           "$HTTPD_ROOT/ops" "%
   SVNAdvertiseV2Protocol ${ADVERTISE_V2_PROTOCOL}
   ${SVN_PATH_AUTHZ_LINE}
 </Location>
+<Location /authz-test-work/anon>
+  DAV               svn
+  SVNParentPath     
"$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/local_tmp"
+  AuthzSVNAccessFile 
"$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/authz"
+  SVNAdvertiseV2Protocol ${ADVERTISE_V2_PROTOCOL}
+  SVNCacheRevProps  ${CACHE_REVPROPS_SETTING}
+  SVNListParentPath On
+  # This may seem unnecessary but granting access to everyone here is necessary
+  # to exercise a bug with httpd 2.3.x+.  The "Require all granted" syntax is
+  # new to 2.3.x+ which we can detect with the mod_authz_core.c module
+  # signature.  Use the "Allow from all" syntax with older versions for 
symmetry.
+  <IfModule mod_authz_core.c>
+    Require all granted
+  </IfModule>
+  <IfModule !mod_authz_core.c>
+    Allow from all
+  </IfModule>
+  ${SVN_PATH_AUTHZ_LINE}
+</Location>
+<Location /authz-test-work/mixed>
+  DAV               svn
+  SVNParentPath     
"$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/local_tmp"
+  AuthzSVNAccessFile 
"$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/authz"
+  SVNAdvertiseV2Protocol ${ADVERTISE_V2_PROTOCOL}
+  SVNCacheRevProps  ${CACHE_REVPROPS_SETTING}
+  SVNListParentPath On
+  AuthType          Basic
+  AuthName          "Subversion Repository"
+  AuthUserFile      $HTTPD_USERS
+  Require           valid-user
+  Satisfy Any
+  ${SVN_PATH_AUTHZ_LINE}
+</Location>
+<Location /authz-test-work/mixed-noauthwhenanon>
+  DAV               svn
+  SVNParentPath     
"$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/local_tmp"
+  AuthzSVNAccessFile 
"$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/authz"
+  SVNAdvertiseV2Protocol ${ADVERTISE_V2_PROTOCOL}
+  SVNCacheRevProps  ${CACHE_REVPROPS_SETTING}
+  SVNListParentPath On
+  AuthType          Basic
+  AuthName          "Subversion Repository"
+  AuthUserFile      $HTTPD_USERS
+  Require           valid-user
+  AuthzSVNNoAuthWhenAnonymousAllowed On
+  SVNPathAuthz On
+</Location>
+<Location /authz-test-work/authn>
+  DAV               svn
+  SVNParentPath     
"$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/local_tmp"
+  AuthzSVNAccessFile 
"$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/authz"
+  SVNAdvertiseV2Protocol ${ADVERTISE_V2_PROTOCOL}
+  SVNCacheRevProps  ${CACHE_REVPROPS_SETTING}
+  SVNListParentPath On
+  AuthType          Basic
+  AuthName          "Subversion Repository"
+  AuthUserFile      $HTTPD_USERS
+  Require           valid-user
+  ${SVN_PATH_AUTHZ_LINE}
+</Location>
+<Location /authz-test-work/authn-anonoff>
+  DAV               svn
+  SVNParentPath     
"$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/local_tmp"
+  AuthzSVNAccessFile 
"$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/authz"
+  SVNAdvertiseV2Protocol ${ADVERTISE_V2_PROTOCOL}
+  SVNCacheRevProps  ${CACHE_REVPROPS_SETTING}
+  SVNListParentPath On
+  AuthType          Basic
+  AuthName          "Subversion Repository"
+  AuthUserFile      $HTTPD_USERS
+  Require           valid-user
+  AuthzSVNAnonymous Off
+  SVNPathAuthz On
+</Location>
+<Location /authz-test-work/authn-lcuser>
+  DAV               svn
+  SVNParentPath     
"$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/local_tmp"
+  AuthzSVNAccessFile 
"$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/authz"
+  SVNAdvertiseV2Protocol ${ADVERTISE_V2_PROTOCOL}
+  SVNCacheRevProps  ${CACHE_REVPROPS_SETTING}
+  SVNListParentPath On
+  AuthType          Basic
+  AuthName          "Subversion Repository"
+  AuthUserFile      $HTTPD_USERS
+  Require           valid-user
+  AuthzForceUsernameCase Lower
+  ${SVN_PATH_AUTHZ_LINE}
+</Location>
+<Location /authz-test-work/authn-group>
+  DAV               svn
+  SVNParentPath     
"$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/local_tmp"
+  AuthzSVNAccessFile 
"$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/authz"
+  SVNAdvertiseV2Protocol ${ADVERTISE_V2_PROTOCOL}
+  SVNCacheRevProps  ${CACHE_REVPROPS_SETTING}
+  SVNListParentPath On
+  AuthType          Basic
+  AuthName          "Subversion Repository"
+  AuthUserFile      $HTTPD_USERS
+  AuthGroupFile     $HTTPD_GROUPS
+  Require           group random
+  AuthzSVNAuthoritative Off
+  SVNPathAuthz On
+</Location>
+<IfModule mod_authz_core.c>
+  <Location /authz-test-work/sallrany>
+    DAV               svn
+    SVNParentPath     
"$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/local_tmp"
+    AuthzSVNAccessFile 
"$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/authz"
+    SVNAdvertiseV2Protocol ${ADVERTISE_V2_PROTOCOL}
+    SVNCacheRevProps  ${CACHE_REVPROPS_SETTING}
+    SVNListParentPath On
+    AuthType          Basic
+    AuthName          "Subversion Repository"
+    AuthUserFile      $HTTPD_USERS
+    AuthzSendForbiddenOnFailure On
+    Satisfy All
+    <RequireAny>
+      Require valid-user
+      Require expr req('ALLOW') == '1'
+    </RequireAny>
+    ${SVN_PATH_AUTHZ_LINE}
+  </Location>
+  <Location /authz-test-work/sallrall>
+    DAV               svn
+    SVNParentPath     
"$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/local_tmp"
+    AuthzSVNAccessFile 
"$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/authz"
+    SVNAdvertiseV2Protocol ${ADVERTISE_V2_PROTOCOL}
+    SVNCacheRevProps  ${CACHE_REVPROPS_SETTING}
+    SVNListParentPath On
+    AuthType          Basic
+    AuthName          "Subversion Repository"
+    AuthUserFile      $HTTPD_USERS
+    AuthzSendForbiddenOnFailure On
+    Satisfy All
+    <RequireAll>
+      Require valid-user
+      Require expr req('ALLOW') == '1'
+    </RequireAll>
+    ${SVN_PATH_AUTHZ_LINE}
+  </Location>
+</IfModule>
 RedirectMatch permanent ^/svn-test-work/repositories/REDIRECT-PERM-(.*)\$ 
/svn-test-work/repositories/\$1
 RedirectMatch           ^/svn-test-work/repositories/REDIRECT-TEMP-(.*)\$ 
/svn-test-work/repositories/\$1
 __EOF__

Modified: 
subversion/branches/reuse-ra-session/subversion/tests/cmdline/getopt_tests_data/svn--help_stdout
URL: 
http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/tests/cmdline/getopt_tests_data/svn--help_stdout?rev=1702504&r1=1702503&r2=1702504&view=diff
==============================================================================
--- 
subversion/branches/reuse-ra-session/subversion/tests/cmdline/getopt_tests_data/svn--help_stdout
 (original)
+++ 
subversion/branches/reuse-ra-session/subversion/tests/cmdline/getopt_tests_data/svn--help_stdout
 Fri Sep 11 15:51:30 2015
@@ -1,8 +1,9 @@
 usage: svn <subcommand> [options] [args]
 Subversion command-line client.
 Type 'svn help <subcommand>' for help on a specific subcommand.
-Type 'svn --version' to see the program version and RA modules
-  or 'svn --version --quiet' to see just the version number.
+Type 'svn --version' to see the program version and RA modules,
+     'svn --version --verbose' to see dependency versions as well,
+     'svn --version --quiet' to see just the version number.
 
 Most subcommands take file and/or directory arguments, recursing
 on the directories.  If no arguments are supplied to such a

Modified: 
subversion/branches/reuse-ra-session/subversion/tests/cmdline/getopt_tests_data/svn_help_stdout
URL: 
http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/tests/cmdline/getopt_tests_data/svn_help_stdout?rev=1702504&r1=1702503&r2=1702504&view=diff
==============================================================================
--- 
subversion/branches/reuse-ra-session/subversion/tests/cmdline/getopt_tests_data/svn_help_stdout
 (original)
+++ 
subversion/branches/reuse-ra-session/subversion/tests/cmdline/getopt_tests_data/svn_help_stdout
 Fri Sep 11 15:51:30 2015
@@ -1,8 +1,9 @@
 usage: svn <subcommand> [options] [args]
 Subversion command-line client.
 Type 'svn help <subcommand>' for help on a specific subcommand.
-Type 'svn --version' to see the program version and RA modules
-  or 'svn --version --quiet' to see just the version number.
+Type 'svn --version' to see the program version and RA modules,
+     'svn --version --verbose' to see dependency versions as well,
+     'svn --version --quiet' to see just the version number.
 
 Most subcommands take file and/or directory arguments, recursing
 on the directories.  If no arguments are supplied to such a


Reply via email to