subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From prabh...@apache.org
Subject svn commit: r1489765 [18/22] - in /subversion/branches/verify-keep-going: ./ build/ build/ac-macros/ build/generator/ build/generator/templates/ contrib/hook-scripts/ contrib/server-side/fsfsfixer/ contrib/server-side/fsfsfixer/fixer/ notes/ subversion...
Date Wed, 05 Jun 2013 09:22:51 GMT
Modified: subversion/branches/verify-keep-going/subversion/svnserve/serve.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/svnserve/serve.c?rev=1489765&r1=1489764&r2=1489765&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/svnserve/serve.c (original)
+++ subversion/branches/verify-keep-going/subversion/svnserve/serve.c Wed Jun  5 09:22:43 2013
@@ -191,10 +191,10 @@ log_fail_and_flush(svn_error_t *err, ser
   svn_error_t *io_err;
 
   log_server_error(err, server, conn, pool);
-  io_err = svn_ra_svn_write_cmd_failure(conn, pool, err);
+  io_err = svn_ra_svn__write_cmd_failure(conn, pool, err);
   svn_error_clear(err);
   SVN_ERR(io_err);
-  return svn_ra_svn_flush(conn, pool);
+  return svn_ra_svn__flush(conn, pool);
 }
 
 /* Log a client command. */
@@ -246,7 +246,7 @@ log_authz_denied(const char *path,
   timestr = svn_time_to_cstring(apr_time_now(), pool);
   remote_host = svn_ra_svn_conn_remote_host(conn);
 
-  line = apr_psprintf(pool, "%" APR_PID_T_FMT 
+  line = apr_psprintf(pool, "%" APR_PID_T_FMT
                       " %s %s %s %s Authorization Failed %s%s %s" APR_EOL_STR,
                       getpid(), timestr,
                       (remote_host ? remote_host : "-"),
@@ -276,7 +276,8 @@ svn_error_t *load_pwdb_config(server_bat
       pwdb_path = svn_dirent_internal_style(pwdb_path, pool);
       pwdb_path = svn_dirent_join(server->base, pwdb_path, pool);
 
-      err = svn_config_read2(&server->pwdb, pwdb_path, TRUE, FALSE, pool);
+      err = svn_config_read3(&server->pwdb, pwdb_path, TRUE,
+                             FALSE, FALSE, pool);
       if (err)
         {
           log_server_error(err, server, conn, pool);
@@ -312,7 +313,7 @@ svn_error_t *load_pwdb_config(server_bat
  * placed in *ACCESS_FILE.  SERVER baton is used to convert relative paths to
  * absolute paths rooted at the server root.  REPOS_ROOT is used to calculate
  * an absolute URL for repos-relative URLs. */
-static svn_error_t * 
+static svn_error_t *
 canonicalize_access_file(const char **access_file, server_baton_t *server,
                          const char *repos_root, apr_pool_t *pool)
 {
@@ -563,11 +564,11 @@ static svn_error_t *send_mechs(svn_ra_sv
                                svn_boolean_t needs_username)
 {
   if (!needs_username && get_access(b, UNAUTHENTICATED) >= required)
-    SVN_ERR(svn_ra_svn_write_word(conn, pool, "ANONYMOUS"));
+    SVN_ERR(svn_ra_svn__write_word(conn, pool, "ANONYMOUS"));
   if (b->tunnel_user && get_access(b, AUTHENTICATED) >= required)
-    SVN_ERR(svn_ra_svn_write_word(conn, pool, "EXTERNAL"));
+    SVN_ERR(svn_ra_svn__write_word(conn, pool, "EXTERNAL"));
   if (b->pwdb && get_access(b, AUTHENTICATED) >= required)
-    SVN_ERR(svn_ra_svn_write_word(conn, pool, "CRAM-MD5"));
+    SVN_ERR(svn_ra_svn__write_word(conn, pool, "CRAM-MD5"));
   return SVN_NO_ERROR;
 }
 
@@ -640,10 +641,10 @@ static svn_error_t *auth(svn_ra_svn_conn
       && b->tunnel_user && strcmp(mech, "EXTERNAL") == 0)
     {
       if (*mecharg && strcmp(mecharg, b->tunnel_user) != 0)
-        return svn_ra_svn_write_tuple(conn, pool, "w(c)", "failure",
-                                      "Requested username does not match");
+        return svn_ra_svn__write_tuple(conn, pool, "w(c)", "failure",
+                                       "Requested username does not match");
       b->user = b->tunnel_user;
-      SVN_ERR(svn_ra_svn_write_tuple(conn, pool, "w()", "success"));
+      SVN_ERR(svn_ra_svn__write_tuple(conn, pool, "w()", "success"));
       *success = TRUE;
       return SVN_NO_ERROR;
     }
@@ -651,7 +652,7 @@ static svn_error_t *auth(svn_ra_svn_conn
   if (get_access(b, UNAUTHENTICATED) >= required
       && strcmp(mech, "ANONYMOUS") == 0 && ! needs_username)
     {
-      SVN_ERR(svn_ra_svn_write_tuple(conn, pool, "w()", "success"));
+      SVN_ERR(svn_ra_svn__write_tuple(conn, pool, "w()", "success"));
       *success = TRUE;
       return SVN_NO_ERROR;
     }
@@ -664,7 +665,7 @@ static svn_error_t *auth(svn_ra_svn_conn
       return SVN_NO_ERROR;
     }
 
-  return svn_ra_svn_write_tuple(conn, pool, "w(c)", "failure",
+  return svn_ra_svn__write_tuple(conn, pool, "w(c)", "failure",
                                 "Must authenticate with listed mechanism");
 }
 
@@ -677,12 +678,12 @@ internal_auth_request(svn_ra_svn_conn_t 
   svn_boolean_t success;
   const char *mech, *mecharg;
 
-  SVN_ERR(svn_ra_svn_write_tuple(conn, pool, "w((!", "success"));
+  SVN_ERR(svn_ra_svn__write_tuple(conn, pool, "w((!", "success"));
   SVN_ERR(send_mechs(conn, pool, b, required, needs_username));
-  SVN_ERR(svn_ra_svn_write_tuple(conn, pool, "!)c)", b->realm));
+  SVN_ERR(svn_ra_svn__write_tuple(conn, pool, "!)c)", b->realm));
   do
     {
-      SVN_ERR(svn_ra_svn_read_tuple(conn, pool, "w(?c)", &mech, &mecharg));
+      SVN_ERR(svn_ra_svn__read_tuple(conn, pool, "w(?c)", &mech, &mecharg));
       if (!*mech)
         break;
       SVN_ERR(auth(conn, pool, mech, mecharg, b, required, needs_username,
@@ -715,7 +716,7 @@ static svn_error_t *auth_request(svn_ra_
 static svn_error_t *trivial_auth_request(svn_ra_svn_conn_t *conn,
                                          apr_pool_t *pool, server_baton_t *b)
 {
-  return svn_ra_svn_write_cmd_response(conn, pool, "()c", "");
+  return svn_ra_svn__write_cmd_response(conn, pool, "()c", "");
 }
 
 /* Ensure that the client has the REQUIRED access by checking the
@@ -838,7 +839,7 @@ static svn_error_t *set_path(svn_ra_svn_
   svn_depth_t depth = svn_depth_infinity;
   svn_boolean_t start_empty;
 
-  SVN_ERR(svn_ra_svn_parse_tuple(params, pool, "crb?(?c)?w",
+  SVN_ERR(svn_ra_svn__parse_tuple(params, pool, "crb?(?c)?w",
                                  &path, &rev, &start_empty, &lock_token,
                                  &depth_word));
   if (depth_word)
@@ -861,7 +862,7 @@ static svn_error_t *delete_path(svn_ra_s
   report_driver_baton_t *b = baton;
   const char *path;
 
-  SVN_ERR(svn_ra_svn_parse_tuple(params, pool, "c", &path));
+  SVN_ERR(svn_ra_svn__parse_tuple(params, pool, "c", &path));
   path = svn_relpath_canonicalize(path, pool);
   if (!b->err)
     b->err = svn_repos_delete_path(b->report_baton, path, pool);
@@ -878,7 +879,7 @@ static svn_error_t *link_path(svn_ra_svn
   /* Default to infinity, for old clients that don't send depth. */
   svn_depth_t depth = svn_depth_infinity;
 
-  SVN_ERR(svn_ra_svn_parse_tuple(params, pool, "ccrb?(?c)?w",
+  SVN_ERR(svn_ra_svn__parse_tuple(params, pool, "ccrb?(?c)?w",
                                  &path, &url, &rev, &start_empty,
                                  &lock_token, &depth_word));
 
@@ -983,7 +984,7 @@ static svn_error_t *accept_report(svn_bo
   rb.from_rev = from_rev;
   if (from_rev)
     *from_rev = SVN_INVALID_REVNUM;
-  err = svn_ra_svn_handle_commands2(conn, pool, report_commands, &rb, TRUE);
+  err = svn_ra_svn__handle_commands2(conn, pool, report_commands, &rb, TRUE);
   if (err)
     {
       /* Network or protocol error while handling commands. */
@@ -995,7 +996,7 @@ static svn_error_t *accept_report(svn_bo
       /* Some failure during the reporting or editing operations. */
       SVN_CMD_ERR(rb.err);
     }
-  SVN_ERR(svn_ra_svn_write_cmd_response(conn, pool, ""));
+  SVN_ERR(svn_ra_svn__write_cmd_response(conn, pool, ""));
 
   if (only_empty_entry)
     *only_empty_entry = rb.entry_counter == 1 && rb.only_empty_entries;
@@ -1017,8 +1018,8 @@ static svn_error_t *write_prop_diffs(svn
     {
       const svn_prop_t *prop = &APR_ARRAY_IDX(propdiffs, i, svn_prop_t);
 
-      SVN_ERR(svn_ra_svn_write_tuple(conn, pool, "c(?s)",
-                                     prop->name, prop->value));
+      SVN_ERR(svn_ra_svn__write_tuple(conn, pool, "c(?s)",
+                                      prop->name, prop->value));
     }
 
   return SVN_NO_ERROR;
@@ -1034,9 +1035,9 @@ static svn_error_t *write_lock(svn_ra_sv
   cdate = svn_time_to_cstring(lock->creation_date, pool);
   edate = lock->expiration_date
     ? svn_time_to_cstring(lock->expiration_date, pool) : NULL;
-  SVN_ERR(svn_ra_svn_write_tuple(conn, pool, "ccc(?c)c(?c)", lock->path,
-                                 lock->token, lock->owner, lock->comment,
-                                 cdate, edate));
+  SVN_ERR(svn_ra_svn__write_tuple(conn, pool, "ccc(?c)c(?c)", lock->path,
+                                  lock->token, lock->owner, lock->comment,
+                                  cdate, edate));
 
   return SVN_NO_ERROR;
 }
@@ -1098,7 +1099,7 @@ static svn_error_t *reparent(svn_ra_svn_
   const char *url;
   const char *fs_path;
 
-  SVN_ERR(svn_ra_svn_parse_tuple(params, pool, "c", &url));
+  SVN_ERR(svn_ra_svn__parse_tuple(params, pool, "c", &url));
   url = svn_uri_canonicalize(url, pool);
   SVN_ERR(trivial_auth_request(conn, pool, b));
   SVN_CMD_ERR(get_fs_path(svn_path_uri_decode(b->repos_url, pool),
@@ -1106,7 +1107,7 @@ static svn_error_t *reparent(svn_ra_svn_
                           &fs_path));
   SVN_ERR(log_command(b, conn, pool, "%s", svn_log__reparent(fs_path, pool)));
   svn_stringbuf_set(b->fs_path, fs_path);
-  SVN_ERR(svn_ra_svn_write_cmd_response(conn, pool, ""));
+  SVN_ERR(svn_ra_svn__write_cmd_response(conn, pool, ""));
   return SVN_NO_ERROR;
 }
 
@@ -1120,7 +1121,7 @@ static svn_error_t *get_latest_rev(svn_r
 
   SVN_ERR(trivial_auth_request(conn, pool, b));
   SVN_CMD_ERR(svn_fs_youngest_rev(&rev, b->fs, pool));
-  SVN_ERR(svn_ra_svn_write_cmd_response(conn, pool, "r", rev));
+  SVN_ERR(svn_ra_svn__write_cmd_response(conn, pool, "r", rev));
   return SVN_NO_ERROR;
 }
 
@@ -1132,13 +1133,13 @@ static svn_error_t *get_dated_rev(svn_ra
   apr_time_t tm;
   const char *timestr;
 
-  SVN_ERR(svn_ra_svn_parse_tuple(params, pool, "c", &timestr));
+  SVN_ERR(svn_ra_svn__parse_tuple(params, pool, "c", &timestr));
   SVN_ERR(log_command(b, conn, pool, "get-dated-rev %s", timestr));
 
   SVN_ERR(trivial_auth_request(conn, pool, b));
   SVN_CMD_ERR(svn_time_from_cstring(&tm, timestr, pool));
   SVN_CMD_ERR(svn_repos_dated_revision(&rev, b->repos, tm, pool));
-  SVN_ERR(svn_ra_svn_write_cmd_response(conn, pool, "r", rev));
+  SVN_ERR(svn_ra_svn__write_cmd_response(conn, pool, "r", rev));
   return SVN_NO_ERROR;
 }
 
@@ -1164,7 +1165,7 @@ static svn_error_t *do_change_rev_prop(s
                                             TRUE, TRUE,
                                             authz_check_access_cb_func(b), &ab,
                                             pool));
-  SVN_ERR(svn_ra_svn_write_cmd_response(conn, pool, ""));
+  SVN_ERR(svn_ra_svn__write_cmd_response(conn, pool, ""));
 
   return SVN_NO_ERROR;
 }
@@ -1180,9 +1181,9 @@ static svn_error_t *change_rev_prop2(svn
   svn_string_t *old_value;
   svn_boolean_t dont_care;
 
-  SVN_ERR(svn_ra_svn_parse_tuple(params, pool, "rc(?s)(b?s)",
-                                 &rev, &name, &value,
-                                 &dont_care, &old_value));
+  SVN_ERR(svn_ra_svn__parse_tuple(params, pool, "rc(?s)(b?s)",
+                                  &rev, &name, &value,
+                                  &dont_care, &old_value));
 
   /* Argument parsing. */
   if (dont_care)
@@ -1216,7 +1217,7 @@ static svn_error_t *change_rev_prop(svn_
 
   /* Because the revprop value was at one time mandatory, the usual
      optional element pattern "(?s)" isn't used. */
-  SVN_ERR(svn_ra_svn_parse_tuple(params, pool, "rc?s", &rev, &name, &value));
+  SVN_ERR(svn_ra_svn__parse_tuple(params, pool, "rc?s", &rev, &name, &value));
 
   SVN_ERR(do_change_rev_prop(conn, b, rev, name, NULL, value, pool));
 
@@ -1234,16 +1235,16 @@ static svn_error_t *rev_proplist(svn_ra_
   ab.server = b;
   ab.conn = conn;
 
-  SVN_ERR(svn_ra_svn_parse_tuple(params, pool, "r", &rev));
+  SVN_ERR(svn_ra_svn__parse_tuple(params, pool, "r", &rev));
   SVN_ERR(log_command(b, conn, pool, "%s", svn_log__rev_proplist(rev, pool)));
 
   SVN_ERR(trivial_auth_request(conn, pool, b));
   SVN_CMD_ERR(svn_repos_fs_revision_proplist(&props, b->repos, rev,
                                              authz_check_access_cb_func(b), &ab,
                                              pool));
-  SVN_ERR(svn_ra_svn_write_tuple(conn, pool, "w((!", "success"));
-  SVN_ERR(svn_ra_svn_write_proplist(conn, pool, props));
-  SVN_ERR(svn_ra_svn_write_tuple(conn, pool, "!))"));
+  SVN_ERR(svn_ra_svn__write_tuple(conn, pool, "w((!", "success"));
+  SVN_ERR(svn_ra_svn__write_proplist(conn, pool, props));
+  SVN_ERR(svn_ra_svn__write_tuple(conn, pool, "!))"));
   return SVN_NO_ERROR;
 }
 
@@ -1259,7 +1260,7 @@ static svn_error_t *rev_prop(svn_ra_svn_
   ab.server = b;
   ab.conn = conn;
 
-  SVN_ERR(svn_ra_svn_parse_tuple(params, pool, "rc", &rev, &name));
+  SVN_ERR(svn_ra_svn__parse_tuple(params, pool, "rc", &rev, &name));
   SVN_ERR(log_command(b, conn, pool, "%s",
                       svn_log__rev_prop(rev, name, pool)));
 
@@ -1267,7 +1268,7 @@ static svn_error_t *rev_prop(svn_ra_svn_
   SVN_CMD_ERR(svn_repos_fs_revision_prop(&value, b->repos, rev, name,
                                          authz_check_access_cb_func(b), &ab,
                                          pool));
-  SVN_ERR(svn_ra_svn_write_cmd_response(conn, pool, "(?s)", value));
+  SVN_ERR(svn_ra_svn__write_cmd_response(conn, pool, "(?s)", value));
   return SVN_NO_ERROR;
 }
 
@@ -1413,7 +1414,7 @@ static svn_error_t *commit(svn_ra_svn_co
     {
       /* Clients before 1.2 don't send lock-tokens, keep-locks,
          and rev-props fields. */
-      SVN_ERR(svn_ra_svn_parse_tuple(params, pool, "c", &log_msg));
+      SVN_ERR(svn_ra_svn__parse_tuple(params, pool, "c", &log_msg));
       lock_tokens = NULL;
       keep_locks = TRUE;
       revprop_list = NULL;
@@ -1421,9 +1422,9 @@ static svn_error_t *commit(svn_ra_svn_co
   else
     {
       /* Clients before 1.5 don't send the rev-props field. */
-      SVN_ERR(svn_ra_svn_parse_tuple(params, pool, "clb?l", &log_msg,
-                                     &lock_tokens, &keep_locks,
-                                     &revprop_list));
+      SVN_ERR(svn_ra_svn__parse_tuple(params, pool, "clb?l", &log_msg,
+                                      &lock_tokens, &keep_locks,
+                                      &revprop_list));
     }
 
   /* The handling for locks is a little problematic, because the
@@ -1441,7 +1442,7 @@ static svn_error_t *commit(svn_ra_svn_co
     SVN_CMD_ERR(add_lock_tokens(conn, lock_tokens, b, pool));
 
   if (revprop_list)
-    SVN_ERR(svn_ra_svn_parse_proplist(revprop_list, pool, &revprop_table));
+    SVN_ERR(svn_ra_svn__parse_proplist(revprop_list, pool, &revprop_table));
   else
     {
       revprop_table = apr_hash_make(pool);
@@ -1466,8 +1467,9 @@ static svn_error_t *commit(svn_ra_svn_co
                b->fs_path->data, revprop_table,
                commit_done, &ccb,
                authz_commit_cb, &ab, pool));
-  SVN_ERR(svn_ra_svn_write_cmd_response(conn, pool, ""));
-  SVN_ERR(svn_ra_svn_drive_editor(conn, pool, editor, edit_baton, &aborted));
+  SVN_ERR(svn_ra_svn__write_cmd_response(conn, pool, ""));
+  SVN_ERR(svn_ra_svn_drive_editor2(conn, pool, editor, edit_baton,
+                                   &aborted, FALSE));
   if (!aborted)
     {
       SVN_ERR(log_command(b, conn, pool, "%s",
@@ -1486,8 +1488,8 @@ static svn_error_t *commit(svn_ra_svn_co
       if (! keep_locks && lock_tokens && lock_tokens->nelts)
         SVN_ERR(unlock_paths(lock_tokens, b, conn, pool));
 
-      SVN_ERR(svn_ra_svn_write_tuple(conn, pool, "r(?c)(?c)(?c)",
-                                     new_rev, date, author, post_commit_err));
+      SVN_ERR(svn_ra_svn__write_tuple(conn, pool, "r(?c)(?c)(?c)",
+                                      new_rev, date, author, post_commit_err));
 
       if (! b->tunnel)
         SVN_ERR(svn_fs_deltify_revision(b->fs, new_rev, pool));
@@ -1519,9 +1521,9 @@ static svn_error_t *get_file(svn_ra_svn_
   ab.conn = conn;
 
   /* Parse arguments. */
-  SVN_ERR(svn_ra_svn_parse_tuple(params, pool, "c(?r)bb?B", &path, &rev,
-                                 &want_props, &want_contents,
-                                 &wants_inherited_props));
+  SVN_ERR(svn_ra_svn__parse_tuple(params, pool, "c(?r)bb?B", &path, &rev,
+                                  &want_props, &want_contents,
+                                  &wants_inherited_props));
 
   full_path = svn_fspath__join(b->fs_path->data,
                                svn_relpath_canonicalize(path, pool), pool);
@@ -1549,31 +1551,31 @@ static svn_error_t *get_file(svn_ra_svn_
     SVN_CMD_ERR(svn_fs_file_contents(&contents, root, full_path, pool));
 
   /* Send successful command response with revision and props. */
-  SVN_ERR(svn_ra_svn_write_tuple(conn, pool, "w((?c)r(!", "success",
-                                 hex_digest, rev));
-  SVN_ERR(svn_ra_svn_write_proplist(conn, pool, props));
+  SVN_ERR(svn_ra_svn__write_tuple(conn, pool, "w((?c)r(!", "success",
+                                  hex_digest, rev));
+  SVN_ERR(svn_ra_svn__write_proplist(conn, pool, props));
 
   if (wants_inherited_props)
     {
       apr_pool_t *iterpool = svn_pool_create(pool);
 
-      SVN_ERR(svn_ra_svn_write_tuple(conn, pool, "!)(?!"));
+      SVN_ERR(svn_ra_svn__write_tuple(conn, pool, "!)(?!"));
       for (i = 0; i < inherited_props->nelts; i++)
         {
           svn_prop_inherited_item_t *iprop =
             APR_ARRAY_IDX(inherited_props, i, svn_prop_inherited_item_t *);
 
           svn_pool_clear(iterpool);
-          SVN_ERR(svn_ra_svn_write_tuple(conn, iterpool, "!(c(!",
-                                         iprop->path_or_url));
-          SVN_ERR(svn_ra_svn_write_proplist(conn, iterpool, iprop->prop_hash));
-          SVN_ERR(svn_ra_svn_write_tuple(conn, iterpool, "!))!",
-                                         iprop->path_or_url));
+          SVN_ERR(svn_ra_svn__write_tuple(conn, iterpool, "!(c(!",
+                                          iprop->path_or_url));
+          SVN_ERR(svn_ra_svn__write_proplist(conn, iterpool, iprop->prop_hash));
+          SVN_ERR(svn_ra_svn__write_tuple(conn, iterpool, "!))!",
+                                          iprop->path_or_url));
         }
       svn_pool_destroy(iterpool);
     }
 
-  SVN_ERR(svn_ra_svn_write_tuple(conn, pool, "!))"));
+  SVN_ERR(svn_ra_svn__write_tuple(conn, pool, "!))"));
 
   /* Now send the file's contents. */
   if (want_contents)
@@ -1589,7 +1591,7 @@ static svn_error_t *get_file(svn_ra_svn_
             {
               write_str.data = buf;
               write_str.len = len;
-              SVN_ERR(svn_ra_svn_write_string(conn, pool, &write_str));
+              SVN_ERR(svn_ra_svn__write_string(conn, pool, &write_str));
             }
           if (len < sizeof(buf))
             {
@@ -1597,14 +1599,14 @@ static svn_error_t *get_file(svn_ra_svn_
               break;
             }
         }
-      write_err = svn_ra_svn_write_cstring(conn, pool, "");
+      write_err = svn_ra_svn__write_cstring(conn, pool, "");
       if (write_err)
         {
           svn_error_clear(err);
           return write_err;
         }
       SVN_CMD_ERR(err);
-      SVN_ERR(svn_ra_svn_write_cmd_response(conn, pool, ""));
+      SVN_ERR(svn_ra_svn__write_cmd_response(conn, pool, ""));
     }
 
   return SVN_NO_ERROR;
@@ -1632,10 +1634,10 @@ static svn_error_t *get_dir(svn_ra_svn_c
   ab.server = b;
   ab.conn = conn;
 
-  SVN_ERR(svn_ra_svn_parse_tuple(params, pool, "c(?r)bb?l?B", &path, &rev,
-                                 &want_props, &want_contents,
-                                 &dirent_fields_list,
-                                 &wants_inherited_props));
+  SVN_ERR(svn_ra_svn__parse_tuple(params, pool, "c(?r)bb?l?B", &path, &rev,
+                                  &want_props, &want_contents,
+                                  &dirent_fields_list,
+                                  &wants_inherited_props));
 
   if (! dirent_fields_list)
     {
@@ -1693,9 +1695,9 @@ static svn_error_t *get_dir(svn_ra_svn_c
                           pool));
 
   /* Begin response ... */
-  SVN_ERR(svn_ra_svn_write_tuple(conn, pool, "w(r(!", "success", rev));
-  SVN_ERR(svn_ra_svn_write_proplist(conn, pool, props));
-  SVN_ERR(svn_ra_svn_write_tuple(conn, pool, "!)(!"));
+  SVN_ERR(svn_ra_svn__write_tuple(conn, pool, "w(r(!", "success", rev));
+  SVN_ERR(svn_ra_svn__write_proplist(conn, pool, props));
+  SVN_ERR(svn_ra_svn__write_tuple(conn, pool, "!)(!"));
 
   /* Fetch the directory entries if requested and send them immediately. */
   if (want_contents)
@@ -1773,11 +1775,11 @@ static svn_error_t *get_dir(svn_ra_svn_c
             cdate = missing_date;
 
           /* Send the entry. */
-          SVN_ERR(svn_ra_svn_write_tuple(conn, pool, "cwnbr(?c)(?c)", name,
-                                         svn_node_kind_to_word(entry_kind),
-                                         (apr_uint64_t) entry_size,
-                                         has_props, created_rev,
-                                         cdate, last_author));
+          SVN_ERR(svn_ra_svn__write_tuple(conn, pool, "cwnbr(?c)(?c)", name,
+                                          svn_node_kind_to_word(entry_kind),
+                                          (apr_uint64_t) entry_size,
+                                          has_props, created_rev,
+                                          cdate, last_author));
         }
       svn_pool_destroy(subpool);
     }
@@ -1786,24 +1788,24 @@ static svn_error_t *get_dir(svn_ra_svn_c
     {
       apr_pool_t *iterpool = svn_pool_create(pool);
 
-      SVN_ERR(svn_ra_svn_write_tuple(conn, pool, "!)(?!"));
+      SVN_ERR(svn_ra_svn__write_tuple(conn, pool, "!)(?!"));
       for (i = 0; i < inherited_props->nelts; i++)
         {
           svn_prop_inherited_item_t *iprop =
             APR_ARRAY_IDX(inherited_props, i, svn_prop_inherited_item_t *);
 
           svn_pool_clear(iterpool);
-          SVN_ERR(svn_ra_svn_write_tuple(conn, iterpool, "!(c(!",
-                                         iprop->path_or_url));
-          SVN_ERR(svn_ra_svn_write_proplist(conn, iterpool, iprop->prop_hash));
-          SVN_ERR(svn_ra_svn_write_tuple(conn, iterpool, "!))!",
-                                         iprop->path_or_url));
+          SVN_ERR(svn_ra_svn__write_tuple(conn, iterpool, "!(c(!",
+                                          iprop->path_or_url));
+          SVN_ERR(svn_ra_svn__write_proplist(conn, iterpool, iprop->prop_hash));
+          SVN_ERR(svn_ra_svn__write_tuple(conn, iterpool, "!))!",
+                                          iprop->path_or_url));
         }
       svn_pool_destroy(iterpool);
     }
 
   /* Finish response. */
-  return svn_ra_svn_write_tuple(conn, pool, "!))");
+  return svn_ra_svn__write_tuple(conn, pool, "!))");
 }
 
 static svn_error_t *update(svn_ra_svn_conn_t *conn, apr_pool_t *pool,
@@ -1813,17 +1815,17 @@ static svn_error_t *update(svn_ra_svn_co
   svn_revnum_t rev;
   const char *target, *full_path, *depth_word;
   svn_boolean_t recurse;
-  apr_uint64_t send_copyfrom_args; /* Optional; default FALSE */
-  apr_uint64_t ignore_ancestry; /* Optional; default TRUE */
+  svn_tristate_t send_copyfrom_args; /* Optional; default FALSE */
+  svn_tristate_t ignore_ancestry; /* Optional; default FALSE */
   /* Default to unknown.  Old clients won't send depth, but we'll
      handle that by converting recurse if necessary. */
   svn_depth_t depth = svn_depth_unknown;
   svn_boolean_t is_checkout;
 
   /* Parse the arguments. */
-  SVN_ERR(svn_ra_svn_parse_tuple(params, pool, "(?r)cb?wB?B", &rev, &target,
-                                 &recurse, &depth_word,
-                                 &send_copyfrom_args, &ignore_ancestry));
+  SVN_ERR(svn_ra_svn__parse_tuple(params, pool, "(?r)cb?w3?3", &rev, &target,
+                                  &recurse, &depth_word,
+                                  &send_copyfrom_args, &ignore_ancestry));
   target = svn_relpath_canonicalize(target, pool);
 
   if (depth_word)
@@ -1841,8 +1843,8 @@ static svn_error_t *update(svn_ra_svn_co
   SVN_ERR(accept_report(&is_checkout, NULL,
                         conn, pool, b, rev, target, NULL, TRUE,
                         depth,
-                        (send_copyfrom_args == TRUE) /* send_copyfrom_args */,
-                        (ignore_ancestry != FALSE) /* ignore_ancestry */));
+                        (send_copyfrom_args == svn_tristate_true),
+                        (ignore_ancestry == svn_tristate_true)));
   if (is_checkout)
     {
       SVN_ERR(log_command(b, conn, pool, "%s",
@@ -1853,7 +1855,9 @@ static svn_error_t *update(svn_ra_svn_co
     {
       SVN_ERR(log_command(b, conn, pool, "%s",
                           svn_log__update(full_path, rev, depth,
-                                          send_copyfrom_args, pool)));
+                                          (send_copyfrom_args
+                                           == svn_tristate_true),
+                                          pool)));
     }
 
   return SVN_NO_ERROR;
@@ -1870,13 +1874,13 @@ static svn_error_t *switch_cmd(svn_ra_sv
   /* Default to unknown.  Old clients won't send depth, but we'll
      handle that by converting recurse if necessary. */
   svn_depth_t depth = svn_depth_unknown;
-  apr_uint64_t send_copyfrom_args; /* Optional; default FALSE */
-  apr_uint64_t ignore_ancestry; /* Optional; default TRUE */
+  svn_tristate_t send_copyfrom_args; /* Optional; default FALSE */
+  svn_tristate_t ignore_ancestry; /* Optional; default TRUE */
 
   /* Parse the arguments. */
-  SVN_ERR(svn_ra_svn_parse_tuple(params, pool, "(?r)cbc?w?BB", &rev, &target,
-                                 &recurse, &switch_url, &depth_word,
-                                 &send_copyfrom_args, &ignore_ancestry));
+  SVN_ERR(svn_ra_svn__parse_tuple(params, pool, "(?r)cbc?w?33", &rev, &target,
+                                  &recurse, &switch_url, &depth_word,
+                                  &send_copyfrom_args, &ignore_ancestry));
   target = svn_relpath_canonicalize(target, pool);
   switch_url = svn_uri_canonicalize(switch_url, pool);
 
@@ -1903,8 +1907,8 @@ static svn_error_t *switch_cmd(svn_ra_sv
   return accept_report(NULL, NULL,
                        conn, pool, b, rev, target, switch_path, TRUE,
                        depth,
-                       (send_copyfrom_args == TRUE) /* send_copyfrom_args */,
-                       (ignore_ancestry != FALSE) /* ignore_ancestry */);
+                       (send_copyfrom_args == svn_tristate_true),
+                       (ignore_ancestry != svn_tristate_false));
 }
 
 static svn_error_t *status(svn_ra_svn_conn_t *conn, apr_pool_t *pool,
@@ -1919,8 +1923,8 @@ static svn_error_t *status(svn_ra_svn_co
   svn_depth_t depth = svn_depth_unknown;
 
   /* Parse the arguments. */
-  SVN_ERR(svn_ra_svn_parse_tuple(params, pool, "cb?(?r)?w",
-                                 &target, &recurse, &rev, &depth_word));
+  SVN_ERR(svn_ra_svn__parse_tuple(params, pool, "cb?(?r)?w",
+                                  &target, &recurse, &rev, &depth_word));
   target = svn_relpath_canonicalize(target, pool);
 
   if (depth_word)
@@ -1958,17 +1962,17 @@ static svn_error_t *diff(svn_ra_svn_conn
   if (params->nelts == 5)
     {
       /* Clients before 1.4 don't send the text_deltas boolean or depth. */
-      SVN_ERR(svn_ra_svn_parse_tuple(params, pool, "(?r)cbbc", &rev, &target,
-                                     &recurse, &ignore_ancestry, &versus_url));
+      SVN_ERR(svn_ra_svn__parse_tuple(params, pool, "(?r)cbbc", &rev, &target,
+                                      &recurse, &ignore_ancestry, &versus_url));
       text_deltas = TRUE;
       depth_word = NULL;
     }
   else
     {
-      SVN_ERR(svn_ra_svn_parse_tuple(params, pool, "(?r)cbbcb?w",
-                                     &rev, &target, &recurse,
-                                     &ignore_ancestry, &versus_url,
-                                     &text_deltas, &depth_word));
+      SVN_ERR(svn_ra_svn__parse_tuple(params, pool, "(?r)cbbcb?w",
+                                      &rev, &target, &recurse,
+                                      &ignore_ancestry, &versus_url,
+                                      &text_deltas, &depth_word));
     }
   target = svn_relpath_canonicalize(target, pool);
   versus_url = svn_uri_canonicalize(versus_url, pool);
@@ -2024,8 +2028,8 @@ static svn_error_t *get_mergeinfo(svn_ra
   ab.server = b;
   ab.conn = conn;
 
-  SVN_ERR(svn_ra_svn_parse_tuple(params, pool, "l(?r)wb", &paths, &rev,
-                                 &inherit_word, &include_descendants));
+  SVN_ERR(svn_ra_svn__parse_tuple(params, pool, "l(?r)wb", &paths, &rev,
+                                  &inherit_word, &include_descendants));
   inherit = svn_inheritance_from_word(inherit_word);
 
   /* Canonicalize the paths which mergeinfo has been requested for. */
@@ -2057,7 +2061,7 @@ static svn_error_t *get_mergeinfo(svn_ra
                                          pool));
   SVN_ERR(svn_mergeinfo__remove_prefix_from_catalog(&mergeinfo, mergeinfo,
                                                     b->fs_path->data, pool));
-  SVN_ERR(svn_ra_svn_write_tuple(conn, pool, "w((!", "success"));
+  SVN_ERR(svn_ra_svn__write_tuple(conn, pool, "w((!", "success"));
   iterpool = svn_pool_create(pool);
   for (hi = apr_hash_first(pool, mergeinfo); hi; hi = apr_hash_next(hi))
     {
@@ -2068,11 +2072,11 @@ static svn_error_t *get_mergeinfo(svn_ra
       svn_pool_clear(iterpool);
 
       SVN_ERR(svn_mergeinfo_to_string(&mergeinfo_string, value, iterpool));
-      SVN_ERR(svn_ra_svn_write_tuple(conn, iterpool, "cs", key,
-                                     mergeinfo_string));
+      SVN_ERR(svn_ra_svn__write_tuple(conn, iterpool, "cs", key,
+                                      mergeinfo_string));
     }
   svn_pool_destroy(iterpool);
-  SVN_ERR(svn_ra_svn_write_tuple(conn, pool, "!))"));
+  SVN_ERR(svn_ra_svn__write_tuple(conn, pool, "!))"));
 
   return SVN_NO_ERROR;
 }
@@ -2086,8 +2090,7 @@ static svn_error_t *log_receiver(void *b
   svn_ra_svn_conn_t *conn = b->conn;
   apr_hash_index_t *h;
   svn_boolean_t invalid_revnum = FALSE;
-  char action[2];
-  const char *author, *date, *message;
+  const svn_string_t *author, *date, *message;
   apr_uint64_t revprop_count;
 
   if (log_entry->revision == SVN_INVALID_REVNUM)
@@ -2104,7 +2107,19 @@ static svn_error_t *log_receiver(void *b
       b->stack_depth--;
     }
 
-  SVN_ERR(svn_ra_svn_write_tuple(conn, pool, "(!"));
+  svn_compat_log_revprops_out_string(&author, &date, &message,
+                                     log_entry->revprops);
+  svn_compat_log_revprops_clear(log_entry->revprops);
+  if (log_entry->revprops)
+    revprop_count = apr_hash_count(log_entry->revprops);
+  else
+    revprop_count = 0;
+
+  /* send LOG_ENTRY */
+  SVN_ERR(svn_ra_svn__start_list(conn, pool));
+
+  /* send LOG_ENTRY->CHANGED_PATHS2 */
+  SVN_ERR(svn_ra_svn__start_list(conn, pool));
   if (log_entry->changed_paths2)
     {
       for (h = apr_hash_first(pool, log_entry->changed_paths2); h;
@@ -2113,34 +2128,36 @@ static svn_error_t *log_receiver(void *b
           const char *path = svn__apr_hash_index_key(h);
           svn_log_changed_path2_t *change = svn__apr_hash_index_val(h);
 
-          action[0] = change->action;
-          action[1] = '\0';
-          SVN_ERR(svn_ra_svn_write_tuple(
-                      conn, pool, "cw(?cr)(cbb)",
+          SVN_ERR(svn_ra_svn__write_data_log_changed_path(
+                      conn, pool,
                       path,
-                      action,
+                      change->action,
                       change->copyfrom_path,
                       change->copyfrom_rev,
-                      svn_node_kind_to_word(change->node_kind),
+                      change->node_kind,
                       /* text_modified and props_modified are never unknown */
                       change->text_modified  == svn_tristate_true,
                       change->props_modified == svn_tristate_true));
         }
     }
-  svn_compat_log_revprops_out(&author, &date, &message, log_entry->revprops);
-  svn_compat_log_revprops_clear(log_entry->revprops);
-  if (log_entry->revprops)
-    revprop_count = apr_hash_count(log_entry->revprops);
-  else
-    revprop_count = 0;
-  SVN_ERR(svn_ra_svn_write_tuple(conn, pool, "!)r(?c)(?c)(?c)bbn(!",
-                                 log_entry->revision,
-                                 author, date, message,
-                                 log_entry->has_children,
-                                 invalid_revnum, revprop_count));
-  SVN_ERR(svn_ra_svn_write_proplist(conn, pool, log_entry->revprops));
-  SVN_ERR(svn_ra_svn_write_tuple(conn, pool, "!)b",
-                                 log_entry->subtractive_merge));
+  SVN_ERR(svn_ra_svn__end_list(conn, pool));
+  
+  /* send LOG_ENTRY main members */
+  SVN_ERR(svn_ra_svn__write_data_log_entry(conn, pool,
+                                           log_entry->revision,
+                                           author, date, message,
+                                           log_entry->has_children,
+                                           invalid_revnum, revprop_count));
+
+  /* send LOG_ENTRY->REVPROPS */
+  SVN_ERR(svn_ra_svn__start_list(conn, pool));
+  if (revprop_count)
+    SVN_ERR(svn_ra_svn__write_proplist(conn, pool, log_entry->revprops));
+  SVN_ERR(svn_ra_svn__end_list(conn, pool));
+
+  /* send LOG_ENTRY members that were added in later SVN releases */
+  SVN_ERR(svn_ra_svn__write_boolean(conn, pool, log_entry->subtractive_merge));
+  SVN_ERR(svn_ra_svn__end_list(conn, pool));
 
   if (log_entry->has_children)
     b->stack_depth++;
@@ -2167,11 +2184,11 @@ static svn_error_t *log_cmd(svn_ra_svn_c
   ab.server = b;
   ab.conn = conn;
 
-  SVN_ERR(svn_ra_svn_parse_tuple(params, pool, "l(?r)(?r)bb?n?Bwl", &paths,
-                                 &start_rev, &end_rev, &send_changed_paths,
-                                 &strict_node, &limit,
-                                 &include_merged_revs_param,
-                                 &revprop_word, &revprop_items));
+  SVN_ERR(svn_ra_svn__parse_tuple(params, pool, "l(?r)(?r)bb?n?Bwl", &paths,
+                                  &start_rev, &end_rev, &send_changed_paths,
+                                  &strict_node, &limit,
+                                  &include_merged_revs_param,
+                                  &revprop_word, &revprop_items));
 
   if (include_merged_revs_param == SVN_RA_SVN_UNSPECIFIED_NUMBER)
     include_merged_revisions = FALSE;
@@ -2239,14 +2256,14 @@ static svn_error_t *log_cmd(svn_ra_svn_c
                             authz_check_access_cb_func(b), &ab, log_receiver,
                             &lb, pool);
 
-  write_err = svn_ra_svn_write_word(conn, pool, "done");
+  write_err = svn_ra_svn__write_word(conn, pool, "done");
   if (write_err)
     {
       svn_error_clear(err);
       return write_err;
     }
   SVN_CMD_ERR(err);
-  SVN_ERR(svn_ra_svn_write_cmd_response(conn, pool, ""));
+  SVN_ERR(svn_ra_svn__write_cmd_response(conn, pool, ""));
   return SVN_NO_ERROR;
 }
 
@@ -2259,7 +2276,7 @@ static svn_error_t *check_path(svn_ra_sv
   svn_fs_root_t *root;
   svn_node_kind_t kind;
 
-  SVN_ERR(svn_ra_svn_parse_tuple(params, pool, "c(?r)", &path, &rev));
+  SVN_ERR(svn_ra_svn__parse_tuple(params, pool, "c(?r)", &path, &rev));
   full_path = svn_fspath__join(b->fs_path->data,
                                svn_relpath_canonicalize(path, pool), pool);
 
@@ -2275,8 +2292,8 @@ static svn_error_t *check_path(svn_ra_sv
 
   SVN_CMD_ERR(svn_fs_revision_root(&root, b->fs, rev, pool));
   SVN_CMD_ERR(svn_fs_check_path(&kind, root, full_path, pool));
-  SVN_ERR(svn_ra_svn_write_cmd_response(conn, pool, "w",
-                                        svn_node_kind_to_word(kind)));
+  SVN_ERR(svn_ra_svn__write_cmd_response(conn, pool, "w",
+                                         svn_node_kind_to_word(kind)));
   return SVN_NO_ERROR;
 }
 
@@ -2289,7 +2306,7 @@ static svn_error_t *stat_cmd(svn_ra_svn_
   svn_fs_root_t *root;
   svn_dirent_t *dirent;
 
-  SVN_ERR(svn_ra_svn_parse_tuple(params, pool, "c(?r)", &path, &rev));
+  SVN_ERR(svn_ra_svn__parse_tuple(params, pool, "c(?r)", &path, &rev));
   full_path = svn_fspath__join(b->fs_path->data,
                                svn_relpath_canonicalize(path, pool), pool);
 
@@ -2311,18 +2328,18 @@ static svn_error_t *stat_cmd(svn_ra_svn_
 
   if (dirent == NULL)
     {
-      SVN_ERR(svn_ra_svn_write_cmd_response(conn, pool, "()"));
+      SVN_ERR(svn_ra_svn__write_cmd_response(conn, pool, "()"));
       return SVN_NO_ERROR;
     }
 
   cdate = (dirent->time == (time_t) -1) ? NULL
     : svn_time_to_cstring(dirent->time, pool);
 
-  SVN_ERR(svn_ra_svn_write_cmd_response(conn, pool, "((wnbr(?c)(?c)))",
-                                        svn_node_kind_to_word(dirent->kind),
-                                        (apr_uint64_t) dirent->size,
-                                        dirent->has_props, dirent->created_rev,
-                                        cdate, dirent->last_author));
+  SVN_ERR(svn_ra_svn__write_cmd_response(conn, pool, "((wnbr(?c)(?c)))",
+                                         svn_node_kind_to_word(dirent->kind),
+                                         (apr_uint64_t) dirent->size,
+                                         dirent->has_props, dirent->created_rev,
+                                         cdate, dirent->last_author));
 
   return SVN_NO_ERROR;
 }
@@ -2346,9 +2363,9 @@ static svn_error_t *get_locations(svn_ra
   ab.conn = conn;
 
   /* Parse the arguments. */
-  SVN_ERR(svn_ra_svn_parse_tuple(params, pool, "crl", &relative_path,
-                                 &peg_revision,
-                                 &loc_revs_proto));
+  SVN_ERR(svn_ra_svn__parse_tuple(params, pool, "crl", &relative_path,
+                                  &peg_revision,
+                                  &loc_revs_proto));
   relative_path = svn_relpath_canonicalize(relative_path, pool);
 
   abs_path = svn_fspath__join(b->fs_path->data, relative_path, pool);
@@ -2394,13 +2411,13 @@ static svn_error_t *get_locations(svn_ra
               const svn_revnum_t *iter_key = svn__apr_hash_index_key(iter);
               const char *iter_value = svn__apr_hash_index_val(iter);
 
-              SVN_ERR(svn_ra_svn_write_tuple(conn, pool, "rc",
-                                             *iter_key, iter_value));
+              SVN_ERR(svn_ra_svn__write_tuple(conn, pool, "rc",
+                                              *iter_key, iter_value));
             }
         }
     }
 
-  write_err = svn_ra_svn_write_word(conn, pool, "done");
+  write_err = svn_ra_svn__write_word(conn, pool, "done");
   if (write_err)
     {
       svn_error_clear(err);
@@ -2408,7 +2425,7 @@ static svn_error_t *get_locations(svn_ra
     }
   SVN_CMD_ERR(err);
 
-  SVN_ERR(svn_ra_svn_write_cmd_response(conn, pool, ""));
+  SVN_ERR(svn_ra_svn__write_cmd_response(conn, pool, ""));
 
   return SVN_NO_ERROR;
 }
@@ -2418,10 +2435,10 @@ static svn_error_t *gls_receiver(svn_loc
                                  apr_pool_t *pool)
 {
   svn_ra_svn_conn_t *conn = baton;
-  return svn_ra_svn_write_tuple(conn, pool, "rr(?c)",
-                                segment->range_start,
-                                segment->range_end,
-                                segment->path);
+  return svn_ra_svn__write_tuple(conn, pool, "rr(?c)",
+                                 segment->range_start,
+                                 segment->range_end,
+                                 segment->path);
 }
 
 static svn_error_t *get_location_segments(svn_ra_svn_conn_t *conn,
@@ -2440,9 +2457,9 @@ static svn_error_t *get_location_segment
   ab.conn = conn;
 
   /* Parse the arguments. */
-  SVN_ERR(svn_ra_svn_parse_tuple(params, pool, "c(?r)(?r)(?r)",
-                                 &relative_path, &peg_revision,
-                                 &start_rev, &end_rev));
+  SVN_ERR(svn_ra_svn__parse_tuple(params, pool, "c(?r)(?r)(?r)",
+                                  &relative_path, &peg_revision,
+                                  &start_rev, &end_rev));
   relative_path = svn_relpath_canonicalize(relative_path, pool);
 
   abs_path = svn_fspath__join(b->fs_path->data, relative_path, pool);
@@ -2484,7 +2501,7 @@ static svn_error_t *get_location_segment
                                          gls_receiver, (void *)conn,
                                          authz_check_access_cb_func(b), &ab,
                                          pool);
-  write_err = svn_ra_svn_write_word(conn, pool, "done");
+  write_err = svn_ra_svn__write_word(conn, pool, "done");
   if (write_err)
     {
       svn_error_clear(err);
@@ -2492,7 +2509,7 @@ static svn_error_t *get_location_segment
     }
   SVN_CMD_ERR(err);
 
-  SVN_ERR(svn_ra_svn_write_cmd_response(conn, pool, ""));
+  SVN_ERR(svn_ra_svn__write_cmd_response(conn, pool, ""));
 
   return SVN_NO_ERROR;
 }
@@ -2507,7 +2524,7 @@ static svn_error_t *svndiff_handler(void
 
   str.data = data;
   str.len = *len;
-  return svn_ra_svn_write_string(b->conn, b->pool, &str);
+  return svn_ra_svn__write_string(b->conn, b->pool, &str);
 }
 
 /* This implements svn_close_fn_t.  Mark the end of the data by writing an
@@ -2516,7 +2533,7 @@ static svn_error_t *svndiff_close_handle
 {
   file_revs_baton_t *b = baton;
 
-  SVN_ERR(svn_ra_svn_write_cstring(b->conn, b->pool, ""));
+  SVN_ERR(svn_ra_svn__write_cstring(b->conn, b->pool, ""));
   return SVN_NO_ERROR;
 }
 
@@ -2532,12 +2549,12 @@ static svn_error_t *file_rev_handler(voi
   file_revs_baton_t *frb = baton;
   svn_stream_t *stream;
 
-  SVN_ERR(svn_ra_svn_write_tuple(frb->conn, pool, "cr(!",
-                                 path, rev));
-  SVN_ERR(svn_ra_svn_write_proplist(frb->conn, pool, rev_props));
-  SVN_ERR(svn_ra_svn_write_tuple(frb->conn, pool, "!)(!"));
+  SVN_ERR(svn_ra_svn__write_tuple(frb->conn, pool, "cr(!",
+                                  path, rev));
+  SVN_ERR(svn_ra_svn__write_proplist(frb->conn, pool, rev_props));
+  SVN_ERR(svn_ra_svn__write_tuple(frb->conn, pool, "!)(!"));
   SVN_ERR(write_prop_diffs(frb->conn, pool, prop_diffs));
-  SVN_ERR(svn_ra_svn_write_tuple(frb->conn, pool, "!)b", merged_revision));
+  SVN_ERR(svn_ra_svn__write_tuple(frb->conn, pool, "!)b", merged_revision));
 
   /* Store the pool for the delta stream. */
   frb->pool = pool;
@@ -2560,7 +2577,7 @@ static svn_error_t *file_rev_handler(voi
                                 svn_ra_svn_compression_level(frb->conn), pool);
     }
   else
-    SVN_ERR(svn_ra_svn_write_cstring(frb->conn, pool, ""));
+    SVN_ERR(svn_ra_svn__write_cstring(frb->conn, pool, ""));
 
   return SVN_NO_ERROR;
 }
@@ -2582,9 +2599,9 @@ static svn_error_t *get_file_revs(svn_ra
   ab.conn = conn;
 
   /* Parse arguments. */
-  SVN_ERR(svn_ra_svn_parse_tuple(params, pool, "c(?r)(?r)?B",
-                                 &path, &start_rev, &end_rev,
-                                 &include_merged_revs_param));
+  SVN_ERR(svn_ra_svn__parse_tuple(params, pool, "c(?r)(?r)?B",
+                                  &path, &start_rev, &end_rev,
+                                  &include_merged_revs_param));
   path = svn_relpath_canonicalize(path, pool);
   SVN_ERR(trivial_auth_request(conn, pool, b));
   full_path = svn_fspath__join(b->fs_path->data, path, pool);
@@ -2606,14 +2623,14 @@ static svn_error_t *get_file_revs(svn_ra
                                  include_merged_revisions,
                                  authz_check_access_cb_func(b), &ab,
                                  file_rev_handler, &frb, pool);
-  write_err = svn_ra_svn_write_word(conn, pool, "done");
+  write_err = svn_ra_svn__write_word(conn, pool, "done");
   if (write_err)
     {
       svn_error_clear(err);
       return write_err;
     }
   SVN_CMD_ERR(err);
-  SVN_ERR(svn_ra_svn_write_cmd_response(conn, pool, ""));
+  SVN_ERR(svn_ra_svn__write_cmd_response(conn, pool, ""));
 
   return SVN_NO_ERROR;
 }
@@ -2629,8 +2646,8 @@ static svn_error_t *lock(svn_ra_svn_conn
   svn_revnum_t current_rev;
   svn_lock_t *l;
 
-  SVN_ERR(svn_ra_svn_parse_tuple(params, pool, "c(?c)b(?r)", &path, &comment,
-                                 &steal_lock, &current_rev));
+  SVN_ERR(svn_ra_svn__parse_tuple(params, pool, "c(?c)b(?r)", &path, &comment,
+                                  &steal_lock, &current_rev));
   full_path = svn_fspath__join(b->fs_path->data,
                                svn_relpath_canonicalize(path, pool), pool);
 
@@ -2643,9 +2660,9 @@ static svn_error_t *lock(svn_ra_svn_conn
                                 0, /* No expiration time. */
                                 current_rev, steal_lock, pool));
 
-  SVN_ERR(svn_ra_svn_write_tuple(conn, pool, "w(!", "success"));
+  SVN_ERR(svn_ra_svn__write_tuple(conn, pool, "w(!", "success"));
   SVN_ERR(write_lock(conn, pool, l));
-  SVN_ERR(svn_ra_svn_write_tuple(conn, pool, "!)"));
+  SVN_ERR(svn_ra_svn__write_tuple(conn, pool, "!)"));
 
   return SVN_NO_ERROR;
 }
@@ -2666,8 +2683,8 @@ static svn_error_t *lock_many(svn_ra_svn
   svn_lock_t *l;
   svn_error_t *err = SVN_NO_ERROR, *write_err;
 
-  SVN_ERR(svn_ra_svn_parse_tuple(params, pool, "(?c)bl", &comment, &steal_lock,
-                                 &path_revs));
+  SVN_ERR(svn_ra_svn__parse_tuple(params, pool, "(?c)bl", &comment, &steal_lock,
+                                  &path_revs));
 
   subpool = svn_pool_create(pool);
 
@@ -2690,8 +2707,8 @@ 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, pool, "c(?r)", &path,
-                                     &current_rev));
+      SVN_ERR(svn_ra_svn__parse_tuple(item->u.list, pool, "c(?r)", &path,
+                                      &current_rev));
 
       /* Allocate the full_path out of pool so it will survive for use
        * by operational logging, after this loop. */
@@ -2717,7 +2734,7 @@ static svn_error_t *lock_many(svn_ra_svn
         {
           if (SVN_ERR_IS_LOCK_ERROR(err))
             {
-              write_err = svn_ra_svn_write_cmd_failure(conn, pool, err);
+              write_err = svn_ra_svn__write_cmd_failure(conn, pool, err);
               svn_error_clear(err);
               err = NULL;
               SVN_ERR(write_err);
@@ -2727,9 +2744,9 @@ static svn_error_t *lock_many(svn_ra_svn
         }
       else
         {
-          SVN_ERR(svn_ra_svn_write_tuple(conn, subpool, "w!", "success"));
+          SVN_ERR(svn_ra_svn__write_tuple(conn, subpool, "w!", "success"));
           SVN_ERR(write_lock(conn, subpool, l));
-          SVN_ERR(svn_ra_svn_write_tuple(conn, subpool, "!"));
+          SVN_ERR(svn_ra_svn__write_tuple(conn, subpool, "!"));
         }
     }
 
@@ -2739,12 +2756,12 @@ static svn_error_t *lock_many(svn_ra_svn
                       svn_log__lock(log_paths, steal_lock, pool)));
 
   /* NOTE: err might contain a fatal locking error from the loop above. */
-  write_err = svn_ra_svn_write_word(conn, pool, "done");
+  write_err = svn_ra_svn__write_word(conn, pool, "done");
   if (!write_err)
     SVN_CMD_ERR(err);
   svn_error_clear(err);
   SVN_ERR(write_err);
-  SVN_ERR(svn_ra_svn_write_cmd_response(conn, pool, ""));
+  SVN_ERR(svn_ra_svn__write_cmd_response(conn, pool, ""));
 
   return SVN_NO_ERROR;
 }
@@ -2756,7 +2773,7 @@ static svn_error_t *unlock(svn_ra_svn_co
   const char *path, *token, *full_path;
   svn_boolean_t break_lock;
 
-  SVN_ERR(svn_ra_svn_parse_tuple(params, pool, "c(?c)b", &path, &token,
+  SVN_ERR(svn_ra_svn__parse_tuple(params, pool, "c(?c)b", &path, &token,
                                  &break_lock));
 
   full_path = svn_fspath__join(b->fs_path->data,
@@ -2771,7 +2788,7 @@ static svn_error_t *unlock(svn_ra_svn_co
   SVN_CMD_ERR(svn_repos_fs_unlock(b->repos, full_path, token, break_lock,
                                   pool));
 
-  SVN_ERR(svn_ra_svn_write_cmd_response(conn, pool, ""));
+  SVN_ERR(svn_ra_svn__write_cmd_response(conn, pool, ""));
 
   return SVN_NO_ERROR;
 }
@@ -2790,8 +2807,8 @@ static svn_error_t *unlock_many(svn_ra_s
   const char *token;
   svn_error_t *err = SVN_NO_ERROR, *write_err;
 
-  SVN_ERR(svn_ra_svn_parse_tuple(params, pool, "bl", &break_lock,
-                                 &unlock_tokens));
+  SVN_ERR(svn_ra_svn__parse_tuple(params, pool, "bl", &break_lock,
+                                  &unlock_tokens));
 
   /* Username required unless break_lock was specified. */
   SVN_ERR(must_have_access(conn, pool, b, svn_authz_write, NULL, ! break_lock));
@@ -2811,8 +2828,8 @@ 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,
-                                     &token));
+      SVN_ERR(svn_ra_svn__parse_tuple(item->u.list, subpool, "c(?c)", &path,
+                                      &token));
 
       /* Allocate the full_path out of pool so it will survive for use
        * by operational logging, after this loop. */
@@ -2835,7 +2852,7 @@ static svn_error_t *unlock_many(svn_ra_s
         {
           if (SVN_ERR_IS_UNLOCK_ERROR(err))
             {
-              write_err = svn_ra_svn_write_cmd_failure(conn, pool, err);
+              write_err = svn_ra_svn__write_cmd_failure(conn, pool, err);
               svn_error_clear(err);
               err = NULL;
               SVN_ERR(write_err);
@@ -2844,8 +2861,8 @@ static svn_error_t *unlock_many(svn_ra_s
             break;
         }
       else
-        SVN_ERR(svn_ra_svn_write_tuple(conn, subpool, "w(c)", "success",
-                                       path));
+        SVN_ERR(svn_ra_svn__write_tuple(conn, subpool, "w(c)", "success",
+                                        path));
     }
 
   svn_pool_destroy(subpool);
@@ -2854,11 +2871,11 @@ static svn_error_t *unlock_many(svn_ra_s
                       svn_log__unlock(log_paths, break_lock, pool)));
 
   /* NOTE: err might contain a fatal unlocking error from the loop above. */
-  write_err = svn_ra_svn_write_word(conn, pool, "done");
+  write_err = svn_ra_svn__write_word(conn, pool, "done");
   if (! write_err)
     SVN_CMD_ERR(err);
   svn_error_clear(err);
-  SVN_ERR(svn_ra_svn_write_cmd_response(conn, pool, ""));
+  SVN_ERR(svn_ra_svn__write_cmd_response(conn, pool, ""));
 
   return SVN_NO_ERROR;
 }
@@ -2871,7 +2888,7 @@ static svn_error_t *get_lock(svn_ra_svn_
   const char *full_path;
   svn_lock_t *l;
 
-  SVN_ERR(svn_ra_svn_parse_tuple(params, pool, "c", &path));
+  SVN_ERR(svn_ra_svn__parse_tuple(params, pool, "c", &path));
 
   full_path = svn_fspath__join(b->fs_path->data,
                                svn_relpath_canonicalize(path, pool), pool);
@@ -2883,10 +2900,10 @@ static svn_error_t *get_lock(svn_ra_svn_
 
   SVN_CMD_ERR(svn_fs_get_lock(&l, b->fs, full_path, pool));
 
-  SVN_ERR(svn_ra_svn_write_tuple(conn, pool, "w((!", "success"));
+  SVN_ERR(svn_ra_svn__write_tuple(conn, pool, "w((!", "success"));
   if (l)
     SVN_ERR(write_lock(conn, pool, l));
-  SVN_ERR(svn_ra_svn_write_tuple(conn, pool, "!))"));
+  SVN_ERR(svn_ra_svn__write_tuple(conn, pool, "!))"));
 
   return SVN_NO_ERROR;
 }
@@ -2907,7 +2924,7 @@ static svn_error_t *get_locks(svn_ra_svn
   ab.server = b;
   ab.conn = conn;
 
-  SVN_ERR(svn_ra_svn_parse_tuple(params, pool, "c?(?w)", &path, &depth_word));
+  SVN_ERR(svn_ra_svn__parse_tuple(params, pool, "c?(?w)", &path, &depth_word));
 
   depth = depth_word ? svn_depth_from_word(depth_word) : svn_depth_infinity;
   if ((depth != svn_depth_empty) &&
@@ -2931,14 +2948,14 @@ static svn_error_t *get_locks(svn_ra_svn
                                       authz_check_access_cb_func(b), &ab,
                                       pool));
 
-  SVN_ERR(svn_ra_svn_write_tuple(conn, pool, "w((!", "success"));
+  SVN_ERR(svn_ra_svn__write_tuple(conn, pool, "w((!", "success"));
   for (hi = apr_hash_first(pool, locks); hi; hi = apr_hash_next(hi))
     {
       svn_lock_t *l = svn__apr_hash_index_val(hi);
 
       SVN_ERR(write_lock(conn, pool, l));
     }
-  SVN_ERR(svn_ra_svn_write_tuple(conn, pool, "!))"));
+  SVN_ERR(svn_ra_svn__write_tuple(conn, pool, "!))"));
 
   return SVN_NO_ERROR;
 }
@@ -2975,7 +2992,7 @@ static svn_error_t *replay_one_revision(
     svn_error_clear(editor->abort_edit(edit_baton, pool));
   SVN_CMD_ERR(err);
 
-  return svn_ra_svn_write_cmd_finish_replay(conn, pool);
+  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,
@@ -2985,7 +3002,7 @@ static svn_error_t *replay(svn_ra_svn_co
   svn_boolean_t send_deltas;
   server_baton_t *b = baton;
 
-  SVN_ERR(svn_ra_svn_parse_tuple(params, pool, "rrb", &rev, &low_water_mark,
+  SVN_ERR(svn_ra_svn__parse_tuple(params, pool, "rrb", &rev, &low_water_mark,
                                  &send_deltas));
 
   SVN_ERR(trivial_auth_request(conn, pool, b));
@@ -2993,7 +3010,7 @@ static svn_error_t *replay(svn_ra_svn_co
   SVN_ERR(replay_one_revision(conn, b, rev, low_water_mark,
                               send_deltas, pool));
 
-  SVN_ERR(svn_ra_svn_write_cmd_response(conn, pool, ""));
+  SVN_ERR(svn_ra_svn__write_cmd_response(conn, pool, ""));
 
   return SVN_NO_ERROR;
 }
@@ -3010,7 +3027,7 @@ static svn_error_t *replay_range(svn_ra_
   ab.server = b;
   ab.conn = conn;
 
-  SVN_ERR(svn_ra_svn_parse_tuple(params, pool, "rrrb", &start_rev,
+  SVN_ERR(svn_ra_svn__parse_tuple(params, pool, "rrrb", &start_rev,
                                  &end_rev, &low_water_mark,
                                  &send_deltas));
 
@@ -3027,9 +3044,9 @@ static svn_error_t *replay_range(svn_ra_
                                                  authz_check_access_cb_func(b),
                                                  &ab,
                                                  iterpool));
-      SVN_ERR(svn_ra_svn_write_tuple(conn, iterpool, "w(!", "revprops"));
-      SVN_ERR(svn_ra_svn_write_proplist(conn, iterpool, props));
-      SVN_ERR(svn_ra_svn_write_tuple(conn, iterpool, "!)"));
+      SVN_ERR(svn_ra_svn__write_tuple(conn, iterpool, "w(!", "revprops"));
+      SVN_ERR(svn_ra_svn__write_proplist(conn, iterpool, props));
+      SVN_ERR(svn_ra_svn__write_tuple(conn, iterpool, "!)"));
 
       SVN_ERR(replay_one_revision(conn, b, rev, low_water_mark,
                                   send_deltas, iterpool));
@@ -3037,7 +3054,7 @@ static svn_error_t *replay_range(svn_ra_
     }
   svn_pool_destroy(iterpool);
 
-  SVN_ERR(svn_ra_svn_write_cmd_response(conn, pool, ""));
+  SVN_ERR(svn_ra_svn__write_cmd_response(conn, pool, ""));
 
   return SVN_NO_ERROR;
 }
@@ -3054,7 +3071,7 @@ get_deleted_rev(svn_ra_svn_conn_t *conn,
   svn_revnum_t end_revision;
   svn_revnum_t revision_deleted;
 
-  SVN_ERR(svn_ra_svn_parse_tuple(params, pool, "crr",
+  SVN_ERR(svn_ra_svn__parse_tuple(params, pool, "crr",
                                  &path, &peg_revision, &end_revision));
   full_path = svn_fspath__join(b->fs_path->data,
                                svn_relpath_canonicalize(path, pool), pool);
@@ -3062,7 +3079,7 @@ get_deleted_rev(svn_ra_svn_conn_t *conn,
   SVN_ERR(trivial_auth_request(conn, pool, b));
   SVN_ERR(svn_repos_deleted_rev(b->fs, full_path, peg_revision, end_revision,
                                 &revision_deleted, pool));
-  SVN_ERR(svn_ra_svn_write_cmd_response(conn, pool, "r", revision_deleted));
+  SVN_ERR(svn_ra_svn__write_cmd_response(conn, pool, "r", revision_deleted));
   return SVN_NO_ERROR;
 }
 
@@ -3085,7 +3102,7 @@ get_inherited_props(svn_ra_svn_conn_t *c
   ab.conn = conn;
 
   /* Parse arguments. */
-  SVN_ERR(svn_ra_svn_parse_tuple(params, iterpool, "c(?r)", &path, &rev));
+  SVN_ERR(svn_ra_svn__parse_tuple(params, iterpool, "c(?r)", &path, &rev));
 
   full_path = svn_fspath__join(b->fs_path->data,
                                svn_relpath_canonicalize(path, iterpool),
@@ -3107,9 +3124,9 @@ get_inherited_props(svn_ra_svn_conn_t *c
   SVN_CMD_ERR(get_props(NULL, &inherited_props, &ab, root, full_path, pool));
 
   /* Send successful command response with revision and props. */
-  SVN_ERR(svn_ra_svn_write_tuple(conn, iterpool, "w(!", "success"));
+  SVN_ERR(svn_ra_svn__write_tuple(conn, iterpool, "w(!", "success"));
 
-  SVN_ERR(svn_ra_svn_write_tuple(conn, iterpool, "!(?!"));
+  SVN_ERR(svn_ra_svn__write_tuple(conn, iterpool, "!(?!"));
 
   for (i = 0; i < inherited_props->nelts; i++)
     {
@@ -3117,14 +3134,14 @@ get_inherited_props(svn_ra_svn_conn_t *c
         APR_ARRAY_IDX(inherited_props, i, svn_prop_inherited_item_t *);
 
       svn_pool_clear(iterpool);
-      SVN_ERR(svn_ra_svn_write_tuple(conn, iterpool, "!(c(!",
-                                     iprop->path_or_url));
-      SVN_ERR(svn_ra_svn_write_proplist(conn, iterpool, iprop->prop_hash));
-      SVN_ERR(svn_ra_svn_write_tuple(conn, iterpool, "!))!",
-                                     iprop->path_or_url));
-    }  
+      SVN_ERR(svn_ra_svn__write_tuple(conn, iterpool, "!(c(!",
+                                      iprop->path_or_url));
+      SVN_ERR(svn_ra_svn__write_proplist(conn, iterpool, iprop->prop_hash));
+      SVN_ERR(svn_ra_svn__write_tuple(conn, iterpool, "!))!",
+                                      iprop->path_or_url));
+    }
 
-  SVN_ERR(svn_ra_svn_write_tuple(conn, iterpool, "!))"));
+  SVN_ERR(svn_ra_svn__write_tuple(conn, iterpool, "!))"));
   svn_pool_destroy(iterpool);
   return SVN_NO_ERROR;
 }
@@ -3285,9 +3302,10 @@ static svn_error_t *find_repos(const cha
     {
       b->base = svn_repos_conf_dir(b->repos, pool);
 
-      SVN_ERR(svn_config_read2(&b->cfg, svn_repos_svnserve_conf(b->repos, pool),
+      SVN_ERR(svn_config_read3(&b->cfg, svn_repos_svnserve_conf(b->repos, pool),
                                FALSE, /* must_exist */
                                FALSE, /* section_names_case_sensitive */
+                               FALSE, /* option_names_case_sensitive */
                                pool));
       SVN_ERR(load_pwdb_config(b, conn, pool));
       SVN_ERR(load_authz_config(b, conn, repos_root, pool));
@@ -3522,42 +3540,42 @@ svn_error_t *serve(svn_ra_svn_conn_t *co
   /* Send greeting.  We don't support version 1 any more, so we can
    * send an empty mechlist. */
   if (params->compression_level > 0)
-    SVN_ERR(svn_ra_svn_write_cmd_response(conn, pool, "nn()(wwwwwwwwwww)",
-                                          (apr_uint64_t) 2, (apr_uint64_t) 2,
-                                          SVN_RA_SVN_CAP_EDIT_PIPELINE,
-                                          SVN_RA_SVN_CAP_SVNDIFF1,
-                                          SVN_RA_SVN_CAP_ABSENT_ENTRIES,
-                                          SVN_RA_SVN_CAP_COMMIT_REVPROPS,
-                                          SVN_RA_SVN_CAP_DEPTH,
-                                          SVN_RA_SVN_CAP_LOG_REVPROPS,
-                                          SVN_RA_SVN_CAP_ATOMIC_REVPROPS,
-                                          SVN_RA_SVN_CAP_PARTIAL_REPLAY,
-                                          SVN_RA_SVN_CAP_INHERITED_PROPS,
-                                          SVN_RA_SVN_CAP_EPHEMERAL_TXNPROPS,
-                                          SVN_RA_SVN_CAP_GET_FILE_REVS_REVERSE
-                                          ));
-  else
-    SVN_ERR(svn_ra_svn_write_cmd_response(conn, pool, "nn()(wwwwwwwwww)",
-                                          (apr_uint64_t) 2, (apr_uint64_t) 2,
-                                          SVN_RA_SVN_CAP_EDIT_PIPELINE,
-                                          SVN_RA_SVN_CAP_ABSENT_ENTRIES,
-                                          SVN_RA_SVN_CAP_COMMIT_REVPROPS,
-                                          SVN_RA_SVN_CAP_DEPTH,
-                                          SVN_RA_SVN_CAP_LOG_REVPROPS,
-                                          SVN_RA_SVN_CAP_ATOMIC_REVPROPS,
-                                          SVN_RA_SVN_CAP_PARTIAL_REPLAY,
-                                          SVN_RA_SVN_CAP_INHERITED_PROPS,
-                                          SVN_RA_SVN_CAP_EPHEMERAL_TXNPROPS,
-                                          SVN_RA_SVN_CAP_GET_FILE_REVS_REVERSE
-                                          ));
+    SVN_ERR(svn_ra_svn__write_cmd_response(conn, pool, "nn()(wwwwwwwwwww)",
+                                           (apr_uint64_t) 2, (apr_uint64_t) 2,
+                                           SVN_RA_SVN_CAP_EDIT_PIPELINE,
+                                           SVN_RA_SVN_CAP_SVNDIFF1,
+                                           SVN_RA_SVN_CAP_ABSENT_ENTRIES,
+                                           SVN_RA_SVN_CAP_COMMIT_REVPROPS,
+                                           SVN_RA_SVN_CAP_DEPTH,
+                                           SVN_RA_SVN_CAP_LOG_REVPROPS,
+                                           SVN_RA_SVN_CAP_ATOMIC_REVPROPS,
+                                           SVN_RA_SVN_CAP_PARTIAL_REPLAY,
+                                           SVN_RA_SVN_CAP_INHERITED_PROPS,
+                                           SVN_RA_SVN_CAP_EPHEMERAL_TXNPROPS,
+                                           SVN_RA_SVN_CAP_GET_FILE_REVS_REVERSE
+                                           ));
+  else
+    SVN_ERR(svn_ra_svn__write_cmd_response(conn, pool, "nn()(wwwwwwwwww)",
+                                           (apr_uint64_t) 2, (apr_uint64_t) 2,
+                                           SVN_RA_SVN_CAP_EDIT_PIPELINE,
+                                           SVN_RA_SVN_CAP_ABSENT_ENTRIES,
+                                           SVN_RA_SVN_CAP_COMMIT_REVPROPS,
+                                           SVN_RA_SVN_CAP_DEPTH,
+                                           SVN_RA_SVN_CAP_LOG_REVPROPS,
+                                           SVN_RA_SVN_CAP_ATOMIC_REVPROPS,
+                                           SVN_RA_SVN_CAP_PARTIAL_REPLAY,
+                                           SVN_RA_SVN_CAP_INHERITED_PROPS,
+                                           SVN_RA_SVN_CAP_EPHEMERAL_TXNPROPS,
+                                           SVN_RA_SVN_CAP_GET_FILE_REVS_REVERSE
+                                           ));
 
   /* Read client response, which we assume to be in version 2 format:
    * version, capability list, and client URL; then we do an auth
    * request. */
-  SVN_ERR(svn_ra_svn_read_tuple(conn, pool, "nlc?c(?c)",
-                                &ver, &caplist, &client_url,
-                                &ra_client_string,
-                                &client_string));
+  SVN_ERR(svn_ra_svn__read_tuple(conn, pool, "nlc?c(?c)",
+                                 &ver, &caplist, &client_url,
+                                 &ra_client_string,
+                                 &client_string));
   if (ver != 2)
     return SVN_NO_ERROR;
 
@@ -3612,10 +3630,10 @@ svn_error_t *serve(svn_ra_svn_conn_t *co
     {
       log_error(err, b.log_file, svn_ra_svn_conn_remote_host(conn),
                 b.user, NULL, pool);
-      io_err = svn_ra_svn_write_cmd_failure(conn, pool, err);
+      io_err = svn_ra_svn__write_cmd_failure(conn, pool, err);
       svn_error_clear(err);
       SVN_ERR(io_err);
-      return svn_ra_svn_flush(conn, pool);
+      return svn_ra_svn__flush(conn, pool);
     }
 
   /* Log the open. */
@@ -3651,11 +3669,11 @@ svn_error_t *serve(svn_ra_svn_conn_t *co
     SVN_ERR(svn_repos_has_capability(b.repos, &supports_mergeinfo,
                                      SVN_REPOS_CAPABILITY_MERGEINFO, pool));
 
-    SVN_ERR(svn_ra_svn_write_tuple(conn, pool, "w(cc(!",
-                                   "success", uuid, b.repos_url));
+    SVN_ERR(svn_ra_svn__write_tuple(conn, pool, "w(cc(!",
+                                    "success", uuid, b.repos_url));
     if (supports_mergeinfo)
-      SVN_ERR(svn_ra_svn_write_word(conn, pool, SVN_RA_SVN_CAP_MERGEINFO));
-    SVN_ERR(svn_ra_svn_write_tuple(conn, pool, "!))"));
+      SVN_ERR(svn_ra_svn__write_word(conn, pool, SVN_RA_SVN_CAP_MERGEINFO));
+    SVN_ERR(svn_ra_svn__write_tuple(conn, pool, "!))"));
   }
 
   /* Set up editor shims. */
@@ -3671,5 +3689,5 @@ svn_error_t *serve(svn_ra_svn_conn_t *co
     SVN_ERR(svn_ra_svn__set_shim_callbacks(conn, callbacks));
   }
 
-  return svn_ra_svn_handle_commands2(conn, pool, main_commands, &b, FALSE);
+  return svn_ra_svn__handle_commands2(conn, pool, main_commands, &b, FALSE);
 }

Modified: subversion/branches/verify-keep-going/subversion/svnserve/server.h
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/svnserve/server.h?rev=1489765&r1=1489764&r2=1489765&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/svnserve/server.h (original)
+++ subversion/branches/verify-keep-going/subversion/svnserve/server.h Wed Jun  5 09:22:43 2013
@@ -138,7 +138,7 @@ svn_error_t *serve(svn_ra_svn_conn_t *co
                    apr_pool_t *pool);
 
 /* Load the password database for the listening server based on the
-   entries in the SERVER struct. 
+   entries in the SERVER struct.
 
    SERVER and CONN must not be NULL. The real errors will be logged with
    SERVER and CONN but return generic errors to the client. */

Modified: subversion/branches/verify-keep-going/subversion/svnserve/svnserve.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/svnserve/svnserve.c?rev=1489765&r1=1489764&r2=1489765&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/svnserve/svnserve.c (original)
+++ subversion/branches/verify-keep-going/subversion/svnserve/svnserve.c Wed Jun  5 09:22:43 2013
@@ -53,6 +53,7 @@
 
 #include "private/svn_dep_compat.h"
 #include "private/svn_cmdline_private.h"
+#include "private/svn_atomic.h"
 
 #include "winservice.h"
 
@@ -241,13 +242,11 @@ static const apr_getopt_option_t svnserv
         "                             "
         "[used for FSFS repositories only]")},
     {"client-speed", SVNSERVE_OPT_CLIENT_SPEED, 1,
-     N_("Optimize throughput based on the assumption that\n"
+     N_("Optimize network handling based on the assumption\n"
         "                             "
-        "clients can receive data with a bitrate of at\n"
+        "that most clients are connected with a bitrate of\n"
         "                             "
-        "least ARG Gbit/s.  For clients receiving data at\n"
-        "                             "
-        "less than 1 Gbit/s, zero should be used.\n"
+        "ARG Mbit/s.\n"
         "                             "
         "Default is 0 (optimizations disabled).")},
 #ifdef CONNECTION_HAVE_THREAD_OPTION
@@ -380,11 +379,44 @@ static apr_status_t redirect_stdout(void
   return apr_file_dup2(out_file, err_file, pool);
 }
 
+#if APR_HAS_THREADS
+/* The pool passed to apr_thread_create can only be released when both
+
+      A: the call to apr_thread_create has returned to the calling thread
+      B: the new thread has started running and reached apr_thread_start_t
+
+   So we set the atomic counter to 2 then both the calling thread and
+   the new thread decrease it and when it reaches 0 the pool can be
+   released.  */
+struct shared_pool_t {
+  svn_atomic_t count;
+  apr_pool_t *pool;
+};
+
+static struct shared_pool_t *
+attach_shared_pool(apr_pool_t *pool)
+{
+  struct shared_pool_t *shared = apr_palloc(pool, sizeof(struct shared_pool_t));
+
+  shared->pool = pool;
+  svn_atomic_set(&shared->count, 2);
+
+  return shared;
+}
+
+static void
+release_shared_pool(struct shared_pool_t *shared)
+{
+  if (svn_atomic_dec(&shared->count) == 0)
+    svn_pool_destroy(shared->pool);
+}
+#endif
+
 /* "Arguments" passed from the main thread to the connection thread */
 struct serve_thread_t {
   svn_ra_svn_conn_t *conn;
   serve_params_t *params;
-  apr_pool_t *pool;
+  struct shared_pool_t *shared_pool;
 };
 
 #if APR_HAS_THREADS
@@ -392,8 +424,8 @@ static void * APR_THREAD_FUNC serve_thre
 {
   struct serve_thread_t *d = data;
 
-  svn_error_clear(serve(d->conn, d->params, d->pool));
-  svn_pool_destroy(d->pool);
+  svn_error_clear(serve(d->conn, d->params, d->shared_pool->pool));
+  release_shared_pool(d->shared_pool);
 
   return NULL;
 }
@@ -457,6 +489,7 @@ int main(int argc, const char *argv[])
 #if APR_HAS_THREADS
   apr_threadattr_t *tattr;
   apr_thread_t *tid;
+  struct shared_pool_t *shared_pool;
 
   struct serve_thread_t *thread_data;
 #endif
@@ -670,11 +703,16 @@ int main(int argc, const char *argv[])
           {
             apr_size_t bandwidth = (apr_size_t)apr_strtoi64(arg, NULL, 0);
 
-            /* block other clients for at most 1 ms (at full bandwidth) */
-            params.zero_copy_limit = bandwidth * 120000;
-
-            /* check for aborted connections at the same rate */
-            params.error_check_interval = bandwidth * 120000;
+            /* for slower clients, don't try anything fancy */
+            if (bandwidth >= 1000)
+              {
+                /* block other clients for at most 1 ms (at full bandwidth).
+                   Note that the send buffer is 16kB anyways. */
+                params.zero_copy_limit = bandwidth * 120;
+
+                /* check for aborted connections at the same rate */
+                params.error_check_interval = bandwidth * 120;
+              }
           }
           break;
 
@@ -752,9 +790,10 @@ int main(int argc, const char *argv[])
     {
       params.base = svn_dirent_dirname(config_filename, pool);
 
-      SVN_INT_ERR(svn_config_read2(&params.cfg, config_filename,
+      SVN_INT_ERR(svn_config_read3(&params.cfg, config_filename,
                                    TRUE, /* must_exist */
                                    FALSE, /* section_names_case_sensitive */
+                                   FALSE, /* option_names_case_sensitive */
                                    pool));
     }
 
@@ -1004,7 +1043,9 @@ int main(int argc, const char *argv[])
                                          connection_pool) == APR_CHILD_DONE)
             ;
         }
-      if (APR_STATUS_IS_EINTR(status))
+      if (APR_STATUS_IS_EINTR(status)
+          || APR_STATUS_IS_ECONNABORTED(status)
+          || APR_STATUS_IS_ECONNRESET(status))
         {
           svn_pool_destroy(connection_pool);
           continue;
@@ -1089,6 +1130,7 @@ int main(int argc, const char *argv[])
              particularly sophisticated strategy for a threaded server, it's
              little different from forking one process per connection. */
 #if APR_HAS_THREADS
+          shared_pool = attach_shared_pool(connection_pool);
           status = apr_threadattr_create(&tattr, connection_pool);
           if (status)
             {
@@ -1108,9 +1150,9 @@ int main(int argc, const char *argv[])
           thread_data = apr_palloc(connection_pool, sizeof(*thread_data));
           thread_data->conn = conn;
           thread_data->params = &params;
-          thread_data->pool = connection_pool;
+          thread_data->shared_pool = shared_pool;
           status = apr_thread_create(&tid, tattr, serve_thread, thread_data,
-                                     connection_pool);
+                                     shared_pool->pool);
           if (status)
             {
               err = svn_error_wrap_apr(status, _("Can't create thread"));
@@ -1118,6 +1160,7 @@ int main(int argc, const char *argv[])
               svn_error_clear(err);
               exit(1);
             }
+          release_shared_pool(shared_pool);
 #endif
           break;
 

Modified: subversion/branches/verify-keep-going/subversion/tests/cmdline/authz_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/tests/cmdline/authz_tests.py?rev=1489765&r1=1489764&r2=1489765&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/tests/cmdline/authz_tests.py (original)
+++ subversion/branches/verify-keep-going/subversion/tests/cmdline/authz_tests.py Wed Jun  5 09:22:43 2013
@@ -576,7 +576,8 @@ def authz_log_and_tracing_test(sbox):
   if sbox.repo_url.startswith('http'):
     expected_err2 = expected_err
   else:
-    expected_err2 = ".*svn: E220001: Item is not readable.*"
+    expected_err2 = ".*svn: E220001: Unreadable path encountered; " \
+                    "access denied.*"
 
   # if we do the same thing directly on the unreadable file, we get:
   # svn: Item is not readable
@@ -1537,17 +1538,17 @@ def authz_del_from_subdir(sbox):
 def log_diff_dontdothat(sbox):
   "log --diff on dontdothat"
   sbox.build(create_wc = False)
-  
+
   ddt_url = sbox.repo_url.replace('/svn-test-work/', '/ddt-test-work/')
-  
+
   svntest.actions.run_and_verify_svn(None, None, [],
-                                      'log', sbox.repo_url, 
+                                      'log', sbox.repo_url,
                                       '-c', 1, '--diff')
 
   # We should expect a PASS or a proper error message instead of
   # svn: E175009: XML parsing failed: (403 Forbidden)
   svntest.actions.run_and_verify_svn(None, None, [],
-                                      'log', ddt_url, 
+                                      'log', ddt_url,
                                       '-c', 1, '--diff')
 
 

Modified: subversion/branches/verify-keep-going/subversion/tests/cmdline/autoprop_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/tests/cmdline/autoprop_tests.py?rev=1489765&r1=1489764&r2=1489765&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/tests/cmdline/autoprop_tests.py (original)
+++ subversion/branches/verify-keep-going/subversion/tests/cmdline/autoprop_tests.py Wed Jun  5 09:22:43 2013
@@ -635,7 +635,7 @@ def svn_prop_inheritable_autoprops_add_v
   # again, which is not what we are here to test.
   if os.name == 'posix':
     os.chmod(os.path.join(sbox.wc_dir, 'D', 'rip.bat'), 0664)
-    
+
   os.chdir(sbox.wc_dir)
   svntest.main.run_svn(None, 'add', '.', '--force', '--no-auto-props',
                        '--config-dir', config_dir)

Modified: subversion/branches/verify-keep-going/subversion/tests/cmdline/basic_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/tests/cmdline/basic_tests.py?rev=1489765&r1=1489764&r2=1489765&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/tests/cmdline/basic_tests.py (original)
+++ subversion/branches/verify-keep-going/subversion/tests/cmdline/basic_tests.py Wed Jun  5 09:22:43 2013
@@ -3043,12 +3043,12 @@ def peg_rev_on_non_existent_wc_path(sbox
   # test something.
   sbox.simple_update()
   # This currently fails with ENOENT on A/mu3.
-  svntest.actions.run_and_verify_svn(None, ['r2\n'], [], 
+  svntest.actions.run_and_verify_svn(None, ['r2\n'], [],
                                      'cat', '-r2', sbox.ospath('A3/mu3') + '@3')
   os.chdir(sbox.ospath('A4'))
-  svntest.actions.run_and_verify_svn(None, ['r2\n'], [], 
+  svntest.actions.run_and_verify_svn(None, ['r2\n'], [],
                                      'cat', '-r2', sbox.ospath('mu3') + '@3')
-  
+
 ########################################################################
 # Run the tests
 

Modified: subversion/branches/verify-keep-going/subversion/tests/cmdline/blame_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/tests/cmdline/blame_tests.py?rev=1489765&r1=1489764&r2=1489765&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/tests/cmdline/blame_tests.py (original)
+++ subversion/branches/verify-keep-going/subversion/tests/cmdline/blame_tests.py Wed Jun  5 09:22:43 2013
@@ -150,7 +150,7 @@ def blame_binary(sbox):
   svntest.main.run_svn(None, 'propdel', 'svn:mime-type', iota)
   svntest.main.run_svn(None, 'ci',
                        '-m', '', iota)
-  
+
   # Blame fails when asking about an old revision where the mime-type is binary
   exit_code, output, errput = svntest.main.run_svn(2, 'blame', iota + '@3')
   if (len(errput) != 1) or (errput[0].find('Skipping') == -1):

Modified: subversion/branches/verify-keep-going/subversion/tests/cmdline/cat_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/tests/cmdline/cat_tests.py?rev=1489765&r1=1489764&r2=1489765&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/tests/cmdline/cat_tests.py (original)
+++ subversion/branches/verify-keep-going/subversion/tests/cmdline/cat_tests.py Wed Jun  5 09:22:43 2013
@@ -163,6 +163,8 @@ def cat_skip_uncattable(sbox):
   expected_err_re = re.compile(expected_err3, re.DOTALL)
 
   exit_code, output, error = svntest.main.run_svn(1, 'cat', rho_path, G_path, new_file_path)
+  error = [line for line in error
+           if not re.compile(svntest.main.stack_trace_regexp).match(line)]
 
   # Verify output
   if output[0] != expected_out:

Modified: subversion/branches/verify-keep-going/subversion/tests/cmdline/commit_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/tests/cmdline/commit_tests.py?rev=1489765&r1=1489764&r2=1489765&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/tests/cmdline/commit_tests.py (original)
+++ subversion/branches/verify-keep-going/subversion/tests/cmdline/commit_tests.py Wed Jun  5 09:22:43 2013
@@ -2892,7 +2892,7 @@ def commit_danglers(sbox):
   A_copied = sbox.ospath('A_copied')
   mu_copied = sbox.ospath('A_copied/mu')
 
-  svntest.main.file_write(mu_copied, "xxxx")  
+  svntest.main.file_write(mu_copied, "xxxx")
 
   # We already test for this problem for some time
   expected_error = "svn: E200009: '.*A_copied' .*exist.*yet.* '.*mu'.*part"
@@ -2936,16 +2936,16 @@ def last_changed_of_copied_subdir(sbox):
   E_copied = sbox.ospath('A/B_copied/E')
   alpha_copied = sbox.ospath('A/B_copied/E/alpha')
 
-  svntest.main.file_write(alpha_copied, "xxxx") 
-  
+  svntest.main.file_write(alpha_copied, "xxxx")
+
   svntest.main.run_svn(None, 'commit', wc_dir, '-mm')
 
   expected = {'Revision'          : '2',
               'Last Changed Rev'  : '2',
              }
   svntest.actions.run_and_verify_info([expected], E_copied)
-  
-  
+
+
 ########################################################################
 # Run the tests
 

Modified: subversion/branches/verify-keep-going/subversion/tests/cmdline/copy_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/tests/cmdline/copy_tests.py?rev=1489765&r1=1489764&r2=1489765&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/tests/cmdline/copy_tests.py (original)
+++ subversion/branches/verify-keep-going/subversion/tests/cmdline/copy_tests.py Wed Jun  5 09:22:43 2013
@@ -4749,7 +4749,7 @@ def mixed_rev_copy_del(sbox):
                                         '-r1',
                                         sbox.ospath('A/B/E/alpha'),
                                         sbox.ospath('A/B/E/beta'))
-  
+
   svntest.actions.run_and_verify_status(wc_dir, expected_status)
 
   # Copy A/B/E to A/B/E_copy
@@ -5217,7 +5217,7 @@ def case_only_rename(sbox):
   # Create expected status.
   expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
   expected_status.add({
-  
+
     'iota'              : Item(status='D ', wc_rev=1, moved_to='IoTa'),
     'IoTa'              : Item(status='A ', copied='+', wc_rev='-', moved_from='iota'),
     'A/B'               : Item(status='D ', wc_rev='1', moved_to='A/b'),

Modified: subversion/branches/verify-keep-going/subversion/tests/cmdline/depth_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/tests/cmdline/depth_tests.py?rev=1489765&r1=1489764&r2=1489765&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/tests/cmdline/depth_tests.py (original)
+++ subversion/branches/verify-keep-going/subversion/tests/cmdline/depth_tests.py Wed Jun  5 09:22:43 2013
@@ -2867,9 +2867,9 @@ def revert_depth_files(sbox):
   "depth immediate+files should revert deleted files"
 
   sbox.build(read_only = True)
-  
+
   expected_output = "Reverted '" + re.escape(sbox.ospath('A/mu')) + "'"
-  
+
   # Apply an unrelated delete one level to deep
   sbox.simple_rm('A/D/gamma')
 

Modified: subversion/branches/verify-keep-going/subversion/tests/cmdline/diff_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/tests/cmdline/diff_tests.py?rev=1489765&r1=1489764&r2=1489765&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/tests/cmdline/diff_tests.py (original)
+++ subversion/branches/verify-keep-going/subversion/tests/cmdline/diff_tests.py Wed Jun  5 09:22:43 2013
@@ -32,7 +32,7 @@ logger = logging.getLogger()
 
 # Our testing module
 import svntest
-from svntest import err
+from svntest import err, wc
 
 from prop_tests import binary_mime_type_on_text_file_warning
 
@@ -1899,7 +1899,7 @@ def diff_keywords(sbox):
 
 
 def diff_force(sbox):
-  "show diffs for binary files with --force"
+  "show diffs for binary files"
 
   sbox.build()
   wc_dir = sbox.wc_dir
@@ -1943,34 +1943,20 @@ def diff_force(sbox):
   svntest.actions.run_and_verify_commit(wc_dir, expected_output,
                                         expected_status, None, wc_dir)
 
-  # Check that we get diff when the first, the second and both files are
-  # marked as binary.
+  # Check that we get diff when the first, the second and both files
+  # are marked as binary.  First we'll use --force.  Then we'll use
+  # the configuration option 'diff-ignore-content-type'.
 
   re_nodisplay = re.compile('^Cannot display:')
 
-  exit_code, stdout, stderr = svntest.main.run_svn(None,
-                                                   'diff', '-r1:2', iota_path,
-                                                   '--force')
-
-  for line in stdout:
-    if (re_nodisplay.match(line)):
-      raise svntest.Failure
-
-  exit_code, stdout, stderr = svntest.main.run_svn(None,
-                                                   'diff', '-r2:1', iota_path,
-                                                   '--force')
-
-  for line in stdout:
-    if (re_nodisplay.match(line)):
-      raise svntest.Failure
-
-  exit_code, stdout, stderr = svntest.main.run_svn(None,
-                                                   'diff', '-r2:3', iota_path,
-                                                   '--force')
-
-  for line in stdout:
-    if (re_nodisplay.match(line)):
-      raise svntest.Failure
+  for opt in ['--force',
+              '--config-option=config:miscellany:diff-ignore-content-type=yes']:
+    for range in ['-r1:2', '-r2:1', '-r2:3']:
+      exit_code, stdout, stderr = svntest.main.run_svn(None, 'diff', range,
+                                                       iota_path, opt)
+      for line in stdout:
+        if (re_nodisplay.match(line)):
+          raise svntest.Failure
 
 #----------------------------------------------------------------------
 # Regression test for issue #2333: Renaming a directory should produce
@@ -3388,7 +3374,7 @@ def diff_git_format_wc_wc(sbox):
   expected_output = make_git_diff_header(
                          alpha_copied_path, "A/B/E/alpha_copied",
                          "revision 0", "working copy",
-                         copyfrom_path="A/B/E/alpha", 
+                         copyfrom_path="A/B/E/alpha",
                          copyfrom_rev='1', cp=True,
                          text_changes=True) + [
     "@@ -1 +1,2 @@\n",
@@ -3983,7 +3969,7 @@ def diff_two_working_copies(sbox):
                       "@@ -1 +0,0 @@\n",
                       "-This is the file 'psi'.\n",
                     ]
-                    
+
   # Files in diff may be in any order.
   expected_output = svntest.verify.UnorderedOutput(expected_output)
   svntest.actions.run_and_verify_svn(None, expected_output, [],
@@ -4520,6 +4506,80 @@ def diff_dir_replaced_by_dir(sbox):
   svntest.actions.run_and_verify_svn(None, expected_output, [],
                                      'diff', '--summarize', wc_dir)
 
+
+@Issue(4366)
+def diff_repos_empty_file_addition(sbox):
+  "repos diff of rev which adds empty file"
+
+  sbox.build()
+  wc_dir = sbox.wc_dir
+
+  # Add and commit an empty file.
+  svntest.main.file_append(sbox.ospath('newfile'), "")
+  svntest.main.run_svn(None, 'add', sbox.ospath('newfile'))
+  expected_output = svntest.wc.State(sbox.wc_dir, {
+    'newfile': Item(verb='Adding'),
+    })
+  expected_status = svntest.actions.get_virginal_state(sbox.wc_dir, 1)
+  expected_status.add({
+    'newfile' : Item(status='  ', wc_rev=2),
+    })
+  svntest.actions.run_and_verify_commit(sbox.wc_dir, expected_output,
+                                        expected_status, None, sbox.wc_dir)
+
+  # Now diff the revision that added the empty file.
+  expected_output = [
+    'Index: newfile\n',
+    '===================================================================\n',
+    ]
+  svntest.actions.run_and_verify_svn(None, expected_output, [],
+                                     'diff', '-c', '2', sbox.repo_url)
+
+def diff_missing_tree_conflict_victim(sbox):
+  "diff with missing tree-conflict victim in wc"
+
+  sbox.build()
+  wc_dir = sbox.wc_dir
+
+  # Produce an 'incoming edit vs. local missing' tree conflict:
+  # r2: edit iota and commit the change
+  svntest.main.file_append(sbox.ospath('iota'), "This is a change to iota.\n")
+  sbox.simple_propset('k', 'v', 'A/C')
+  sbox.simple_commit()
+  # now remove iota
+  sbox.simple_rm('iota', 'A/C')
+  sbox.simple_commit()
+  # update to avoid mixed-rev wc warning
+  sbox.simple_update()
+  # merge r2 into wc and verify that a tree conflict is flagged on iota
+  expected_output = wc.State(wc_dir, {
+      'iota' : Item(status='  ', treeconflict='C'),
+      'A/C' : Item(status='  ', treeconflict='C')
+  })
+  expected_mergeinfo_output = wc.State(wc_dir, {})
+  expected_elision_output = wc.State(wc_dir, {})
+  expected_disk = svntest.main.greek_state.copy()
+  expected_disk.remove('iota','A/C')
+  expected_status = svntest.actions.get_virginal_state(wc_dir, 3)
+  expected_status.tweak('iota', 'A/C',
+                        status='! ', treeconflict='C', wc_rev=None)
+  expected_skip = wc.State('', { })
+  svntest.actions.run_and_verify_merge(wc_dir, '1', '2',
+                                       sbox.repo_url, None,
+                                       expected_output,
+                                       expected_mergeinfo_output,
+                                       expected_elision_output,
+                                       expected_disk,
+                                       expected_status,
+                                       expected_skip,
+                                       None, None, None, None, None, None,
+                                       False, '--ignore-ancestry', wc_dir)
+
+  # 'svn diff' should show no change for the working copy
+  # This currently fails because svn errors out with a 'node not found' error
+  expected_output = [ ]
+  svntest.actions.run_and_verify_svn(None, expected_output, [], 'diff', wc_dir)
+
 ########################################################################
 #Run the tests
 
@@ -4598,6 +4658,8 @@ test_list = [ None,
               local_tree_replace,
               diff_dir_replaced_by_file,
               diff_dir_replaced_by_dir,
+              diff_repos_empty_file_addition,
+              diff_missing_tree_conflict_victim,
               ]
 
 if __name__ == '__main__':



Mime
View raw message