subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From v...@apache.org
Subject svn commit: r1425508 [15/17] - in /subversion/branches/javahl-ra: ./ build/ build/ac-macros/ build/generator/ build/generator/templates/ build/hudson/ notes/ notes/api-errata/1.8/ notes/obliterate/ notes/tree-conflicts/ subversion/ subversion/bindings/...
Date Sun, 23 Dec 2012 18:34:20 GMT
Modified: subversion/branches/javahl-ra/subversion/svnlook/main.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/svnlook/main.c?rev=1425508&r1=1425507&r2=1425508&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/svnlook/main.c (original)
+++ subversion/branches/javahl-ra/subversion/svnlook/main.c Sun Dec 23 18:34:14 2012
@@ -1792,7 +1792,7 @@ do_plist(svnlook_ctxt_t *c,
       if (verbose)
         {
           if (xml)
-            svn_cmdline__print_xml_prop(&sb, pname, propval, pool);
+            svn_cmdline__print_xml_prop(&sb, pname, propval, FALSE, pool);
           else
             {
               const char *pname_stdout;

Modified: subversion/branches/javahl-ra/subversion/svnrdump/load_editor.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/svnrdump/load_editor.c?rev=1425508&r1=1425507&r2=1425508&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/svnrdump/load_editor.c (original)
+++ subversion/branches/javahl-ra/subversion/svnrdump/load_editor.c Sun Dec 23 18:34:14 2012
@@ -704,6 +704,7 @@ new_node_record(void **node_baton,
       apr_size_t residual_close_count;
       apr_array_header_t *residual_open_path;
       int i;
+      apr_size_t n;
 
       /* Before attempting to handle the action, call open_directory
          for all the path components and set the directory baton
@@ -720,7 +721,7 @@ new_node_record(void **node_baton,
 
       /* First close all as many directories as there are after
          skip_ancestor, and then open fresh directories */
-      for (i = 0; i < residual_close_count; i ++)
+      for (n = 0; n < residual_close_count; n ++)
         {
           /* Don't worry about destroying the actual rb->db object,
              since the pool we're using has the lifetime of one

Modified: subversion/branches/javahl-ra/subversion/svnserve/main.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/svnserve/main.c?rev=1425508&r1=1425507&r2=1425508&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/svnserve/main.c (original)
+++ subversion/branches/javahl-ra/subversion/svnserve/main.c Sun Dec 23 18:34:14 2012
@@ -149,6 +149,7 @@ void winservice_notify_stop(void)
 #define SVNSERVE_OPT_CACHE_FULLTEXTS 266
 #define SVNSERVE_OPT_CACHE_REVPROPS  267
 #define SVNSERVE_OPT_SINGLE_CONN     268
+#define SVNSERVE_OPT_CLIENT_SPEED    269
 
 static const apr_getopt_option_t svnserve__options[] =
   {
@@ -235,6 +236,16 @@ static const apr_getopt_option_t svnserv
         "Default is no.\n"
         "                             "
         "[used for FSFS repositories only]")},
+    {"client-speed", SVNSERVE_OPT_CLIENT_SPEED, 1,
+     N_("Optimize throughput based on the assumption that\n"
+        "                             "
+        "clients can receive data with a bitrate of at\n"
+        "                             "
+        "least ARG Gbit/s.  For clients receiving data at\n"
+        "                             "
+        "less than 1 Gbit/s, zero should be used.\n"
+        "                             "
+        "Default is 0 (optimizations disabled).")},
 #ifdef CONNECTION_HAVE_THREAD_OPTION
     /* ### Making the assumption here that WIN32 never has fork and so
      * ### this option never exists when --service exists. */
@@ -497,6 +508,8 @@ int main(int argc, const char *argv[])
   params.cache_fulltexts = TRUE;
   params.cache_txdeltas = FALSE;
   params.cache_revprops = FALSE;
+  params.zero_copy_limit = 0;
+  params.error_check_interval = 4096;
 
   while (1)
     {
@@ -645,6 +658,18 @@ int main(int argc, const char *argv[])
              = svn_tristate__from_word(arg) == svn_tristate_true;
           break;
 
+        case SVNSERVE_OPT_CLIENT_SPEED:
+          {
+            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;
+          }
+          break;
+
 #ifdef WIN32
         case SVNSERVE_OPT_SERVICE:
           if (run_mode != run_mode_service)
@@ -755,8 +780,10 @@ int main(int argc, const char *argv[])
        * the pool cleanup handlers that call sasl_dispose() (connection_pool)
        * and sasl_done() (pool) are run in the right order. See issue #3664. */
       connection_pool = svn_pool_create(pool);
-      conn = svn_ra_svn_create_conn2(NULL, in_file, out_file,
+      conn = svn_ra_svn_create_conn3(NULL, in_file, out_file,
                                      params.compression_level,
+                                     params.zero_copy_limit,
+                                     params.error_check_interval,
                                      connection_pool);
       svn_error_clear(serve(conn, &params, connection_pool));
       exit(0);
@@ -925,7 +952,7 @@ int main(int argc, const char *argv[])
     settings.single_threaded = TRUE;
     if (handling_mode == connection_mode_thread)
       {
-#ifdef APR_HAS_THREADS
+#if APR_HAS_THREADS
         settings.single_threaded = FALSE;
 #else
         /* No requests will be processed at all
@@ -988,8 +1015,10 @@ int main(int argc, const char *argv[])
           /* It's not a fatal error if we cannot enable keep-alives. */
         }
 
-      conn = svn_ra_svn_create_conn2(usock, NULL, NULL,
+      conn = svn_ra_svn_create_conn3(usock, NULL, NULL,
                                      params.compression_level,
+                                     params.zero_copy_limit,
+                                     params.error_check_interval,
                                      connection_pool);
 
       if (run_mode == run_mode_listen_once)

Modified: subversion/branches/javahl-ra/subversion/svnserve/serve.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/svnserve/serve.c?rev=1425508&r1=1425507&r2=1425508&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/svnserve/serve.c (original)
+++ subversion/branches/javahl-ra/subversion/svnserve/serve.c Sun Dec 23 18:34:14 2012
@@ -886,13 +886,14 @@ static svn_error_t *accept_report(svn_bo
   /* Make an svn_repos report baton.  Tell it to drive the network editor
    * when the report is complete. */
   svn_ra_svn_get_editor(&editor, &edit_baton, conn, pool, NULL, NULL);
-  SVN_CMD_ERR(svn_repos_begin_report2(&report_baton, rev, b->repos,
+  SVN_CMD_ERR(svn_repos_begin_report3(&report_baton, rev, b->repos,
                                       b->fs_path->data, target, tgt_path,
                                       text_deltas, depth, ignore_ancestry,
                                       send_copyfrom_args,
                                       editor, edit_baton,
                                       authz_check_access_cb_func(b),
-                                      b, pool));
+                                      b, svn_ra_svn_zero_copy_limit(conn),
+                                      pool));
 
   rb.sb = b;
   rb.repos_url = svn_path_uri_decode(b->repos_url, pool);
@@ -962,33 +963,52 @@ static svn_error_t *write_lock(svn_ra_sv
 }
 
 /* ### This really belongs in libsvn_repos. */
-/* Get the properties for a path, with hardcoded committed-info values. */
-static svn_error_t *get_props(apr_hash_t **props, svn_fs_root_t *root,
-                              const char *path, apr_pool_t *pool)
-{
-  svn_string_t *str;
-  svn_revnum_t crev;
-  const char *cdate, *cauthor, *uuid;
-
-  /* Get the properties. */
-  SVN_ERR(svn_fs_node_proplist(props, root, path, pool));
-
-  /* Hardcode the values for the committed revision, date, and author. */
-  SVN_ERR(svn_repos_get_committed_info(&crev, &cdate, &cauthor, root,
-                                       path, pool));
-  str = svn_string_create(apr_psprintf(pool, "%ld", crev),
-                          pool);
-  apr_hash_set(*props, SVN_PROP_ENTRY_COMMITTED_REV, APR_HASH_KEY_STRING, str);
-  str = (cdate) ? svn_string_create(cdate, pool) : NULL;
-  apr_hash_set(*props, SVN_PROP_ENTRY_COMMITTED_DATE, APR_HASH_KEY_STRING,
-               str);
-  str = (cauthor) ? svn_string_create(cauthor, pool) : NULL;
-  apr_hash_set(*props, SVN_PROP_ENTRY_LAST_AUTHOR, APR_HASH_KEY_STRING, str);
-
-  /* Hardcode the values for the UUID. */
-  SVN_ERR(svn_fs_get_uuid(svn_fs_root_fs(root), &uuid, pool));
-  str = (uuid) ? svn_string_create(uuid, pool) : NULL;
-  apr_hash_set(*props, SVN_PROP_ENTRY_UUID, APR_HASH_KEY_STRING, str);
+/* Get the explicit properties and/or inherited properties for a PATH in
+   ROOT, with hardcoded committed-info values. */
+static svn_error_t *
+get_props(apr_hash_t **props,
+          apr_array_header_t **iprops,
+          server_baton_t *b,
+          svn_fs_root_t *root,
+          const char *path,
+          apr_pool_t *pool)
+{
+  /* Get the explicit properties. */
+  if (props)
+    {
+      svn_string_t *str;
+      svn_revnum_t crev;
+      const char *cdate, *cauthor, *uuid;
+
+      SVN_ERR(svn_fs_node_proplist(props, root, path, pool));
+
+      /* Hardcode the values for the committed revision, date, and author. */
+      SVN_ERR(svn_repos_get_committed_info(&crev, &cdate, &cauthor, root,
+                                           path, pool));
+      str = svn_string_create(apr_psprintf(pool, "%ld", crev),
+                              pool);
+      apr_hash_set(*props, SVN_PROP_ENTRY_COMMITTED_REV, APR_HASH_KEY_STRING,
+                   str);
+      str = (cdate) ? svn_string_create(cdate, pool) : NULL;
+      apr_hash_set(*props, SVN_PROP_ENTRY_COMMITTED_DATE, APR_HASH_KEY_STRING,
+                   str);
+      str = (cauthor) ? svn_string_create(cauthor, pool) : NULL;
+      apr_hash_set(*props, SVN_PROP_ENTRY_LAST_AUTHOR, APR_HASH_KEY_STRING,
+                   str);
+
+      /* Hardcode the values for the UUID. */
+      SVN_ERR(svn_fs_get_uuid(svn_fs_root_fs(root), &uuid, pool));
+      str = (uuid) ? svn_string_create(uuid, pool) : NULL;
+      apr_hash_set(*props, SVN_PROP_ENTRY_UUID, APR_HASH_KEY_STRING, str);
+    }
+
+  /* Get any inherited properties the user is authorized to. */
+  if (iprops)
+    {
+      SVN_ERR(svn_repos_fs_get_inherited_props(iprops, root, path,
+                                               authz_check_access_cb_func(b),
+                                               b, pool, pool));
+    }
 
   return SVN_NO_ERROR;
 }
@@ -1390,16 +1410,20 @@ static svn_error_t *get_file(svn_ra_svn_
   svn_fs_root_t *root;
   svn_stream_t *contents;
   apr_hash_t *props = NULL;
+  apr_array_header_t *inherited_props;
   svn_string_t write_str;
   char buf[4096];
   apr_size_t len;
   svn_boolean_t want_props, want_contents;
+  apr_uint64_t wants_inherited_props;
   svn_checksum_t *checksum;
   svn_error_t *err, *write_err;
+  int i;
 
   /* Parse arguments. */
-  SVN_ERR(svn_ra_svn_parse_tuple(params, pool, "c(?r)bb", &path, &rev,
-                                 &want_props, &want_contents));
+  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);
@@ -1420,8 +1444,9 @@ static svn_error_t *get_file(svn_ra_svn_
   SVN_CMD_ERR(svn_fs_file_checksum(&checksum, svn_checksum_md5, root,
                                    full_path, TRUE, pool));
   hex_digest = svn_checksum_to_cstring_display(checksum, pool);
-  if (want_props)
-    SVN_CMD_ERR(get_props(&props, root, full_path, pool));
+  if (want_props || wants_inherited_props)
+    SVN_CMD_ERR(get_props(&props, &inherited_props, b, root, full_path,
+                          pool));
   if (want_contents)
     SVN_CMD_ERR(svn_fs_file_contents(&contents, root, full_path, pool));
 
@@ -1429,6 +1454,27 @@ static svn_error_t *get_file(svn_ra_svn_
   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, "!)(?!"));
+      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_pool_destroy(iterpool);
+    }
+
   SVN_ERR(svn_ra_svn_write_tuple(conn, pool, "!))"));
 
   /* Now send the file's contents. */
@@ -1473,17 +1519,21 @@ static svn_error_t *get_dir(svn_ra_svn_c
   const char *path, *full_path;
   svn_revnum_t rev;
   apr_hash_t *entries, *props = NULL;
+  apr_array_header_t *inherited_props;
   apr_hash_index_t *hi;
   svn_fs_root_t *root;
   apr_pool_t *subpool;
   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;
+  int i;
 
-  SVN_ERR(svn_ra_svn_parse_tuple(params, pool, "c(?r)bb?l", &path, &rev,
+  SVN_ERR(svn_ra_svn_parse_tuple(params, pool, "c(?r)bb?l?B", &path, &rev,
                                  &want_props, &want_contents,
-                                 &dirent_fields_list));
+                                 &dirent_fields_list,
+                                 &wants_inherited_props));
 
   if (! dirent_fields_list)
     {
@@ -1491,8 +1541,6 @@ static svn_error_t *get_dir(svn_ra_svn_c
     }
   else
     {
-      int i;
-
       dirent_fields = 0;
 
       for (i = 0; i < dirent_fields_list->nelts; ++i)
@@ -1536,9 +1584,11 @@ static svn_error_t *get_dir(svn_ra_svn_c
   /* Fetch the root of the appropriate revision. */
   SVN_CMD_ERR(svn_fs_revision_root(&root, b->fs, rev, pool));
 
-  /* Fetch the directory properties if requested. */
-  if (want_props)
-    SVN_CMD_ERR(get_props(&props, root, full_path, pool));
+  /* Fetch the directory's explicit and/or inherited properties
+     if requested. */
+  if (want_props || wants_inherited_props)
+    SVN_CMD_ERR(get_props(&props, &inherited_props, b, root, full_path,
+                          pool));
 
   /* Begin response ... */
   SVN_ERR(svn_ra_svn_write_tuple(conn, pool, "w(r(!", "success", rev));
@@ -1630,6 +1680,26 @@ static svn_error_t *get_dir(svn_ra_svn_c
       svn_pool_destroy(subpool);
     }
 
+  if (wants_inherited_props)
+    {
+      apr_pool_t *iterpool = svn_pool_create(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_pool_destroy(iterpool);
+    }
+
   /* Finish response. */
   return svn_ra_svn_write_tuple(conn, pool, "!))");
 }
@@ -2858,6 +2928,65 @@ get_deleted_rev(svn_ra_svn_conn_t *conn,
   return SVN_NO_ERROR;
 }
 
+static svn_error_t *
+get_inherited_props(svn_ra_svn_conn_t *conn,
+                    apr_pool_t *pool,
+                    apr_array_header_t *params,
+                    void *baton)
+{
+  server_baton_t *b = baton;
+  const char *path, *full_path;
+  svn_revnum_t rev;
+  svn_fs_root_t *root;
+  apr_array_header_t *inherited_props;
+  int i;
+  apr_pool_t *iterpool = svn_pool_create(pool);
+
+  /* Parse arguments. */
+  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),
+                               pool);
+
+  /* Check authorizations */
+  SVN_ERR(must_have_access(conn, iterpool, b, svn_authz_read,
+                           full_path, FALSE));
+
+  if (!SVN_IS_VALID_REVNUM(rev))
+    SVN_CMD_ERR(svn_fs_youngest_rev(&rev, b->fs, pool));
+
+  SVN_ERR(log_command(b, conn, pool, "%s",
+                      svn_log__get_inherited_props(full_path, rev,
+                                                   iterpool)));
+
+  /* Fetch the properties and a stream for the contents. */
+  SVN_CMD_ERR(svn_fs_revision_root(&root, b->fs, rev, iterpool));
+  SVN_CMD_ERR(get_props(NULL, &inherited_props, b, 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, "!(?!"));
+
+  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, "!))"));
+  svn_pool_destroy(iterpool);
+  return SVN_NO_ERROR;
+}
+
 static const svn_ra_svn_cmd_entry_t main_commands[] = {
   { "reparent",        reparent },
   { "get-latest-rev",  get_latest_rev },
@@ -2889,6 +3018,7 @@ static const svn_ra_svn_cmd_entry_t main
   { "replay",          replay },
   { "replay-range",    replay_range },
   { "get-deleted-rev", get_deleted_rev },
+  { "get-iprops",      get_inherited_props },
   { NULL }
 };
 
@@ -2944,24 +3074,6 @@ repos_path_valid(const char *path)
   return TRUE;
 }
 
-/* Callback which receives hook environment variables from the hook
- * environment configuration section,
- * An implementation of svn_config_enumerator2_t. */
-static svn_boolean_t
-hooks_env_conf_cb(const char *name,
-                  const char *value,
-                  void *baton,
-                  apr_pool_t *pool)
-{
-  apr_hash_t *hooks_env = baton;
-  apr_pool_t *hash_pool = apr_hash_pool_get(hooks_env);
-
-  apr_hash_set(hooks_env, apr_pstrdup(hash_pool, name),
-               APR_HASH_KEY_STRING, apr_pstrdup(hash_pool, value));
-
-  return TRUE;
-}
-
 /* Look for the repository given by URL, using ROOT as the virtual
  * repository root.  If we find one, fill in the repos, fs, cfg,
  * repos_url, and fs_path fields of B.  Set B->repos's client
@@ -2974,7 +3086,7 @@ static svn_error_t *find_repos(const cha
                                const apr_array_header_t *capabilities,
                                apr_pool_t *pool)
 {
-  const char *path, *full_path, *repos_root, *fs_path;
+  const char *path, *full_path, *repos_root, *fs_path, *hooks_env;
   svn_stringbuf_t *url_buf;
 
   /* Skip past the scheme and authority part. */
@@ -3052,16 +3164,12 @@ static svn_error_t *find_repos(const cha
                                  "No access allowed to this repository",
                                  b, conn, pool);
 
-  /* If a hook environment has been configured, set it up. */
-  if (svn_config_has_section(b->cfg, SVN_CONFIG_SECTION_HOOKS_ENV))
-    {
-      apr_hash_t *hooks_env = apr_hash_make(pool);
-
-      svn_config_enumerate2(b->cfg, SVN_CONFIG_SECTION_HOOKS_ENV,
-                            hooks_env_conf_cb, hooks_env, pool);
-
-      svn_repos_hooks_setenv(b->repos, hooks_env);
-    }
+  /* Configure hook script environment variables. */
+  svn_config_get(b->cfg, &hooks_env, SVN_CONFIG_SECTION_GENERAL,
+                 SVN_CONFIG_OPTION_HOOKS_ENV, NULL);
+  if (hooks_env)
+    hooks_env = svn_dirent_internal_style(hooks_env, pool);
+  svn_repos_hooks_setenv(b->repos, hooks_env, pool, pool);
 
   return SVN_NO_ERROR;
 }
@@ -3089,37 +3197,67 @@ fs_warning_func(void *baton, svn_error_t
   svn_pool_clear(b->pool);
 }
 
-
-static svn_error_t *
-fetch_props_func(apr_hash_t **props,
-                 void *baton,
-                 const char *path,
-                 svn_revnum_t base_revision,
-                 apr_pool_t *result_pool,
-                 apr_pool_t *scratch_pool)
+/* Return the normalized repository-relative path for the given PATH
+ * (may be a URL, full path or relative path) and fs contained in the
+ * server baton BATON. Allocate the result in POOL.
+ */
+static const char *
+get_normalized_repo_rel_path(void *baton,
+                             const char *path,
+                             apr_pool_t *pool)
 {
   server_baton_t *sb = baton;
-  svn_fs_root_t *fs_root;
-  svn_error_t *err;
-
-  if (!SVN_IS_VALID_REVNUM(base_revision))
-    SVN_ERR(svn_fs_youngest_rev(&base_revision, sb->fs, scratch_pool));
 
   if (svn_path_is_url(path))
     {
       /* This is a copyfrom URL. */
-      path = svn_uri_skip_ancestor(sb->repos_url, path, scratch_pool);
-      path = svn_fspath__canonicalize(path, scratch_pool);
+      path = svn_uri_skip_ancestor(sb->repos_url, path, pool);
+      path = svn_fspath__canonicalize(path, pool);
     }
   else
     {
       /* This is a base-relative path. */
-      if (path[0] != '/')
+      if ((path)[0] != '/')
         /* Get an absolute path for use in the FS. */
-        path = svn_fspath__join(sb->fs_path->data, path, scratch_pool);
+        path = svn_fspath__join(sb->fs_path->data, path, pool);
     }
 
-  SVN_ERR(svn_fs_revision_root(&fs_root, sb->fs, base_revision, scratch_pool));
+  return path;
+}
+
+/* Get the revision root for REVISION in fs given by server baton BATON
+ * and return it in *FS_ROOT. Use HEAD if REVISION is SVN_INVALID_REVNUM.
+ * Use POOL for allocations.
+ */
+static svn_error_t *
+get_revision_root(svn_fs_root_t **fs_root,
+                  void *baton,
+                  svn_revnum_t revision,
+                  apr_pool_t *pool)
+{
+  server_baton_t *sb = baton;
+
+  if (!SVN_IS_VALID_REVNUM(revision))
+    SVN_ERR(svn_fs_youngest_rev(&revision, sb->fs, pool));
+
+  SVN_ERR(svn_fs_revision_root(fs_root, sb->fs, revision, pool));
+
+  return SVN_NO_ERROR;
+}
+
+static svn_error_t *
+fetch_props_func(apr_hash_t **props,
+                 void *baton,
+                 const char *path,
+                 svn_revnum_t base_revision,
+                 apr_pool_t *result_pool,
+                 apr_pool_t *scratch_pool)
+{
+  svn_fs_root_t *fs_root;
+  svn_error_t *err;
+
+  path = get_normalized_repo_rel_path(baton, path, scratch_pool);
+  SVN_ERR(get_revision_root(&fs_root, baton, base_revision, scratch_pool));
 
   err = svn_fs_node_proplist(props, fs_root, path, result_pool);
   if (err && err->apr_err == SVN_ERR_FS_NOT_FOUND)
@@ -3141,28 +3279,11 @@ fetch_kind_func(svn_kind_t *kind,
                 svn_revnum_t base_revision,
                 apr_pool_t *scratch_pool)
 {
-  server_baton_t *sb = baton;
   svn_node_kind_t node_kind;
   svn_fs_root_t *fs_root;
 
-  if (!SVN_IS_VALID_REVNUM(base_revision))
-    SVN_ERR(svn_fs_youngest_rev(&base_revision, sb->fs, scratch_pool));
-
-  if (svn_path_is_url(path))
-    {
-      /* This is a copyfrom URL. */
-      path = svn_uri_skip_ancestor(sb->repos_url, path, scratch_pool);
-      path = svn_fspath__canonicalize(path, scratch_pool);
-    }
-  else
-    {
-      /* This is a base-relative path. */
-      if (path[0] != '/')
-        /* Get an absolute path for use in the FS. */
-        path = svn_fspath__join(sb->fs_path->data, path, scratch_pool);
-    }
-
-  SVN_ERR(svn_fs_revision_root(&fs_root, sb->fs, base_revision, scratch_pool));
+  path = get_normalized_repo_rel_path(baton, path, scratch_pool);
+  SVN_ERR(get_revision_root(&fs_root, baton, base_revision, scratch_pool));
 
   SVN_ERR(svn_fs_check_path(&node_kind, fs_root, path, scratch_pool));
   *kind = svn__kind_from_node_kind(node_kind, FALSE);
@@ -3178,31 +3299,14 @@ fetch_base_func(const char **filename,
                 apr_pool_t *result_pool,
                 apr_pool_t *scratch_pool)
 {
-  server_baton_t *sb = baton;
   svn_stream_t *contents;
   svn_stream_t *file_stream;
   const char *tmp_filename;
   svn_fs_root_t *fs_root;
   svn_error_t *err;
 
-  if (!SVN_IS_VALID_REVNUM(base_revision))
-    SVN_ERR(svn_fs_youngest_rev(&base_revision, sb->fs, scratch_pool));
-
-  if (svn_path_is_url(path))
-    {
-      /* This is a copyfrom URL. */
-      path = svn_uri_skip_ancestor(sb->repos_url, path, scratch_pool);
-      path = svn_fspath__canonicalize(path, scratch_pool);
-    }
-  else
-    {
-      /* This is a base-relative path. */
-      if (path[0] != '/')
-        /* Get an absolute path for use in the FS. */
-        path = svn_fspath__join(sb->fs_path->data, path, scratch_pool);
-    }
-
-  SVN_ERR(svn_fs_revision_root(&fs_root, sb->fs, base_revision, scratch_pool));
+  path = get_normalized_repo_rel_path(baton, path, scratch_pool);
+  SVN_ERR(get_revision_root(&fs_root, baton, base_revision, scratch_pool));
 
   err = svn_fs_file_contents(&contents, fs_root, path, scratch_pool);
   if (err && err->apr_err == SVN_ERR_FS_NOT_FOUND)
@@ -3260,7 +3364,7 @@ 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()(wwwwwwww)",
+    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_SVNDIFF1,
@@ -3269,9 +3373,11 @@ svn_error_t *serve(svn_ra_svn_conn_t *co
                                           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_PARTIAL_REPLAY,
+                                          SVN_RA_SVN_CAP_INHERITED_PROPS,
+                                          SVN_RA_SVN_CAP_EPHEMERAL_TXNPROPS));
   else
-    SVN_ERR(svn_ra_svn_write_cmd_response(conn, pool, "nn()(wwwwwww)",
+    SVN_ERR(svn_ra_svn_write_cmd_response(conn, pool, "nn()(wwwwwwwww)",
                                           (apr_uint64_t) 2, (apr_uint64_t) 2,
                                           SVN_RA_SVN_CAP_EDIT_PIPELINE,
                                           SVN_RA_SVN_CAP_ABSENT_ENTRIES,
@@ -3279,7 +3385,9 @@ svn_error_t *serve(svn_ra_svn_conn_t *co
                                           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_PARTIAL_REPLAY,
+                                          SVN_RA_SVN_CAP_INHERITED_PROPS,
+                                          SVN_RA_SVN_CAP_EPHEMERAL_TXNPROPS));
 
   /* Read client response, which we assume to be in version 2 format:
    * version, capability list, and client URL; then we do an auth

Modified: subversion/branches/javahl-ra/subversion/svnserve/server.h
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/svnserve/server.h?rev=1425508&r1=1425507&r2=1425508&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/svnserve/server.h (original)
+++ subversion/branches/javahl-ra/subversion/svnserve/server.h Sun Dec 23 18:34:14 2012
@@ -128,6 +128,13 @@ typedef struct serve_params_t {
      Defaults to SVN_DELTA_COMPRESSION_LEVEL_DEFAULT. */
   int compression_level;
 
+  /* Item size up to which we use the zero-copy code path to transmit
+     them over the network.  0 disables that code path. */
+  apr_size_t zero_copy_limit;
+
+  /* Amount of data to send between checks for cancellation requests
+     coming in from the client. */
+  apr_size_t error_check_interval;
 } serve_params_t;
 
 /* Serve the connection CONN according to the parameters PARAMS. */

Modified: subversion/branches/javahl-ra/subversion/svnversion/main.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/svnversion/main.c?rev=1425508&r1=1425507&r2=1425508&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/svnversion/main.c (original)
+++ subversion/branches/javahl-ra/subversion/svnversion/main.c Sun Dec 23 18:34:14 2012
@@ -57,19 +57,19 @@ help(const apr_getopt_option_t *options,
     (svn_cmdline_fprintf
      (stdout, pool,
       _("usage: svnversion [OPTIONS] [WC_PATH [TRAIL_URL]]\n\n"
-        "  Produce a compact 'version number' for the working copy path\n"
+        "  Produce a compact version identifier for the working copy path\n"
         "  WC_PATH.  TRAIL_URL is the trailing portion of the URL used to\n"
         "  determine if WC_PATH itself is switched (detection of switches\n"
-        "  within WC_PATH does not rely on TRAIL_URL).  The version number\n"
+        "  within WC_PATH does not rely on TRAIL_URL).  The version identifier\n"
         "  is written to standard output.  For example:\n"
         "\n"
         "    $ svnversion . /repos/svn/trunk\n"
         "    4168\n"
         "\n"
-        "  The version number will be a single number if the working\n"
+        "  The version identifier will be a single number if the working\n"
         "  copy is single revision, unmodified, not switched and with\n"
         "  a URL that matches the TRAIL_URL argument.  If the working\n"
-        "  copy is unusual the version number will be more complex:\n"
+        "  copy is unusual the version identifier will be more complex:\n"
         "\n"
         "   4123:4168     mixed revision working copy\n"
         "   4168M         modified working copy\n"

Modified: subversion/branches/javahl-ra/subversion/svnversion/svnversion.1
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/svnversion/svnversion.1?rev=1425508&r1=1425507&r2=1425508&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/svnversion/svnversion.1 (original)
+++ subversion/branches/javahl-ra/subversion/svnversion/svnversion.1 Sun Dec 23 18:34:14 2012
@@ -23,10 +23,10 @@
 .\"
 .TH svnversion 1
 .SH NAME
-svnversion \- Produce a compact version number for a working copy.
+svnversion \- Produce a compact version identifier for a working copy.
 .SH SYNOPSIS
 .TP
-\fBsvnversion\fP [\fIwc_path\fP [\fItrail_url\fP]]
+\fBsvnversion\fP [\fIoptions\fP] [\fIwc_path\fP [\fItrail_url\fP]]
 .SH OVERVIEW
 Subversion is a version control system, which allows you to keep old
 versions of files and directories (usually source code), keep a log of

Modified: subversion/branches/javahl-ra/subversion/tests/cmdline/copy_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/tests/cmdline/copy_tests.py?rev=1425508&r1=1425507&r2=1425508&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/tests/cmdline/copy_tests.py (original)
+++ subversion/branches/javahl-ra/subversion/tests/cmdline/copy_tests.py Sun Dec 23 18:34:14 2012
@@ -5742,6 +5742,30 @@ def copy_text_conflict(sbox):
   })
   svntest.actions.run_and_verify_unquiet_status(wc_dir, expected_status)
 
+@Issue(2843)
+def copy_over_excluded(sbox):
+  "copy on top of excluded should give error"
+
+  sbox.build(read_only = True)
+  wc_dir = sbox.wc_dir
+
+  svntest.actions.run_and_verify_svn(None, None, [],
+                                     'update', '--set-depth', 'exclude',
+                                     sbox.ospath('A/D'))
+
+  expected_error = "svn: E155000: Path '.*D' exists.*excluded.*"
+
+  svntest.actions.run_and_verify_svn(None, None, expected_error,
+                                     'cp',
+                                       sbox.repo_url + '/A/C',
+                                       sbox.ospath('A/D'))
+
+  expected_error = "svn: E155000: Path '.*D' exists.*excluded.*"
+  svntest.actions.run_and_verify_svn(None, None, expected_error,
+                                     'cp',
+                                       sbox.ospath('A/C'),
+                                       sbox.ospath('A/D'))
+
 ########################################################################
 # Run the tests
 
@@ -5858,6 +5882,7 @@ test_list = [ None,
               three_nested_moves,
               copy_to_unversioned_parent,
               copy_text_conflict,
+              copy_over_excluded,
              ]
 
 if __name__ == '__main__':

Modified: subversion/branches/javahl-ra/subversion/tests/cmdline/getopt_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/tests/cmdline/getopt_tests.py?rev=1425508&r1=1425507&r2=1425508&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/tests/cmdline/getopt_tests.py (original)
+++ subversion/branches/javahl-ra/subversion/tests/cmdline/getopt_tests.py Sun Dec 23 18:34:14 2012
@@ -95,13 +95,41 @@ rep_lines_res = [
                   'Subversion command-line client, version X.Y.Z.'),
                 ]
 
+# This is a trigger pattern that selects the secondary set of
+# delete/replace patterns
+switch_res_line = 'System information:'
+
+# This is a list of lines to delete after having seen switch_res_line.
+switched_del_lines_res = [
+                          # In svn --version --verbose, dependent libs loaded
+                          # shared libs are optional.
+                          re.compile(r'^\* (loaded|linked)'),
+                          # In svn --version --verbose, remove everything from
+                          # the extended lists
+                          re.compile(r'^  - '),
+                         ]
+
+# This is a list of lines to search and replace text on after having
+# seen switch_res_line.
+switched_rep_lines_res = [
+                          # We don't care about the actual canonical host
+                          (re.compile('^\* running on.*$'), '* running on'),
+                         ]
+
 def process_lines(lines):
   "delete lines that should not be compared and search and replace the rest"
   output = [ ]
+  del_res = del_lines_res
+  rep_res = rep_lines_res
+
   for line in lines:
+    if line.startswith(switch_res_line):
+      del_res = switched_del_lines_res
+      rep_res = switched_rep_lines_res
+
     # Skip these lines from the output list.
     delete_line = 0
-    for delete_re in del_lines_res:
+    for delete_re in del_res:
       if delete_re.match(line):
         delete_line = 1
         break
@@ -109,7 +137,7 @@ def process_lines(lines):
       continue
 
     # Search and replace text on the rest.
-    for replace_re, replace_str in rep_lines_res:
+    for replace_re, replace_str in rep_res:
       line = replace_re.sub(replace_str, line)
 
     output.append(line)
@@ -179,6 +207,10 @@ def getopt__version__quiet(sbox):
   "run svn --version --quiet"
   run_one_test(sbox, 'svn--version--quiet', '--version', '--quiet')
 
+def getopt__version__verbose(sbox):
+  "run svn --version --verbose"
+  run_one_test(sbox, 'svn--version--verbose', '--version', '--verbose')
+
 def getopt__help(sbox):
   "run svn --help"
   run_one_test(sbox, 'svn--help', '--help')
@@ -204,6 +236,7 @@ test_list = [ None,
               getopt_no_args,
               getopt__version,
               getopt__version__quiet,
+              getopt__version__verbose,
               getopt__help,
               getopt_help,
               getopt_help_bogus_cmd,

Modified: subversion/branches/javahl-ra/subversion/tests/cmdline/getopt_tests_data/svn--version_stdout
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/tests/cmdline/getopt_tests_data/svn--version_stdout?rev=1425508&r1=1425507&r2=1425508&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/tests/cmdline/getopt_tests_data/svn--version_stdout (original)
+++ subversion/branches/javahl-ra/subversion/tests/cmdline/getopt_tests_data/svn--version_stdout Sun Dec 23 18:34:14 2012
@@ -2,8 +2,8 @@ svn, version 0.16.0 (r3987)
    compiled Dec  5 2002, 00:02:51
 
 Copyright (C) 2010 The Apache Software Foundation.
-This software consists of contributions made by many people; see the NOTICE
-file for more information.
+This software consists of contributions made by many people;
+see the NOTICE file for more information.
 Subversion is open source software, see http://subversion.apache.org/
 
 The following repository access (RA) modules are available:

Modified: subversion/branches/javahl-ra/subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout?rev=1425508&r1=1425507&r2=1425508&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout (original)
+++ subversion/branches/javahl-ra/subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout Sun Dec 23 18:34:14 2012
@@ -31,12 +31,18 @@ usage: 1. log [PATH][@REV]
   and limits the scope of the displayed diff to the specified depth.
 
   If the --search option is used, log messages are displayed only if the
-  provided search pattern matches the author, date, log message text,
-  or, if the --verbose option is also provided, a changed path.
-  The search pattern may include glob syntax wildcards:
+  provided search pattern matches any of the author, date, log message
+  text (unless --quiet is used), or, if the --verbose option is also
+  provided, a changed path.
+  The search pattern may include "glob syntax" wildcards:
       ?      matches any single character
       *      matches a sequence of arbitrary characters
-      [...]  matches any of the characters listed inside the brackets
+      [abc]  matches any of the characters listed inside the brackets
+  If multiple --search options are provided, a log message is shown if
+  it matches any of the provided search patterns. If the --search-and
+  option is used, that option's argument is combined with the pattern
+  from the previous --search or --search-and option, and a log message
+  is shown only if it matches the combined search pattern.
   If --limit is used in combination with --search, --limit restricts the
   number of log messages searched, rather than restricting the output
   to a particular number of matching log messages.
@@ -94,24 +100,17 @@ Valid options:
   --diff                   : produce diff output
   --diff-cmd ARG           : use ARG as diff command
   --internal-diff          : override diff-cmd specified in config file
-  -x [--extensions] ARG    : Default: '-u'. When Subversion is invoking an
-                             external diff program, ARG is simply passed along
-                             to the program. But when Subversion is using its
-                             default internal diff implementation, or when
-                             Subversion is displaying blame annotations, ARG
-                             could be any of the following:
-                                -u (--unified):
-                                   Output 3 lines of unified context.
-                                -b (--ignore-space-change):
-                                   Ignore changes in the amount of white space.
-                                -w (--ignore-all-space):
-                                   Ignore all white space.
-                                --ignore-eol-style:
-                                   Ignore changes in EOL style.
-                                -p (--show-c-function):
-                                   Show C function name in diff output.
+  -x [--extensions] ARG    : Specify differencing options for external diff or
+                             internal diff or blame. Default: '-u'. Options are
+                             separated by spaces. Internal diff and blame take:
+                               -u, --unified: Show 3 lines of unified context
+                               -b, --ignore-space-change: Ignore changes in
+                                 amount of white space
+                               -w, --ignore-all-space: Ignore all white space
+                               --ignore-eol-style: Ignore changes in EOL style
+                               -p, --show-c-function: Show C function name
   --search ARG             : use ARG as search pattern (glob syntax)
-  --isearch ARG            : like --search, but case-insensitive
+  --search-and ARG         : combine ARG with the previous search pattern
 
 Global options:
   --username ARG           : specify a username ARG

Modified: subversion/branches/javahl-ra/subversion/tests/cmdline/log_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/tests/cmdline/log_tests.py?rev=1425508&r1=1425507&r2=1425508&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/tests/cmdline/log_tests.py (original)
+++ subversion/branches/javahl-ra/subversion/tests/cmdline/log_tests.py Sun Dec 23 18:34:14 2012
@@ -2296,14 +2296,51 @@ def log_search(sbox):
   log_chain = parse_log_output(output)
   check_log_chain(log_chain, [7, 6, 3])
 
-  # case-insensitive search
+  # search is case-insensitive
   exit_code, output, err = svntest.actions.run_and_verify_svn(
-                             None, None, [], 'log', '--isearch',
+                             None, None, [], 'log', '--search',
                              'FOR REVISION [367]')
 
   log_chain = parse_log_output(output)
   check_log_chain(log_chain, [7, 6, 3])
 
+  # multi-pattern search
+  exit_code, output, err = svntest.actions.run_and_verify_svn(
+                             None, None, [], 'log',
+                             '--search', 'for revision 3',
+                             '--search', 'for revision 6',
+                             '--search', 'for revision 7')
+
+  log_chain = parse_log_output(output)
+  check_log_chain(log_chain, [7, 6, 3])
+
+  # combined pattern search
+  exit_code, output, err = svntest.actions.run_and_verify_svn(
+                             None, None, [], 'log', '--verbose',
+                             '--search', 'for revision 8',
+                             '--search-and', 'test the code',
+                             '--search', 'for revision 7',
+                             '--search-and', 'this won\'t match ',
+                             '--search', 'psi',
+                             '--search-and', 'multiple lines',
+                             '--search-and', 'revision 6') # don't match r4
+
+  log_chain = parse_log_output(output)
+  check_log_chain(log_chain, [8, 6])
+
+  exit_code, output, err = svntest.actions.run_and_verify_svn(
+                             None, None, [], 'log', '--verbose',
+                             '--search', 'for revision 8',
+                             '--search-and', 'this won\'t match ',
+                             '--search', 'for revision 7',
+                             '--search', 'psi',
+                             '--search-and', 'multiple lines',
+                             '--search-and', 'revision 4') # don't match r6
+
+  log_chain = parse_log_output(output)
+  check_log_chain(log_chain, [7, 4])
+
+
 @SkipUnless(server_has_mergeinfo)
 def merge_sensitive_log_with_search(sbox):
   "test 'svn log -g --search'"

Modified: subversion/branches/javahl-ra/subversion/tests/cmdline/merge_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/tests/cmdline/merge_tests.py?rev=1425508&r1=1425507&r2=1425508&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/tests/cmdline/merge_tests.py (original)
+++ subversion/branches/javahl-ra/subversion/tests/cmdline/merge_tests.py Sun Dec 23 18:34:14 2012
@@ -5799,14 +5799,14 @@ def merge_to_path_with_switched_children
   expected_mergeinfo_output = wc.State(A_COPY_D_path, {
     ''      : Item(status=' G'),
     'H'     : Item(status=' G'),
-    'H/psi' : Item(status=' G')
+    'H/psi' : Item(status=' U')
     })
   expected_elision_output = wc.State(A_COPY_D_path, {
     })
   expected_disk_D.tweak('', props={SVN_PROP_MERGEINFO : '/A/D:5,6*'})
   expected_disk_D.tweak('H', props={SVN_PROP_MERGEINFO : '/A/D/H:5*,8'})
   expected_disk_D.tweak('H/psi', contents="New content",
-                        props={SVN_PROP_MERGEINFO :'/A/D/H/psi:5,8'})
+                        props={SVN_PROP_MERGEINFO :'/A/D/H/psi:5'})
   expected_status_D.tweak('H/psi', status='MM')
   svntest.actions.run_and_verify_merge(A_COPY_D_path, '4', '5',
                                        sbox.repo_url + '/A/D', None,
@@ -5869,7 +5869,7 @@ def merge_to_path_with_switched_children
     'D/H'       : Item(props={SVN_PROP_MERGEINFO : '/A/D/H:5*,8'}),
     'D/H/chi'   : Item("This is the file 'chi'.\n"),
     'D/H/psi'   : Item("New content",
-                       props={SVN_PROP_MERGEINFO : '/A/D/H/psi:5,8'}),
+                       props={SVN_PROP_MERGEINFO : '/A/D/H/psi:5'}),
     'D/H/omega' : Item("New content"),
     })
   expected_skip = wc.State(A_COPY_path, { })

Modified: subversion/branches/javahl-ra/subversion/tests/cmdline/merge_tree_conflict_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/tests/cmdline/merge_tree_conflict_tests.py?rev=1425508&r1=1425507&r2=1425508&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/tests/cmdline/merge_tree_conflict_tests.py (original)
+++ subversion/branches/javahl-ra/subversion/tests/cmdline/merge_tree_conflict_tests.py Sun Dec 23 18:34:14 2012
@@ -1671,7 +1671,6 @@ def merge_replace_setup(sbox):
 
 #----------------------------------------------------------------------
 # ra_serf causes duplicate notifications with this test:
-@XFail(svntest.main.is_ra_type_dav_serf)
 @Issue(3802)
 def merge_replace_causes_tree_conflict(sbox):
   "replace vs. edit tree-conflicts"

Modified: subversion/branches/javahl-ra/subversion/tests/cmdline/mergeinfo_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/tests/cmdline/mergeinfo_tests.py?rev=1425508&r1=1425507&r2=1425508&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/tests/cmdline/mergeinfo_tests.py (original)
+++ subversion/branches/javahl-ra/subversion/tests/cmdline/mergeinfo_tests.py Sun Dec 23 18:34:14 2012
@@ -72,7 +72,8 @@ def no_mergeinfo(sbox):
   svntest.actions.run_and_verify_mergeinfo(adjust_error_for_server_version(""),
                                            [],
                                            sbox.repo_url + '/A',
-                                           sbox.repo_url + '/A2')
+                                           sbox.repo_url + '/A2',
+                                           "--show-revs=merged")
 
 def mergeinfo(sbox):
   "'mergeinfo' on a path with mergeinfo"
@@ -94,7 +95,8 @@ def mergeinfo(sbox):
   svntest.actions.run_and_verify_mergeinfo(adjust_error_for_server_version(""),
                                            ['3'],
                                            sbox.repo_url + '/A',
-                                           sbox.ospath('A2'))
+                                           sbox.ospath('A2'),
+                                           "--show-revs=merged")
 
 @SkipUnless(server_has_mergeinfo)
 def explicit_mergeinfo_source(sbox):
@@ -132,13 +134,17 @@ def explicit_mergeinfo_source(sbox):
 
   # Check using each of our recorded merge sources (as paths and URLs).
   svntest.actions.run_and_verify_mergeinfo(adjust_error_for_server_version(""),
-                                           ['2', '4'], url(B2), path(B))
+                                           ['2', '4'], url(B2), path(B),
+                                           "--show-revs=merged")
   svntest.actions.run_and_verify_mergeinfo(adjust_error_for_server_version(""),
-                                           ['2', '4'], path(B2), path(B))
+                                           ['2', '4'], path(B2), path(B),
+                                           "--show-revs=merged")
   svntest.actions.run_and_verify_mergeinfo(adjust_error_for_server_version(""),
-                                           ['3', '5'], url(B3), path(B))
+                                           ['3', '5'], url(B3), path(B),
+                                           "--show-revs=merged")
   svntest.actions.run_and_verify_mergeinfo(adjust_error_for_server_version(""),
-                                           ['3', '5'], path(B3), path(B))
+                                           ['3', '5'], path(B3), path(B),
+                                           "--show-revs=merged")
 
 @SkipUnless(server_has_mergeinfo)
 def mergeinfo_non_source(sbox):
@@ -162,7 +168,8 @@ def mergeinfo_non_source(sbox):
 
   # Check on a source we haven't "merged" from.
   svntest.actions.run_and_verify_mergeinfo(adjust_error_for_server_version(""),
-                                           [], H2_url, H_path)
+                                           [], H2_url, H_path,
+                                           "--show-revs=merged")
 
 #----------------------------------------------------------------------
 # Issue #3138
@@ -238,7 +245,8 @@ def non_inheritable_mergeinfo(sbox):
   svntest.actions.run_and_verify_mergeinfo(adjust_error_for_server_version(""),
                                            ['4','6*'],
                                            sbox.repo_url + '/A',
-                                           A_COPY_path)
+                                           A_COPY_path,
+                                           '--show-revs', 'merged')
   svntest.actions.run_and_verify_mergeinfo(adjust_error_for_server_version(""),
                                            ['3','5','6*'],
                                            sbox.repo_url + '/A',
@@ -249,7 +257,8 @@ def non_inheritable_mergeinfo(sbox):
   svntest.actions.run_and_verify_mergeinfo(adjust_error_for_server_version(""),
                                            ['4'],
                                            sbox.repo_url + '/A/D',
-                                           D_COPY_path)
+                                           D_COPY_path,
+                                           '--show-revs', 'merged')
   svntest.actions.run_and_verify_mergeinfo(adjust_error_for_server_version(""),
                                            ['3','6'],
                                            sbox.repo_url + '/A/D',

Modified: subversion/branches/javahl-ra/subversion/tests/cmdline/patch_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/tests/cmdline/patch_tests.py?rev=1425508&r1=1425507&r2=1425508&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/tests/cmdline/patch_tests.py (original)
+++ subversion/branches/javahl-ra/subversion/tests/cmdline/patch_tests.py Sun Dec 23 18:34:14 2012
@@ -4099,6 +4099,61 @@ def patch_add_and_delete(sbox):
                                        1, # check-props
                                        1) # dry-run
 
+
+def patch_git_with_index_line(sbox):
+  "apply git patch with 'index' line"
+
+  sbox.build(read_only = True)
+  wc_dir = sbox.wc_dir
+  patch_file_path = make_patch_path(sbox)
+
+  unidiff_patch = [
+    "diff --git a/src/tools/ConsoleRunner/hi.txt b/src/tools/ConsoleRunner/hi.txt\n",
+    "new file mode 100644\n",
+    "index 0000000..c82a38f\n",
+    "--- /dev/null\n",
+    "+++ b/src/tools/ConsoleRunner/hi.txt\n",
+    "@@ -0,0 +1 @@\n",
+    "+hihihihihihi\n",
+    "\ No newline at end of file\n",
+  ]
+
+  svntest.main.file_write(patch_file_path, ''.join(unidiff_patch))
+
+  expected_output = [
+    'A         %s\n' % sbox.ospath('src'),
+    'A         %s\n' % sbox.ospath('src/tools'),
+    'A         %s\n' % sbox.ospath('src/tools/ConsoleRunner'),
+    'A         %s\n' % sbox.ospath('src/tools/ConsoleRunner/hi.txt'),
+  ]
+
+  expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
+  expected_status.add({
+      'src/'                            : Item(status='A ', wc_rev=0),
+      'src/tools'                       : Item(status='A ', wc_rev=0),
+      'src/tools/ConsoleRunner/'        : Item(status='A ', wc_rev=0),
+      'src/tools/ConsoleRunner/hi.txt'  : Item(status='A ', wc_rev=0),
+  })
+
+  expected_disk = svntest.main.greek_state.copy()
+  expected_disk.add({'src'                            : Item(),
+                     'src/tools'                      : Item(),
+                     'src/tools/ConsoleRunner'        : Item(),
+                     'src/tools/ConsoleRunner/hi.txt' :
+                        Item(contents="hihihihihihi")
+                   })
+
+  expected_skip = wc.State('', { })
+
+  svntest.actions.run_and_verify_patch(wc_dir, os.path.abspath(patch_file_path),
+                                       expected_output,
+                                       expected_disk,
+                                       expected_status,
+                                       expected_skip,
+                                       None, # expected err
+                                       1, # check-props
+                                       1) # dry-run
+
 ########################################################################
 #Run the tests
 
@@ -4143,6 +4198,7 @@ test_list = [ None,
               patch_delete_and_skip,
               patch_target_no_eol_at_eof,
               patch_add_and_delete,
+              patch_git_with_index_line,
             ]
 
 if __name__ == '__main__':

Modified: subversion/branches/javahl-ra/subversion/tests/cmdline/prop_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/tests/cmdline/prop_tests.py?rev=1425508&r1=1425507&r2=1425508&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/tests/cmdline/prop_tests.py (original)
+++ subversion/branches/javahl-ra/subversion/tests/cmdline/prop_tests.py Sun Dec 23 18:34:14 2012
@@ -2047,7 +2047,7 @@ def atomic_over_ra(sbox):
   sbox.build(create_wc=False)
   repo_url = sbox.repo_url
 
-  # From this point on, similar to ../libsvn_fs-fs-test.c:revision_props().
+  # From this point on, similar to ../libsvn_fs/fs-test.c:revision_props().
   s1 = "violet"
   s2 = "wrong value"
 

Modified: subversion/branches/javahl-ra/subversion/tests/cmdline/resolve_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/tests/cmdline/resolve_tests.py?rev=1425508&r1=1425507&r2=1425508&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/tests/cmdline/resolve_tests.py (original)
+++ subversion/branches/javahl-ra/subversion/tests/cmdline/resolve_tests.py Sun Dec 23 18:34:14 2012
@@ -25,7 +25,7 @@
 ######################################################################
 
 # General modules
-import shutil, sys, re, os
+import shutil, sys, re, os, stat
 import time
 
 # Our testing module
@@ -106,7 +106,6 @@ def automatic_conflict_resolution(sbox):
 # Test for issue #3707 'property conflicts not handled correctly by
 # svn resolve'.
 @Issue(3707)
-@XFail()
 def prop_conflict_resolution(sbox):
   "resolving prop conflicts"
 
@@ -225,8 +224,8 @@ def prop_conflict_resolution(sbox):
   #   2) 'A/mu' - An incoming prop edit on a local prop modification.
   #   3) 'A/D/gamma' - An local, non-conflicted prop edit
   #
-  # This currently fails because svn resolve --accept=[theirs-conflict |
-  # theirs-full] removes the conflicts, but doesn't install 'their' version
+  # Previously this failed because svn resolve --accept=[theirs-conflict |
+  # theirs-full] removed the conflicts, but didn't install 'their' version
   # of the conflicted properties.
   do_prop_conflicting_up_and_resolve('mine-full',
                                      ['local_edit\n'],
@@ -244,6 +243,35 @@ def prop_conflict_resolution(sbox):
                                      [], # Prop deleted
                                      ['incoming-conflict\n'])
 
+@SkipUnless(svntest.main.is_posix_os)
+def auto_resolve_executable_file(sbox):
+  "resolve file with executable bit set"
+  sbox.build()
+  wc_dir = sbox.wc_dir
+
+  # Mark iota as executable
+  sbox.simple_propset("svn:executable", '*', 'iota')
+  sbox.simple_commit() # r2
+
+  # Make a change to iota in r3
+  svntest.main.file_write(sbox.ospath('iota'), "boo\n")
+  sbox.simple_commit() # r3
+
+  # Update back to r2, and tweak iota to provoke a text conflict
+  sbox.simple_update(revision=2)
+  svntest.main.file_write(sbox.ospath('iota'), "bzzt\n")
+
+  # Get permission bits of iota
+  mode = os.stat(sbox.ospath('iota'))[stat.ST_MODE]
+
+  # Update back to r3, and auto-resolve the text conflict.
+  svntest.main.run_svn(False, 'update', wc_dir, '--accept', 'theirs-full')
+
+  # permission bits of iota should be unaffected
+  if mode != os.stat(sbox.ospath('iota'))[stat.ST_MODE]:
+    raise svntest.Failure
+
+
 ########################################################################
 # Run the tests
 
@@ -251,6 +279,7 @@ def prop_conflict_resolution(sbox):
 test_list = [ None,
               automatic_conflict_resolution,
               prop_conflict_resolution,
+              auto_resolve_executable_file,
              ]
 
 if __name__ == '__main__':

Modified: subversion/branches/javahl-ra/subversion/tests/cmdline/schedule_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/tests/cmdline/schedule_tests.py?rev=1425508&r1=1425507&r2=1425508&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/tests/cmdline/schedule_tests.py (original)
+++ subversion/branches/javahl-ra/subversion/tests/cmdline/schedule_tests.py Sun Dec 23 18:34:14 2012
@@ -563,6 +563,7 @@ def status_add_deleted_directory(sbox):
 # Regression test for issue #939:
 # Recursive 'svn add' should still traverse already-versioned dirs.
 @Issue(939)
+@Issue(4241)
 def add_recursive_already_versioned(sbox):
   "'svn add' should traverse already-versioned dirs"
 
@@ -592,8 +593,8 @@ def add_recursive_already_versioned(sbox
   ### or else Subversion will think you're trying to add the working copy
   ### to its parent directory, and will (possibly, if the parent directory
   ### isn't versioned) fail.
-  #svntest.main.run_svn(None, 'add', '--force', wc_dir)
-  #svntest.actions.run_and_verify_status(wc_dir, expected_status)
+  svntest.main.run_svn(None, 'add', '--force', wc_dir)
+  svntest.actions.run_and_verify_status(wc_dir, expected_status)
 
   # Now revert, and do the adds again from inside the working copy.
   svntest.main.run_svn(None, 'revert', '--recursive', wc_dir)

Modified: subversion/branches/javahl-ra/subversion/tests/cmdline/special_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/tests/cmdline/special_tests.py?rev=1425508&r1=1425507&r2=1425508&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/tests/cmdline/special_tests.py (original)
+++ subversion/branches/javahl-ra/subversion/tests/cmdline/special_tests.py Sun Dec 23 18:34:14 2012
@@ -759,7 +759,6 @@ def symlink_destination_change(sbox):
 # (disk and metadata).
 @Issue(3884)
 @SkipUnless(svntest.main.is_posix_os)
-@XFail()
 def merge_foreign_symlink(sbox):
   "merge symlink-add from foreign repos"
 
@@ -790,7 +789,7 @@ def merge_foreign_symlink(sbox):
   # Verify special status.
   expected_disk = svntest.main.greek_state.copy()
   expected_disk.add({
-    'A/zeta': Item(props={ 'svn:special': '*' })
+    'A/zeta': Item(contents="link target", props={ 'svn:special': '*' })
   })
   svntest.actions.verify_disk(sbox.ospath(''), expected_disk, True)
 
@@ -820,7 +819,7 @@ def symlink_to_wc_basic(sbox):
   wc_uuid = svntest.actions.get_wc_uuid(wc_dir)
   expected_info = [{
       'Path' : re.escape(os.path.join(symlink_path)),
-      'Working Copy Root Path' : re.escape(os.path.abspath(symlink_path)),
+      'Working Copy Root Path' : re.escape(os.path.abspath(wc_dir)),
       'Repository Root' : sbox.repo_url,
       'Repository UUID' : wc_uuid,
       'Revision' : '1',
@@ -829,7 +828,7 @@ def symlink_to_wc_basic(sbox):
   }, {
       'Name' : 'iota',
       'Path' : re.escape(os.path.join(symlink_path, 'iota')),
-      'Working Copy Root Path' : re.escape(os.path.abspath(symlink_path)),
+      'Working Copy Root Path' : re.escape(os.path.abspath(wc_dir)),
       'Repository Root' : sbox.repo_url,
       'Repository UUID' : wc_uuid,
       'Revision' : '1',

Modified: subversion/branches/javahl-ra/subversion/tests/cmdline/stat_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/tests/cmdline/stat_tests.py?rev=1425508&r1=1425507&r2=1425508&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/tests/cmdline/stat_tests.py (original)
+++ subversion/branches/javahl-ra/subversion/tests/cmdline/stat_tests.py Sun Dec 23 18:34:14 2012
@@ -986,25 +986,19 @@ def status_ignored_dir(sbox):
 
 #----------------------------------------------------------------------
 
-@Issue(2030)
-def status_unversioned_dir(sbox):
-  "status on unversioned dir"
-  sbox.build(read_only = True, create_wc = False)
-  dir = sbox.wc_dir
-  svntest.main.safe_rmtree(sbox.wc_dir)
-  os.mkdir(dir)
-
-  # Depending on whether you run the tests below a working copy
-  # or not, the error message might either be something like
-  # svn: warning: W155007: '...copies/stat_tests-19' is not a working copy
-  # or
-  # svn: warning: W155010: The node '...copies/stat_tests-19' was not found.
+def status_unversioned_dir_in_wc(sbox):
+  "status on unversioned dir in working copy"
+  sbox.build(read_only = True)
 
-  expected_err = "svn: warning: W1550(07|10): .*'.*(/|\\\\)" + \
-                 os.path.basename(dir) + \
-                 "' (is not a working copy|was not found)"
+  # Create two unversioned directories within the test working copy
+  path = sbox.ospath('1/2')
+  os.makedirs(path)
+
+  expected_err = "svn: warning: (W155007|W155010): .*'.*(/|\\\\)" + \
+                 os.path.basename(path) + \
+                 "' was not found"
   svntest.actions.run_and_verify_svn2(None, [], expected_err, 0,
-                                      "status", dir, dir)
+                                      "status", path)
 
 #----------------------------------------------------------------------
 
@@ -1883,14 +1877,6 @@ def status_nested_wc_old_format(sbox):
   os.chdir(wc_dir)
   svntest.actions.run_and_verify_svn(None, [ "?       subdir\n" ], [], 'st')
 
-########################################################################
-# Run the tests
-
-
-def simple_lock(sbox, relpath):
-  path = os.path.join(sbox.wc_dir, relpath)
-  svntest.actions.run_and_verify_svn(None, None, [], 'lock', path)
-
 #----------------------------------------------------------------------
 # Regression test for issue #3855 "status doesn't show 'K' on a locked
 # deleted node".
@@ -1902,7 +1888,8 @@ def status_locked_deleted(sbox):
   iota_path = sbox.ospath('iota')
 
   sbox.simple_rm('iota')
-  simple_lock(sbox, 'iota')
+  svntest.actions.run_and_verify_svn(None, None, [], 'lock',
+                                     os.path.join(sbox.wc_dir, 'iota'))
   svntest.actions.run_and_verify_svn(None, ['D    K  %s\n' % iota_path], [],
                                      'status', iota_path)
 
@@ -2036,6 +2023,19 @@ def status_not_present(sbox):
                                      sbox.ospath('A/mu'),
                                      sbox.ospath('no-file'))
 
+# Skip this test is a .svn dir exists in the root directory
+@Skip(lambda: os.path.exists("/%s" % svntest.main.get_admin_name())) 
+def status_unversioned_dir(sbox):
+  "status on unversioned dir"
+  sbox.build(read_only = True, create_wc = False)
+
+  # Run svn status on "/", which we assume exists and isn't a WC.
+  # This should work on UNIX-like systems and Windows systems
+  expected_err = "svn: warning: W1550(07|10): .*'.*(/|\\\\)" + \
+                 "' is not a working copy"
+  svntest.actions.run_and_verify_svn2(None, [], expected_err, 0,
+                                      "status", "/")
+
 ########################################################################
 # Run the tests
 
@@ -2060,7 +2060,7 @@ test_list = [ None,
               missing_dir_in_anchor,
               status_in_xml,
               status_ignored_dir,
-              status_unversioned_dir,
+              status_unversioned_dir_in_wc,
               status_missing_dir,
               status_nonrecursive_update_different_cwd,
               status_add_plus_conflict,
@@ -2080,6 +2080,7 @@ test_list = [ None,
               wclock_status,
               modified_modulo_translation,
               status_not_present,
+              status_unversioned_dir,
              ]
 
 if __name__ == '__main__':

Modified: subversion/branches/javahl-ra/subversion/tests/cmdline/svnadmin_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/tests/cmdline/svnadmin_tests.py?rev=1425508&r1=1425507&r2=1425508&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/tests/cmdline/svnadmin_tests.py (original)
+++ subversion/branches/javahl-ra/subversion/tests/cmdline/svnadmin_tests.py Sun Dec 23 18:34:14 2012
@@ -1824,7 +1824,8 @@ def mergeinfo_race(sbox):
 @Issue(4213)
 def recover_old(sbox):
   "recover --pre-1.4-compatible"
-  sbox.build(create_wc=False)
+  svntest.main.safe_rmtree(sbox.repo_dir, 1)
+  svntest.main.create_repos(sbox.repo_dir, minor_version=0)
   svntest.main.run_svnadmin("recover", sbox.repo_dir)
 
 

Modified: subversion/branches/javahl-ra/subversion/tests/cmdline/svndumpfilter_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/tests/cmdline/svndumpfilter_tests.py?rev=1425508&r1=1425507&r2=1425508&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/tests/cmdline/svndumpfilter_tests.py (original)
+++ subversion/branches/javahl-ra/subversion/tests/cmdline/svndumpfilter_tests.py Sun Dec 23 18:34:14 2012
@@ -679,6 +679,33 @@ def accepts_deltas(sbox):
 
   
 
+@Issue(4234)
+def dumpfilter_targets_expect_leading_slash_prefixes(sbox):
+  "dumpfilter targets expect leading '/' in prefixes"
+  ## See http://subversion.tigris.org/issues/show_bug.cgi?id=4234. ##
+
+  test_create(sbox)
+
+  dumpfile_location = os.path.join(os.path.dirname(sys.argv[0]),
+                                   'svndumpfilter_tests_data',
+                                   'greek_tree.dump')
+  dumpfile = open(dumpfile_location).read()
+
+  (fd, targets_file) = tempfile.mkstemp(dir=svntest.main.temp_dir)
+  try:
+    targets = open(targets_file, 'w')
+
+    # Removing the leading slash in path prefixes should work.
+    targets.write('A/D/H\n')
+    targets.write('A/D/G\n')
+    targets.close()
+    _simple_dumpfilter_test(sbox, dumpfile,
+                            'exclude', '/A/B/E', '--targets', targets_file)
+  finally:
+    os.close(fd)
+    os.remove(targets_file)
+
+
 ########################################################################
 # Run the tests
 
@@ -693,6 +720,7 @@ test_list = [ None,
               dropped_but_not_renumbered_empty_revs,
               match_empty_prefix,
               accepts_deltas,
+              dumpfilter_targets_expect_leading_slash_prefixes,
               ]
 
 if __name__ == '__main__':

Modified: subversion/branches/javahl-ra/subversion/tests/cmdline/svnlook_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/tests/cmdline/svnlook_tests.py?rev=1425508&r1=1425507&r2=1425508&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/tests/cmdline/svnlook_tests.py (original)
+++ subversion/branches/javahl-ra/subversion/tests/cmdline/svnlook_tests.py Sun Dec 23 18:34:14 2012
@@ -698,9 +698,14 @@ fp.close()"""
                     'bogus_rev_val\n',
                     '  bogus_prop\n',
                     '  svn:log\n', '  svn:author\n',
-                    #  internal property, not really expected
-                    '  svn:check-locks\n',
-                    '  bogus_rev_prop\n', '  svn:date\n']
+                    '  svn:check-locks\n', # internal prop, not really expected
+                    '  bogus_rev_prop\n',
+                    '  svn:date\n',
+                    '  svn:txn-client-compat-version\n',
+                    ]
+  # ra_dav and ra_svn add the user-agent ephemeral property
+  if svntest.main.is_ra_type_dav() or svntest.main.is_ra_type_svn():
+    expected_data.append('  svn:txn-user-agent\n')
   verify_logfile(logfilepath, svntest.verify.UnorderedOutput(expected_data))
 
 def property_delete(sbox):

Modified: subversion/branches/javahl-ra/subversion/tests/cmdline/svntest/actions.py
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/tests/cmdline/svntest/actions.py?rev=1425508&r1=1425507&r2=1425508&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/tests/cmdline/svntest/actions.py (original)
+++ subversion/branches/javahl-ra/subversion/tests/cmdline/svntest/actions.py Sun Dec 23 18:34:14 2012
@@ -35,7 +35,7 @@ else:
   from cStringIO import StringIO
 
 import svntest
-from svntest import main, verify, tree, wc
+from svntest import main, verify, tree, wc, sandbox
 from svntest import Failure
 
 logger = logging.getLogger()
@@ -1573,6 +1573,90 @@ def run_and_verify_status_xml(expected_e
           pprint.pformat(expected_entries).splitlines(),
           pprint.pformat(actual_entries).splitlines())))
 
+def run_and_verify_inherited_prop_xml(path_or_url,
+                                      expected_inherited_props,
+                                      expected_explicit_props,
+                                      propname=None,
+                                      peg_rev=None,
+                                      *args):
+  """If PROPNAME is None, then call run_and_verify_svn with proplist -v --xml
+  --show-inherited-props on PATH_OR_URL, otherwise call run_and_verify_svn
+  with propget PROPNAME --xml --show-inherited-props.
+
+  PATH_OR_URL is pegged at PEG_REV if the latter is not None.  If PEG_REV
+  is none, then PATH_OR_URL is pegged at HEAD if a url.
+
+  EXPECTED_INHERITED_PROPS is a (possibly empty) dict mapping working copy
+  paths or URLs to dicts of inherited properties. EXPECTED_EXPLICIT_PROPS is
+  a (possibly empty) dict of the explicit properties expected on PATH_OR_URL.
+
+  Returns on success, raises on failure if EXPECTED_INHERITED_PROPS or
+  EXPECTED_EXPLICIT_PROPS don't match the results of proplist/propget.
+  """
+
+  if peg_rev is None:
+    if sandbox.is_url(path_or_url):
+      path_or_url = path_or_url + '@HEAD'
+  else:
+    path_or_url = path_or_url + '@' + str(peg_rev)
+
+  if (propname):
+    exit_code, output, errput = svntest.actions.run_and_verify_svn(
+      None, None, [], 'propget', propname, '--xml',
+      '--show-inherited-props', path_or_url, *args)
+  else:
+    exit_code, output, errput = svntest.actions.run_and_verify_svn(
+      None, None, [], 'proplist', '-v', '--xml', '--show-inherited-props',
+      path_or_url, *args)
+
+  if len(errput) > 0:
+    raise Failure
+
+  # Props inherited from within the WC are keyed on absolute paths.
+  expected_iprops = {}
+  for x in expected_inherited_props:
+    if sandbox.is_url(x):
+      expected_iprops[x] = expected_inherited_props[x]    
+    else:
+      expected_iprops[os.path.abspath(x)] = expected_inherited_props[x]
+
+  actual_iprops = {}
+  actual_explicit_props = {}
+
+  doc = parseString(''.join(output))
+  targets = doc.getElementsByTagName('target')
+  for t in targets:
+
+    # Create actual inherited props.
+    iprops = t.getElementsByTagName('inherited_property')
+
+    if len(iprops) > 0:
+      actual_iprops[t.getAttribute('path')]={}
+
+    for i in iprops:
+      actual_iprops[t.getAttribute('path')][i.getAttribute('name')] = \
+        i.firstChild.nodeValue
+
+    # Create actual explicit props.
+    xprops = t.getElementsByTagName('property')
+
+    for x in xprops:
+      actual_explicit_props[x.getAttribute('name')] = x.firstChild.nodeValue
+
+  if expected_explicit_props != actual_explicit_props:
+    raise svntest.Failure(
+      'Actual and expected explicit props do not match\n' +
+      '\n'.join(difflib.ndiff(
+      pprint.pformat(expected_explicit_props).splitlines(),
+      pprint.pformat(actual_explicit_props).splitlines())))
+
+  if expected_iprops != actual_iprops:
+    raise svntest.Failure(
+      'Actual and expected inherited props do not match\n' +
+      '\n'.join(difflib.ndiff(
+      pprint.pformat(expected_iprops).splitlines(),
+      pprint.pformat(actual_iprops).splitlines())))
+
 def run_and_verify_diff_summarize_xml(error_re_string = [],
                                       expected_prefix = None,
                                       expected_paths = [],

Modified: subversion/branches/javahl-ra/subversion/tests/cmdline/svntest/main.py
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/tests/cmdline/svntest/main.py?rev=1425508&r1=1425507&r2=1425508&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/tests/cmdline/svntest/main.py (original)
+++ subversion/branches/javahl-ra/subversion/tests/cmdline/svntest/main.py Sun Dec 23 18:34:14 2012
@@ -1229,10 +1229,12 @@ class TestSpawningThread(threading.Threa
   """A thread that runs test cases in their own processes.
   Receives test numbers to run from the queue, and saves results into
   the results field."""
-  def __init__(self, queue):
+  def __init__(self, queue, progress_func, tests_total):
     threading.Thread.__init__(self)
     self.queue = queue
     self.results = []
+    self.progress_func = progress_func
+    self.tests_total = tests_total
 
   def run(self):
     while True:
@@ -1243,6 +1245,11 @@ class TestSpawningThread(threading.Threa
 
       self.run_one(next_index)
 
+      # signal progress
+      if self.progress_func:
+        self.progress_func(self.tests_total - self.queue.qsize(),
+                           self.tests_total)
+
   def run_one(self, index):
     command = os.path.abspath(sys.argv[0])
 
@@ -1499,7 +1506,8 @@ def _internal_run_tests(test_list, testn
     for num in testnums:
       number_queue.put(num)
 
-    threads = [ TestSpawningThread(number_queue) for i in range(parallel) ]
+    threads = [ TestSpawningThread(number_queue, progress_func,
+                                   len(testnums)) for i in range(parallel) ]
     for t in threads:
       t.start()
 
@@ -1512,10 +1520,6 @@ def _internal_run_tests(test_list, testn
       results += t.results
     results.sort()
 
-    # signal some kind of progress
-    if progress_func:
-      progress_func(len(testnums), len(testnums))
-
     # terminate the line of dots
     print("")
 

Modified: subversion/branches/javahl-ra/subversion/tests/cmdline/tree_conflict_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/tests/cmdline/tree_conflict_tests.py?rev=1425508&r1=1425507&r2=1425508&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/tests/cmdline/tree_conflict_tests.py (original)
+++ subversion/branches/javahl-ra/subversion/tests/cmdline/tree_conflict_tests.py Sun Dec 23 18:34:14 2012
@@ -652,7 +652,7 @@ def merge_file_mod_onto_not_file(sbox):
   "merge file: modify onto not-file"
   sbox2 = sbox.clone_dependent()
   test_tc_merge(sbox, f_mods, br_scen = f_dels + f_moves + f_rpl_d)
-  test_tc_merge(sbox2, f_mods, wc_scen = f_dels)
+  test_tc_merge(sbox2, f_mods, wc_scen = f_dels + f_moves)
   # Note: See UC4 in notes/tree-conflicts/use-cases.txt.
 
 def merge_file_del_onto_not_same(sbox):

Propchange: subversion/branches/javahl-ra/subversion/tests/cmdline/tree_conflict_tests.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: subversion/branches/javahl-ra/subversion/tests/cmdline/wc_tests.py
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: subversion/branches/javahl-ra/subversion/tests/libsvn_delta/vdelta_1.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: subversion/branches/javahl-ra/subversion/tests/libsvn_fs/fs-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/tests/libsvn_fs/fs-test.c?rev=1425508&r1=1425507&r2=1425508&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/tests/libsvn_fs/fs-test.c (original)
+++ subversion/branches/javahl-ra/subversion/tests/libsvn_fs/fs-test.c Sun Dec 23 18:34:14 2012
@@ -4176,12 +4176,12 @@ check_related(const svn_test_opts_t *opt
             int related = 0;
 
             /* Get the ID for the first path/revision combination. */
-            SVN_ERR(svn_fs_revision_root(&rev_root, fs, pr1.rev, pool));
-            SVN_ERR(svn_fs_node_id(&id1, rev_root, pr1.path, pool));
+            SVN_ERR(svn_fs_revision_root(&rev_root, fs, pr1.rev, subpool));
+            SVN_ERR(svn_fs_node_id(&id1, rev_root, pr1.path, subpool));
 
             /* Get the ID for the second path/revision combination. */
-            SVN_ERR(svn_fs_revision_root(&rev_root, fs, pr2.rev, pool));
-            SVN_ERR(svn_fs_node_id(&id2, rev_root, pr2.path, pool));
+            SVN_ERR(svn_fs_revision_root(&rev_root, fs, pr2.rev, subpool));
+            SVN_ERR(svn_fs_node_id(&id2, rev_root, pr2.path, subpool));
 
             /* <exciting> Now, run the relationship check! </exciting> */
             related = svn_fs_check_related(id1, id2) ? 1 : 0;

Modified: subversion/branches/javahl-ra/subversion/tests/libsvn_repos/repos-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/tests/libsvn_repos/repos-test.c?rev=1425508&r1=1425507&r2=1425508&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/tests/libsvn_repos/repos-test.c (original)
+++ subversion/branches/javahl-ra/subversion/tests/libsvn_repos/repos-test.c Sun Dec 23 18:34:14 2012
@@ -1077,9 +1077,10 @@ rmlocks(const svn_test_opts_t *opts,
     SVN_ERR(create_rmlocks_editor(&editor, &edit_baton, &removed, subpool));
 
     /* Report what we have. */
-    SVN_ERR(svn_repos_begin_report2(&report_baton, 1, repos, "/", "", NULL,
+    SVN_ERR(svn_repos_begin_report3(&report_baton, 1, repos, "/", "", NULL,
                                     FALSE, svn_depth_infinity, FALSE, FALSE,
-                                    editor, edit_baton, NULL, NULL, subpool));
+                                    editor, edit_baton, NULL, NULL, 1024,
+                                    subpool));
     SVN_ERR(svn_repos_set_path3(report_baton, "", 1,
                                 svn_depth_infinity,
                                 FALSE, NULL, subpool));
@@ -2065,9 +2066,10 @@ reporter_depth_exclude(const svn_test_op
   SVN_ERR(dir_delta_get_editor(&editor, &edit_baton, fs,
                                txn_root, "", subpool));
 
-  SVN_ERR(svn_repos_begin_report2(&report_baton, 2, repos, "/", "", NULL,
+  SVN_ERR(svn_repos_begin_report3(&report_baton, 2, repos, "/", "", NULL,
                                   TRUE, svn_depth_infinity, FALSE, FALSE,
-                                  editor, edit_baton, NULL, NULL, subpool));
+                                  editor, edit_baton, NULL, NULL, 16,
+                                  subpool));
   SVN_ERR(svn_repos_set_path3(report_baton, "", 1,
                               svn_depth_infinity,
                               FALSE, NULL, subpool));
@@ -2122,9 +2124,10 @@ reporter_depth_exclude(const svn_test_op
   SVN_ERR(dir_delta_get_editor(&editor, &edit_baton, fs,
                                txn_root, "", subpool));
 
-  SVN_ERR(svn_repos_begin_report2(&report_baton, 2, repos, "/", "", NULL,
+  SVN_ERR(svn_repos_begin_report3(&report_baton, 2, repos, "/", "", NULL,
                                   TRUE, svn_depth_infinity, FALSE, FALSE,
-                                  editor, edit_baton, NULL, NULL, subpool));
+                                  editor, edit_baton, NULL, NULL, 20,
+                                  subpool));
   SVN_ERR(svn_repos_set_path3(report_baton, "", 1,
                               svn_depth_infinity,
                               FALSE, NULL, subpool));

Modified: subversion/branches/javahl-ra/subversion/tests/libsvn_subr/cache-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/tests/libsvn_subr/cache-test.c?rev=1425508&r1=1425507&r2=1425508&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/tests/libsvn_subr/cache-test.c (original)
+++ subversion/branches/javahl-ra/subversion/tests/libsvn_subr/cache-test.c Sun Dec 23 18:34:14 2012
@@ -183,8 +183,8 @@ test_membuffer_cache_basic(apr_pool_t *p
   svn_cache__t *cache;
   svn_membuffer_t *membuffer;
 
-  SVN_ERR(svn_cache__membuffer_cache_create(&membuffer, 10*1024, 1,
-                                            TRUE, pool));
+  SVN_ERR(svn_cache__membuffer_cache_create(&membuffer, 10*1024, 1, 0,
+                                            TRUE, TRUE, pool));
 
   /* Create a cache with just one entry. */
   SVN_ERR(svn_cache__create_membuffer_cache(&cache,

Modified: subversion/branches/javahl-ra/subversion/tests/libsvn_subr/checksum-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/tests/libsvn_subr/checksum-test.c?rev=1425508&r1=1425507&r2=1425508&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/tests/libsvn_subr/checksum-test.c (original)
+++ subversion/branches/javahl-ra/subversion/tests/libsvn_subr/checksum-test.c Sun Dec 23 18:34:14 2012
@@ -24,6 +24,7 @@
 #include <apr_pools.h>
 
 #include "svn_error.h"
+#include "private/svn_pseudo_md5.h"
 
 #include "../svn_test.h"
 
@@ -80,6 +81,38 @@ test_checksum_empty(apr_pool_t *pool)
   return SVN_NO_ERROR;
 }
 
+static svn_error_t *
+test_pseudo_md5(apr_pool_t *pool)
+{
+  apr_uint32_t input[16] = { 0 };
+  apr_uint32_t digest_15[4] = { 0 };
+  apr_uint32_t digest_31[4] = { 0 };
+  apr_uint32_t digest_63[4] = { 0 };
+  svn_checksum_t *checksum;
+
+  /* input is all 0s but the hash shall be different
+     (due to different input sizes)*/
+  svn__pseudo_md5_15(digest_15, input);
+  svn__pseudo_md5_31(digest_31, input);
+  svn__pseudo_md5_63(digest_63, input);
+
+  SVN_TEST_ASSERT(memcmp(digest_15, digest_31, sizeof(digest_15)));
+  SVN_TEST_ASSERT(memcmp(digest_15, digest_63, sizeof(digest_15)));
+  SVN_TEST_ASSERT(memcmp(digest_31, digest_63, sizeof(digest_15)));
+
+  /* the checksums shall also be different from "proper" MD5 */
+  SVN_ERR(svn_checksum(&checksum, svn_checksum_md5, input, 15, pool));
+  SVN_TEST_ASSERT(memcmp(digest_15, checksum->digest, sizeof(digest_15)));
+  
+  SVN_ERR(svn_checksum(&checksum, svn_checksum_md5, input, 31, pool));
+  SVN_TEST_ASSERT(memcmp(digest_31, checksum->digest, sizeof(digest_15)));
+
+  SVN_ERR(svn_checksum(&checksum, svn_checksum_md5, input, 63, pool));
+  SVN_TEST_ASSERT(memcmp(digest_63, checksum->digest, sizeof(digest_15)));
+
+  return SVN_NO_ERROR;
+}
+
 /* An array of all test functions */
 struct svn_test_descriptor_t test_funcs[] =
   {
@@ -88,5 +121,7 @@ struct svn_test_descriptor_t test_funcs[
                    "checksum parse"),
     SVN_TEST_PASS2(test_checksum_empty,
                    "checksum emptiness"),
+    SVN_TEST_PASS2(test_pseudo_md5,
+                   "pseudo-md5 compatibility"),
     SVN_TEST_NULL
   };



Mime
View raw message