Modified: 
subversion/branches/reuse-ra-session/subversion/tests/libsvn_ra/ra-test.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/tests/libsvn_ra/ra-test.c?rev=1702504&r1=1702503&r2=1702504&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/tests/libsvn_ra/ra-test.c 
(original)
+++ subversion/branches/reuse-ra-session/subversion/tests/libsvn_ra/ra-test.c 
Fri Sep 11 15:51:30 2015
@@ -332,15 +332,16 @@ static svn_error_t *
 check_tunnel_callback_test(const svn_test_opts_t *opts,
                            apr_pool_t *pool)
 {
-  tunnel_baton_t b = { TUNNEL_MAGIC };
+  tunnel_baton_t *b = apr_pcalloc(pool, sizeof(*b));
   svn_ra_callbacks2_t *cbtable;
   svn_ra_session_t *session;
-  svn_error_t *err;
+
+  b->magic = TUNNEL_MAGIC;
 
   SVN_ERR(svn_ra_create_callbacks(&cbtable, pool));
   cbtable->check_tunnel_func = check_tunnel;
   cbtable->open_tunnel_func = open_tunnel;
-  cbtable->tunnel_baton = &b;
+  cbtable->tunnel_baton = b;
   SVN_ERR(svn_cmdline_create_auth_baton2(&cbtable->auth_baton,
                                          TRUE  /* non_interactive */,
                                          "jrandom", "rayjandom",
@@ -350,12 +351,12 @@ check_tunnel_callback_test(const svn_tes
                                          FALSE, FALSE, FALSE, FALSE,
                                          NULL, NULL, NULL, pool));
 
-  b.last_check = TRUE;
-  err = svn_ra_open4(&session, NULL, "svn+foo://localhost/no-repo",
-                     NULL, cbtable, NULL, NULL, pool);
-  svn_error_clear(err);
-  SVN_TEST_ASSERT(err);
-  SVN_TEST_ASSERT(!b.last_check);
+  b->last_check = TRUE;
+  SVN_TEST_ASSERT_ERROR(svn_ra_open4(&session, NULL,
+                                     "svn+foo://localhost/no-repo",
+                                     NULL, cbtable, NULL, NULL, pool),
+                        SVN_ERR_RA_CANNOT_CREATE_SESSION);
+  SVN_TEST_ASSERT(!b->last_check);
   return SVN_NO_ERROR;
 }
 
@@ -363,14 +364,15 @@ static svn_error_t *
 tunnel_callback_test(const svn_test_opts_t *opts,
                      apr_pool_t *pool)
 {
-  tunnel_baton_t b = { TUNNEL_MAGIC };
+  tunnel_baton_t *b = apr_pcalloc(pool, sizeof(*b));
   apr_pool_t *scratch_pool = svn_pool_create(pool);
   const char *url;
   svn_ra_callbacks2_t *cbtable;
   svn_ra_session_t *session;
-  svn_error_t *err;
   const char tunnel_repos_name[] = "test-repo-tunnel";
 
+  b->magic = TUNNEL_MAGIC;
+
   SVN_ERR(svn_test__create_repos(NULL, tunnel_repos_name, opts, scratch_pool));
 
   /* Immediately close the repository to avoid race condition with svnserve
@@ -382,7 +384,7 @@ tunnel_callback_test(const svn_test_opts
   SVN_ERR(svn_ra_create_callbacks(&cbtable, pool));
   cbtable->check_tunnel_func = check_tunnel;
   cbtable->open_tunnel_func = open_tunnel;
-  cbtable->tunnel_baton = &b;
+  cbtable->tunnel_baton = b;
   SVN_ERR(svn_cmdline_create_auth_baton2(&cbtable->auth_baton,
                                          TRUE  /* non_interactive */,
                                          "jrandom", "rayjandom",
@@ -392,20 +394,13 @@ tunnel_callback_test(const svn_test_opts
                                          FALSE, FALSE, FALSE, FALSE,
                                          NULL, NULL, NULL, pool));
 
-  b.last_check = FALSE;
-  err = svn_ra_open4(&session, NULL, url, NULL, cbtable, NULL, NULL,
-                     scratch_pool);
-  if (err && err->apr_err == SVN_ERR_TEST_FAILED)
-    {
-      svn_handle_error2(err, stderr, FALSE, "svn_tests: ");
-      svn_error_clear(err);
-      return SVN_NO_ERROR;
-    }
-  SVN_ERR(err);
-  SVN_TEST_ASSERT(b.last_check);
-  SVN_TEST_ASSERT(b.open_count > 0);
+  b->last_check = FALSE;
+  SVN_ERR(svn_ra_open4(&session, NULL, url, NULL, cbtable, NULL, NULL,
+                        scratch_pool));
+  SVN_TEST_ASSERT(b->last_check);
+  SVN_TEST_ASSERT(b->open_count > 0);
   svn_pool_destroy(scratch_pool);
-  SVN_TEST_ASSERT(b.open_count == 0);
+  SVN_TEST_ASSERT(b->open_count == 0);
   return SVN_NO_ERROR;
 }
 
@@ -1517,6 +1512,66 @@ ra_list_has_props(const svn_test_opts_t
   return SVN_NO_ERROR;
 }
 
+/* Test ra_svn tunnel editor handling, including polling. */
+
+static svn_error_t *
+tunnel_run_checkout(const svn_test_opts_t *opts,
+                       apr_pool_t *pool)
+{
+  tunnel_baton_t *b = apr_pcalloc(pool, sizeof(*b));
+  apr_pool_t *scratch_pool = svn_pool_create(pool);
+  const char *url;
+  svn_ra_callbacks2_t *cbtable;
+  svn_ra_session_t *session;
+  const char tunnel_repos_name[] = "test-run_checkout";
+  const svn_ra_reporter3_t *reporter;
+  void *report_baton;
+
+  b->magic = TUNNEL_MAGIC;
+
+  SVN_ERR(svn_test__create_repos(NULL, tunnel_repos_name, opts, scratch_pool));
+
+  /* Immediately close the repository to avoid race condition with svnserve
+  (and then the cleanup code) with BDB when our pool is cleared. */
+  svn_pool_clear(scratch_pool);
+
+  url = apr_pstrcat(pool, "svn+test://localhost/", tunnel_repos_name,
+    SVN_VA_NULL);
+  SVN_ERR(svn_ra_create_callbacks(&cbtable, pool));
+  cbtable->check_tunnel_func = check_tunnel;
+  cbtable->open_tunnel_func = open_tunnel;
+  cbtable->tunnel_baton = b;
+  SVN_ERR(svn_cmdline_create_auth_baton2(&cbtable->auth_baton,
+    TRUE  /* non_interactive */,
+    "jrandom", "rayjandom",
+    NULL,
+    TRUE  /* no_auth_cache */,
+    FALSE /* trust_server_cert */,
+    FALSE, FALSE, FALSE, FALSE,
+    NULL, NULL, NULL, pool));
+
+  b->last_check = FALSE;
+
+  SVN_ERR(svn_ra_open4(&session, NULL, url, NULL, cbtable, NULL, NULL,
+                       scratch_pool));
+
+  SVN_ERR(commit_changes(session, pool));
+
+  SVN_ERR(svn_ra_do_update3(session,
+                            &reporter, &report_baton,
+                            1, "",
+                            svn_depth_infinity, FALSE, FALSE,
+                            svn_delta_default_editor(pool), NULL,
+                            pool, pool));
+
+  SVN_ERR(reporter->set_path(report_baton, "", 0, svn_depth_infinity, FALSE,
+                             NULL, pool));
+
+  SVN_ERR(reporter->finish_report(report_baton, pool));
+
+  return SVN_NO_ERROR;
+}
+
 
 /* The test table.  */
 
@@ -1547,6 +1602,8 @@ static struct svn_test_descriptor_t test
                        "check how ra layers handle errors from callbacks"),
     SVN_TEST_OPTS_PASS(ra_list_has_props,
                        "check list has_props performance"),
+    SVN_TEST_OPTS_PASS(tunnel_run_checkout,
+                       "verify checkout over a tunnel"),
     SVN_TEST_NULL
   };
 

Modified: 
subversion/branches/reuse-ra-session/subversion/tests/libsvn_repos/dump-load-test.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/tests/libsvn_repos/dump-load-test.c?rev=1702504&r1=1702503&r2=1702504&view=diff
==============================================================================
--- 
subversion/branches/reuse-ra-session/subversion/tests/libsvn_repos/dump-load-test.c
 (original)
+++ 
subversion/branches/reuse-ra-session/subversion/tests/libsvn_repos/dump-load-test.c
 Fri Sep 11 15:51:30 2015
@@ -76,8 +76,8 @@ test_dump_bad_props(svn_stringbuf_t **du
   SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(youngest_rev));
 
   /* Test that a dump completes without error. */
-  SVN_ERR(svn_repos_dump_fs3(repos, stream, start_rev, end_rev,
-                             FALSE, FALSE,
+  SVN_ERR(svn_repos_dump_fs4(repos, stream, start_rev, end_rev,
+                             FALSE, FALSE, TRUE, TRUE,
                              notify_func, notify_baton,
                              NULL, NULL,
                              pool));

Modified: 
subversion/branches/reuse-ra-session/subversion/tests/libsvn_repos/repos-test.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/tests/libsvn_repos/repos-test.c?rev=1702504&r1=1702503&r2=1702504&view=diff
==============================================================================
--- 
subversion/branches/reuse-ra-session/subversion/tests/libsvn_repos/repos-test.c 
(original)
+++ 
subversion/branches/reuse-ra-session/subversion/tests/libsvn_repos/repos-test.c 
Fri Sep 11 15:51:30 2015
@@ -35,8 +35,10 @@
 #include "svn_delta.h"
 #include "svn_config.h"
 #include "svn_props.h"
+#include "svn_sorts.h"
 #include "svn_version.h"
 #include "private/svn_repos_private.h"
+#include "private/svn_dep_compat.h"
 
 /* be able to look into svn_config_t */
 #include "../../libsvn_subr/config_impl.h"
@@ -48,13 +50,6 @@
 /* Used to terminate lines in large multi-line string literals. */
 #define NL APR_EOL_STR
 
-#ifndef MAX
-#define MAX(a,b) (((a)>(b))?(a):(b))
-#endif
-#ifndef MIN
-#define MIN(a,b) (((a)<(b))?(a):(b))
-#endif
-
 /* Compare strings, like strcmp but either or both may be NULL which
  * compares equal to NULL and not equal to any non-NULL string. */
 static int
@@ -750,8 +745,7 @@ check_locations_info(apr_hash_t *locatio
   unsigned int i;
   for (i = 0; info->rev != 0; ++i, ++info)
     {
-      const char *p = apr_hash_get(locations, &info->rev, sizeof
-                                   (svn_revnum_t));
+      const char *p = apr_hash_get(locations, &info->rev, sizeof(info->rev));
       if (!p)
         return svn_error_createf(SVN_ERR_TEST_FAILED, NULL,
                                  "Missing path for revision %ld", info->rev);
@@ -2999,7 +2993,7 @@ file_rev_handler(void *baton, const char
 {
   apr_hash_t *ht = baton;
   const char *author;
-  file_revs_t *file_rev = apr_hash_get(ht, &rev, sizeof(svn_revnum_t));
+  file_revs_t *file_rev = apr_hash_get(ht, &rev, sizeof(rev));
 
   if (!file_rev)
     return svn_error_createf(SVN_ERR_TEST_FAILED, NULL,
@@ -3017,7 +3011,7 @@ file_rev_handler(void *baton, const char
 
   /* Remove this revision from this list so we'll be able to verify that we
      have seen all expected revisions. */
-  apr_hash_set(ht, &rev, sizeof(svn_revnum_t), NULL);
+  apr_hash_set(ht, &rev, sizeof(rev), NULL);
 
   return SVN_NO_ERROR;
 }
@@ -3055,16 +3049,16 @@ test_get_file_revs(const svn_test_opts_t
 
   for (i = 0; i < sizeof(trunk_results) / sizeof(trunk_results[0]); i++)
     apr_hash_set(ht_trunk_results, &trunk_results[i].rev,
-                 sizeof(svn_revnum_t), &trunk_results[i]);
+                 sizeof(trunk_results[i].rev), &trunk_results[i]);
 
   for (i = 0; i < sizeof(branch_results) / sizeof(branch_results[0]); i++)
     apr_hash_set(ht_branch_results, &branch_results[i].rev,
-                 sizeof(svn_revnum_t), &branch_results[i]);
+                 sizeof(branch_results[i].rev), &branch_results[i]);
 
   for (i = 0; i < sizeof(trunk_results) / sizeof(trunk_results[0]); i++)
     if (!trunk_results[i].result_of_merge)
       apr_hash_set(ht_reverse_results, &trunk_results[i].rev,
-                   sizeof(svn_revnum_t), &trunk_results[i]);
+                   sizeof(trunk_results[i].rev), &trunk_results[i]);
 
   /* Check for feature support */
   if (opts->server_minor_version && (opts->server_minor_version < 5))
@@ -3612,6 +3606,241 @@ deprecated_access_context_api(const svn_
   return SVN_NO_ERROR;
 }
 
+static svn_error_t *
+mkdir_delete_copy(svn_repos_t *repos,
+                  const char *src,
+                  const char *dst,
+                  apr_pool_t *pool)
+{
+  svn_fs_t *fs = svn_repos_fs(repos);
+  svn_revnum_t youngest_rev;
+  svn_fs_txn_t *txn;
+  svn_fs_root_t *txn_root, *rev_root;
+
+  SVN_ERR(svn_fs_youngest_rev(&youngest_rev, fs, pool));
+  
+  SVN_ERR(svn_fs_begin_txn(&txn, fs, youngest_rev, pool));
+  SVN_ERR(svn_fs_txn_root(&txn_root, txn, pool));
+  SVN_ERR(svn_fs_make_dir(txn_root, "A/T", pool));
+  SVN_ERR(svn_repos_fs_commit_txn(NULL, repos, &youngest_rev, txn, pool));
+
+  SVN_ERR(svn_fs_begin_txn(&txn, fs, youngest_rev, pool));
+  SVN_ERR(svn_fs_txn_root(&txn_root, txn, pool));
+  SVN_ERR(svn_fs_delete(txn_root, "A/T", pool));
+  SVN_ERR(svn_repos_fs_commit_txn(NULL, repos, &youngest_rev, txn, pool));
+
+  SVN_ERR(svn_fs_begin_txn(&txn, fs, youngest_rev, pool));
+  SVN_ERR(svn_fs_txn_root(&txn_root, txn, pool));
+  SVN_ERR(svn_fs_revision_root(&rev_root, fs, youngest_rev - 1, pool));
+  SVN_ERR(svn_fs_copy(rev_root, src, txn_root, dst, pool));
+  SVN_ERR(svn_repos_fs_commit_txn(NULL, repos, &youngest_rev, txn, pool));
+
+  return SVN_NO_ERROR;
+}
+
+struct authz_read_baton_t {
+  apr_hash_t *paths;
+  apr_pool_t *pool;
+  const char *deny;
+};
+
+static svn_error_t *
+authz_read_func(svn_boolean_t *allowed,
+                svn_fs_root_t *root,
+                const char *path,
+                void *baton,
+                apr_pool_t *pool)
+{
+  struct authz_read_baton_t *b = baton;
+
+  if (b->deny && !strcmp(b->deny, path))
+    *allowed = FALSE;
+  else
+    *allowed = TRUE;
+
+  svn_hash_sets(b->paths, apr_pstrdup(b->pool, path), (void*)1);
+
+  return SVN_NO_ERROR;
+}
+
+static svn_error_t *
+verify_locations(apr_hash_t *actual,
+                 apr_hash_t *expected,
+                 apr_hash_t *checked,
+                 apr_pool_t *pool)
+{
+  apr_hash_index_t *hi;
+
+  for (hi = apr_hash_first(pool, expected); hi; hi = apr_hash_next(hi))
+    {
+      const svn_revnum_t *rev = apr_hash_this_key(hi);
+      const char *path = apr_hash_get(actual, rev, sizeof(*rev));
+
+      if (!path)
+        return svn_error_createf(SVN_ERR_TEST_FAILED, NULL,
+                                 "expected %s for %d found (null)",
+                                 (char*)apr_hash_this_val(hi), (int)*rev);
+      else if (strcmp(path, apr_hash_this_val(hi)))
+        return svn_error_createf(SVN_ERR_TEST_FAILED, NULL,
+                                 "expected %s for %d found %s",
+                                 (char*)apr_hash_this_val(hi), (int)*rev, 
path);
+
+    }
+
+  for (hi = apr_hash_first(pool, actual); hi; hi = apr_hash_next(hi))
+    {
+      const svn_revnum_t *rev = apr_hash_this_key(hi);
+      const char *path = apr_hash_get(expected, rev, sizeof(*rev));
+
+      if (!path)
+        return svn_error_createf(SVN_ERR_TEST_FAILED, NULL,
+                                 "found %s for %d expected (null)",
+                                 (char*)apr_hash_this_val(hi), (int)*rev);
+      else if (strcmp(path, apr_hash_this_val(hi)))
+        return svn_error_createf(SVN_ERR_TEST_FAILED, NULL,
+                                 "found %s for %d expected %s",
+                                 (char*)apr_hash_this_val(hi), (int)*rev, 
path);
+
+      if (!svn_hash_gets(checked, path))
+        return svn_error_createf(SVN_ERR_TEST_FAILED, NULL,
+                                 "did not check %s", path);
+    }
+
+  return SVN_NO_ERROR;
+}
+
+static void
+set_expected(apr_hash_t *expected,
+             svn_revnum_t rev,
+             const char *path,
+             apr_pool_t *pool)
+{
+  svn_revnum_t *rp = apr_palloc(pool, sizeof(svn_revnum_t));
+  *rp = rev;
+  apr_hash_set(expected, rp, sizeof(*rp), path);
+}
+
+static svn_error_t *
+trace_node_locations_authz(const svn_test_opts_t *opts,
+                           apr_pool_t *pool)
+{
+  svn_repos_t *repos;
+  svn_fs_t *fs;
+  svn_revnum_t youngest_rev = 0;
+  svn_fs_txn_t *txn;
+  svn_fs_root_t *txn_root;
+  struct authz_read_baton_t arb;
+  apr_array_header_t *revs = apr_array_make(pool, 10, sizeof(svn_revnum_t));
+  apr_hash_t *locations;
+  apr_hash_t *expected = apr_hash_make(pool);
+  int i;
+
+  /* Create test repository. */
+  SVN_ERR(svn_test__create_repos(&repos, 
"test-repo-trace-node-locations-authz",
+                                 opts, pool));
+  fs = svn_repos_fs(repos);
+
+  /* r1 create A */
+  SVN_ERR(svn_fs_begin_txn(&txn, fs, youngest_rev, pool));
+  SVN_ERR(svn_fs_txn_root(&txn_root, txn, pool));
+  SVN_ERR(svn_fs_make_dir(txn_root, "A", pool));
+  SVN_ERR(svn_fs_make_file(txn_root, "A/f", pool));
+  SVN_ERR(svn_test__set_file_contents(txn_root, "A/f", "foobar", pool));
+  SVN_ERR(svn_repos_fs_commit_txn(NULL, repos, &youngest_rev, txn, pool));
+
+  /* r4 copy A to B */
+  SVN_ERR(mkdir_delete_copy(repos, "A", "B", pool));
+
+  /* r7 copy B to C */
+  SVN_ERR(mkdir_delete_copy(repos, "B", "C", pool));
+
+  /* r10 copy C to D */
+  SVN_ERR(mkdir_delete_copy(repos, "C", "D", pool));
+
+  SVN_ERR(svn_fs_youngest_rev(&youngest_rev, fs, pool));
+  SVN_ERR_ASSERT(youngest_rev == 10);
+
+  arb.paths = apr_hash_make(pool);
+  arb.pool = pool;
+  arb.deny = NULL;
+
+  apr_array_clear(revs);
+  for (i = 0; i <= youngest_rev; ++i)
+    APR_ARRAY_PUSH(revs, svn_revnum_t) = i;
+  set_expected(expected, 10, "/D/f", pool);
+  set_expected(expected, 8, "/C/f", pool);
+  set_expected(expected, 7, "/C/f", pool);
+  set_expected(expected, 5, "/B/f", pool);
+  set_expected(expected, 4, "/B/f", pool);
+  set_expected(expected, 2, "/A/f", pool);
+  set_expected(expected, 1, "/A/f", pool);
+  apr_hash_clear(arb.paths);
+  SVN_ERR(svn_repos_trace_node_locations(fs, &locations, "D/f", 10, revs,
+                                         authz_read_func, &arb, pool));
+  SVN_ERR(verify_locations(locations, expected, arb.paths, pool));
+
+  apr_array_clear(revs);
+  for (i = 1; i <= youngest_rev; ++i)
+    APR_ARRAY_PUSH(revs, svn_revnum_t) = i;
+  apr_hash_clear(arb.paths);
+  SVN_ERR(svn_repos_trace_node_locations(fs, &locations, "D/f", 10, revs,
+                                         authz_read_func, &arb, pool));
+  SVN_ERR(verify_locations(locations, expected, arb.paths, pool));
+
+  apr_array_clear(revs);
+  for (i = 2; i <= youngest_rev; ++i)
+    APR_ARRAY_PUSH(revs, svn_revnum_t) = i;
+  set_expected(expected, 1, NULL, pool);
+  apr_hash_clear(arb.paths);
+  SVN_ERR(svn_repos_trace_node_locations(fs, &locations, "D/f", 10, revs,
+                                         authz_read_func, &arb, pool));
+  SVN_ERR(verify_locations(locations, expected, arb.paths, pool));
+
+  apr_array_clear(revs);
+  for (i = 3; i <= youngest_rev; ++i)
+    APR_ARRAY_PUSH(revs, svn_revnum_t) = i;
+  set_expected(expected, 2, NULL, pool);
+  apr_hash_clear(arb.paths);
+  SVN_ERR(svn_repos_trace_node_locations(fs, &locations, "D/f", 10, revs,
+                                         authz_read_func, &arb, pool));
+  SVN_ERR(verify_locations(locations, expected, arb.paths, pool));
+
+  apr_array_clear(revs);
+  for (i = 6; i <= youngest_rev; ++i)
+    APR_ARRAY_PUSH(revs, svn_revnum_t) = i;
+  set_expected(expected, 5, NULL, pool);
+  set_expected(expected, 4, NULL, pool);
+  apr_hash_clear(arb.paths);
+  SVN_ERR(svn_repos_trace_node_locations(fs, &locations, "D/f", 10, revs,
+                                         authz_read_func, &arb, pool));
+  SVN_ERR(verify_locations(locations, expected, arb.paths, pool));
+
+  arb.deny = "/B/f";
+  apr_array_clear(revs);
+  for (i = 0; i <= youngest_rev; ++i)
+    APR_ARRAY_PUSH(revs, svn_revnum_t) = i;
+  apr_hash_clear(arb.paths);
+  SVN_ERR(svn_repos_trace_node_locations(fs, &locations, "D/f", 10, revs,
+                                         authz_read_func, &arb, pool));
+  SVN_ERR(verify_locations(locations, expected, arb.paths, pool));
+
+  apr_array_clear(revs);
+  for (i = 6; i <= youngest_rev; ++i)
+    APR_ARRAY_PUSH(revs, svn_revnum_t) = i;
+  apr_hash_clear(arb.paths);
+  SVN_ERR(svn_repos_trace_node_locations(fs, &locations, "D/f", 10, revs,
+                                         authz_read_func, &arb, pool));
+  SVN_ERR(verify_locations(locations, expected, arb.paths, pool));
+
+  APR_ARRAY_PUSH(revs, svn_revnum_t) = 0;
+  apr_hash_clear(arb.paths);
+  SVN_ERR(svn_repos_trace_node_locations(fs, &locations, "D/f", 10, revs,
+                                         authz_read_func, &arb, pool));
+  SVN_ERR(verify_locations(locations, expected, arb.paths, pool));
+
+  return SVN_NO_ERROR;
+}
+
 /* The test table.  */
 
 static int max_threads = 4;
@@ -3667,6 +3896,8 @@ static struct svn_test_descriptor_t test
                        "test test_repos_fs_type"),
     SVN_TEST_OPTS_PASS(deprecated_access_context_api,
                        "test deprecated access context api"),
+    SVN_TEST_OPTS_PASS(trace_node_locations_authz,
+                       "authz for svn_repos_trace_node_locations"),
     SVN_TEST_NULL
   };
 

Modified: 
subversion/branches/reuse-ra-session/subversion/tests/libsvn_subr/cache-test.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/tests/libsvn_subr/cache-test.c?rev=1702504&r1=1702503&r2=1702504&view=diff
==============================================================================
--- 
subversion/branches/reuse-ra-session/subversion/tests/libsvn_subr/cache-test.c 
(original)
+++ 
subversion/branches/reuse-ra-session/subversion/tests/libsvn_subr/cache-test.c 
Fri Sep 11 15:51:30 2015
@@ -221,6 +221,7 @@ test_membuffer_cache_basic(apr_pool_t *p
                                             "cache:",
                                             
SVN_CACHE__MEMBUFFER_DEFAULT_PRIORITY,
                                             FALSE,
+                                            FALSE,
                                             pool, pool));
 
   return basic_cache_test(cache, FALSE, pool);
@@ -278,6 +279,7 @@ test_membuffer_serializer_error_handling
                                             "cache:",
                                             
SVN_CACHE__MEMBUFFER_DEFAULT_PRIORITY,
                                             FALSE,
+                                            FALSE,
                                             pool, pool));
 
   SVN_ERR(svn_cache__set(cache, "twenty", &twenty, pool));
@@ -307,6 +309,7 @@ test_membuffer_serializer_error_handling
                                             "cache:",
                                             
SVN_CACHE__MEMBUFFER_DEFAULT_PRIORITY,
                                             FALSE,
+                                            FALSE,
                                             pool, pool));
 
   /* Store one entry in cache. */
@@ -393,6 +396,7 @@ test_membuffer_cache_clearing(apr_pool_t
                                             "cache:",
                                             
SVN_CACHE__MEMBUFFER_DEFAULT_PRIORITY,
                                             FALSE,
+                                            FALSE,
                                             pool, pool));
 
   /* Initially, the cache is empty. */
@@ -440,6 +444,51 @@ test_membuffer_cache_clearing(apr_pool_t
   return SVN_NO_ERROR;
 }
 
+/* Implements svn_iter_apr_hash_cb_t. */
+static svn_error_t *
+null_cache_iter_func(void *baton,
+                     const void *key,
+                     apr_ssize_t klen,
+                     void *val,
+                     apr_pool_t *pool)
+{
+  /* shall never be called */
+  return svn_error_create(SVN_ERR_TEST_FAILED, NULL, "should not be called");
+}
+
+static svn_error_t *
+test_null_cache(apr_pool_t *pool)
+{
+  svn_boolean_t found, done;
+  int *data = NULL;
+  svn_cache__info_t info;
+
+  svn_cache__t *cache;
+  SVN_ERR(svn_cache__create_null(&cache, "test-dummy", pool));
+
+  /* Can't cache anything. */
+  SVN_TEST_ASSERT(svn_cache__is_cachable(cache, 0) == FALSE);
+  SVN_TEST_ASSERT(svn_cache__is_cachable(cache, 1) == FALSE);
+
+  /* No point in adding data. */
+  SVN_ERR(svn_cache__set(cache, "data", &data, pool));
+  SVN_ERR(svn_cache__get((void **)&data, &found, cache, "data", pool));
+  SVN_TEST_ASSERT(found == FALSE);
+
+  SVN_ERR(svn_cache__has_key(&found, cache, "data", pool));
+  SVN_TEST_ASSERT(found == FALSE);
+
+  /* Iteration "works" but is a no-op. */
+  SVN_ERR(svn_cache__iter(&done, cache, null_cache_iter_func, NULL, pool));
+  SVN_TEST_ASSERT(done);
+
+  /* It shall know its name. */
+  SVN_ERR(svn_cache__get_info(cache, &info, TRUE, pool));
+  SVN_TEST_STRING_ASSERT(info.id, "test-dummy");
+
+  return SVN_NO_ERROR;
+}
+
 static svn_error_t *
 test_membuffer_unaligned_string_keys(apr_pool_t *pool)
 {
@@ -462,7 +511,7 @@ test_membuffer_unaligned_string_keys(apr
   SVN_ERR(svn_cache__create_membuffer_cache(
             &cache, membuffer, serialize_revnum, deserialize_revnum,
             APR_HASH_KEY_STRING, unaligned_prefix,
-            SVN_CACHE__MEMBUFFER_DEFAULT_PRIORITY, FALSE,
+            SVN_CACHE__MEMBUFFER_DEFAULT_PRIORITY, FALSE, FALSE,
             pool, pool));
 
   SVN_ERR(svn_cache__set(cache, unaligned_key, &fifty, pool));
@@ -513,7 +562,7 @@ test_membuffer_unaligned_fixed_keys(apr_
             &cache, membuffer, serialize_revnum, deserialize_revnum,
             8 /* klen*/,
             unaligned_prefix,
-            SVN_CACHE__MEMBUFFER_DEFAULT_PRIORITY, FALSE,
+            SVN_CACHE__MEMBUFFER_DEFAULT_PRIORITY, FALSE, FALSE,
             pool, pool));
 
   SVN_ERR(svn_cache__set(cache, unaligned_key, &fifty, pool));
@@ -541,6 +590,7 @@ test_membuffer_unaligned_fixed_keys(apr_
   return SVN_NO_ERROR;
 }
 
+
 /* The test table.  */
 
 static int max_threads = 1;
@@ -560,6 +610,8 @@ static struct svn_test_descriptor_t test
                    "test for error handling in membuffer svn_cache"),
     SVN_TEST_PASS2(test_membuffer_cache_clearing,
                    "test clearing a membuffer svn_cache"),
+    SVN_TEST_PASS2(test_null_cache,
+                   "basic null svn_cache test"),
     SVN_TEST_PASS2(test_membuffer_unaligned_string_keys,
                    "test membuffer cache with unaligned string keys"),
     SVN_TEST_PASS2(test_membuffer_unaligned_fixed_keys,

Modified: 
subversion/branches/reuse-ra-session/subversion/tests/libsvn_subr/config-test.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/tests/libsvn_subr/config-test.c?rev=1702504&r1=1702503&r2=1702504&view=diff
==============================================================================
--- 
subversion/branches/reuse-ra-session/subversion/tests/libsvn_subr/config-test.c 
(original)
+++ 
subversion/branches/reuse-ra-session/subversion/tests/libsvn_subr/config-test.c 
Fri Sep 11 15:51:30 2015
@@ -367,6 +367,18 @@ test_expand(const svn_test_opts_t *opts,
      of "c" was not created in a temporary pool when expanding "g". */
   SVN_TEST_STRING_ASSERT(val, "bar");
 
+  /* Get expanded "j" and "k" which have cyclic definitions.
+   * They must return empty values. */
+  svn_config_get(cfg, &val, "section1", "j", NULL);
+  SVN_TEST_STRING_ASSERT(val, "");
+  svn_config_get(cfg, &val, "section1", "k", NULL);
+  SVN_TEST_STRING_ASSERT(val, "");
+
+  /* Get expanded "l" which depends on a cyclic definition.
+   * So, it also considered "undefined" and will be normalized to "". */
+  svn_config_get(cfg, &val, "section1", "l", NULL);
+  SVN_TEST_STRING_ASSERT(val, "");
+
   return SVN_NO_ERROR;
 }
 

Modified: 
subversion/branches/reuse-ra-session/subversion/tests/libsvn_subr/config-test.cfg
URL: 
http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/tests/libsvn_subr/config-test.cfg?rev=1702504&r1=1702503&r2=1702504&view=diff
==============================================================================
--- 
subversion/branches/reuse-ra-session/subversion/tests/libsvn_subr/config-test.cfg
 (original)
+++ 
subversion/branches/reuse-ra-session/subversion/tests/libsvn_subr/config-test.cfg
 Fri Sep 11 15:51:30 2015
@@ -40,6 +40,11 @@ g=lyrical %(c)sd
 h=  %(unterminated
 # Multiple expansions
 i=%(a)s %(b)s
+# Recursive two-level variable expansion with surrounding text
+j=some %(k)scle
+k=c%(j)sy
+# Depends on a cyclic definition
+l=depends on a %(j)scycle!
 
 [UpperCaseSection]
 a=Aa

Modified: 
subversion/branches/reuse-ra-session/subversion/tests/libsvn_subr/dirent_uri-test.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/tests/libsvn_subr/dirent_uri-test.c?rev=1702504&r1=1702503&r2=1702504&view=diff
==============================================================================
--- 
subversion/branches/reuse-ra-session/subversion/tests/libsvn_subr/dirent_uri-test.c
 (original)
+++ 
subversion/branches/reuse-ra-session/subversion/tests/libsvn_subr/dirent_uri-test.c
 Fri Sep 11 15:51:30 2015
@@ -904,16 +904,36 @@ static const testcase_canonicalize_t uri
     { "https://[::1]:443";,     "https://[::1]"; },
     { "http://[FACE:B00C::]/s","http://[face:b00c::]/s"; },
     { "svn+ssh://b@[1:2::3]/s","svn+ssh://b@[1:2::3]/s" },
+    { "file:///A%2f%2Fb%2fc",  "file:///A/b/c"},
+    { "file:///A%2fb%2f%2Fc",  "file:///A/b/c"},
 #ifdef SVN_USE_DOS_PATHS
     { "file:///c:/temp/repos", "file:///C:/temp/repos" },
     { "file:///c:/temp/REPOS", "file:///C:/temp/REPOS" },
     { "file:///C:/temp/REPOS", "file:///C:/temp/REPOS" },
     { "file:///c:/",           "file:///C:" },
+    { "file:///c:%2ftemp",     "file:///C:/temp"},
+    { "file:///C:hi",          "file:///C:hi" },
+    { "file:///c:hi",          "file:///C:hi" },
+    { "file:///C:hi/Q",        "file:///C:hi/Q" },
+    { "file:///c:hi/q",        "file:///C:hi/q" },
+    { "file:///c:hi%2fD",      "file:///C:hi/D" },
+    { "file:///c:hi%25/A",     "file:///C:hi%25/A"},
+    { "file:///c:hi%2E/A",     "file:///C:hi./A"},
+    { "file:///c:hi%/A",       "file:///C:hi%25/A"},
 #else /* !SVN_USE_DOS_PATHS */
     { "file:///c:/temp/repos", "file:///c:/temp/repos" },
     { "file:///c:/temp/REPOS", "file:///c:/temp/REPOS" },
     { "file:///C:/temp/REPOS", "file:///C:/temp/REPOS" },
     { "file:///c:/",           "file:///c:" },
+    { "file:///c:%2ftemp",     "file:///c:/temp"},
+    { "file:///C:hi",          "file:///C:hi" },
+    { "file:///c:hi",          "file:///c:hi" },
+    { "file:///C:hi/Q",        "file:///C:hi/Q" },
+    { "file:///c:hi/q",        "file:///c:hi/q" },
+    { "file:///c:hi%2fD",      "file:///c:hi/D" },
+    { "file:///c:hi%25/A",     "file:///c:hi%25/A" },
+    { "file:///c:hi%2E/A",     "file:///c:hi./A"},
+    { "file:///c:hi%/A",       "file:///c:hi%25/A"},
 #endif /* SVN_USE_DOS_PATHS */
     /* Hostnames that look like non-canonical paths */
     { "file://./foo",             "file://./foo" },
@@ -2332,6 +2352,25 @@ test_dirent_from_file_url(apr_pool_t *po
     { "file:///A%7C",              "A:/" },
     { "file:///A%7C/dir",          "A:/dir" },
     { "file:///A%7Cdir",           "A:dir" },
+    { "file:///A%7C%5Cdir",        "A:/dir" },
+    { "file:///A%7C%5Cdir%5Cfile", "A:/dir\\file" },
+    { "file:///A:%5Cdir",          "A:/dir" },
+    { "file:///A:%5Cdir%5Cfile",   "A:/dir\\file" },
+    { "file://localhost/A:%5Cfile","A:/file"},
+    { "file://localhost/A:file",   "A:file"}
+#else
+    { "file:///A:",                "/A:" },
+    { "file:///A:/dir",            "/A:/dir" },
+    { "file:///A:dir",             "/A:dir" },
+    { "file:///A%7C",              "/A|" },
+    { "file:///A%7C/dir",          "/A|/dir" },
+    { "file:///A%7Cdir",           "/A|dir" },
+    { "file:///A%7C%5Cdir",        "/A|\\dir" },
+    { "file:///A%7C%5Cdir%5Cfile", "/A|\\dir\\file" },
+    { "file:///A:%5Cdir",          "/A:\\dir" },
+    { "file:///A:%5Cdir%5Cfile",   "/A:\\dir\\file" },
+    { "file://localhost/A:%5Cfile","/A:\\file" },
+    { "file://localhost/A:file",   "/A:file" }
 #endif
   };
   int i;
@@ -2347,6 +2386,11 @@ test_dirent_from_file_url(apr_pool_t *po
                                  "svn_uri_get_dirent_from_file_url(\"%s\") "
                                  "returned \"%s\" expected \"%s\"",
                                  tests[i].url, result, tests[i].result);
+      if (!svn_dirent_is_canonical(result, pool))
+        return svn_error_createf(SVN_ERR_TEST_FAILED, NULL,
+          "svn_uri_get_dirent_from_file_url(\"%s\") "
+          "returned \"%s\", which is not canonical.",
+          tests[i].url, result);
     }
 
   return SVN_NO_ERROR;

Modified: 
subversion/branches/reuse-ra-session/subversion/tests/libsvn_subr/io-test.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/tests/libsvn_subr/io-test.c?rev=1702504&r1=1702503&r2=1702504&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/tests/libsvn_subr/io-test.c 
(original)
+++ subversion/branches/reuse-ra-session/subversion/tests/libsvn_subr/io-test.c 
Fri Sep 11 15:51:30 2015
@@ -784,6 +784,44 @@ test_install_stream_to_longpath(apr_pool
 }
 
 static svn_error_t *
+test_install_stream_over_readonly_file(apr_pool_t *pool)
+{
+  const char *tmp_dir;
+  const char *final_abspath;
+  svn_stream_t *stream;
+  svn_stringbuf_t *actual_content;
+
+  /* Create an empty directory. */
+  SVN_ERR(svn_dirent_get_absolute(&tmp_dir, 
"test_install_stream_over_readonly_file",
+                                  pool));
+  SVN_ERR(svn_io_remove_dir2(tmp_dir, TRUE, NULL, NULL, pool));
+  SVN_ERR(svn_io_make_dir_recursively(tmp_dir, pool));
+  svn_test_add_dir_cleanup(tmp_dir);
+
+  final_abspath = svn_dirent_join(tmp_dir, "stream1", pool);
+
+  /* Create empty read-only file. */
+  SVN_ERR(svn_io_file_create_empty(final_abspath, pool));
+  SVN_ERR(svn_io_set_file_read_only(final_abspath, FALSE, pool));
+
+  SVN_ERR(svn_stream__create_for_install(&stream, tmp_dir, pool, pool));
+  SVN_ERR(svn_stream_puts(stream, "stream1 content"));
+  SVN_ERR(svn_stream_close(stream));
+  SVN_ERR(svn_stream__install_stream(stream,
+                                     final_abspath,
+                                     TRUE,
+                                     pool));
+
+  SVN_ERR(svn_stringbuf_from_file2(&actual_content,
+                                   final_abspath,
+                                   pool));
+
+  SVN_TEST_STRING_ASSERT(actual_content->data, "stream1 content");
+
+  return SVN_NO_ERROR;
+}
+
+static svn_error_t *
 test_file_size_get(apr_pool_t *pool)
 {
   const char *tmp_dir, *path;
@@ -823,6 +861,64 @@ test_file_size_get(apr_pool_t *pool)
   return SVN_NO_ERROR;
 }
 
+static svn_error_t *
+test_file_rename2(apr_pool_t *pool)
+{
+  const char *tmp_dir;
+  const char *foo_path;
+  const char *bar_path;
+  svn_stringbuf_t *actual_content;
+  svn_node_kind_t actual_kind;
+
+  /* Create an empty directory. */
+  SVN_ERR(svn_dirent_get_absolute(&tmp_dir, "test_file_rename2", pool));
+  SVN_ERR(svn_io_remove_dir2(tmp_dir, TRUE, NULL, NULL, pool));
+  SVN_ERR(svn_io_make_dir_recursively(tmp_dir, pool));
+  svn_test_add_dir_cleanup(tmp_dir);
+
+  foo_path = svn_dirent_join(tmp_dir, "foo", pool);
+  bar_path = svn_dirent_join(tmp_dir, "bar", pool);
+
+  /* Test 1: Simple file rename. */
+  SVN_ERR(svn_io_file_create(foo_path, "file content", pool));
+
+  SVN_ERR(svn_io_file_rename2(foo_path, bar_path, FALSE, pool));
+
+  SVN_ERR(svn_stringbuf_from_file2(&actual_content, bar_path, pool));
+  SVN_TEST_STRING_ASSERT(actual_content->data, "file content");
+
+  SVN_ERR(svn_io_check_path(foo_path, &actual_kind, pool));
+  SVN_TEST_ASSERT(actual_kind == svn_node_none);
+  SVN_ERR(svn_io_remove_file2(bar_path, FALSE, pool));
+
+  /* Test 2: Rename file with flush_to_disk flag. */
+  SVN_ERR(svn_io_file_create(foo_path, "file content", pool));
+
+  SVN_ERR(svn_io_file_rename2(foo_path, bar_path, TRUE, pool));
+
+  SVN_ERR(svn_stringbuf_from_file2(&actual_content, bar_path, pool));
+  SVN_TEST_STRING_ASSERT(actual_content->data, "file content");
+  SVN_ERR(svn_io_check_path(foo_path, &actual_kind, pool));
+  SVN_TEST_ASSERT(actual_kind == svn_node_none);
+
+  SVN_ERR(svn_io_remove_file2(bar_path, FALSE, pool));
+
+  /* Test 3: Rename file over existing read-only file. */
+  SVN_ERR(svn_io_file_create(foo_path, "file content", pool));
+  SVN_ERR(svn_io_file_create(bar_path, "bar content", pool));
+  SVN_ERR(svn_io_set_file_read_only(bar_path, FALSE, pool));
+
+  SVN_ERR(svn_io_file_rename2(foo_path, bar_path, FALSE, pool));
+
+  SVN_ERR(svn_stringbuf_from_file2(&actual_content, bar_path, pool));
+  SVN_TEST_STRING_ASSERT(actual_content->data, "file content");
+  SVN_ERR(svn_io_check_path(foo_path, &actual_kind, pool));
+  SVN_TEST_ASSERT(actual_kind == svn_node_none);
+  SVN_ERR(svn_io_remove_file2(bar_path, FALSE, pool));
+
+  return SVN_NO_ERROR;
+}
+
 /* The test table.  */
 
 static int max_threads = 3;
@@ -846,8 +942,12 @@ static struct svn_test_descriptor_t test
                    "test ignore-enoent"),
     SVN_TEST_PASS2(test_install_stream_to_longpath,
                    "test svn_stream__install_stream to long path"),
+    SVN_TEST_PASS2(test_install_stream_over_readonly_file,
+                   "test svn_stream__install_stream over RO file"),
     SVN_TEST_PASS2(test_file_size_get,
                    "test svn_io_file_size_get"),
+    SVN_TEST_PASS2(test_file_rename2,
+                   "test svn_io_file_rename2"),
     SVN_TEST_NULL
   };
 

Modified: 
subversion/branches/reuse-ra-session/subversion/tests/libsvn_subr/stream-test.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/tests/libsvn_subr/stream-test.c?rev=1702504&r1=1702503&r2=1702504&view=diff
==============================================================================
--- 
subversion/branches/reuse-ra-session/subversion/tests/libsvn_subr/stream-test.c 
(original)
+++ 
subversion/branches/reuse-ra-session/subversion/tests/libsvn_subr/stream-test.c 
Fri Sep 11 15:51:30 2015
@@ -32,6 +32,75 @@
 
 #include "../svn_test.h"
 
+struct stream_baton_t
+{
+  svn_filesize_t capacity_left;
+  char current;
+  apr_size_t max_read;
+};
+
+/* Implements svn_stream_t.read_fn. */
+static svn_error_t *
+read_handler(void *baton,
+             char *buffer,
+             apr_size_t *len)
+{
+  struct stream_baton_t *btn = baton;
+  int i;
+
+  /* Cap the read request to what we actually support. */
+  if (btn->max_read < *len)
+    *len = btn->max_read;
+  if (btn->capacity_left < *len)
+    *len = (apr_size_t)btn->capacity_left;
+
+  /* Produce output */
+  for (i = 0; i < *len; ++i)
+    {
+      buffer[i] = btn->current + 1;
+      btn->current = (btn->current + 1) & 0x3f;
+
+      btn->capacity_left--;
+    }
+
+  return SVN_NO_ERROR;
+}
+
+static svn_error_t *
+data_available_handler(void *baton,
+                       svn_boolean_t *data_available)
+{
+  struct stream_baton_t *btn = baton;
+  *data_available = btn->capacity_left > 0;
+
+  return SVN_NO_ERROR;
+}
+
+/* Return a stream that produces CAPACITY characters in chunks of at most
+ * MAX_READ chars.  The first char will be '\1' followed by '\2' etc. up
+ * to '\x40' and then repeating the cycle until the end of the stream.
+ * Allocate the result in RESULT_POOL. */
+static svn_stream_t *
+create_test_read_stream(svn_filesize_t capacity,
+                        apr_size_t max_read,
+                        apr_pool_t *result_pool)
+{
+  svn_stream_t *stream;
+  struct stream_baton_t *baton;
+
+  baton = apr_pcalloc(result_pool, sizeof(*baton));
+  baton->capacity_left = capacity;
+  baton->current = 0;
+  baton->max_read = max_read;
+
+  stream = svn_stream_create(baton, result_pool);
+  svn_stream_set_read2(stream, read_handler, NULL);
+  svn_stream_set_data_available(stream, data_available_handler);
+
+  return stream;
+}
+
+/*------------------------ Tests --------------------------- */
 
 static svn_error_t *
 test_stream_from_string(apr_pool_t *pool)
@@ -803,6 +872,70 @@ test_stream_compressed_read_full(apr_poo
   return SVN_NO_ERROR;
 }
 
+/* Utility function verifying that LINE contains LENGTH characters read
+ * from a stream returned by create_test_read_stream().  C is the first
+ * character expected in LINE. */
+static svn_error_t *
+expect_line_content(svn_stringbuf_t *line,
+                    char start,
+                    apr_size_t length)
+{
+  apr_size_t i;
+  char c = start - 1;
+
+  SVN_TEST_ASSERT(line->len == length);
+  for (i = 0; i < length; ++i)
+    {
+      SVN_TEST_ASSERT(line->data[i] == c + 1);
+      c = (c + 1) & 0x3f;
+    }
+
+  return SVN_NO_ERROR;
+}
+
+static svn_error_t *
+test_stream_buffered_wrapper(apr_pool_t *pool)
+{
+  apr_pool_t *iterpool = svn_pool_create(pool);
+  svn_stringbuf_t *line;
+  svn_boolean_t eof = FALSE;
+  apr_size_t read = 0;
+
+  /* At least a few stream chunks (16k) worth of data. */
+  const apr_size_t stream_length = 100000;
+
+  /* Our source stream delivers data in very small chunks only.
+   * This requires multiple reads per line while readline will hold marks
+   * etc. */
+  svn_stream_t *stream = create_test_read_stream(stream_length, 19, pool);
+  stream = svn_stream_wrap_buffered_read(stream, pool);
+
+  /* We told the stream not to supports seeking to the start. */
+  SVN_TEST_ASSERT_ERROR(svn_stream_seek(stream, NULL),
+                        SVN_ERR_STREAM_SEEK_NOT_SUPPORTED);
+
+  /* Read all lines. Check EOF detection. */
+  while (!eof)
+    {
+      /* The local pool ensures that marks get cleaned up. */
+      svn_pool_clear(iterpool);
+      SVN_ERR(svn_stream_readline(stream, &line, "\n", &eof, iterpool));
+
+      /* Verify that we read the correct data and the full stream. */
+      if (read == 0)
+        SVN_ERR(expect_line_content(line, 1, '\n' - 1));
+      else if (eof)
+        SVN_ERR(expect_line_content(line, '\n' + 1, stream_length - read));
+      else
+        SVN_ERR(expect_line_content(line, '\n' + 1, 63));
+
+      /* Update bytes read. */
+      read += line->len + 1;
+    }
+
+  return SVN_NO_ERROR;
+}
+
 /* The test table.  */
 
 static int max_threads = 1;
@@ -834,6 +967,8 @@ static struct svn_test_descriptor_t test
                    "test svn_stringbuf_from_stream"),
     SVN_TEST_PASS2(test_stream_compressed_read_full,
                    "test compression for streams without partial read"),
+    SVN_TEST_PASS2(test_stream_buffered_wrapper,
+                   "test buffering read stream wrapper"),
     SVN_TEST_NULL
   };
 

Modified: 
subversion/branches/reuse-ra-session/subversion/tests/libsvn_wc/wc-queries-test.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/tests/libsvn_wc/wc-queries-test.c?rev=1702504&r1=1702503&r2=1702504&view=diff
==============================================================================
--- 
subversion/branches/reuse-ra-session/subversion/tests/libsvn_wc/wc-queries-test.c
 (original)
+++ 
subversion/branches/reuse-ra-session/subversion/tests/libsvn_wc/wc-queries-test.c
 Fri Sep 11 15:51:30 2015
@@ -52,7 +52,7 @@ WC_QUERIES_SQL_DECLARE_STATEMENT_INFO(wc
 /* The first query after the normal wc queries */
 #define STMT_SCHEMA_FIRST STMT_CREATE_SCHEMA
 
-#define SQLITE_ERR(x)   \
+#define SQLITE_ERR(x) do                                         \
 {                                                                \
   int sqlite_err__temp = (x);                                    \
   if (sqlite_err__temp != SQLITE_OK)                             \

Modified: 
subversion/branches/reuse-ra-session/tools/buildbot/slaves/bb-openbsd/svnbuild.sh
URL: 
http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/tools/buildbot/slaves/bb-openbsd/svnbuild.sh?rev=1702504&r1=1702503&r2=1702504&view=diff
==============================================================================
--- 
subversion/branches/reuse-ra-session/tools/buildbot/slaves/bb-openbsd/svnbuild.sh
 (original)
+++ 
subversion/branches/reuse-ra-session/tools/buildbot/slaves/bb-openbsd/svnbuild.sh
 Fri Sep 11 15:51:30 2015
@@ -25,4 +25,4 @@ set -x
 export JAVA_HOME=/usr/local/jdk-1.7.0
 
 branch="$(basename $(svn info . | grep ^URL  | cut -d' ' -f2))"
-(cd .. && gmake BRANCH="$branch" THREADING="no")
+(cd .. && gmake BRANCH="$branch" THREADING="no" ENABLE_PERL_BINDINGS="no")

Modified: 
subversion/branches/reuse-ra-session/tools/buildbot/slaves/bb-openbsd/svncheck-bindings.sh
URL: 
http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/tools/buildbot/slaves/bb-openbsd/svncheck-bindings.sh?rev=1702504&r1=1702503&r2=1702504&view=diff
==============================================================================
--- 
subversion/branches/reuse-ra-session/tools/buildbot/slaves/bb-openbsd/svncheck-bindings.sh
 (original)
+++ 
subversion/branches/reuse-ra-session/tools/buildbot/slaves/bb-openbsd/svncheck-bindings.sh
 Fri Sep 11 15:51:30 2015
@@ -24,7 +24,7 @@ set -x
 
 branch="$(basename $(svn info . | grep ^URL  | cut -d' ' -f2))"
 export MALLOC_OPTIONS=S
-(cd .. && gmake BRANCH="$branch" THREADING="no" svn-check-bindings)
+(cd .. && gmake BRANCH="$branch" THREADING="no" ENABLE_PERL_BINDINGS="no" 
svn-check-bindings)
 grep -q "^Result: PASS$" tests.log.bindings.pl || exit 1
 grep -q "^OK$" tests.log.bindings.py || exit 1
 tail -n 1 tests.log.bindings.rb | grep -q ", 0 failures, 0 errors" || exit 1

Modified: 
subversion/branches/reuse-ra-session/tools/buildbot/slaves/svn-sparc-solaris/svncheck.sh
URL: 
http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/tools/buildbot/slaves/svn-sparc-solaris/svncheck.sh?rev=1702504&r1=1702503&r2=1702504&view=diff
==============================================================================
--- 
subversion/branches/reuse-ra-session/tools/buildbot/slaves/svn-sparc-solaris/svncheck.sh
 (original)
+++ 
subversion/branches/reuse-ra-session/tools/buildbot/slaves/svn-sparc-solaris/svncheck.sh
 Fri Sep 11 15:51:30 2015
@@ -28,7 +28,7 @@ cd ../obj
 
LD_PRELOAD_64=/export/home/wandisco/buildbot/install/lib/preloadable_libiconv.so
 export LD_PRELOAD_64
 
-if [ $SVN_VER_MINOR -eq 9 ]; then
+if [ $SVN_VER_MINOR -ge 9 ]; then
   echo "============ make svnserveautocheck"
   make svnserveautocheck CLEANUP=1 PARALLEL=30 THREADED=1 || exit $?
 else

Propchange: 
subversion/branches/reuse-ra-session/tools/buildbot/slaves/svn-x64-macosx/
            ('svn:ignore' removed)

Modified: 
subversion/branches/reuse-ra-session/tools/buildbot/slaves/svn-x64-macosx/setenv.sh
URL: 
http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/tools/buildbot/slaves/svn-x64-macosx/setenv.sh?rev=1702504&r1=1702503&r2=1702504&view=diff
==============================================================================
--- 
subversion/branches/reuse-ra-session/tools/buildbot/slaves/svn-x64-macosx/setenv.sh
 (original)
+++ 
subversion/branches/reuse-ra-session/tools/buildbot/slaves/svn-x64-macosx/setenv.sh
 Fri Sep 11 15:51:30 2015
@@ -19,7 +19,6 @@
 ## variables:
 ##
 ##     PATH                     The search path
-##     SVNBB_OPENSSL            OpenSSL installation prefix
 ##     SVNBB_BDB                Berkeley DB installation prefix
 ##     SVNBB_SWIG               Swig installation prefix
 ##     SVNBB_SERF               Serf installation prefix
@@ -30,13 +29,12 @@
 ##     SVNBB_APR_20_DEV         Path of APR-2.0
 ##     SVNBB_JUNIT              The path of the junit.jar
 ##     SVNBB_PARALLEL           Optional: parallelization; defaults to 2
-##     LIBTOOL_CONFIG           Optional: libtool configuration path
 ##
 ## The invoking script will set local variable named ${scripts} that
 ## is the absolute path the parent of this file.
 
 # Modify this to suit your deployment
-environment=$(cd "${scripts}/.." && pwd)/environment.sh
+environment=$(cd "${scripts}/../.." && pwd)/environment.sh
 
 eval $(${environment})
 SVNBB_PARALLEL="${SVNBB_PARALLEL-2}"

Modified: subversion/branches/reuse-ra-session/tools/client-side/bash_completion
URL: 
http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/tools/client-side/bash_completion?rev=1702504&r1=1702503&r2=1702504&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/tools/client-side/bash_completion 
(original)
+++ subversion/branches/reuse-ra-session/tools/client-side/bash_completion Fri 
Sep 11 15:51:30 2015
@@ -84,6 +84,7 @@ function _svn_info()
   done
 }
 
+# broken since svn 1.7 | FIXME: change to svn status -v ?
 # _svn_lls (dir|file|all) files...
 # list svn-managed files from list
 # some 'svn status --all-files' would be welcome here?
@@ -106,6 +107,85 @@ function _svn_lls()
     done
 }
 
+# try to complete TARGET
+# 1. [nothing]  lists available protocols
+# 2. svn+ssh:// lists servers from .ssh/known_hosts
+# 3. http[s]:// lists already used svn servers
+# 4. file://    lists files from dir
+# 5. ^/ or protocol except file:/ triggers svn ls
+# this code expects bash 4, $cur is split by : too
+#
+# $1            'all' | 'remote_only'
+# return        true if found something
+function _svn_complete_target() {
+       # echo -e "\n_svn_complete_target: [$cur] 1:[${COMP_WORDS[COMP_CWORD]}] 
2:[${COMP_WORDS[COMP_CWORD-1]}] 3:[${COMP_WORDS[COMP_CWORD-2]}] | 
[${COMP_WORDS[@]}] [$COMP_WORDBREAKS]"
+       local prefix=${COMP_WORDS[COMP_CWORD-2]}
+       local colon=${COMP_WORDS[COMP_CWORD-1]}
+       # see about COMP_WORDBREAKS workaround in prop completion
+       if [[ $prefix == "file" && "$colon" == ":" ]]
+       then
+               # file completion for file:// urls
+               COMPREPLY=( $(compgen -d -S '/' -X '*/.*' -- $cur ) )
+               return
+       elif [[ ( $1 == "all" && $cur == ^/* ) || ( "$colon" == ":" && $cur == 
//*/* ) ]]
+       then    # we already hava a protocoll and host: autocomplete for svn ls 
^/bla | svn ls remote_url | svn checkout remote_url
+               local p
+               if [ "$colon" == ":" ] ; then
+                       p="$prefix$colon"
+               fi
+               if [[ $cur =~ ((.*/)([^/]*)) ]] # url = everything up to the 
last /
+               then
+                       local url="${BASH_REMATCH[2]}"
+                       local path="${BASH_REMATCH[3]}"
+                       local remote_files="$(svn ls --non-interactive "$p$url" 
2> /dev/null )"
+                       COMPREPLY=( $(compgen -P "$url" -W "$remote_files" -- 
"$path" ) )
+                       compopt -o nospace
+                       return 0
+               fi
+       elif [[ "$colon" == ":" ]]
+       then
+               # get known servers
+               # svn+ssh://
+               if [[ $prefix == "svn+ssh" && $cur =~ (^//(.*)) ]] ; then
+                       local server_start=${BASH_REMATCH[2]}
+                       # debian & suse: 
/usr/share/bash-completion/bash_completion
+                       local suffix=/
+                       _known_hosts_real -p // "$server_start"
+               else
+                       local urls= file=
+                       for file in ~/.subversion/auth/svn.simple/* ; do
+                               if [ -r $file ] ; then
+                                       local url=$(_svn_read_hashfile 
svn:realmstring < $file)
+                                       url=${url/*</}
+                                       url=${url/>*/}
+                                       urls="$urls $url"
+                               fi
+                       done
+
+                       # only suggest/show possible suffixes
+                       local suffix=$cur c= choices=
+                       for c in $urls ; do
+                               [[ $c == $prefix:* ]] && choices="$choices 
${c#*:}"
+                       done
+               
+                       COMPREPLY=( $(compgen -W "$choices" -- $suffix ) )
+               fi
+               compopt -o nospace
+               return
+       else
+               # show schemas
+               if [ $1 == 'all' ] ; then
+                       COMPREPLY=( $(compgen -W "^/ $urlSchemas" -- $cur) )
+               else
+                       COMPREPLY=( $(compgen -W "$urlSchemas" -- $cur) )
+               fi
+               compopt -o nospace
+               return
+       fi
+       #echo "nothing found"
+       return 1
+}
+
 # This completion guides the command/option order along the one suggested
 # by "svn help", although other syntaxes are allowed.
 #
@@ -183,6 +263,7 @@ _svn()
        optsParam="$optsParam|--native-eol|-l|--limit|-c|--change"
        optsParam="$optsParam|--depth|--set-depth|--with-revprop"
        optsParam="$optsParam|--cl|--changelist|--accept|--show-revs"
+       optsParam="$optsParam|--show-item"
 
        # svn:* and other (env SVN_BASH_*_PROPS) properties
        local svnProps revProps allProps psCmds propCmds
@@ -392,38 +473,10 @@ _svn()
        if [[ $cmd == @(co|checkout|ls|list) && $stat = 'arg' && \
                        $SVN_BASH_COMPL_EXT == *urls* ]]
        then
-               # see about COMP_WORDBREAKS workaround in prop completion
-               if [[ $cur == file:* ]]
-               then
-                       # file completion for file:// urls
-                       local where=${cur/file:/}
-                       COMPREPLY=( $(compgen -d -S '/' -X '*/.*' -- $where ) )
-                       return
-               elif [[ $cur == *:* ]]
-               then
-                       # get known urls
-                       local urls= file=
-                       for file in ~/.subversion/auth/svn.simple/* ; do
-                               if [ -r $file ] ; then
-                                       local url=$(_svn_read_hashfile 
svn:realmstring < $file)
-                                       url=${url/*</}
-                                       url=${url/>*/}
-                                       urls="$urls $url"
-                               fi
-                       done
-
-                       # only suggest/show possible suffixes
-                       local prefix=${cur%:*} suffix=${cur#*:} c= choices=
-                       for c in $urls ; do
-                               [[ $c == $prefix:* ]] && choices="$choices 
${c#*:}"
-                       done
-
-                       COMPREPLY=( $(compgen -W "$choices" -- $suffix ) )
-                       return
+               if [[ $cmd == @(ls|list) ]] ; then
+                       _svn_complete_target 'all' && return
                else
-                       # show schemas
-                       COMPREPLY=( $(compgen -W "$urlSchemas" -- $cur) )
-                       return
+                       _svn_complete_target 'remote_only' && return
                fi
        fi
 
@@ -440,17 +493,23 @@ _svn()
            elif [[ "$here" == */trunk* ]] ; then
              # we guess that it is a merge from a branch
              COMPREPLY=( $(compgen -W ${here/\/trunk*/\/branches\/} -- $cur ) )
+             compopt -o nospace
              return 0
            else
              # no se, let us suggest the repository root...
-             COMPREPLY=( $(compgen -W $(_svn_info Root) -- $cur ) )
+             COMPREPLY=( $(compgen -W $(_svn_info Root)/ -- $cur ) )
+             compopt -o nospace
              return 0
            fi
+         # this part is broken with bash 4 URL contains https only
          elif [[ $URL == */branches/* && $here == */trunk* && \
                ! $hasReintegrateOpt && $cur = '' && $stat = 'arg' ]] ; then
            # force --reintegrate only if the current word is empty
            COMPREPLY=( $(compgen -W '--reintegrate' -- $cur ) )
            return 0
+         # autocomplete for svn merge ^/bla
+         else
+           _svn_complete_target 'all' && return
          fi
        fi
 
@@ -501,6 +560,10 @@ _svn()
 
            [[ $previous = '--show-revs' ]] && values='merged eligible'
 
+           [[ $previous = '--show-item' ]] && values="kind url relative-url \
+             repos-root-url repos-uuid revision last-changed-revision \
+             last-changed-date last-changed-author wc-root"
+
            if [[ $previous = '--username' ]] ; then
              values="$SVN_BASH_USERNAME"
              if [[ $SVN_BASH_COMPL_EXT == *username* ]] ; then

Modified: subversion/branches/reuse-ra-session/tools/dev/fsfs-access-map.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/tools/dev/fsfs-access-map.c?rev=1702504&r1=1702503&r2=1702504&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/tools/dev/fsfs-access-map.c (original)
+++ subversion/branches/reuse-ra-session/tools/dev/fsfs-access-map.c Fri Sep 11 
15:51:30 2015
@@ -225,7 +225,7 @@ open_file(const char *name, int handle)
       *key = handle;
 
       handle_info = apr_pcalloc(pool, sizeof(*handle_info));
-      apr_hash_set(handles, key, sizeof(handle), handle_info);
+      apr_hash_set(handles, key, sizeof(*key), handle_info);
     }
 
   /* link handle to file */

Modified: subversion/branches/reuse-ra-session/tools/dev/scramble-tree.py
URL: 
http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/tools/dev/scramble-tree.py?rev=1702504&r1=1702503&r2=1702504&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/tools/dev/scramble-tree.py (original)
+++ subversion/branches/reuse-ra-session/tools/dev/scramble-tree.py Fri Sep 11 
15:51:30 2015
@@ -60,12 +60,7 @@ try:
 except AttributeError:
   my_getopt = getopt.getopt
 import random
-try:
-  # Python >=2.5
-  from hashlib import md5 as hashlib_md5
-except ImportError:
-  # Python <2.5
-  from md5 import md5 as hashlib_md5
+from hashlib import md5 as hashlib_md5
 import base64
 
 

Modified: subversion/branches/reuse-ra-session/tools/dev/unix-build/Makefile.svn
URL: 
http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/tools/dev/unix-build/Makefile.svn?rev=1702504&r1=1702503&r2=1702504&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/tools/dev/unix-build/Makefile.svn 
(original)
+++ subversion/branches/reuse-ra-session/tools/dev/unix-build/Makefile.svn Fri 
Sep 11 15:51:30 2015
@@ -151,8 +151,8 @@ APR_UTIL_URL        = https://svn.apache.org/re
 HTTPD_URL      = https://archive.apache.org/dist/httpd/$(HTTPD_DIST)
 NEON_URL       = http://webdav.org/neon/$(NEON_DIST)
 #SERF_URL      = http://serf.googlecode.com/files/$(SERF_DIST)
-SERF_URL       = https://serf.googlecode.com/svn/tags/$(SERF_VER)
-SERF_OLD_URL   = https://serf.googlecode.com/svn/tags/$(SERF_OLD_VER)
+SERF_URL       = https://svn.apache.org/repos/asf/serf/tags/$(SERF_VER)
+SERF_OLD_URL   = https://svn.apache.org/repos/asf/serf/tags/$(SERF_OLD_VER)
 SQLITE_URL     = https://www.sqlite.org/2014/$(SQLITE_DIST)
 CYRUS_SASL_URL = ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/$(CYRUS_SASL_DIST)
 LIBMAGIC_URL   = ftp://ftp.astron.com/pub/file/$(LIBMAGIC_DIST)
@@ -1461,6 +1461,7 @@ $(SVN_OBJDIR)/.bindings-installed: $(SVN
 # run svn regression tests
 HTTPD_CHECK_CONF=$(PREFIX)/httpd/conf/httpd-svn-check-$(WC).conf
 HTTPD_CHECK_USERS=$(PREFIX)/httpd/conf/httpd-svn-check-users
+HTTPD_CHECK_GROUPS=$(PREFIX)/httpd/conf/httpd-svn-check-groups
 HTTPD_CHECK_PORT=8081
 MOD_DONTDOTHAT_CONF=$(PREFIX)/httpd/conf/dontdothat
 
@@ -1470,11 +1471,17 @@ $(MOD_DONTDOTHAT_CONF):
        echo >>[email protected] '/ = deny'
        mv -f [email protected] $@
 
-$(HTTPD_CHECK_CONF): $(MOD_DONTDOTHAT_CONF)
+$(HTTPD_CHECK_GROUPS):
+       mkdir -p $(dir $@)
+       printf "random: jrandom\nconstant: jconstant\n" > $@
+
+$(HTTPD_CHECK_CONF): $(MOD_DONTDOTHAT_CONF) $(HTTPD_CHECK_GROUPS)
        mkdir -p $(dir $@)
        $(PREFIX)/httpd/bin/htpasswd -bc $(HTTPD_CHECK_USERS).tmp jrandom 
rayjandom
        $(PREFIX)/httpd/bin/htpasswd -b $(HTTPD_CHECK_USERS).tmp jconstant 
rayjandom
        $(PREFIX)/httpd/bin/htpasswd -b $(HTTPD_CHECK_USERS).tmp __dumpster__ 
__loadster__
+       $(PREFIX)/httpd/bin/htpasswd -b $(HTTPD_CHECK_USERS).tmp JRANDOM 
rayjandom
+       $(PREFIX)/httpd/bin/htpasswd -b $(HTTPD_CHECK_USERS).tmp JCONSTANT 
rayjandom
        mv -f $(HTTPD_CHECK_USERS).tmp $(HTTPD_CHECK_USERS)
        echo > [email protected] '# httpd config for make check'
        echo >>[email protected] 'ServerRoot "$(PREFIX)/httpd"'
@@ -1539,8 +1546,8 @@ endif
        echo >>[email protected] '# Location for tests using mod_dontdothat'
        echo >>[email protected] '<Location /ddt-test-work/repositories>'
        echo >> [email protected] 'DAV               svn'
-       echo >> [email protected] 'SVNParentPath     
"$(SVN_WC)/subversion/tests/cmdline/svn-test-work/repositories"'
-       echo >> [email protected] 'AuthzSVNAccessFile 
"$(SVN_WC)/subversion/tests/cmdline/svn-test-work/authz"'
+       echo >> [email protected] 'SVNParentPath     
$(SVN_WC)/subversion/tests/cmdline/svn-test-work/repositories'
+       echo >> [email protected] 'AuthzSVNAccessFile 
$(SVN_WC)/subversion/tests/cmdline/svn-test-work/authz'
        echo >> [email protected] 'AuthType          Basic'
        echo >> [email protected] 'AuthName          "Subversion Repository"'
        echo >> [email protected] 'AuthzSVNAccessFile 
$(SVN_WC)/subversion/tests/cmdline/svn-test-work/authz'
@@ -1551,6 +1558,169 @@ ifeq ($(USE_HTTPV1),yes)
 endif
        echo >> [email protected] 'DontDoThatConfigFile "$(MOD_DONTDOTHAT_CONF)"'
        echo >> [email protected] '</Location>'
+
+       echo >>[email protected] '# Several locations for mod_authz_svn test follow'
+       echo >>[email protected] '<Location /authz-test-work/anon>'
+       echo >>[email protected] '  DAV               svn'
+       echo >>[email protected] '  SVNParentPath     
$(SVN_WC)/subversion/tests/cmdline/svn-test-work/local_tmp'
+       echo >>[email protected] '  AuthzSVNAccessFile 
$(SVN_WC)/subversion/tests/cmdline/svn-test-work/authz'
+ifeq ($(USE_HTTPV1),yes)
+       echo >>[email protected] '    SVNAdvertiseV2Protocol off'
+endif
+       echo >>[email protected] '  SVNListParentPath On'
+       echo >>[email protected] '  <IfModule mod_authz_core.c>'
+       echo >>[email protected] '    Require all granted'
+       echo >>[email protected] '  </IfModule>'
+       echo >>[email protected] '  <IfModule !mod_authz_core.c>'
+       echo >>[email protected] '    Allow from all'
+       echo >>[email protected] '  </IfModule>'
+ifeq ($(USE_AUTHZ_SHORT_CIRCUIT),yes)
+       echo >>[email protected] '    SVNPathAuthz short_circuit'
+endif
+       echo >>[email protected] '</Location>'
+       echo >>[email protected] '<Location /authz-test-work/mixed>'
+       echo >>[email protected] '  DAV               svn'
+       echo >>[email protected] '  SVNParentPath     
$(SVN_WC)/subversion/tests/cmdline/svn-test-work/local_tmp'
+       echo >>[email protected] '  AuthzSVNAccessFile 
$(SVN_WC)/subversion/tests/cmdline/svn-test-work/authz'
+ifeq ($(USE_HTTPV1),yes)
+       echo >>[email protected] '    SVNAdvertiseV2Protocol off'
+endif
+       echo >>[email protected] '  SVNListParentPath On'
+       echo >>[email protected] '  AuthType          Basic'
+       echo >>[email protected] '  AuthName          "Subversion Repository"'
+       echo >>[email protected] '  AuthUserFile      $(HTTPD_CHECK_USERS)'
+       echo >>[email protected] '  Require           valid-user'
+       echo >>[email protected] '  Satisfy Any'
+ifeq ($(USE_AUTHZ_SHORT_CIRCUIT),yes)
+       echo >>[email protected] '    SVNPathAuthz short_circuit'
+endif
+       echo >>[email protected] '</Location>'
+       echo >>[email protected] '<Location /authz-test-work/mixed-noauthwhenanon>'
+       echo >>[email protected] '  DAV               svn'
+       echo >>[email protected] '  SVNParentPath     
$(SVN_WC)/subversion/tests/cmdline/svn-test-work/local_tmp'
+       echo >>[email protected] '  AuthzSVNAccessFile 
$(SVN_WC)/subversion/tests/cmdline/svn-test-work/authz'
+ifeq ($(USE_HTTPV1),yes)
+       echo >>[email protected] '    SVNAdvertiseV2Protocol off'
+endif
+       echo >>[email protected] '  SVNListParentPath On'
+       echo >>[email protected] '  AuthType          Basic'
+       echo >>[email protected] '  AuthName          "Subversion Repository"'
+       echo >>[email protected] '  AuthUserFile      $(HTTPD_CHECK_USERS)'
+       echo >>[email protected] '  Require           valid-user'
+       echo >>[email protected] '  AuthzSVNNoAuthWhenAnonymousAllowed On'
+       echo >>[email protected] '  SVNPathAuthz On'
+ifeq ($(USE_AUTHZ_SHORT_CIRCUIT),yes)
+       echo >>[email protected] '    SVNPathAuthz short_circuit'
+endif
+       echo >>[email protected] '</Location>'
+       echo >>[email protected] '<Location /authz-test-work/authn>'
+       echo >>[email protected] '  DAV               svn'
+       echo >>[email protected] '  SVNParentPath     
$(SVN_WC)/subversion/tests/cmdline/svn-test-work/local_tmp'
+       echo >>[email protected] '  AuthzSVNAccessFile 
$(SVN_WC)/subversion/tests/cmdline/svn-test-work/authz'
+ifeq ($(USE_HTTPV1),yes)
+       echo >>[email protected] '    SVNAdvertiseV2Protocol off'
+endif
+       echo >>[email protected] '  SVNListParentPath On'
+       echo >>[email protected] '  AuthType          Basic'
+       echo >>[email protected] '  AuthName          "Subversion Repository"'
+       echo >>[email protected] '  AuthUserFile      $(HTTPD_CHECK_USERS)'
+       echo >>[email protected] '  Require           valid-user'
+ifeq ($(USE_AUTHZ_SHORT_CIRCUIT),yes)
+       echo >>[email protected] '    SVNPathAuthz short_circuit'
+endif
+       echo >>[email protected] '</Location>'
+       echo >>[email protected] '<Location /authz-test-work/authn-anonoff>'
+       echo >>[email protected] '  DAV               svn'
+       echo >>[email protected] '  SVNParentPath     
$(SVN_WC)/subversion/tests/cmdline/svn-test-work/local_tmp'
+       echo >>[email protected] '  AuthzSVNAccessFile 
$(SVN_WC)/subversion/tests/cmdline/svn-test-work/authz'
+ifeq ($(USE_HTTPV1),yes)
+       echo >>[email protected] '    SVNAdvertiseV2Protocol off'
+endif
+       echo >>[email protected] '  SVNListParentPath On'
+       echo >>[email protected] '  AuthType          Basic'
+       echo >>[email protected] '  AuthName          "Subversion Repository"'
+       echo >>[email protected] '  AuthUserFile      $(HTTPD_CHECK_USERS)'
+       echo >>[email protected] '  Require           valid-user'
+       echo >>[email protected] '  AuthzSVNAnonymous Off'
+       echo >>[email protected] '  SVNPathAuthz On'
+       echo >>[email protected] '</Location>'
+       echo >>[email protected] '<Location /authz-test-work/authn-lcuser>'
+       echo >>[email protected] '  DAV               svn'
+       echo >>[email protected] '  SVNParentPath     
$(SVN_WC)/subversion/tests/cmdline/svn-test-work/local_tmp'
+       echo >>[email protected] '  AuthzSVNAccessFile 
$(SVN_WC)/subversion/tests/cmdline/svn-test-work/authz'
+ifeq ($(USE_HTTPV1),yes)
+       echo >>[email protected] '    SVNAdvertiseV2Protocol off'
+endif
+       echo >>[email protected] '  SVNListParentPath On'
+       echo >>[email protected] '  AuthType          Basic'
+       echo >>[email protected] '  AuthName          "Subversion Repository"'
+       echo >>[email protected] '  AuthUserFile      $(HTTPD_CHECK_USERS)'
+       echo >>[email protected] '  Require           valid-user'
+       echo >>[email protected] '  AuthzForceUsernameCase Lower'
+ifeq ($(USE_AUTHZ_SHORT_CIRCUIT),yes)
+       echo >>[email protected] '    SVNPathAuthz short_circuit'
+endif
+       echo >>[email protected] '</Location>'
+       echo >>[email protected] '<Location /authz-test-work/authn-group>'
+       echo >>[email protected] '  DAV               svn'
+       echo >>[email protected] '  SVNParentPath     
$(SVN_WC)/subversion/tests/cmdline/svn-test-work/local_tmp'
+       echo >>[email protected] '  AuthzSVNAccessFile 
$(SVN_WC)/subversion/tests/cmdline/svn-test-work/authz'
+ifeq ($(USE_HTTPV1),yes)
+       echo >>[email protected] '    SVNAdvertiseV2Protocol off'
+endif
+       echo >>[email protected] '  SVNListParentPath On'
+       echo >>[email protected] '  AuthType          Basic'
+       echo >>[email protected] '  AuthName          "Subversion Repository"'
+       echo >>[email protected] '  AuthUserFile      $(HTTPD_CHECK_USERS)'
+       echo >>[email protected] '  AuthGroupFile     $(HTTPD_CHECK_GROUPS)'
+       echo >>[email protected] '  Require           group random'
+       echo >>[email protected] '  AuthzSVNAuthoritative Off'
+       echo >>[email protected] '  SVNPathAuthz On'
+       echo >>[email protected] '</Location>'
+       echo >>[email protected] '<IfModule mod_authz_core.c>'
+       echo >>[email protected] '  <Location /authz-test-work/sallrany>'
+       echo >>[email protected] '    DAV               svn'
+       echo >>[email protected] '    SVNParentPath     
$($SVN_WC)/subversion/tests/cmdline/svn-test-work/local_tmp'
+       echo >>[email protected] '    AuthzSVNAccessFile 
$(SVN_WC)/subversion/tests/cmdline/svn-test-work/authz'
+ifeq ($(USE_HTTPV1),yes)
+       echo >>[email protected] '    SVNAdvertiseV2Protocol off'
+endif
+       echo >>[email protected] '    SVNListParentPath On'
+       echo >>[email protected] '    AuthType          Basic'
+       echo >>[email protected] '    AuthName          "Subversion Repository"'
+       echo >>[email protected] '    AuthUserFile      $(HTTPD_CHECK_USERS)'
+       echo >>[email protected] '    AuthzSendForbiddenOnFailure On'
+       echo >>[email protected] '    Satisfy All'
+       echo >>[email protected] '    <RequireAny>'
+       echo >>[email protected] '      Require valid-user'
+       echo >>[email protected] '      Require expr req("ALLOW") == "1"'
+       echo >>[email protected] '    </RequireAny>'
+ifeq ($(USE_AUTHZ_SHORT_CIRCUIT),yes)
+       echo >>[email protected] '    SVNPathAuthz short_circuit'
+endif
+       echo >>[email protected] '  </Location>'
+       echo >>[email protected] '  <Location /authz-test-work/sallrall>'
+       echo >>[email protected] '    DAV               svn'
+       echo >>[email protected] '    SVNParentPath     
$(SVN_WC)/subversion/tests/cmdline/svn-test-work/local_tmp'
+       echo >>[email protected] '    AuthzSVNAccessFile 
$(SVN_WC)/subversion/tests/cmdline/svn-test-work/authz'
+ifeq ($(USE_HTTPV1),yes)
+       echo >>[email protected] '    SVNAdvertiseV2Protocol off'
+endif
+       echo >>[email protected] '    SVNListParentPath On'
+       echo >>[email protected] '    AuthType          Basic'
+       echo >>[email protected] '    AuthName          "Subversion Repository"'
+       echo >>[email protected] '    AuthUserFile      $(HTTPD_CHECK_USERS)'
+       echo >>[email protected] '    AuthzSendForbiddenOnFailure On'
+       echo >>[email protected] '    Satisfy All'
+       echo >>[email protected] '    <RequireAll>'
+       echo >>[email protected] '      Require valid-user'
+       echo >>[email protected] '      Require expr req("ALLOW") == "1"'
+       echo >>[email protected] '    </RequireAll>'
+ifeq ($(USE_AUTHZ_SHORT_CIRCUIT),yes)
+       echo >>[email protected] '    SVNPathAuthz short_circuit'
+endif
+       echo >>[email protected] '  </Location>'
+       echo >>[email protected] '</IfModule>'
        echo >>[email protected] 'RedirectMatch permanent 
^/svn-test-work/repositories/REDIRECT-PERM-(.*)$$ 
/svn-test-work/repositories/$$1'
        echo >>[email protected] 'RedirectMatch 
^/svn-test-work/repositories/REDIRECT-TEMP-(.*)$$ 
/svn-test-work/repositories/$$1'
        echo >>[email protected] 'Include "conf/$(SVN_REL_WC)*-custom.conf"'

Modified: subversion/branches/reuse-ra-session/tools/dist/backport.pl
URL: 
http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/tools/dist/backport.pl?rev=1702504&r1=1702503&r2=1702504&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/tools/dist/backport.pl (original)
+++ subversion/branches/reuse-ra-session/tools/dist/backport.pl Fri Sep 11 
15:51:30 2015
@@ -245,7 +245,7 @@ sub nominate_usage {
   print <<EOF;
 nominate.pl: a tool for adding entries to STATUS.
 
-Usage: $0 "foo r42 bar r43 qux 45." "\$Some_justification"
+Usage: $0 "r42, r43, r45" "\$Some_justification"
 
 Will add:
  * r42, r43, r45
@@ -256,6 +256,15 @@ Will add:
      +1: $availid
 to STATUS.  Backport branches are detected automatically.
 
+The revisions argument may contain arbitrary text (besides the revision
+numbers); it will be ignored.  For example,
+    $0 "Committed revision 42." "\$Some_justification"
+will nominate r42.
+
+The justification can be an arbitrarily-long string; if it is wider than the
+available width, this script will wrap it for you (and allow you to review
+the result before committing).
+
 The STATUS file in the current directory is used (unless argv[0] is "n", in
 which case the STATUS file in the directory of argv[0] is used; the intent
 is to create a symlink named "n" in the branch wc root).

Modified: subversion/branches/reuse-ra-session/tools/dist/rat-excludes
URL: 
http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/tools/dist/rat-excludes?rev=1702504&r1=1702503&r2=1702504&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/tools/dist/rat-excludes (original)
+++ subversion/branches/reuse-ra-session/tools/dist/rat-excludes Fri Sep 11 
15:51:30 2015
@@ -32,7 +32,7 @@ subversion/bindings/ctypes-python/csvn/e
 subversion/tests/cmdline/svntest/err.py
 tools/buildbot/master/public_html/buildbot.css
 tools/dist/rat-excludes
-tools/dist/_gnupg.py
+tools/dist/security/_gnupg.py
 tools/dist/templates/*.ezt
 tools/dev/iz/defect.dem
 tools/dev/iz/ff2csv.command

Modified: subversion/branches/reuse-ra-session/tools/dist/release.py
URL: 
http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/tools/dist/release.py?rev=1702504&r1=1702503&r2=1702504&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/tools/dist/release.py (original)
+++ subversion/branches/reuse-ra-session/tools/dist/release.py Fri Sep 11 
15:51:30 2015
@@ -34,9 +34,6 @@
 # It'd be kind of nice to use the Subversion python bindings in this script,
 # but people.apache.org doesn't currently have them installed
 
-# Futures (Python 2.5 compatibility)
-from __future__ import with_statement
-
 # Stuff we need
 import os
 import re
@@ -86,12 +83,12 @@ except AttributeError:
 tool_versions = {
   'trunk' : {
             'autoconf' : '2.69',
-            'libtool'  : '2.4.3',
+            'libtool'  : '2.4.6',
             'swig'     : '2.0.12',
   },
   '1.9' : {
             'autoconf' : '2.69',
-            'libtool'  : '2.4.3',
+            'libtool'  : '2.4.6',
             'swig'     : '2.0.12'
   },
   '1.8' : {
@@ -356,6 +353,13 @@ class LibtoolDep(RollDep):
         # system libtool (I'm looking at you, Debian).
         return False
 
+    def build(self):
+        RollDep.build(self)
+        # autogen.sh looks for glibtoolize before libtoolize
+        bin_dir = os.path.join(get_prefix(self._base_dir), "bin")
+        os.symlink("libtoolize", os.path.join(bin_dir, "glibtoolize"))
+        os.symlink("libtool", os.path.join(bin_dir, "glibtool"))
+
 
 class SwigDep(RollDep):
     def __init__(self, base_dir, use_existing, verbose, swig_ver, sf_mirror):
@@ -799,7 +803,7 @@ def get_siginfo(args, quiet=False):
     try:
         import gnupg
     except ImportError:
-        import _gnupg as gnupg
+        import security._gnupg as gnupg
     gpg = gnupg.GPG()
 
     target = get_target(args)

Modified: subversion/branches/reuse-ra-session/tools/dist/templates/rc-news.ezt
URL: 
http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/tools/dist/templates/rc-news.ezt?rev=1702504&r1=1702503&r2=1702504&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/tools/dist/templates/rc-news.ezt 
(original)
+++ subversion/branches/reuse-ra-session/tools/dist/templates/rc-news.ezt Fri 
Sep 11 15:51:30 2015
@@ -16,7 +16,7 @@
    in the [version_base] release.</p> 
  
 <p>To get this release from the nearest mirror, please visit our
-   <a href="/download/#[anchor]">download page</a>.</p> 
+   <a href="/download.cgi#[anchor]">download page</a>.</p> 
  
 </div> <!-- #news-[date] --> 
 

Modified: 
subversion/branches/reuse-ra-session/tools/dist/templates/rc-release-ann.ezt
URL: 
http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/tools/dist/templates/rc-release-ann.ezt?rev=1702504&r1=1702503&r2=1702504&view=diff
==============================================================================
--- 
subversion/branches/reuse-ra-session/tools/dist/templates/rc-release-ann.ezt 
(original)
+++ 
subversion/branches/reuse-ra-session/tools/dist/templates/rc-release-ann.ezt 
Fri Sep 11 15:51:30 2015
@@ -1,7 +1,7 @@
 I'm happy to announce the release of Apache Subversion [version].
 Please choose the mirror closest to you by visiting:
 
-    http://subversion.apache.org/download/#[anchor]
+    http://subversion.apache.org/download.cgi#[anchor]
 
 The SHA1 checksums are:
 

Modified: 
subversion/branches/reuse-ra-session/tools/dist/templates/stable-news.ezt
URL: 
http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/tools/dist/templates/stable-news.ezt?rev=1702504&r1=1702503&r2=1702504&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/tools/dist/templates/stable-news.ezt 
(original)
+++ subversion/branches/reuse-ra-session/tools/dist/templates/stable-news.ezt 
Fri Sep 11 15:51:30 2015
@@ -13,7 +13,7 @@
    >change log</a> for more information about this release.</p> 
  
 <p>To get this release from the nearest mirror, please visit our
-   <a href="/download/#[anchor]">download page</a>.</p> 
+   <a href="/download.cgi#[anchor]">download page</a>.</p> 
  
 </div> <!-- #news-[date] --> 
 

Modified: 
subversion/branches/reuse-ra-session/tools/dist/templates/stable-release-ann.ezt
URL: 
http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/tools/dist/templates/stable-release-ann.ezt?rev=1702504&r1=1702503&r2=1702504&view=diff
==============================================================================
--- 
subversion/branches/reuse-ra-session/tools/dist/templates/stable-release-ann.ezt
 (original)
+++ 
subversion/branches/reuse-ra-session/tools/dist/templates/stable-release-ann.ezt
 Fri Sep 11 15:51:30 2015
@@ -1,7 +1,7 @@
 I'm happy to announce the release of Apache Subversion [version].
 Please choose the mirror closest to you by visiting:
 
-    http://subversion.apache.org/download/#[anchor]
+    http://subversion.apache.org/download.cgi#[anchor]
 
 The SHA1 checksums are:
 

Modified: subversion/branches/reuse-ra-session/win-tests.py
URL: 
http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/win-tests.py?rev=1702504&r1=1702503&r2=1702504&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/win-tests.py (original)
+++ subversion/branches/reuse-ra-session/win-tests.py Fri Sep 11 15:51:30 2015
@@ -490,6 +490,7 @@ class Httpd:
     self.httpd_config = os.path.join(self.root, 'httpd.conf')
     self.httpd_users = os.path.join(self.root, 'users')
     self.httpd_mime_types = os.path.join(self.root, 'mime.types')
+    self.httpd_groups = os.path.join(self.root, 'groups')
     self.abs_builddir = abs_builddir
     self.abs_objdir = abs_objdir
     self.service_name = 'svn-test-httpd-' + str(httpd_port)
@@ -503,6 +504,7 @@ class Httpd:
     create_target_dir(self.root_dir)
 
     self._create_users_file()
+    self._create_groups_file()
     self._create_mime_types_file()
     self._create_dontdothat_file()
 
@@ -543,6 +545,8 @@ class Httpd:
     if self.httpd_ver >= 2.2:
       fp.write(self._sys_module('auth_basic_module', 'mod_auth_basic.so'))
       fp.write(self._sys_module('authn_file_module', 'mod_authn_file.so'))
+      fp.write(self._sys_module('authz_groupfile_module', 
'mod_authz_groupfile.so'))
+      fp.write(self._sys_module('authz_host_module', 'mod_authz_host.so'))
     else:
       fp.write(self._sys_module('auth_module', 'mod_auth.so'))
     fp.write(self._sys_module('alias_module', 'mod_alias.so'))
@@ -565,6 +569,7 @@ class Httpd:
     # Define two locations for repositories
     fp.write(self._svn_repo('repositories'))
     fp.write(self._svn_repo('local_tmp'))
+    fp.write(self._svn_authz_repo())
 
     # And two redirects for the redirect tests
     fp.write('RedirectMatch permanent ^/svn-test-work/repositories/'
@@ -597,6 +602,17 @@ class Httpd:
                                     'jconstant', 'rayjandom'])
     os.spawnv(os.P_WAIT, htpasswd, ['htpasswd.exe', '-bp',  self.httpd_users,
                                     '__dumpster__', '__loadster__'])
+    os.spawnv(os.P_WAIT, htpasswd, ['htpasswd.exe', '-bp',  self.httpd_users,
+                                    'JRANDOM', 'rayjandom'])
+    os.spawnv(os.P_WAIT, htpasswd, ['htpasswd.exe', '-bp',  self.httpd_users,
+                                    'JCONSTANT', 'rayjandom'])
+
+  def _create_groups_file(self):
+    "Create groups for mod_authz_svn tests"
+    fp = open(self.httpd_groups, 'w')
+    fp.write('random: jrandom\n')
+    fp.write('constant: jconstant\n')
+    fp.close()
 
   def _create_mime_types_file(self):
     "Create empty mime.types file"
@@ -657,6 +673,153 @@ class Httpd:
       '  DontDoThatConfigFile ' + self._quote(self.dontdothat_file) + '\n' \
       '</Location>\n'
 
+  def _svn_authz_repo(self):
+    local_tmp = os.path.join(self.abs_builddir,
+                             CMDLINE_TEST_SCRIPT_NATIVE_PATH,
+                             'svn-test-work', 'local_tmp')
+    return \
+      '<Location /authz-test-work/anon>' + '\n' \
+      '  DAV               svn' + '\n' \
+      '  SVNParentPath     ' + local_tmp + '\n' \
+      '  AuthzSVNAccessFile ' + self._quote(self.authz_file) + '\n' \
+      '  SVNAdvertiseV2Protocol ' + self.httpv2_option + '\n' \
+      '  SVNListParentPath On' + '\n' \
+      '  <IfModule mod_authz_core.c>' + '\n' \
+      '    Require all granted' + '\n' \
+      '  </IfModule>' + '\n' \
+      '  <IfModule !mod_authz_core.c>' + '\n' \
+      '    Allow from all' + '\n' \
+      '  </IfModule>' + '\n' \
+      '  SVNPathAuthz ' + self.path_authz_option + '\n' \
+      '</Location>' + '\n' \
+      '<Location /authz-test-work/mixed>' + '\n' \
+      '  DAV               svn' + '\n' \
+      '  SVNParentPath     ' + local_tmp + '\n' \
+      '  AuthzSVNAccessFile ' + self._quote(self.authz_file) + '\n' \
+      '  SVNAdvertiseV2Protocol ' + self.httpv2_option + '\n' \
+      '  SVNListParentPath On' + '\n' \
+      '  AuthType          Basic' + '\n' \
+      '  AuthName          "Subversion Repository"' + '\n' \
+      '  AuthUserFile    ' + self._quote(self.httpd_users) + '\n' \
+      '  Require           valid-user' + '\n' \
+      '  Satisfy Any' + '\n' \
+      '  SVNPathAuthz ' + self.path_authz_option + '\n' \
+      '</Location>' + '\n' \
+      '<Location /authz-test-work/mixed-noauthwhenanon>' + '\n' \
+      '  DAV               svn' + '\n' \
+      '  SVNParentPath     ' + local_tmp + '\n' \
+      '  AuthzSVNAccessFile ' + self._quote(self.authz_file) + '\n' \
+      '  SVNAdvertiseV2Protocol ' + self.httpv2_option + '\n' \
+      '  SVNListParentPath On' + '\n' \
+      '  AuthType          Basic' + '\n' \
+      '  AuthName          "Subversion Repository"' + '\n' \
+      '  AuthUserFile    ' + self._quote(self.httpd_users) + '\n' \
+      '  Require           valid-user' + '\n' \
+      '  AuthzSVNNoAuthWhenAnonymousAllowed On' + '\n' \
+      '  SVNPathAuthz On' + '\n' \
+      '</Location>' + '\n' \
+      '<Location /authz-test-work/authn>' + '\n' \
+      '  DAV               svn' + '\n' \
+      '  SVNParentPath     ' + local_tmp + '\n' \
+      '  AuthzSVNAccessFile ' + self._quote(self.authz_file) + '\n' \
+      '  SVNAdvertiseV2Protocol ' + self.httpv2_option + '\n' \
+      '  SVNListParentPath On' + '\n' \
+      '  AuthType          Basic' + '\n' \
+      '  AuthName          "Subversion Repository"' + '\n' \
+      '  AuthUserFile    ' + self._quote(self.httpd_users) + '\n' \
+      '  Require           valid-user' + '\n' \
+      '  SVNPathAuthz ' + self.path_authz_option + '\n' \
+      '</Location>' + '\n' \
+      '<Location /authz-test-work/authn-anonoff>' + '\n' \
+      '  DAV               svn' + '\n' \
+      '  SVNParentPath     ' + local_tmp + '\n' \
+      '  AuthzSVNAccessFile ' + self._quote(self.authz_file) + '\n' \
+      '  SVNAdvertiseV2Protocol ' + self.httpv2_option + '\n' \
+      '  SVNListParentPath On' + '\n' \
+      '  AuthType          Basic' + '\n' \
+      '  AuthName          "Subversion Repository"' + '\n' \
+      '  AuthUserFile    ' + self._quote(self.httpd_users) + '\n' \
+      '  Require           valid-user' + '\n' \
+      '  AuthzSVNAnonymous Off' + '\n' \
+      '  SVNPathAuthz On' + '\n' \
+      '</Location>' + '\n' \
+      '<Location /authz-test-work/authn-lcuser>' + '\n' \
+      '  DAV               svn' + '\n' \
+      '  SVNParentPath     ' + local_tmp + '\n' \
+      '  AuthzSVNAccessFile ' + self._quote(self.authz_file) + '\n' \
+      '  SVNAdvertiseV2Protocol ' + self.httpv2_option + '\n' \
+      '  SVNListParentPath On' + '\n' \
+      '  AuthType          Basic' + '\n' \
+      '  AuthName          "Subversion Repository"' + '\n' \
+      '  AuthUserFile    ' + self._quote(self.httpd_users) + '\n' \
+      '  Require           valid-user' + '\n' \
+      '  AuthzForceUsernameCase Lower' + '\n' \
+      '  SVNPathAuthz ' + self.path_authz_option + '\n' \
+      '</Location>' + '\n' \
+      '<Location /authz-test-work/authn-lcuser>' + '\n' \
+      '  DAV               svn' + '\n' \
+      '  SVNParentPath     ' + local_tmp + '\n' \
+      '  AuthzSVNAccessFile ' + self._quote(self.authz_file) + '\n' \
+      '  SVNAdvertiseV2Protocol ' + self.httpv2_option + '\n' \
+      '  SVNListParentPath On' + '\n' \
+      '  AuthType          Basic' + '\n' \
+      '  AuthName          "Subversion Repository"' + '\n' \
+      '  AuthUserFile    ' + self._quote(self.httpd_users) + '\n' \
+      '  Require           valid-user' + '\n' \
+      '  AuthzForceUsernameCase Lower' + '\n' \
+      '  SVNPathAuthz ' + self.path_authz_option + '\n' \
+      '</Location>' + '\n' \
+      '<Location /authz-test-work/authn-group>' + '\n' \
+      '  DAV               svn' + '\n' \
+      '  SVNParentPath     ' + local_tmp + '\n' \
+      '  AuthzSVNAccessFile ' + self._quote(self.authz_file) + '\n' \
+      '  SVNAdvertiseV2Protocol ' + self.httpv2_option + '\n' \
+      '  SVNListParentPath On' + '\n' \
+      '  AuthType          Basic' + '\n' \
+      '  AuthName          "Subversion Repository"' + '\n' \
+      '  AuthUserFile    ' + self._quote(self.httpd_users) + '\n' \
+      '  AuthGroupFile    ' + self._quote(self.httpd_groups) + '\n' \
+      '  Require           group random' + '\n' \
+      '  AuthzSVNAuthoritative Off' + '\n' \
+      '  SVNPathAuthz On' + '\n' \
+      '</Location>' + '\n' \
+      '<IfModule mod_authz_core.c>' + '\n' \
+      '<Location /authz-test-work/sallrany>' + '\n' \
+      '  DAV               svn' + '\n' \
+      '  SVNParentPath     ' + local_tmp + '\n' \
+      '  AuthzSVNAccessFile ' + self._quote(self.authz_file) + '\n' \
+      '  SVNAdvertiseV2Protocol ' + self.httpv2_option + '\n' \
+      '  SVNListParentPath On' + '\n' \
+      '  AuthType          Basic' + '\n' \
+      '  AuthName          "Subversion Repository"' + '\n' \
+      '  AuthUserFile    ' + self._quote(self.httpd_users) + '\n' \
+      '  AuthzSendForbiddenOnFailure On' + '\n' \
+      '  Satisfy All' + '\n' \
+      '  <RequireAny>' + '\n' \
+      '    Require valid-user' + '\n' \
+      '    Require expr req(\'ALLOW\') == \'1\'' + '\n' \
+      '  </RequireAny>' + '\n' \
+      '  SVNPathAuthz ' + self.path_authz_option + '\n' \
+      '</Location>' + '\n' \
+      '<Location /authz-test-work/sallrall>'+ '\n' \
+      '  DAV               svn' + '\n' \
+      '  SVNParentPath     ' + local_tmp + '\n' \
+      '  AuthzSVNAccessFile ' + self._quote(self.authz_file) + '\n' \
+      '  SVNAdvertiseV2Protocol ' + self.httpv2_option + '\n' \
+      '  SVNListParentPath On' + '\n' \
+      '  AuthType          Basic' + '\n' \
+      '  AuthName          "Subversion Repository"' + '\n' \
+      '  AuthUserFile    ' + self._quote(self.httpd_users) + '\n' \
+      '  AuthzSendForbiddenOnFailure On' + '\n' \
+      '  Satisfy All' + '\n' \
+      '  <RequireAll>' + '\n' \
+      '    Require valid-user' + '\n' \
+      '    Require expr req(\'ALLOW\') == \'1\'' + '\n' \
+      '  </RequireAll>' + '\n' \
+      '  SVNPathAuthz ' + self.path_authz_option + '\n' \
+      '</Location>' + '\n' \
+      '</IfModule>' + '\n' \
+
   def start(self):
     if self.service:
       self._start_service()
@@ -826,20 +989,36 @@ if not test_javahl and not test_swig:
     log_file = os.path.join(abs_builddir, log)
     fail_log_file = os.path.join(abs_builddir, faillog)
 
+  if run_httpd:
+    httpd_version = gen_obj._libraries['httpd'].version
+  else:
+    httpd_version = None
+
+  opts, args = run_tests.create_parser().parse_args([])
+  opts.url = base_url
+  opts.fs_type = fs_type
+  opts.http_library = 'serf'
+  opts.server_minor_version = server_minor_version
+  opts.verbose = not quiet
+  opts.cleanup = cleanup
+  opts.enable_sasl = enable_sasl
+  opts.parallel = parallel
+  opts.config_file = config_file
+  opts.fsfs_sharding = fsfs_sharding
+  opts.fsfs_packing = fsfs_packing
+  opts.list_tests = list_tests
+  opts.svn_bin = svn_bin
+  opts.mode_filter = mode_filter
+  opts.milestone_filter = milestone_filter
+  opts.httpd_version = httpd_version
+  opts.set_log_level = log_level
+  opts.ssl_cert = ssl_cert
+  opts.exclusive_wc_locks = exclusive_wc_locks
+  opts.memcached_server = memcached_server
+  opts.skip_c_tests = skip_c_tests
+  opts.dump_load_cross_check = dump_load_cross_check
   th = run_tests.TestHarness(abs_srcdir, abs_builddir,
-                             log_file,
-                             fail_log_file,
-                             base_url, fs_type, 'serf',
-                             server_minor_version, not quiet,
-                             cleanup, enable_sasl, parallel, config_file,
-                             fsfs_sharding, fsfs_packing,
-                             list_tests, svn_bin, mode_filter,
-                             milestone_filter,
-                             set_log_level=log_level, ssl_cert=ssl_cert,
-                             exclusive_wc_locks=exclusive_wc_locks,
-                             memcached_server=memcached_server,
-                             skip_c_tests=skip_c_tests,
-                             dump_load_cross_check=dump_load_cross_check)
+                             log_file, fail_log_file, opts)
   old_cwd = os.getcwd()
   try:
     os.chdir(abs_builddir)


Reply via email to