You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by da...@apache.org on 2015/09/18 03:38:50 UTC

svn commit: r1703735 [7/8] - in /subversion/branches/patch-exec: ./ build/ build/ac-macros/ build/generator/ build/generator/templates/ contrib/hook-scripts/ notes/ subversion/ subversion/bindings/swig/include/ subversion/include/ subversion/include/pr...

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

Modified: subversion/branches/patch-exec/subversion/svnserve/svnserve.c
URL: http://svn.apache.org/viewvc/subversion/branches/patch-exec/subversion/svnserve/svnserve.c?rev=1703735&r1=1703734&r2=1703735&view=diff
==============================================================================
--- subversion/branches/patch-exec/subversion/svnserve/svnserve.c (original)
+++ subversion/branches/patch-exec/subversion/svnserve/svnserve.c Fri Sep 18 01:38:47 2015
@@ -1030,7 +1030,9 @@ sub_main(int *exit_code, int argc, const
       apr_pool_cleanup_register(pool, pool, apr_pool_cleanup_null,
                                 redirect_stdout);
 
-      SVN_ERR(svn_stream_for_stdin(&stdin_stream, pool));
+      /* We are an interactive server, i.e. can't use APR buffering on
+       * stdin. */
+      SVN_ERR(svn_stream_for_stdin2(&stdin_stream, FALSE, pool));
       SVN_ERR(svn_stream_for_stdout(&stdout_stream, pool));
 
       /* Use a subpool for the connection to ensure that if SASL is used

Modified: subversion/branches/patch-exec/subversion/tests/cmdline/authz_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/patch-exec/subversion/tests/cmdline/authz_tests.py?rev=1703735&r1=1703734&r2=1703735&view=diff
==============================================================================
--- subversion/branches/patch-exec/subversion/tests/cmdline/authz_tests.py (original)
+++ subversion/branches/patch-exec/subversion/tests/cmdline/authz_tests.py Fri Sep 18 01:38:47 2015
@@ -728,10 +728,8 @@ def authz_locking(sbox):
 
   if sbox.repo_url.startswith('http'):
     expected_err = ".*svn: E175013: .*[Ff]orbidden.*"
-    expected_status = 1
   else:
     expected_err = ".*svn: warning: W170001: Authorization failed.*"
-    expected_status = 0
 
   root_url = sbox.repo_url
   wc_dir = sbox.wc_dir
@@ -741,16 +739,16 @@ def authz_locking(sbox):
   mu_path = os.path.join(wc_dir, 'A', 'mu')
 
   # lock a file url, target is readonly: should fail
-  svntest.actions.run_and_verify_svn2(None, expected_err, expected_status,
-                                      'lock',
-                                      '-m', 'lock msg',
-                                      iota_url)
+  svntest.actions.run_and_verify_svn(None, expected_err,
+                                     'lock',
+                                     '-m', 'lock msg',
+                                     iota_url)
 
   # lock a file path, target is readonly: should fail
-  svntest.actions.run_and_verify_svn2(None, expected_err, expected_status,
-                                      'lock',
-                                      '-m', 'lock msg',
-                                      iota_path)
+  svntest.actions.run_and_verify_svn(None, expected_err,
+                                     'lock',
+                                     '-m', 'lock msg',
+                                     iota_path)
 
   # Test for issue 2700: we have write access in folder /A, but not in root.
   # Get a lock on /A/mu and try to commit it.
@@ -783,16 +781,16 @@ def authz_locking(sbox):
   svntest.actions.run_and_verify_info([{'Lock Token' : None}],
                                       sbox.ospath('A/mu'))
 
-  ### Crazy serf SVN_ERR_FS_LOCK_OWNER_MISMATCH warning! Issue 3801?
   if sbox.repo_url.startswith('http'):
     expected_err = ".*svn: warning: W160039: Unlock.*[Ff]orbidden.*"
-    expected_status = 0
+  else:
+    expected_err = ".*svn: warning: W170001: Authorization failed.*"
 
-  svntest.actions.run_and_verify_svn2(None, expected_err, expected_status,
-                                      'lock',
-                                      '-m', 'lock msg',
-                                      mu_path,
-                                      iota_path)
+  svntest.actions.run_and_verify_svn(None, expected_err,
+                                     'lock',
+                                     '-m', 'lock msg',
+                                     mu_path,
+                                     iota_path)
 
   # One path locked, one still unlocked
   svntest.actions.run_and_verify_info([{'Lock Token' : None}],

Modified: subversion/branches/patch-exec/subversion/tests/cmdline/lock_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/patch-exec/subversion/tests/cmdline/lock_tests.py?rev=1703735&r1=1703734&r2=1703735&view=diff
==============================================================================
--- subversion/branches/patch-exec/subversion/tests/cmdline/lock_tests.py (original)
+++ subversion/branches/patch-exec/subversion/tests/cmdline/lock_tests.py Fri Sep 18 01:38:47 2015
@@ -275,11 +275,11 @@ def steal_lock(sbox):
 
   # attempt (and fail) to lock file
 
-  # This should give a "iota' is already locked... error, but exits 0.
-  svntest.actions.run_and_verify_svn2(None,
-                                      ".*already locked", 0,
-                                      'lock',
-                                      '-m', 'trying to break', file_path_b)
+  # This should give a "iota' is already locked error
+  svntest.actions.run_and_verify_svn(None,
+                                     ".*already locked",
+                                     'lock',
+                                     '-m', 'trying to break', file_path_b)
 
   svntest.actions.run_and_verify_svn(".*locked by user", [],
                                      'lock', '--force',
@@ -703,11 +703,11 @@ def out_of_date(sbox):
                        '-m', '', file_path)
 
   # --- Meanwhile, in our other working copy... ---
-  svntest.actions.run_and_verify_svn2(None,
-                                      ".*newer version of '/iota' exists", 0,
-                                      'lock',
-                                      '--username', svntest.main.wc_author2,
-                                      '-m', '', file_path_b)
+  svntest.actions.run_and_verify_svn(None,
+                                     ".*newer version of '/iota' exists",
+                                     'lock',
+                                     '--username', svntest.main.wc_author2,
+                                     '-m', '', file_path_b)
 
 #----------------------------------------------------------------------
 # Tests reverting a svn:needs-lock file
@@ -1164,10 +1164,10 @@ def unlock_already_unlocked_files(sbox):
 
   error_msg = ".*Path '/A/B/E/alpha' is already locked by user '" + \
               svntest.main.wc_author2 + "'.*"
-  svntest.actions.run_and_verify_svn2(None, error_msg, 0,
-                                      'lock',
-                                      '--username', svntest.main.wc_author2,
-                                      alpha_path, gamma_path)
+  svntest.actions.run_and_verify_svn(None, error_msg,
+                                     'lock',
+                                     '--username', svntest.main.wc_author2,
+                                     alpha_path, gamma_path)
   expected_status.tweak('A/D/gamma', writelocked='K')
   svntest.actions.run_and_verify_status(wc_dir, expected_status)
 
@@ -1180,11 +1180,11 @@ def unlock_already_unlocked_files(sbox):
 
   error_msg = "(.*No lock on path '/A/B/lambda'.*)" + \
               "|(.*'A/B/lambda' is not locked.*)"
-  svntest.actions.run_and_verify_svn2(None, error_msg, 0,
-                                      'unlock',
-                                      '--username', svntest.main.wc_author2,
-                                      '--force',
-                                      iota_path, lambda_path, alpha_path)
+  svntest.actions.run_and_verify_svn(None, error_msg,
+                                     'unlock',
+                                     '--username', svntest.main.wc_author2,
+                                     '--force',
+                                     iota_path, lambda_path, alpha_path)
 
 
   expected_status.tweak('iota', 'A/B/E/alpha', writelocked=None)
@@ -1305,9 +1305,8 @@ def unlock_wrong_token(sbox):
   # Then, unlocking the WC path should fail.
   ### The error message returned is actually this, but let's worry about that
   ### another day...
-  svntest.actions.run_and_verify_svn2(
-    None, ".*(No lock on path)", 0,
-    'unlock', file_path)
+  svntest.actions.run_and_verify_svn(None, ".*(No lock on path)",
+                                     'unlock', file_path)
 
 #----------------------------------------------------------------------
 # Verify that info shows lock info for locked files with URI-unsafe names
@@ -1366,10 +1365,10 @@ def unlocked_lock_of_other_user(sbox):
   else:
     expected_err = "svn: warning: W160039: User '%s' is trying to use a lock owned by "\
                    "'%s'.*" % (svntest.main.wc_author2, svntest.main.wc_author)
-  svntest.actions.run_and_verify_svn2([], expected_err, 0,
-                                      'unlock',
-                                      '--username', svntest.main.wc_author2,
-                                      pi_path)
+  svntest.actions.run_and_verify_svn([], expected_err,
+                                     'unlock',
+                                     '--username', svntest.main.wc_author2,
+                                     pi_path)
   svntest.actions.run_and_verify_status(wc_dir, expected_status)
 
 
@@ -1421,9 +1420,9 @@ def lock_twice_in_one_wc(sbox):
   svntest.actions.run_and_verify_svn(None, [],
                                      'lock', mu_path, '-m', 'Locked here')
 
-  # Locking in location 2 should fail ### Currently returns exitcode 0
-  svntest.actions.run_and_verify_svn2(None, ".*is already locked.*", 0,
-                                      'lock', '-m', '', mu2_path)
+  # Locking in location 2 should fail
+  svntest.actions.run_and_verify_svn(None, ".*is already locked.*",
+                                     'lock', '-m', '', mu2_path)
 
   # Change the file anyway
   os.chmod(mu2_path, 0700)
@@ -1469,8 +1468,8 @@ def lock_path_not_in_head(sbox):
   # ..\..\..\subversion\libsvn_client\ra.c:275: (apr_err=235000)
   # svn: In file '..\..\..\subversion\libsvn_ra_serf\util.c' line 1120:
   #  assertion failed (ctx->status_code)
-  svntest.actions.run_and_verify_svn2(None, expected_lock_fail_err_re,
-                                      0, 'lock', lambda_path)
+  svntest.actions.run_and_verify_svn(None, expected_lock_fail_err_re,
+                                     'lock', lambda_path)
 
   expected_err = 'svn: E155008: The node \'.*D\' is not a file'
   svntest.actions.run_and_verify_svn(None, expected_err,
@@ -1679,8 +1678,8 @@ def block_unlock_if_pre_unlock_hook_fail
 
   # Make sure the unlock operation fails as pre-unlock hook blocks it.
   expected_unlock_fail_err_re = ".*error text"
-  svntest.actions.run_and_verify_svn2(None, expected_unlock_fail_err_re,
-                                      0, 'unlock', pi_path)
+  svntest.actions.run_and_verify_svn(None, expected_unlock_fail_err_re,
+                                     'unlock', pi_path)
   svntest.actions.run_and_verify_status(wc_dir, expected_status)
 
 #----------------------------------------------------------------------
@@ -1699,10 +1698,10 @@ def lock_invalid_token(sbox):
   fname = 'iota'
   file_path = os.path.join(sbox.wc_dir, fname)
 
-  svntest.actions.run_and_verify_svn2(None,
-                                      "svn: warning: W160037: " \
-                                      ".*scheme.*'opaquelocktoken'", 0,
-                                      'lock', '-m', '', file_path)
+  svntest.actions.run_and_verify_svn(None,
+                                     "svn: warning: W160037: " \
+                                     ".*scheme.*'opaquelocktoken'",
+                                     'lock', '-m', '', file_path)
 
 @Issue(3105)
 def lock_multi_wc(sbox):
@@ -1922,27 +1921,29 @@ def lock_hook_messages(sbox):
   svntest.actions.create_failing_hook(repo_dir, "pre-lock", error_msg)
   svntest.actions.create_failing_hook(repo_dir, "pre-unlock", error_msg)
 
-  _, _, actual_stderr = svntest.actions.run_and_verify_svn2(
-                                     [], svntest.verify.AnyOutput, 0,
+  _, _, actual_stderr = svntest.actions.run_and_verify_svn(
+                                     [], svntest.verify.AnyOutput,
                                      'lock', mu_url)
-  if len(actual_stderr) > 2:
-    actual_stderr = actual_stderr[-2:]
+  if len(actual_stderr) > 4:
+    actual_stderr = actual_stderr[-4:-2] + actual_stderr[-1:]
   expected_err = [
     'svn: warning: W165001: ' + svntest.actions.hook_failure_message('pre-lock'),
     error_msg + "\n",
+    "svn: E200009: One or more locks could not be obtained\n",
   ]
   svntest.verify.compare_and_display_lines(None, 'STDERR',
                                            expected_err, actual_stderr)
 
 
-  _, _, actual_stderr = svntest.actions.run_and_verify_svn2(
-                                     [], svntest.verify.AnyOutput, 0,
+  _, _, actual_stderr = svntest.actions.run_and_verify_svn(
+                                     [], svntest.verify.AnyOutput,
                                      'unlock', iota_url)
-  if len(actual_stderr) > 2:
-    actual_stderr = actual_stderr[-2:]
+  if len(actual_stderr) > 4:
+    actual_stderr = actual_stderr[-4:-2] + actual_stderr[-1:]
   expected_err = [
     'svn: warning: W165001: ' + svntest.actions.hook_failure_message('pre-unlock'),
     error_msg + "\n",
+    "svn: E200009: One or more locks could not be released\n",
   ]
   svntest.verify.compare_and_display_lines(None, 'STDERR',
                                            expected_err, actual_stderr)
@@ -2036,15 +2037,15 @@ def dav_lock_timeout(sbox):
   expiration_date = svntest.actions.run_and_parse_info(sbox.repo_url + '/iota')[0]['Lock Expires']
 
   # Verify that there is a lock, by trying to obtain one
-  svntest.actions.run_and_verify_svn2(None, ".*locked by user", 0,
-                                      'lock', '-m', '', sbox.ospath('iota'))
+  svntest.actions.run_and_verify_svn(None, ".*locked by user",
+                                     'lock', '-m', '', sbox.ospath('iota'))
   expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
   expected_status.tweak('iota', writelocked='O')
   svntest.actions.run_and_verify_status(wc_dir, expected_status)
 
   # This used to fail over serf with a parse error of the timeout.
   expected_err = "svn: warning: W160039:"
-  svntest.actions.run_and_verify_svn2(None, expected_err, 0,
+  svntest.actions.run_and_verify_svn(None, expected_err,
                                      'unlock', sbox.repo_url + '/iota')
 
   # Force unlock via working copy, this also used to fail over serf.
@@ -2207,27 +2208,27 @@ def many_locks_hooks(sbox):
                                          '  sys.exit(1)\n'
                                          'sys.exit(0)\n')
 
-  svntest.actions.run_and_verify_svn2(".* locked",
-                                      "svn: warning: W165001: .*", 0,
-                                      'lock',
-                                      sbox.ospath('iota'),
-                                      sbox.ospath('A/mu'),
-                                      sbox.ospath('A/B/E/alpha'),
-                                      sbox.ospath('A/D/G/pi'),
-                                      sbox.ospath('A/D/G/rho'))
+  svntest.actions.run_and_verify_svn(".* locked",
+                                     "svn: warning: W165001: .*",
+                                     'lock',
+                                     sbox.ospath('iota'),
+                                     sbox.ospath('A/mu'),
+                                     sbox.ospath('A/B/E/alpha'),
+                                     sbox.ospath('A/D/G/pi'),
+                                     sbox.ospath('A/D/G/rho'))
 
   expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
   expected_status.tweak('iota', 'A/mu', 'A/B/E/alpha', 'A/D/G/rho',
                         writelocked='K')
   svntest.actions.run_and_verify_status(wc_dir, expected_status)
 
-  svntest.actions.run_and_verify_svn2(".* unlocked",
-                                      "svn: warning: W165001: .*", 0,
-                                      'unlock',
-                                      sbox.ospath('iota'),
-                                      sbox.ospath('A/mu'),
-                                      sbox.ospath('A/B/E/alpha'),
-                                      sbox.ospath('A/D/G/rho'))
+  svntest.actions.run_and_verify_svn(".* unlocked",
+                                     "svn: warning: W165001: .*",
+                                     'unlock',
+                                     sbox.ospath('iota'),
+                                     sbox.ospath('A/mu'),
+                                     sbox.ospath('A/B/E/alpha'),
+                                     sbox.ospath('A/D/G/rho'))
 
   expected_status.tweak('iota', 'A/B/E/alpha', 'A/D/G/rho',
                         writelocked=None)

Modified: subversion/branches/patch-exec/subversion/tests/cmdline/merge_automatic_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/patch-exec/subversion/tests/cmdline/merge_automatic_tests.py?rev=1703735&r1=1703734&r2=1703735&view=diff
==============================================================================
--- subversion/branches/patch-exec/subversion/tests/cmdline/merge_automatic_tests.py (original)
+++ subversion/branches/patch-exec/subversion/tests/cmdline/merge_automatic_tests.py Fri Sep 18 01:38:47 2015
@@ -1327,6 +1327,78 @@ def reintegrate_subtree_not_updated(sbox
   sbox.simple_commit()
   sbox.simple_update()
 
+def merge_to_copy_and_add(sbox):
+  "merge peg to a copy and add"
+
+  sbox.build()
+
+  sbox.simple_copy('A', 'AA')
+  sbox.simple_append('A/mu', 'A/mu')
+  sbox.simple_commit('A')
+
+  # This is the scenario the code is supposed to support; a copy
+  svntest.actions.run_and_verify_svn(None, [],
+                                     'merge', '^/A', sbox.ospath('AA'))
+
+  sbox.simple_mkdir('A3')
+  # And this case currently segfaults, because merge doesn't check
+  # if the path has a repository location
+  expected_err = ".*svn: E195012: Can't perform .*A3'.*added.*"
+  svntest.actions.run_and_verify_svn(None, expected_err,
+                                     'merge', '^/A', sbox.ospath('A3'))
+  # Try the same merge with --reintegrate, for completeness' sake.
+  expected_err = ".*svn: E195012: Can't reintegrate into .*A3'.*added.*"
+  svntest.actions.run_and_verify_svn(None, expected_err,
+                                     'merge', '--reintegrate', '^/A',
+                                     sbox.ospath('A3'))
+
+def merge_delete_crlf_file(sbox):
+  "merge the deletion of a strict CRLF file"
+
+  sbox.build()
+
+  sbox.simple_copy('A', 'AA')
+
+  # Let commit fix the eols
+  sbox.simple_add_text('with\rCRLF\rhere!', 'A/crlf')
+  sbox.simple_add_text('with\rnative\r\eol', 'A/native')
+  sbox.simple_add_text('with\rCR\r\eol', 'A/cr')
+  sbox.simple_add_text('with\rLF\r\eol', 'A/lf')
+
+  # And apply the magic property
+  sbox.simple_propset('svn:eol-style', 'CRLF',   'A/crlf')
+  sbox.simple_propset('svn:eol-style', 'native', 'A/native')
+  sbox.simple_propset('svn:eol-style', 'CR',     'A/cr')
+  sbox.simple_propset('svn:eol-style', 'LF',     'A/lf')
+
+  sbox.simple_commit('A') # r2
+
+  # Merge the addition of the files
+  svntest.actions.run_and_verify_svn(None, [],
+                                     'merge', '^/A', sbox.ospath('AA'))
+  sbox.simple_commit('AA') # r3
+
+  sbox.simple_rm('A/D', 'A/mu', 'A/crlf', 'A/native', 'A/cr', 'A/lf')
+  sbox.simple_commit('A') # r4
+
+  sbox.simple_update('') # Make single revision r4
+
+  # And now merge the deletes
+  expected_output = svntest.verify.UnorderedOutput([
+    '--- Merging r3 through r4 into \'%s\':\n' % sbox.ospath('AA'),
+    'D    %s\n' % sbox.ospath('AA/cr'),
+    'D    %s\n' % sbox.ospath('AA/crlf'),
+    'D    %s\n' % sbox.ospath('AA/lf'),
+    'D    %s\n' % sbox.ospath('AA/native'),
+    'D    %s\n' % sbox.ospath('AA/mu'),
+    'D    %s\n' % sbox.ospath('AA/D'),
+    '--- Recording mergeinfo for merge of r3 through r4 into \'%s\':\n'
+                % sbox.ospath('AA'),
+    ' U   %s\n' % sbox.ospath('AA')
+  ])
+  svntest.actions.run_and_verify_svn(expected_output, [],
+                                     'merge', '^/A', sbox.ospath('AA'))
+
 ########################################################################
 # Run the tests
 
@@ -1356,6 +1428,8 @@ test_list = [ None,
               auto_merge_handles_replacements_in_merge_source,
               effective_sync_results_in_reintegrate,
               reintegrate_subtree_not_updated,
+              merge_to_copy_and_add,
+              merge_delete_crlf_file
              ]
 
 if __name__ == '__main__':

Modified: subversion/branches/patch-exec/subversion/tests/cmdline/revert_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/patch-exec/subversion/tests/cmdline/revert_tests.py?rev=1703735&r1=1703734&r2=1703735&view=diff
==============================================================================
--- subversion/branches/patch-exec/subversion/tests/cmdline/revert_tests.py (original)
+++ subversion/branches/patch-exec/subversion/tests/cmdline/revert_tests.py Fri Sep 18 01:38:47 2015
@@ -1630,7 +1630,13 @@ def revert_obstructing_wc(sbox):
   svntest.actions.run_and_verify_svn("Skipped '.*A' -- .*obstruct.*", [],
                                      'revert', '-R', wc_dir)
 
+def revert_moved_dir_partial(sbox):
+  "partial revert moved_dir"
 
+  sbox.build(read_only = True)
+
+  sbox.simple_move('A', 'A_')
+  svntest.actions.run_and_verify_svn(None, [], 'revert', sbox.ospath('A'))
 
 
 ########################################################################
@@ -1673,6 +1679,7 @@ test_list = [ None,
               revert_with_unversioned_targets,
               revert_nonexistent,
               revert_obstructing_wc,
+              revert_moved_dir_partial,
              ]
 
 if __name__ == '__main__':

Modified: subversion/branches/patch-exec/subversion/tests/cmdline/svnadmin_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/patch-exec/subversion/tests/cmdline/svnadmin_tests.py?rev=1703735&r1=1703734&r2=1703735&view=diff
==============================================================================
--- subversion/branches/patch-exec/subversion/tests/cmdline/svnadmin_tests.py (original)
+++ subversion/branches/patch-exec/subversion/tests/cmdline/svnadmin_tests.py Fri Sep 18 01:38:47 2015
@@ -601,8 +601,8 @@ def dump_quiet(sbox):
 
   sbox.build(create_wc = False)
 
-  exit_code, output, errput = svntest.main.run_svnadmin("dump", sbox.repo_dir,
-                                                        '--quiet')
+  exit_code, dump, errput = svntest.main.run_svnadmin("dump", sbox.repo_dir,
+                                                      '--quiet')
   svntest.verify.compare_and_display_lines(
     "Output of 'svnadmin dump --quiet' is unexpected.",
     'STDERR', [], errput)
@@ -1227,7 +1227,7 @@ def fsfs_recover_handle_missing_revs_or_
 
 #----------------------------------------------------------------------
 
-@Skip(svntest.main.tests_use_prepacakaged_repository)
+@Skip(svntest.main.tests_use_prepackaged_repository)
 def create_in_repo_subdir(sbox):
   "'svnadmin create /path/to/repo/subdir'"
 
@@ -3131,6 +3131,77 @@ def fsfs_pack_non_sharded(sbox):
       ['svnadmin: Warning - this repository is not sharded. Packing has no effect.\n'],
       [], "pack", sbox.repo_dir)
 
+def load_revprops(sbox):
+  "svnadmin load-revprops"
+
+  sbox.build(create_wc=False, empty=True)
+
+  dump_path = os.path.join(os.path.dirname(sys.argv[0]),
+                                           'svnadmin_tests_data',
+                                           'skeleton_repos.dump')
+  dump_contents = open(dump_path, 'rb').readlines()
+  load_and_verify_dumpstream(sbox, None, [], None, False, dump_contents)
+
+  svntest.actions.run_and_verify_svnlook(['Initial setup...\n', '\n'],
+                                         [], 'log', '-r1', sbox.repo_dir)
+
+  # After loading the dump, amend one of the log message in the repository.
+  input_file = sbox.get_tempname()
+  svntest.main.file_write(input_file, 'Modified log message...\n')
+
+  svntest.actions.run_and_verify_svnadmin([], [], 'setlog', '--bypass-hooks',
+                                          '-r1', sbox.repo_dir, input_file)
+  svntest.actions.run_and_verify_svnlook(['Modified log message...\n', '\n'],
+                                         [], 'log', '-r1', sbox.repo_dir)
+
+  # Load the same dump, but with 'svnadmin load-revprops'.  Doing so should
+  # restore the log message to its original state.
+  svntest.main.run_command_stdin(svntest.main.svnadmin_binary, None, 0,
+                                 True, dump_contents, 'load-revprops',
+                                 sbox.repo_dir)
+
+  svntest.actions.run_and_verify_svnlook(['Initial setup...\n', '\n'],
+                                         [], 'log', '-r1', sbox.repo_dir)
+
+def dump_revprops(sbox):
+  "svnadmin dump-revprops"
+
+  sbox.build(create_wc=False)
+
+  # Dump revprops only.
+  exit_code, dump_contents, errput = \
+    svntest.actions.run_and_verify_svnadmin(None, [], "dump-revprops", "-q",
+                                            sbox.repo_dir)
+
+  # We expect the dump to contain no path changes
+  for line in dump_contents:
+    if line.find("Node-path: ") > -1:
+      logger.warn("Error: path change found in revprops-only dump.")
+      raise svntest.Failure
+
+  # Remember the current log message for r1
+  exit_code, log_msg, errput = \
+    svntest.actions.run_and_verify_svnlook(None, [], 'log', '-r1',
+                                           sbox.repo_dir)
+
+  # Now, change the log message in the repository.
+  input_file = sbox.get_tempname()
+  svntest.main.file_write(input_file, 'Modified log message...\n')
+
+  svntest.actions.run_and_verify_svnadmin([], [], 'setlog', '--bypass-hooks',
+                                          '-r1', sbox.repo_dir, input_file)
+  svntest.actions.run_and_verify_svnlook(['Modified log message...\n', '\n'],
+                                         [], 'log', '-r1', sbox.repo_dir)
+
+  # Load the same dump with 'svnadmin load-revprops'.  Doing so should
+  # restore the log message to its original state.
+  svntest.main.run_command_stdin(svntest.main.svnadmin_binary, None, 0,
+                                 True, dump_contents, 'load-revprops',
+                                 sbox.repo_dir)
+
+  svntest.actions.run_and_verify_svnlook(log_msg, [], 'log', '-r1',
+                                         sbox.repo_dir)
+
 ########################################################################
 # Run the tests
 
@@ -3189,6 +3260,8 @@ test_list = [ None,
               load_no_svndate_r0,
               hotcopy_read_only,
               fsfs_pack_non_sharded,
+              load_revprops,
+              dump_revprops
              ]
 
 if __name__ == '__main__':

Modified: subversion/branches/patch-exec/subversion/tests/cmdline/svnmucc_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/patch-exec/subversion/tests/cmdline/svnmucc_tests.py?rev=1703735&r1=1703734&r2=1703735&view=diff
==============================================================================
--- subversion/branches/patch-exec/subversion/tests/cmdline/svnmucc_tests.py (original)
+++ subversion/branches/patch-exec/subversion/tests/cmdline/svnmucc_tests.py Fri Sep 18 01:38:47 2015
@@ -106,7 +106,9 @@ def basic_svnmucc(sbox):
 
   sbox.build()
   empty_file = sbox.ospath('empty')
+  file = sbox.ospath('file')
   svntest.main.file_append(empty_file, '')
+  svntest.main.file_append(file, 'file')
 
   # revision 2
   test_svnmucc(sbox.repo_url,
@@ -301,6 +303,14 @@ def basic_svnmucc(sbox):
                'propsetf', 'testprop', empty_file, 'foo/z.c',
                'propsetf', 'testprop', empty_file, 'foo/foo')
 
+  # revision 21
+  test_svnmucc(sbox.repo_url,
+               ['M /foo/z.c',
+                ], #---------
+               '-m', 'log msg',
+               'propset', 'testprop', 'false', 'foo/z.c',
+               'put', file, 'foo/z.c')
+
   # Expected missing revision error
   xtest_svnmucc(sbox.repo_url,
                 ["svnmucc: E200004: 'a' is not a revision"
@@ -461,7 +471,7 @@ def prohibited_deletes_and_moves(sbox):
   # See dev@, 2015-05-11, "Re: Issue 4579 / svnmucc fails to process certain
   # deletes", <http://svn.haxx.se/dev/archive-2015-05/0038.shtml>
 
-  sbox.build()
+  sbox.build(read_only = True)
   svntest.main.file_write(sbox.ospath('file'), "New contents")
 
   xtest_svnmucc(sbox.repo_url,
@@ -502,6 +512,82 @@ def prohibited_deletes_and_moves(sbox):
                 'rm', 'A/B',
                 'mv', 'A', 'A1')
 
+def svnmucc_type_errors(sbox):
+  "test type errors"
+
+  sbox.build(read_only=True)
+
+  sbox.simple_append('file', 'New contents')
+
+  xtest_svnmucc(sbox.repo_url,
+                ["svnmucc: E160016: Can't operate on 'B' "
+                "because 'A' is not a directory"],
+                '-m', '',
+                'put', sbox.ospath('file'), 'A',
+                'mkdir', 'A/B',
+                'propset', 'iota', 'iota', 'iota')
+
+  xtest_svnmucc(sbox.repo_url,
+                ["svnmucc: E200009: Can't delete node at 'A'"],
+                '-m', '',
+                'mkdir', 'A/Z',
+                'put', sbox.ospath('file'), 'A')
+
+  xtest_svnmucc(sbox.repo_url,
+                ["svnmucc: E160020: Path 'Z' already exists"],
+                '-m', '',
+                'mkdir', 'A/Z',
+                'put', sbox.ospath('file'), 'A/Z')
+
+def svnmucc_propset_and_put(sbox):
+  "propset and put"
+
+  sbox.build()
+
+  sbox.simple_append('file', 'New contents')
+
+  # First in the sane order: put, then propset
+  xtest_svnmucc(sbox.repo_url,
+                [],
+                '-m', '',
+                'put', sbox.ospath('file'), 't1',
+                'propset', 't1', 't1', 't1')
+
+  # And now in an impossible order: propset, then put
+  xtest_svnmucc(sbox.repo_url,
+                ["svnmucc: E200009: Can't set properties at not existing 't2'"],
+                '-m', '',
+                'propset', 't2', 't2', 't2',
+                'put', sbox.ospath('file'), 't2')
+
+  # And if the target already exists (dir)
+  xtest_svnmucc(sbox.repo_url,
+                ["svnmucc: E200009: Can't delete node at 'A'"],
+                '-m', '',
+                'propset', 'A', 'A', 'A',
+                'put', sbox.ospath('file'), 'A')
+
+  # And if the target already exists (file) # fixed in r1702467
+  xtest_svnmucc(sbox.repo_url,
+                [],
+                '-m', '',
+                'propset', 'iota', 'iota', 'iota',
+                'put', sbox.ospath('file'), 'iota')
+
+  # Put same file twice (non existing)
+  xtest_svnmucc(sbox.repo_url,
+                ["svnmucc: E160020: Path 't3' already exists"],
+                '-m', '',
+                'put', sbox.ospath('file'), 't3',
+                'put', sbox.ospath('file'), 't3')
+
+  # Put same file twice (existing)
+  xtest_svnmucc(sbox.repo_url,
+                ["svnmucc: E200009: Can't update file at 't1'"],
+                '-m', '',
+                'put', sbox.ospath('file'), 't1',
+                'put', sbox.ospath('file'), 't1')
+
 
 ######################################################################
 
@@ -513,6 +599,8 @@ test_list = [ None,
               no_log_msg_non_interactive,
               nested_replaces,
               prohibited_deletes_and_moves,
+              svnmucc_type_errors,
+              svnmucc_propset_and_put,
             ]
 
 if __name__ == '__main__':

Modified: subversion/branches/patch-exec/subversion/tests/cmdline/svntest/actions.py
URL: http://svn.apache.org/viewvc/subversion/branches/patch-exec/subversion/tests/cmdline/svntest/actions.py?rev=1703735&r1=1703734&r2=1703735&view=diff
==============================================================================
--- subversion/branches/patch-exec/subversion/tests/cmdline/svntest/actions.py (original)
+++ subversion/branches/patch-exec/subversion/tests/cmdline/svntest/actions.py Fri Sep 18 01:38:47 2015
@@ -249,6 +249,28 @@ def run_and_verify_svnadmin2(expected_st
   return exit_code, out, err
 
 
+def run_and_verify_svnfsfs(expected_stdout,
+                           expected_stderr, *varargs):
+  """Like run_and_verify_svnfsfs2, but the expected exit code is
+  assumed to be 0 if no output is expected on stderr, and 1 otherwise."""
+
+  expected_exit = 0
+  if expected_stderr is not None and expected_stderr != []:
+    expected_exit = 1
+  return run_and_verify_svnfsfs2(expected_stdout, expected_stderr,
+                                 expected_exit, *varargs)
+
+def run_and_verify_svnfsfs2(expected_stdout, expected_stderr,
+                            expected_exit, *varargs):
+  """Run svnfsfs command and check its output and exit code."""
+
+  exit_code, out, err = main.run_svnfsfs(*varargs)
+  verify.verify_outputs("Unexpected output", out, err,
+                        expected_stdout, expected_stderr)
+  verify.verify_exit_code("Unexpected return code", exit_code, expected_exit)
+  return exit_code, out, err
+
+
 def run_and_verify_svnversion(wc_dir, trail_url,
                               expected_stdout, expected_stderr, *varargs):
   """like run_and_verify_svnversion2, but the expected exit code is
@@ -1646,7 +1668,7 @@ def run_and_verify_diff_summarize_xml(er
   for path in paths:
     modified_path = path.childNodes[0].data
 
-    if (expected_prefix is not None
+    if (expected_prefix
         and modified_path.find(expected_prefix) == 0):
       modified_path = modified_path.replace(expected_prefix, '')[1:].strip()
 

Modified: subversion/branches/patch-exec/subversion/tests/cmdline/svntest/main.py
URL: http://svn.apache.org/viewvc/subversion/branches/patch-exec/subversion/tests/cmdline/svntest/main.py?rev=1703735&r1=1703734&r2=1703735&view=diff
==============================================================================
--- subversion/branches/patch-exec/subversion/tests/cmdline/svntest/main.py (original)
+++ subversion/branches/patch-exec/subversion/tests/cmdline/svntest/main.py Fri Sep 18 01:38:47 2015
@@ -1416,7 +1416,7 @@ def make_log_msg():
 # Functions which check the test configuration
 # (useful for conditional XFails)
 
-def tests_use_prepacakaged_repository():
+def tests_use_prepackaged_repository():
   return options.fsfs_version is not None
 
 def tests_verify_dump_load_cross_check():
@@ -1885,14 +1885,48 @@ def _internal_run_tests(test_list, testn
   return exit_code
 
 
-def create_default_options():
-  """Set the global options to the defaults, as provided by the argument
-     parser."""
-  _parse_options([])
+class AbbreviatedFormatter(logging.Formatter):
+  """A formatter with abbreviated loglevel indicators in the output.
 
+  Use %(levelshort)s in the format string to get a single character
+  representing the loglevel..
+  """
+
+  _level_short = {
+    logging.CRITICAL : 'C',
+    logging.ERROR : 'E',
+    logging.WARNING : 'W',
+    logging.INFO : 'I',
+    logging.DEBUG : 'D',
+    logging.NOTSET : '-',
+    }
 
-def _create_parser():
+  def format(self, record):
+    record.levelshort = self._level_short[record.levelno]
+    return logging.Formatter.format(self, record)
+
+def _create_parser(usage=None):
   """Return a parser for our test suite."""
+
+  global logger
+
+  # Initialize the LOGGER global variable so the option parsing can set
+  # its loglevel, as appropriate.
+  logger = logging.getLogger()
+
+  # Did some chucklehead log something before we configured it? If they
+  # did, then a default handler/formatter would get installed. We want
+  # to be the one to install the first (and only) handler.
+  for handler in logger.handlers:
+    if not isinstance(handler.formatter, AbbreviatedFormatter):
+      raise Exception('Logging occurred before configuration. Some code'
+                      ' path needs to be fixed. Examine the log output'
+                      ' to find what/where logged something.')
+
+  # Set a sane default log level
+  if logger.getEffectiveLevel() == logging.NOTSET:
+    logger.setLevel(logging.WARN)
+
   def set_log_level(option, opt, value, parser, level=None):
     if level:
       # called from --verbose
@@ -1901,9 +1935,18 @@ def _create_parser():
       # called from --set-log-level
       logger.setLevel(getattr(logging, value, None) or int(value))
 
-  # set up the parser
+  # Set up the parser.
+  # If you add new options, consider adding them in
+  #
+  #     .../build/run_tests.py:main()
+  #
+  # and handling them in
+  #
+  #     .../build/run_tests.py:TestHarness._init_py_tests()
+  #
   _default_http_library = 'serf'
-  usage = 'usage: %prog [options] [<test> ...]'
+  if usage is None:
+    usage = 'usage: %prog [options] [<test> ...]'
   parser = optparse.OptionParser(usage=usage)
   parser.add_option('-l', '--list', action='store_true', dest='list_tests',
                     help='Print test doc strings instead of running them')
@@ -1918,6 +1961,9 @@ def _create_parser():
   parser.add_option('-p', '--parallel', action='store_const',
                     const=default_num_threads, dest='parallel',
                     help='Run the tests in parallel')
+  parser.add_option('--parallel-instances', action='store',
+                    type='int', dest='parallel',
+                    help='Run the given number of tests in parallel')
   parser.add_option('-c', action='store_true', dest='is_child_process',
                     help='Flag if we are running this python test as a ' +
                          'child process')
@@ -2003,31 +2049,46 @@ def _create_parser():
   return parser
 
 
-def _parse_options(arglist=sys.argv[1:]):
+def parse_options(arglist=sys.argv[1:], usage=None):
   """Parse the arguments in arg_list, and set the global options object with
      the results"""
 
   global options
 
-  parser = _create_parser()
+  parser = _create_parser(usage)
   (options, args) = parser.parse_args(arglist)
 
-  # some sanity checking
+  # If there are no logging handlers registered yet, then install our
+  # own with our custom formatter. (anything currently installed *is*
+  # our handler as tested above, in _create_parser)
+  if not logger.handlers:
+    # Now that we have some options, let's get the logger configured before
+    # doing anything more
+    if options.log_with_timestamps:
+      formatter = AbbreviatedFormatter('%(levelshort)s:'
+                                       ' [%(asctime)s] %(message)s',
+                                       datefmt='%Y-%m-%d %H:%M:%S')
+    else:
+      formatter = AbbreviatedFormatter('%(levelshort)s: %(message)s')
+    handler = logging.StreamHandler(sys.stdout)
+    handler.setFormatter(formatter)
+    logger.addHandler(handler)
+
+  # Normalize url to have no trailing slash
+  if options.url:
+    if options.url[-1:] == '/':
+      options.test_area_url = options.url[:-1]
+    else:
+      options.test_area_url = options.url
+
+  # Some sanity checking
   if options.fsfs_packing and not options.fsfs_sharding:
     parser.error("--fsfs-packing requires --fsfs-sharding")
 
-  # If you change the below condition then change
-  # ../../../../build/run_tests.py too.
   if options.server_minor_version not in range(3, SVN_VER_MINOR+1):
     parser.error("test harness only supports server minor versions 3-%d"
                  % SVN_VER_MINOR)
 
-  if options.url:
-    if options.url[-1:] == '/': # Normalize url to have no trailing slash
-      options.test_area_url = options.url[:-1]
-    else:
-      options.test_area_url = options.url
-
   # Make sure the server-minor-version matches the fsfs-version parameter.
   if options.fsfs_version:
     if options.fsfs_version == 6:
@@ -2110,27 +2171,6 @@ def get_issue_details(issue_numbers):
   return issue_dict
 
 
-class AbbreviatedFormatter(logging.Formatter):
-  """A formatter with abbreviated loglevel indicators in the output.
-
-  Use %(levelshort)s in the format string to get a single character
-  representing the loglevel..
-  """
-
-  _level_short = {
-    logging.CRITICAL : 'C',
-    logging.ERROR : 'E',
-    logging.WARNING : 'W',
-    logging.INFO : 'I',
-    logging.DEBUG : 'D',
-    logging.NOTSET : '-',
-    }
-
-  def format(self, record):
-    record.levelshort = self._level_short[record.levelno]
-    return logging.Formatter.format(self, record)
-
-
 # Main func.  This is the "entry point" that all the test scripts call
 # to run their list of tests.
 #
@@ -2141,7 +2181,6 @@ def execute_tests(test_list, serial_only
   exiting the process.  This function can be used when a caller doesn't
   want the process to die."""
 
-  global logger
   global pristine_url
   global pristine_greek_repos_url
   global svn_binary
@@ -2161,42 +2200,13 @@ def execute_tests(test_list, serial_only
 
   testnums = []
 
-  # Initialize the LOGGER global variable so the option parsing can set
-  # its loglevel, as appropriate.
-  logger = logging.getLogger()
-
-  # Did some chucklehead log something before we configured it? If they
-  # did, then a default handler/formatter would get installed. We want
-  # to be the one to install the first (and only) handler.
-  for handler in logger.handlers:
-    if not isinstance(handler.formatter, AbbreviatedFormatter):
-      raise Exception('Logging occurred before configuration. Some code'
-                      ' path needs to be fixed. Examine the log output'
-                      ' to find what/where logged something.')
-
   if not options:
     # Override which tests to run from the commandline
-    (parser, args) = _parse_options()
+    (parser, args) = parse_options()
     test_selection = args
   else:
     parser = _create_parser()
 
-  # If there are no handlers registered yet, then install our own with
-  # our custom formatter. (anything currently installed *is* our handler
-  # as tested above)
-  if not logger.handlers:
-    # Now that we have some options, let's get the logger configured before
-    # doing anything more
-    if options.log_with_timestamps:
-      formatter = AbbreviatedFormatter('%(levelshort)s:'
-                                       ' [%(asctime)s] %(message)s',
-                                       datefmt='%Y-%m-%d %H:%M:%S')
-    else:
-      formatter = AbbreviatedFormatter('%(levelshort)s: %(message)s')
-    handler = logging.StreamHandler(sys.stdout)
-    handler.setFormatter(formatter)
-    logger.addHandler(handler)
-
   # parse the positional arguments (test nums, names)
   for arg in test_selection:
     appended = False
@@ -2326,25 +2336,29 @@ def execute_tests(test_list, serial_only
     # We are simply listing the tests so always exit with success.
     return 0
 
-  # don't run tests in parallel when the tests don't support it or there
-  # are only a few tests to run.
+  # don't run tests in parallel when the tests don't support it or
+  # there are only a few tests to run.
+  options_parallel = options.parallel
   if serial_only or len(testnums) < 2:
     options.parallel = 0
 
-  if not options.is_child_process:
-    # Build out the default configuration directory
-    create_config_dir(default_config_dir,
-                      ssl_cert=options.ssl_cert,
-                      ssl_url=options.test_area_url,
-                      http_proxy=options.http_proxy,
-                      exclusive_wc_locks=options.exclusive_wc_locks)
-
-    # Setup the pristine repository
-    svntest.actions.setup_pristine_greek_repository()
-
-  # Run the tests.
-  exit_code = _internal_run_tests(test_list, testnums, options.parallel,
-                                  options.srcdir, progress_func)
+  try:
+    if not options.is_child_process:
+      # Build out the default configuration directory
+      create_config_dir(default_config_dir,
+                        ssl_cert=options.ssl_cert,
+                        ssl_url=options.test_area_url,
+                        http_proxy=options.http_proxy,
+                        exclusive_wc_locks=options.exclusive_wc_locks)
+
+      # Setup the pristine repository
+      svntest.actions.setup_pristine_greek_repository()
+
+    # Run the tests.
+    exit_code = _internal_run_tests(test_list, testnums, options.parallel,
+                                    options.srcdir, progress_func)
+  finally:
+    options.parallel = options_parallel
 
   # Remove all scratchwork: the 'pristine' repository, greek tree, etc.
   # This ensures that an 'import' will happen the next time we run.

Modified: subversion/branches/patch-exec/subversion/tests/cmdline/update_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/patch-exec/subversion/tests/cmdline/update_tests.py?rev=1703735&r1=1703734&r2=1703735&view=diff
==============================================================================
--- subversion/branches/patch-exec/subversion/tests/cmdline/update_tests.py (original)
+++ subversion/branches/patch-exec/subversion/tests/cmdline/update_tests.py Fri Sep 18 01:38:47 2015
@@ -6731,6 +6731,90 @@ def update_keywords_on_shortcut(sbox):
               for line in text_after_up]):
     raise svntest.Failure("update did not update the LastChangedRevision keyword")
 
+def update_add_conflicted_deep(sbox):
+  "deep add conflicted"
+
+  sbox.build()
+  repo_url = sbox.repo_url
+
+  svntest.actions.run_and_verify_svnmucc(
+                        None, [], '-U', repo_url, '-m', '',
+                        'mkdir', 'A/z',
+                        'mkdir', 'A/z/z',
+                        'mkdir', 'A/z/z/z')
+
+  svntest.actions.run_and_verify_svnmucc(
+                        None, [], '-U', repo_url, '-m', '',
+                        'rm', 'A/z',
+                        'mkdir', 'A/z',
+                        'mkdir', 'A/z/z',
+                        'mkdir', 'A/z/z/z')
+
+  sbox.simple_append('A/z', 'A/z')
+  sbox.simple_add('A/z')
+  sbox.simple_update('A', 2)
+  # This final update used to segfault using 1.9.0 and 1.9.1
+  sbox.simple_update('A/z/z', 3)
+
+def missing_tmp_update(sbox):
+  "missing tmp update caused segfault"
+
+  sbox.build(read_only = True)
+  wc_dir = sbox.wc_dir
+  svntest.actions.run_and_verify_update(wc_dir, None, None, None, [], False,
+                                        wc_dir, '--set-depth', 'empty')
+
+  os.rmdir(sbox.ospath(svntest.main.get_admin_name() + '/tmp'))
+
+  svntest.actions.run_and_verify_svn(None, '.*Unable to create.*',
+                                     'up', wc_dir, '--set-depth', 'infinity')
+
+  svntest.actions.run_and_verify_svn(None, [], 'cleanup', wc_dir)
+
+  svntest.actions.run_and_verify_update(wc_dir, None, None, None, [], False,
+                                        wc_dir, '--set-depth', 'infinity')
+
+def update_delete_switched(sbox):
+  "update delete switched"
+
+  sbox.build(read_only = True)
+  wc_dir = sbox.wc_dir
+
+  svntest.actions.run_and_verify_switch(wc_dir, sbox.ospath('A/B/E'),
+                                        sbox.repo_url + '/A/D/G',
+                                        None, None, None, [], False,
+                                        '--ignore-ancestry')
+
+  # Introduce some change somewhere...
+  sbox.simple_propset('A', 'A', 'A')
+
+  expected_status = svntest.wc.State(wc_dir, {
+      ''                  : Item(status='  ', wc_rev='1'),
+      'A'                 : Item(status='A ', copied='+', treeconflict='C', wc_rev='-'),
+      'A/B'               : Item(status='  ', copied='+', wc_rev='-'),
+      'A/B/E'             : Item(status='A ', copied='+', wc_rev='-'),
+      'A/B/E/rho'         : Item(status='  ', copied='+', wc_rev='-'),
+      'A/B/E/pi'          : Item(status='  ', copied='+', wc_rev='-'),
+      'A/B/E/tau'         : Item(status='  ', copied='+', wc_rev='-'),
+      'A/B/lambda'        : Item(status='  ', copied='+', wc_rev='-'),
+      'A/B/F'             : Item(status='  ', copied='+', wc_rev='-'),
+      'A/D'               : Item(status='  ', copied='+', wc_rev='-'),
+      'A/D/G'             : Item(status='  ', copied='+', wc_rev='-'),
+      'A/D/G/pi'          : Item(status='  ', copied='+', wc_rev='-'),
+      'A/D/G/tau'         : Item(status='  ', copied='+', wc_rev='-'),
+      'A/D/G/rho'         : Item(status='  ', copied='+', wc_rev='-'),
+      'A/D/gamma'         : Item(status='  ', copied='+', wc_rev='-'),
+      'A/D/H'             : Item(status='  ', copied='+', wc_rev='-'),
+      'A/D/H/omega'       : Item(status='  ', copied='+', wc_rev='-'),
+      'A/D/H/psi'         : Item(status='  ', copied='+', wc_rev='-'),
+      'A/D/H/chi'         : Item(status='  ', copied='+', wc_rev='-'),
+      'A/mu'              : Item(status='  ', copied='+', wc_rev='-'),
+      'A/C'               : Item(status='  ', copied='+', wc_rev='-'),
+      'iota'              : Item(status='  ', wc_rev='1'),
+  })
+  svntest.actions.run_and_verify_update(wc_dir, None, None, expected_status,
+                                        [], False, sbox.ospath('A'), '-r', 0)
+
 #######################################################################
 # Run the tests
 
@@ -6818,6 +6902,9 @@ test_list = [ None,
               update_child_below_add,
               update_conflict_details,
               update_keywords_on_shortcut,
+              update_add_conflicted_deep,
+              missing_tmp_update,
+              update_delete_switched,
              ]
 
 if __name__ == '__main__':

Modified: subversion/branches/patch-exec/subversion/tests/cmdline/upgrade_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/patch-exec/subversion/tests/cmdline/upgrade_tests.py?rev=1703735&r1=1703734&r2=1703735&view=diff
==============================================================================
--- subversion/branches/patch-exec/subversion/tests/cmdline/upgrade_tests.py (original)
+++ subversion/branches/patch-exec/subversion/tests/cmdline/upgrade_tests.py Fri Sep 18 01:38:47 2015
@@ -1480,6 +1480,90 @@ def auto_analyze(sbox):
   if val != [(1,)]:
     raise svntest.Failure("analyze failed")
 
+def upgrade_1_0_with_externals(sbox):
+  "test upgrading 1.0.0 working copy with externals"
+
+  sbox.build(create_wc = False)
+  replace_sbox_with_tarfile(sbox, 'upgrade_1_0_with_externals.tar.bz2')
+
+  url = sbox.repo_url
+
+  # This is non-canonical by the rules of svn_uri_canonicalize, it gets
+  # written into the entries file and upgrade has to canonicalize.
+  non_canonical_url = url[:-1] + '%%%02x' % ord(url[-1])
+  xml_entries_relocate(sbox.wc_dir, 'file:///1.0.0/repos', non_canonical_url)
+
+  externals_propval  = 'exdir_G ' + sbox.repo_url + '/A/D/G' + '\n'
+  adm_name = svntest.main.get_admin_name()
+  dir_props_file = os.path.join(sbox.wc_dir, adm_name, 'dir-props')
+  svntest.main.file_write(dir_props_file,
+                          ('K 13\n'
+                          'svn:externals\n'
+                          'V %d\n' % len(externals_propval))
+                          + externals_propval + '\nEND\n', 'wb')
+
+  # Attempt to use the working copy, this should give an error
+  expected_stderr = wc_is_too_old_regex
+  svntest.actions.run_and_verify_svn(None, expected_stderr,
+                                     'info', sbox.wc_dir)
+
+
+  # Now upgrade the working copy
+  svntest.actions.run_and_verify_svn(None, [],
+                                     'upgrade', sbox.wc_dir)
+  # And the separate working copy below COPIED or check_format() fails
+  svntest.actions.run_and_verify_svn(None, [],
+                                     'upgrade',
+                                     os.path.join(sbox.wc_dir, 'COPIED', 'G'))
+
+  # Actually check the format number of the upgraded working copy
+  check_format(sbox, get_current_format())
+
+  # Now check the contents of the working copy
+  # #### This working copy is not just a basic tree,
+  #      fix with the right data once we get here
+  expected_status = svntest.wc.State(sbox.wc_dir,
+    {
+      '' : Item(status=' M', wc_rev=7),
+      'B'                 : Item(status='  ', wc_rev='7'),
+      'B/mu'              : Item(status='  ', wc_rev='7'),
+      'B/D'               : Item(status='  ', wc_rev='7'),
+      'B/D/H'             : Item(status='  ', wc_rev='7'),
+      'B/D/H/psi'         : Item(status='  ', wc_rev='7'),
+      'B/D/H/omega'       : Item(status='  ', wc_rev='7'),
+      'B/D/H/zeta'        : Item(status='MM', wc_rev='7'),
+      'B/D/H/chi'         : Item(status='  ', wc_rev='7'),
+      'B/D/gamma'         : Item(status='  ', wc_rev='9'),
+      'B/D/G'             : Item(status='  ', wc_rev='7'),
+      'B/D/G/tau'         : Item(status='  ', wc_rev='7'),
+      'B/D/G/rho'         : Item(status='  ', wc_rev='7'),
+      'B/D/G/pi'          : Item(status='  ', wc_rev='7'),
+      'B/B'               : Item(status='  ', wc_rev='7'),
+      'B/B/lambda'        : Item(status='  ', wc_rev='7'),
+      'MKDIR'             : Item(status='A ', wc_rev='0'),
+      'MKDIR/MKDIR'       : Item(status='A ', wc_rev='0'),
+      'A'                 : Item(status='  ', wc_rev='7'),
+      'A/B'               : Item(status='  ', wc_rev='7'),
+      'A/B/lambda'        : Item(status='  ', wc_rev='7'),
+      'A/D'               : Item(status='  ', wc_rev='7'),
+      'A/D/G'             : Item(status='  ', wc_rev='7'),
+      'A/D/G/rho'         : Item(status='  ', wc_rev='7'),
+      'A/D/G/pi'          : Item(status='  ', wc_rev='7'),
+      'A/D/G/tau'         : Item(status='  ', wc_rev='7'),
+      'A/D/H'             : Item(status='  ', wc_rev='7'),
+      'A/D/H/psi'         : Item(status='  ', wc_rev='7'),
+      'A/D/H/omega'       : Item(status='  ', wc_rev='7'),
+      'A/D/H/zeta'        : Item(status='  ', wc_rev='7'),
+      'A/D/H/chi'         : Item(status='  ', wc_rev='7'),
+      'A/D/gamma'         : Item(status='  ', wc_rev='7'),
+      'A/mu'              : Item(status='  ', wc_rev='7'),
+      'iota'              : Item(status='  ', wc_rev='7'),
+      'COPIED'            : Item(status='  ', wc_rev='10'),
+      'DELETED'           : Item(status='D ', wc_rev='10'),
+      'exdir_G'           : Item(status='X '),
+     })
+  run_and_verify_status_no_server(sbox.wc_dir, expected_status)
+
 ########################################################################
 # Run the tests
 
@@ -1537,6 +1621,7 @@ test_list = [ None,
               changelist_upgrade_1_6,
               upgrade_1_7_dir_external,
               auto_analyze,
+              upgrade_1_0_with_externals,
              ]
 
 

Modified: subversion/branches/patch-exec/subversion/tests/libsvn_fs/fs-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/patch-exec/subversion/tests/libsvn_fs/fs-test.c?rev=1703735&r1=1703734&r2=1703735&view=diff
==============================================================================
--- subversion/branches/patch-exec/subversion/tests/libsvn_fs/fs-test.c (original)
+++ subversion/branches/patch-exec/subversion/tests/libsvn_fs/fs-test.c Fri Sep 18 01:38:47 2015
@@ -4969,7 +4969,7 @@ unordered_txn_dirprops(const svn_test_op
   /* Commit the first one first. */
   SVN_ERR(test_commit_txn(&new_rev, txn, NULL, pool));
 
-  /* Some backends are clever then others. */
+  /* Some backends are cleverer than others. */
   if (is_bdb)
     {
       /* Then commit the second -- but expect an conflict because the
@@ -5591,7 +5591,7 @@ dir_prop_merge(const svn_test_opts_t *op
   SVN_ERR(svn_fs_abort_txn(c_txn, pool));
 
   /* Changes in a sub-tree should not conflict with prop changes to some
-     parent directory but some backends are clever then others. */
+     parent directory but some backends are cleverer than others. */
   if (is_bdb)
     {
       SVN_ERR(test_commit_txn(&head_rev, top_txn, "/A", pool));