subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hwri...@apache.org
Subject svn commit: r1400556 [26/29] - in /subversion/branches/ev2-export: ./ build/ build/ac-macros/ build/generator/ build/generator/templates/ build/hudson/ contrib/client-side/emacs/ contrib/client-side/svn-push/ contrib/client-side/svnmerge/ contrib/hook-...
Date Sun, 21 Oct 2012 02:00:47 GMT
Modified: subversion/branches/ev2-export/subversion/svnserve/serve.c
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/svnserve/serve.c?rev=1400556&r1=1400555&r2=1400556&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/svnserve/serve.c (original)
+++ subversion/branches/ev2-export/subversion/svnserve/serve.c Sun Oct 21 02:00:31 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, "!))");
 }
@@ -2771,7 +2841,8 @@ static svn_error_t *replay_one_revision(
     svn_error_clear(editor->abort_edit(edit_baton, pool));
   SVN_CMD_ERR(err);
 
-  return svn_ra_svn_write_cmd(conn, pool, "finish-replay", "");
+  return svn_ra_svn_write_templated_cmd(conn, pool,
+                                        svn_ra_svn_cmd_finish_replay);
 }
 
 static svn_error_t *replay(svn_ra_svn_conn_t *conn, apr_pool_t *pool,
@@ -2858,6 +2929,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 +3019,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 +3075,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 +3087,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. */
@@ -3032,8 +3145,8 @@ static svn_error_t *find_repos(const cha
 
 #ifdef SVN_HAVE_SASL
   /* Should we use Cyrus SASL? */
-  svn_config_get_bool(b->cfg, &b->use_sasl, SVN_CONFIG_SECTION_SASL,
-                      SVN_CONFIG_OPTION_USE_SASL, FALSE);
+  SVN_ERR(svn_config_get_bool(b->cfg, &b->use_sasl, SVN_CONFIG_SECTION_SASL,
+                              SVN_CONFIG_OPTION_USE_SASL, FALSE));
 #endif
 
   /* Use the repository UUID as the default realm. */
@@ -3052,16 +3165,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_ERR(svn_repos_hooks_setenv(b->repos, hooks_env, pool, pool));
 
   return SVN_NO_ERROR;
 }
@@ -3089,37 +3198,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 +3280,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 +3300,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 +3365,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 +3374,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 +3386,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/ev2-export/subversion/svnserve/server.h
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/svnserve/server.h?rev=1400556&r1=1400555&r2=1400556&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/svnserve/server.h (original)
+++ subversion/branches/ev2-export/subversion/svnserve/server.h Sun Oct 21 02:00:31 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/ev2-export/subversion/svnsync/main.c
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/svnsync/main.c?rev=1400556&r1=1400555&r2=1400556&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/svnsync/main.c (original)
+++ subversion/branches/ev2-export/subversion/svnsync/main.c Sun Oct 21 02:00:31 2012
@@ -301,7 +301,6 @@ check_lib_versions(void)
       { "svn_ra",    svn_ra_version },
       { NULL, NULL }
     };
-
   SVN_VERSION_DEFINE(my_version);
 
   return svn_ver_check_list(&my_version, checklist);
@@ -1858,9 +1857,10 @@ help_cmd(apr_getopt_t *os, void *baton, 
 
   SVN_ERR(svn_ra_print_modules(version_footer, pool));
 
-  SVN_ERR(svn_opt_print_help3(os, "svnsync",
+  SVN_ERR(svn_opt_print_help4(os, "svnsync",
                               opt_baton ? opt_baton->version : FALSE,
                               opt_baton ? opt_baton->quiet : FALSE,
+                              /*###opt_state ? opt_state->verbose :*/ FALSE,
                               version_footer->data, header,
                               svnsync_cmd_table, svnsync_options, NULL,
                               NULL, pool));

Modified: subversion/branches/ev2-export/subversion/svnversion/main.c
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/svnversion/main.c?rev=1400556&r1=1400555&r2=1400556&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/svnversion/main.c (original)
+++ subversion/branches/ev2-export/subversion/svnversion/main.c Sun Oct 21 02:00:31 2012
@@ -37,8 +37,8 @@
 static svn_error_t *
 version(svn_boolean_t quiet, apr_pool_t *pool)
 {
-  return svn_opt_print_help3(NULL, "svnversion", TRUE, quiet, NULL, NULL,
-                             NULL, NULL, NULL, NULL, pool);
+  return svn_opt_print_help4(NULL, "svnversion", TRUE, quiet, FALSE,
+                             NULL, NULL, NULL, NULL, NULL, NULL, pool);
 }
 
 static void
@@ -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"
@@ -107,8 +107,8 @@ check_lib_versions(void)
       { "svn_wc",     svn_wc_version },
       { NULL, NULL }
     };
-
   SVN_VERSION_DEFINE(my_version);
+
   return svn_ver_check_list(&my_version, checklist);
 }
 

Modified: subversion/branches/ev2-export/subversion/svnversion/svnversion.1
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/svnversion/svnversion.1?rev=1400556&r1=1400555&r2=1400556&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/svnversion/svnversion.1 (original)
+++ subversion/branches/ev2-export/subversion/svnversion/svnversion.1 Sun Oct 21 02:00:31 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/ev2-export/subversion/tests/cmdline/basic_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/tests/cmdline/basic_tests.py?rev=1400556&r1=1400555&r2=1400556&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/tests/cmdline/basic_tests.py (original)
+++ subversion/branches/ev2-export/subversion/tests/cmdline/basic_tests.py Sun Oct 21 02:00:31 2012
@@ -2989,6 +2989,7 @@ def delete_conflicts_one_of_many(sbox):
   verify_file_deleted("failed to remove conflict file",
                       sbox.ospath('A/D/G/rho.mine'))
 
+
 ########################################################################
 # Run the tests
 

Modified: subversion/branches/ev2-export/subversion/tests/cmdline/commit_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/tests/cmdline/commit_tests.py?rev=1400556&r1=1400555&r2=1400556&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/tests/cmdline/commit_tests.py (original)
+++ subversion/branches/ev2-export/subversion/tests/cmdline/commit_tests.py Sun Oct 21 02:00:31 2012
@@ -2915,7 +2915,33 @@ def commit_danglers(sbox):
                                         expected_error,
                                         wc_dir, '--cl', 'L')
 
-
+#----------------------------------------------------------------------
+# Test for issue 4203: Commit of moved dir with modified file in
+# dir/subdir should bump LastChangedRev of subdir in originating WC
+@XFail()
+@Issue(4203)
+def commit_moved_dir_with_nested_mod_in_subdir(sbox):
+  "commit of moved dir with nested mod in subdir"
+
+  sbox.build()
+  wc_dir = sbox.wc_dir
+
+  sbox.simple_move('A/B','A/B_copied')
+
+  B_copied = sbox.ospath('A/B_copied')
+  E_copied = sbox.ospath('A/B_copied/E')
+  alpha_copied = sbox.ospath('A/B_copied/E/alpha')
+
+  svntest.main.file_write(alpha_copied, "xxxx") 
+  
+  svntest.main.run_svn(None, 'commit', wc_dir, '-mm')
+
+  expected = {'Revision'          : '2',
+              'Last Changed Rev'  : '2',
+             }
+  svntest.actions.run_and_verify_info([expected], E_copied)
+  
+  
 ########################################################################
 # Run the tests
 
@@ -2986,6 +3012,7 @@ test_list = [ None,
               commit_incomplete,
               commit_add_subadd,
               commit_danglers,
+              commit_moved_dir_with_nested_mod_in_subdir,
              ]
 
 if __name__ == '__main__':

Modified: subversion/branches/ev2-export/subversion/tests/cmdline/copy_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/tests/cmdline/copy_tests.py?rev=1400556&r1=1400555&r2=1400556&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/tests/cmdline/copy_tests.py (original)
+++ subversion/branches/ev2-export/subversion/tests/cmdline/copy_tests.py Sun Oct 21 02:00:31 2012
@@ -1878,12 +1878,14 @@ def mv_unversioned_file(sbox):
 
   # Try to move an unversioned file.
   svntest.actions.run_and_verify_svn(None, None,
-                                     ".*unversioned1.* is not under version control.*",
+                                     ".*unversioned1' " +
+                                       "(does not exist|is not under version control)",
                                      'mv', unver_path_1, dest_path_1)
 
   # Try to forcibly move an unversioned file.
   svntest.actions.run_and_verify_svn(None, None,
-                                     ".*unversioned2.* is not under version control.*",
+                                     ".*unversioned2.* " +
+                                       "(does not exist|is not under version control)",
                                      'mv',
                                      unver_path_2, dest_path_2)
 
@@ -5457,11 +5459,13 @@ def copy_deleted_dir(sbox):
   sbox.simple_rm('A')
 
   svntest.actions.run_and_verify_svn(None, None,
-                                     'svn: E145000: Path.* does not exist',
+                                     '(svn: E145000: Path.* does not exist)|' +
+                                      "(svn: E155035: Deleted node .* copied)",
                                      'cp', sbox.ospath('iota'),
                                      sbox.ospath('new_iota'))
   svntest.actions.run_and_verify_svn(None, None,
-                                     'svn: E145000: Path.* does not exist',
+                                     '(svn: E145000: Path.* does not exist)|' +
+                                      "(svn: E155035: Deleted node .* copied)",
                                      'cp', sbox.ospath('A/D'),
                                      sbox.ospath('new_D'))
 
@@ -5742,6 +5746,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 +5886,7 @@ test_list = [ None,
               three_nested_moves,
               copy_to_unversioned_parent,
               copy_text_conflict,
+              copy_over_excluded,
              ]
 
 if __name__ == '__main__':

Modified: subversion/branches/ev2-export/subversion/tests/cmdline/davautocheck.sh
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/tests/cmdline/davautocheck.sh?rev=1400556&r1=1400555&r2=1400556&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/tests/cmdline/davautocheck.sh (original)
+++ subversion/branches/ev2-export/subversion/tests/cmdline/davautocheck.sh Sun Oct 21 02:00:31 2012
@@ -219,13 +219,18 @@ fi
 [ -r "$MOD_AUTHZ_SVN" ] \
   || fail "authz_svn_module not found, please use '--enable-shared --enable-dso --with-apxs' with your 'configure' script"
 
-LD_LIBRARY_PATH="$ABS_BUILDDIR/subversion/libsvn_ra_neon/.libs:$ABS_BUILDDIR/subversion/libsvn_ra_local/.libs:$ABS_BUILDDIR/subversion/libsvn_ra_svn/.libs:$LD_LIBRARY_PATH"
-export LD_LIBRARY_PATH
+BUILDDIR_LIBRARY_PATH="$ABS_BUILDDIR/subversion/libsvn_ra_neon/.libs:$ABS_BUILDDIR/subversion/libsvn_ra_local/.libs:$ABS_BUILDDIR/subversion/libsvn_ra_svn/.libs"
 
 case "`uname`" in
-  Darwin*) LDD='otool -L'
+  Darwin*)
+    LDD='otool -L'
+    DYLD_LIBRARY_PATH="$BUILDDIR_LIBRARY_PATH:$DYLD_LIBRARY_PATH"
+    export DYLD_LIBRARY_PATH
     ;;
-  *) LDD='ldd'
+  *)
+    LDD='ldd'
+    LD_LIBRARY_PATH="$BUILDDIR_LIBRARY_PATH:$LD_LIBRARY_PATH"
+    export LD_LIBRARY_PATH
     ;;
 esac
 
@@ -318,44 +323,48 @@ say "Using directory '$HTTPD_ROOT'..."
 if [ ${USE_SSL:+set} ]; then
   say "Setting up SSL"
   BASE_URL="https://localhost:$HTTPD_PORT"
-# A self-signed certifcate for localhost generated via:
-#   openssl req -new -x509 -nodes -out cert.pem -keyout cert-key.pem
+# A self-signed certifcate for localhost that expires after 2039-12-30
+# generated via:
+#   openssl req -new -x509 -nodes -days 10000 -out cert.pem -keyout cert-key.pem
+# This is embedded, rather than generated on-the-fly, to avoid consuming
+# system entropy.
   SSL_CERTIFICATE_FILE="$HTTPD_ROOT/cert.pem"
 cat > "$SSL_CERTIFICATE_FILE" <<__EOF__
 -----BEGIN CERTIFICATE-----
-MIICrTCCAhagAwIBAgIJAN/ks6HqqeVKMA0GCSqGSIb3DQEBBQUAMEQxGjAYBgNV
-BAoTEUFwYWNoZSBTdWJ2ZXJzaW9uMRIwEAYDVQQLEwl0ZXN0c3VpdGUxEjAQBgNV
-BAMTCWxvY2FsaG9zdDAeFw0xMjA2MTIyMTIyNDlaFw0xMjA3MTIyMTIyNDlaMEQx
-GjAYBgNVBAoTEUFwYWNoZSBTdWJ2ZXJzaW9uMRIwEAYDVQQLEwl0ZXN0c3VpdGUx
-EjAQBgNVBAMTCWxvY2FsaG9zdDCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA
-pAIkUHZbKgb6n75AZu7YG3skAeFZRVCiu9K/KwLKxDlhDuXhAjrGUOyfwtvj0Ezw
-F6J1Ke6NJFNOMw9FKcp9BegUyWHQ0hTxQSbgIGCgZGG74LUO5kdHQBU9bu/3daF+
-TC0e08OO90RLAoNr/CADZOTDDPD1QYFS3Au49GZPtI8CAwEAAaOBpjCBozAdBgNV
-HQ4EFgQUKgls7+vC/CGZKNJUczUSo+ZL2wAwdAYDVR0jBG0wa4AUKgls7+vC/CGZ
-KNJUczUSo+ZL2wChSKRGMEQxGjAYBgNVBAoTEUFwYWNoZSBTdWJ2ZXJzaW9uMRIw
-EAYDVQQLEwl0ZXN0c3VpdGUxEjAQBgNVBAMTCWxvY2FsaG9zdIIJAN/ks6HqqeVK
-MAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADgYEAFMkecdq3XuJaRaC+4G38
-RNzUFR5Mnv/Ue/43J5CEJ5g2RTxro8DnGcYw2Qbv8lCUDBhkQ8L/lwnLe5jd204D
-Ad9t+1LXNyrYYncOmoZyzKupbfR0m6qz2Q45tqEztHokVWLnchiBaOL0nnGY0rPM
-zyc9CVIgp7ivvAud6ja++CQ=
+MIIC7zCCAligAwIBAgIJALP1pLDiJRtuMA0GCSqGSIb3DQEBBQUAMFkxCzAJBgNV
+BAYTAkFVMRMwEQYDVQQIEwpTb21lLVN0YXRlMSEwHwYDVQQKExhJbnRlcm5ldCBX
+aWRnaXRzIFB0eSBMdGQxEjAQBgNVBAMTCWxvY2FsaG9zdDAeFw0xMjA4MTMxNDA5
+MDRaFw0zOTEyMzAxNDA5MDRaMFkxCzAJBgNVBAYTAkFVMRMwEQYDVQQIEwpTb21l
+LVN0YXRlMSEwHwYDVQQKExhJbnRlcm5ldCBXaWRnaXRzIFB0eSBMdGQxEjAQBgNV
+BAMTCWxvY2FsaG9zdDCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA9kBx6trU
+WQnFNDrW+dU159zEbSWGts3ScITIMTLE4EclMh50SP2BnJDnetkNO8JhPXOm4KZi
+XdJugWAk0NmpawhAk3xVxHh5N8wwyPk3IMx7+Yu+sgcsd0Dj9YK1fIazgTUp/Dsk
+VGJvqu+kgNYxPvzWi/OsBLW/ZNp+spTzoAcCAwEAAaOBvjCBuzAdBgNVHQ4EFgQU
+f7OIDackB7zzPm10aiQgq9WzRdQwgYsGA1UdIwSBgzCBgIAUf7OIDackB7zzPm10
+aiQgq9WzRdShXaRbMFkxCzAJBgNVBAYTAkFVMRMwEQYDVQQIEwpTb21lLVN0YXRl
+MSEwHwYDVQQKExhJbnRlcm5ldCBXaWRnaXRzIFB0eSBMdGQxEjAQBgNVBAMTCWxv
+Y2FsaG9zdIIJALP1pLDiJRtuMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQAD
+gYEAD2rdgeVYCSEeseEfFCTNte//rDsT3coO9SbGOpmlCJ5TfbmXjs2YaQZH7NST
+mla3hw2Bf9ppTUw1ZWvOVgD3mpxAbYNBA/4HaxmK4GlS2kZsKiMr0xgcVGjmEIW/
+HS9q+PHwStDKNSyYc1+m+bUmeRGUKLgC4kuBF7JDK8A2WYc=
 -----END CERTIFICATE-----
 __EOF__
   SSL_CERTIFICATE_KEY_FILE="$HTTPD_ROOT/cert-key.pem"
 cat > "$SSL_CERTIFICATE_KEY_FILE" <<__EOF__
- -----BEGIN RSA PRIVATE KEY-----
-MIICXAIBAAKBgQCkAiRQdlsqBvqfvkBm7tgbeyQB4VlFUKK70r8rAsrEOWEO5eEC
-OsZQ7J/C2+PQTPAXonUp7o0kU04zD0Upyn0F6BTJYdDSFPFBJuAgYKBkYbvgtQ7m
-R0dAFT1u7/d1oX5MLR7Tw473REsCg2v8IANk5MMM8PVBgVLcC7j0Zk+0jwIDAQAB
-AoGAFU0x6kF1FcBSTO0o8DWVW/xicNwT/Cy89igpLCzwqQvKz2SMFP4NQ/V3ypdE
-v4k+pdMz5H5XVqB7R6Z0FTl3g1ecfZoxYuMYWgzaaS6nx1xWJUqMTUqHArt9Sl/K
-/k6H5cNPC3JxGv7Blz87a3ypi93ZgSOJZDixG0BoRClGegECQQDVLTMqH5pVeBH1
-kfY2O8initMhi1lluM7yREbvZtxm844P11m7V4sOX9XQtBaaW3qLjzIru0TBJCL6
-F1JF7mYlAkEAxPRsJuFtBtWpQvnFzX3uXtaJtKtBIHbyBhmzo4f+ed/JU4Kzu1Pk
-CMnKgglg8rzU8/0HIU0AiaV2ItlQwb6PowJATZkWds7qLxJ19x4ascMxV0uBb0R6
-Vjzfl/CioaKfuBoQLFQHpdpIFANuoXnsgGOsSADoEmMos+WjlcXHfQ06wQJBAJTe
-79Tftephm+QtKc9urbvvy/zNKZghcEUeLkOgqsByYBoIhFRHT+k4piJudmJkS071
-ZetM6eghMk+bFcisgqMCQDD3kQ8gYOS9GbHPuTF4dfFSBx51nvd+hWNna1wi3rl+
-7nYzmrRWOp4ZMUG7i6GwqYHZ9stwJ/xRup5oink5VoQ=
+-----BEGIN RSA PRIVATE KEY-----
+MIICXQIBAAKBgQD2QHHq2tRZCcU0Otb51TXn3MRtJYa2zdJwhMgxMsTgRyUyHnRI
+/YGckOd62Q07wmE9c6bgpmJd0m6BYCTQ2alrCECTfFXEeHk3zDDI+TcgzHv5i76y
+Byx3QOP1grV8hrOBNSn8OyRUYm+q76SA1jE+/NaL86wEtb9k2n6ylPOgBwIDAQAB
+AoGBAJBzhV+rNl10qcXVrj2noJN+oYsVNE0Pt55hhb22dl7J3TvlOXmHm/xn1CHw
+KR8hC0GtEfs+Hv3CbyhdabtJs2L7QxO5VjgLO+onBmAOw1iPF9DjbMcAlFJnoOWI
+HYwANOWGp2jRxL5cHUfrBVCgUISen3VUZEnQkr4n/Zty/QEBAkEA/XIZ3oh5MiFA
+o4IaFaFQpBc6K/e6fnM0217scaPvfZiYS1k9Fx/UQTAGsxJOnhnsi04WgHPMS5wB
+RP4/PiIGIQJBAPi7yIKKS4E8hWBZL+79TI8Zm2uehGCB8V6m9k7e3I82To9Tgcow
+qZHsAPtN50fg85I94L3REg2FSQlDlzbMkScCQQC2pweLv/EQNrS94eJomkRirban
+vzYxMVfzjRp737iWXGXNT7feNXsjq7f4UAZGnMpDrvg6hLnD999WWKE9ZwnhAkBl
+c9p9/EB9zxyrxtT5StGuUIiHJdnirz2vGLTASMB3nXP/m9UFjkGr5jIkTos2Uzel
+/50qbxtI7oNyxuHnlRrjAkASfQ51kaBcABYRiacesQi94W/kE3MkgHWkCXNb6//u
+gxk/ezALZ8neJzJudzRkX3auGwH1ne9vCM1ED5dkM54H
 -----END RSA PRIVATE KEY-----
 __EOF__
   SSL_MAKE_VAR="SSL_CERT=$SSL_CERTIFICATE_FILE"

Modified: subversion/branches/ev2-export/subversion/tests/cmdline/depth_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/tests/cmdline/depth_tests.py?rev=1400556&r1=1400555&r2=1400556&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/tests/cmdline/depth_tests.py (original)
+++ subversion/branches/ev2-export/subversion/tests/cmdline/depth_tests.py Sun Oct 21 02:00:31 2012
@@ -2881,7 +2881,29 @@ def commit_then_immediates_update(sbox):
                                         expected_status,
                                         None, None, None, None, None, False,
                                         "--depth=immediates", wc_dir)
+
+def revert_depth_files(sbox):
+  "depth immediate+files should revert deleted files"
+
+  sbox.build(read_only = True)
+  
+  expected_output = "Reverted '" + re.escape(sbox.ospath('A/mu')) + "'"
   
+  # Apply an unrelated delete one level to deep
+  sbox.simple_rm('A/D/gamma')
+
+  sbox.simple_rm('A/mu')
+  # Expect reversion of just 'mu'
+  svntest.actions.run_and_verify_svn(None, expected_output, [],
+                                     'revert', '--depth=immediates', sbox.ospath('A'))
+
+  # Apply an unrelated directory delete
+  sbox.simple_rm('A/D')
+
+  sbox.simple_rm('A/mu')
+  # Expect reversion of just 'mu'
+  svntest.actions.run_and_verify_svn(None, expected_output, [],
+                                     'revert', '--depth=files', sbox.ospath('A'))
 
 
 #----------------------------------------------------------------------
@@ -2932,6 +2954,7 @@ test_list = [ None,
               sparse_update_with_dash_dash_parents,
               update_below_depth_empty,
               commit_then_immediates_update,
+              revert_depth_files,
               ]
 
 if __name__ == "__main__":

Modified: subversion/branches/ev2-export/subversion/tests/cmdline/getopt_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/tests/cmdline/getopt_tests.py?rev=1400556&r1=1400555&r2=1400556&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/tests/cmdline/getopt_tests.py (original)
+++ subversion/branches/ev2-export/subversion/tests/cmdline/getopt_tests.py Sun Oct 21 02:00:31 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/ev2-export/subversion/tests/cmdline/getopt_tests_data/svn--version_stdout
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/tests/cmdline/getopt_tests_data/svn--version_stdout?rev=1400556&r1=1400555&r2=1400556&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/tests/cmdline/getopt_tests_data/svn--version_stdout (original)
+++ subversion/branches/ev2-export/subversion/tests/cmdline/getopt_tests_data/svn--version_stdout Sun Oct 21 02:00:31 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/ev2-export/subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout?rev=1400556&r1=1400555&r2=1400556&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout (original)
+++ subversion/branches/ev2-export/subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout Sun Oct 21 02:00:31 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/ev2-export/subversion/tests/cmdline/log_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/tests/cmdline/log_tests.py?rev=1400556&r1=1400555&r2=1400556&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/tests/cmdline/log_tests.py (original)
+++ subversion/branches/ev2-export/subversion/tests/cmdline/log_tests.py Sun Oct 21 02:00:31 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/ev2-export/subversion/tests/cmdline/merge_reintegrate_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/tests/cmdline/merge_reintegrate_tests.py?rev=1400556&r1=1400555&r2=1400556&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/tests/cmdline/merge_reintegrate_tests.py (original)
+++ subversion/branches/ev2-export/subversion/tests/cmdline/merge_reintegrate_tests.py Sun Oct 21 02:00:31 2012
@@ -1002,18 +1002,18 @@ def reintegrate_with_subtree_mergeinfo(s
   # reflects that the same revisions have been applied across all of A_COPY,
   # then the reintegrate merge should succeed.  We'll try that case first.
   #
-  #   A_COPY_3       4--------9---
+  #   A_COPY_3       4-------[9]--
   #                 /          \
-  #                /            \c.
+  #                /            \
   #   A     -1--------5-6-7-8---10-------------------WC--
-  #            \ \              (D)         \        /r.
-  #             \ \                    (mu)  \s.    /
+  #            \ \              (D)         \        /reint.
+  #             \ \                    (mu)  \      /
   #   A_COPY     2-\--------------------12---13--14------
-  #                 \                   /c.
+  #                 \                   /
   #                  \                 /
-  #   A_COPY_2        3--------------11---
+  #   A_COPY_2        3-------------[11]--
   #
-  #   Key: c. = cherry-pick, s. = sync, r. = reintegrate.
+  #   Key: [#] = cherry-picked revision; (foo) = merge of subtree 'foo'
   #   Note: These diagrams show an overview and do not capture every detail.
 
   # r9 - Make a text change to A_COPY_3/D/gamma
@@ -1189,16 +1189,16 @@ def reintegrate_with_subtree_mergeinfo(s
   # merge should fail, but should provide a helpful message as to where the
   # problems are.
   #
-  #   A_COPY_3        4--------9---
+  #   A_COPY_3        4-------[9]--
   #                  /          \
-  #                 /            \c.        [-8]___
+  #                 /            \          [-8]___
   #   A     -1---------5-6-7-8---10----------------\-------WC--
-  #            \ \               (D)        \       \      /r.
-  #             \ \                    (mu)  \s.     \c.  /
+  #            \ \               (D)        \       \      /reint.
+  #             \ \                    (mu)  \       \    /
   #   A_COPY     2-\--------------------12---13--14--15--------
-  #                 \                   /c.          (D)
+  #                 \                   /            (D)
   #                  \                 /
-  #   A_COPY_2        3--------------11---
+  #   A_COPY_2        3-------------[11]--
 
   # First revert the previous reintegrate merge
   svntest.actions.run_and_verify_svn(None, None, [],
@@ -1269,16 +1269,16 @@ def reintegrate_with_subtree_mergeinfo(s
   #      of 'trunk' was previously merged to 'branch'
   #
   #                                       Step:   A   B    C   D    E
-  #   A_COPY_3    ----9---
+  #   A_COPY_3    ---[9]--
   #              /     \                      (D/g.->
-  #             /       \c.        [-8]___     D/g.m.) (D/g.m.)
+  #             /       \          [-8]___     D/g.m.) (D/g.m.)
   #   A     ------------10----------------\------16-------18--------WC
-  #          \\         (D)        \       \        \        \      /r.
-  #           \\              (mu)  \s.     \c.      \s.      \s.  /
+  #          \\         (D)        \       \        \        \      /reint.
+  #           \\              (mu)  \       \        \        \    /
   #   A_COPY   -\--------------12---13--14--15-------17-------19------
-  #              \             /c.          (D)
+  #              \             /            (D)
   #               \           /
-  #   A_COPY_2     ---------11---
+  #   A_COPY_2     --------[11]--
 
   # r16 - A) REPOS-to-REPOS rename of A/D/gamma to A/D/gamma_moved.  Since
   # r874258 WC-to-WC moves won't create mergeinfo on the dest if the source
@@ -1503,7 +1503,7 @@ def multiple_reintegrates_from_the_same_
   # r12 - Do a --record-only merge from 'A' to the feature branch so we
   # don't try to merge r11 from trunk during the next sync merge.
   svntest.actions.run_and_verify_svn(None, None, [], 'up', wc_dir)
-  svntest.actions.run_and_verify_svn(None, None, [], 'merge',
+  svntest.actions.run_and_verify_svn(None, None, [], 'merge', '-c11',
                                      '--record-only',
                                      sbox.repo_url + '/A',
                                      Feature_branch_path)

Modified: subversion/branches/ev2-export/subversion/tests/cmdline/merge_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/tests/cmdline/merge_tests.py?rev=1400556&r1=1400555&r2=1400556&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/tests/cmdline/merge_tests.py (original)
+++ subversion/branches/ev2-export/subversion/tests/cmdline/merge_tests.py Sun Oct 21 02:00:31 2012
@@ -4501,6 +4501,12 @@ def set_up_branch(sbox, branch_only = Fa
     r(5 + NBR_OF_BRANCHES) - A/D/H/omega
   Return (expected_disk, expected_status).'''
 
+  # With the default parameters, the branching looks like this:
+  #
+  #   A         -1-----3-4-5-6--
+  #                \
+  #   A_COPY        2-----------
+
   wc_dir = sbox.wc_dir
 
   expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
@@ -5793,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,
@@ -5863,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, { })
@@ -6535,7 +6541,7 @@ def avoid_reflected_revs(sbox):
   bfile2_content = "This is bfile2\n"
 
   # We'll consider A as the trunk and A_COPY as the feature branch
-  # Create a tfile1 in A
+  # r3 - Create a tfile1 in A
   svntest.main.file_write(tfile1_path, tfile1_content)
   svntest.actions.run_and_verify_svn(None, None, [], 'add', tfile1_path)
   expected_output = wc.State(wc_dir, {'A/tfile1' : Item(verb='Adding')})
@@ -6543,7 +6549,7 @@ def avoid_reflected_revs(sbox):
   svntest.actions.run_and_verify_commit(wc_dir, expected_output,
                                         wc_status, None, wc_dir)
 
-  # Create a bfile1 in A_COPY
+  # r4 - Create a bfile1 in A_COPY
   svntest.main.file_write(bfile1_path, bfile1_content)
   svntest.actions.run_and_verify_svn(None, None, [], 'add', bfile1_path)
   expected_output = wc.State(wc_dir, {'A_COPY/bfile1' : Item(verb='Adding')})
@@ -6551,7 +6557,7 @@ def avoid_reflected_revs(sbox):
   svntest.actions.run_and_verify_commit(wc_dir, expected_output,
                                         wc_status, None, wc_dir)
 
-  # Create one more file in A
+  # r5 - Create one more file in A
   svntest.main.file_write(tfile2_path, tfile2_content)
   svntest.actions.run_and_verify_svn(None, None, [], 'add', tfile2_path)
   expected_output = wc.State(wc_dir, {'A/tfile2' : Item(verb='Adding')})
@@ -6628,7 +6634,6 @@ def avoid_reflected_revs(sbox):
                                        None, A_COPY_path,
                                        '--allow-mixed-revisions')
 
-  # Sync up with the trunk ie., A
   svntest.actions.run_and_verify_svn(None, None, [], 'up', wc_dir)
   expected_output = wc.State(wc_dir, {
     'A_COPY'        : Item(verb='Sending'),
@@ -6669,7 +6674,6 @@ def avoid_reflected_revs(sbox):
                                        None, A_COPY_path,
                                        '--allow-mixed-revisions')
 
-
   svntest.actions.run_and_verify_svn(None, None, [], 'up', wc_dir)
   expected_output = wc.State(wc_dir, {
     'A_COPY'        : Item(verb='Sending'),
@@ -6678,7 +6682,7 @@ def avoid_reflected_revs(sbox):
   svntest.actions.run_and_verify_commit(wc_dir, expected_output,
                                         None, None, wc_dir)
 
-  # Add bfile2 to A_COPY
+  # r8 - Add bfile2 to A_COPY
   svntest.main.file_write(bfile2_path, bfile2_content)
   svntest.actions.run_and_verify_svn(None, None, [], 'add', bfile2_path)
   expected_output = wc.State(wc_dir, {'A_COPY/bfile2' : Item(verb='Adding')})
@@ -6694,7 +6698,6 @@ def avoid_reflected_revs(sbox):
 
   # Merge 2:8 from A_COPY(feature branch) to A(trunk).
   expected_output = wc.State(A_path, {
-    ''       : Item(status='C '),
     'bfile2' : Item(status='A '),
     'bfile1' : Item(status='A '),
     })
@@ -6704,7 +6707,7 @@ def avoid_reflected_revs(sbox):
   expected_elision_output = wc.State(A_path, {
     })
   expected_status = wc.State(A_path, {
-    ''          : Item(status='CM', wc_rev=6),
+    ''          : Item(status=' M', wc_rev=6),
     'bfile2'    : Item(status='A ', wc_rev='-', copied='+'),
     'bfile1'    : Item(status='A ', wc_rev='-', copied='+'),
     'tfile2'    : Item(status='  ', wc_rev=6),
@@ -8016,7 +8019,9 @@ def merge_to_sparse_directories(sbox):
 def merge_old_and_new_revs_from_renamed_dir(sbox):
   "merge -rold(before rename):head renamed dir"
 
-  ## See http://svn.haxx.se/dev/archive-2007-09/0706.shtml ##
+  # See the email on dev@ from Paul Burba, 2007-09-27, "RE: svn commit:
+  # r26803 - [...]", <http://svn.haxx.se/dev/archive-2007-09/0706.shtml> or
+  # <http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=927127>.
 
   # Create a WC with a single branch
   sbox.build()
@@ -11057,10 +11062,22 @@ def reverse_merge_away_all_mergeinfo(sbo
 # merge'.  Specifically see
 # http://subversion.tigris.org/issues/show_bug.cgi?id=3067#desc5
 @SkipUnless(server_has_mergeinfo)
-@Issues(3138,3067)
+@Issues(3138,3067,4217)
 def dont_merge_revs_into_subtree_that_predate_it(sbox):
   "dont merge revs into a subtree that predate it"
 
+  #                              +-> merge -c7 A/D/H/nu@7 H_COPY/nu
+  #                              | +-> merge -c2 A/D/H H_COPY
+  #                              | | +-> merge A/D/H H_COPY
+  #                              | | |
+  # A/D/H      A----------------------
+  #     +-psi  +-M-------------M------
+  #     +-nu       A-D C---M-D
+  # H_COPY               C---------G-G
+  #     +-psi            +---------+-.
+  #     +-nu             +-------G---.
+  #            1 2 3 4 5 6 7 8 9 w w w
+
   # Create our good 'ole greek tree.
   sbox.build()
   wc_dir = sbox.wc_dir
@@ -11175,13 +11192,12 @@ def dont_merge_revs_into_subtree_that_pr
                                      H_COPY_path)
 
   # H_COPY needs r6-9 applied while H_COPY/nu needs only 6,8-9.
-  # This means r6 will be done as a separate editor drive targeted
-  # on H_COPY.  But r6 was only the copy of A/D/H to H_COPY and
-  # so is a no-op and there will no notification for r6.
   svntest.actions.run_and_verify_svn(
     None,
     expected_merge_output(
-      [[6,9]], ['U    ' + os.path.join(H_COPY_path, "psi") + '\n',
+      [[7,9],  # Merge notification
+       [6,9]], # Mergeinfo notification
+               ['U    ' + os.path.join(H_COPY_path, "psi") + '\n',
                 'D    ' + os.path.join(H_COPY_path, "nu") + '\n',
                 ' U   ' + H_COPY_path + '\n',]),
     [], 'merge', sbox.repo_url + '/A/D/H', H_COPY_path, '--force')
@@ -13124,7 +13140,7 @@ def merge_two_edits_to_same_prop(sbox):
       " C   %s\n" % mu_path,
       ], prop_conflicts=1,
       args=['--allow-mixed-revisions',
-            '--accept=theirs-conflict'],
+            '--accept=working'],
       resolved=[mu_path])
   svn_merge(rev4, A_COPY_path, A_path, [
       " C   %s\n" % mu_path,

Modified: subversion/branches/ev2-export/subversion/tests/cmdline/merge_tree_conflict_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/tests/cmdline/merge_tree_conflict_tests.py?rev=1400556&r1=1400555&r2=1400556&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/tests/cmdline/merge_tree_conflict_tests.py (original)
+++ subversion/branches/ev2-export/subversion/tests/cmdline/merge_tree_conflict_tests.py Sun Oct 21 02:00:31 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/ev2-export/subversion/tests/cmdline/mergeinfo_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/tests/cmdline/mergeinfo_tests.py?rev=1400556&r1=1400555&r2=1400556&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/tests/cmdline/mergeinfo_tests.py (original)
+++ subversion/branches/ev2-export/subversion/tests/cmdline/mergeinfo_tests.py Sun Oct 21 02:00:31 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/ev2-export/subversion/tests/cmdline/patch_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/tests/cmdline/patch_tests.py?rev=1400556&r1=1400555&r2=1400556&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/tests/cmdline/patch_tests.py (original)
+++ subversion/branches/ev2-export/subversion/tests/cmdline/patch_tests.py Sun Oct 21 02:00:31 2012
@@ -3997,24 +3997,57 @@ def patch_target_no_eol_at_eof(sbox):
 
   patch_file_path = make_patch_path(sbox)
   iota_path = sbox.ospath('iota')
+  mu_path = sbox.ospath('A/mu')
 
   iota_contents = [
     "This is the file iota."
   ]
 
+  mu_contents = [
+    "context\n",
+    "context\n",
+    "context\n",
+    "context\n",
+    "This is the file mu.\n",
+    "context\n",
+    "context\n",
+    "context\n",
+    "context", # no newline at end of file
+  ]
+
   svntest.main.file_write(iota_path, ''.join(iota_contents))
+  svntest.main.file_write(mu_path, ''.join(mu_contents))
   expected_output = svntest.wc.State(wc_dir, {
     'iota'  : Item(verb='Sending'),
+    'A/mu'  : Item(verb='Sending'),
     })
   expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
   expected_status.tweak('iota', wc_rev=2)
+  expected_status.tweak('A/mu', wc_rev=2)
   svntest.actions.run_and_verify_commit(wc_dir, expected_output,
                                         expected_status, None, wc_dir)
   unidiff_patch = [
-    "--- iota\t(revision 1)\n",
+    "Index: A/mu\n",
+    "===================================================================\n",
+    "--- A/mu\t(revision 2)\n",
+    "+++ A/mu\t(working copy)\n",
+    "@@ -2,8 +2,8 @@ context\n",
+    " context\n",
+    " context\n",
+    " context\n",
+    "-This is the file mu.\n",
+    "+It is really the file mu.\n",
+    " context\n",
+    " context\n",
+    " context\n",
+    " context\n",
+    "\\ No newline at end of file\n",
+    "Index: iota\n",
+    "===================================================================\n",
+    "--- iota\t(revision 2)\n",
     "+++ iota\t(working copy)\n",
-    "@@ -1,7 +1,7 @@\n",
-    "-This is the file iota.\n"
+    "@@ -1 +1 @@\n",
+    "-This is the file iota.\n",
     "\\ No newline at end of file\n",
     "+It is really the file 'iota'.\n",
     "\\ No newline at end of file\n",
@@ -4025,15 +4058,29 @@ def patch_target_no_eol_at_eof(sbox):
   iota_contents = [
     "It is really the file 'iota'."
   ]
+  mu_contents = [
+    "context\n",
+    "context\n",
+    "context\n",
+    "context\n",
+    "It is really the file mu.\n",
+    "context\n",
+    "context\n",
+    "context\n",
+    "context", # no newline at end of file
+  ]
   expected_output = [
+    'U         %s\n' % sbox.ospath('A/mu'),
     'U         %s\n' % sbox.ospath('iota'),
   ]
 
   expected_disk = svntest.main.greek_state.copy()
   expected_disk.tweak('iota', contents=''.join(iota_contents))
+  expected_disk.tweak('A/mu', contents=''.join(mu_contents))
 
   expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
   expected_status.tweak('iota', status='M ', wc_rev=2)
+  expected_status.tweak('A/mu', status='M ', wc_rev=2)
 
   expected_skip = wc.State('', { })
 
@@ -4099,6 +4146,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 +4245,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/ev2-export/subversion/tests/cmdline/prop_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/tests/cmdline/prop_tests.py?rev=1400556&r1=1400555&r2=1400556&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/tests/cmdline/prop_tests.py (original)
+++ subversion/branches/ev2-export/subversion/tests/cmdline/prop_tests.py Sun Oct 21 02:00:31 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"
 
@@ -2268,7 +2268,7 @@ def propget_redirection(sbox):
 
   # Run propget -vR svn:mergeinfo, redirecting the stdout to a file.
   arglist = [svntest.main.svn_binary, 'propget', SVN_PROP_MERGEINFO, '-vR',
-             wc_dir]
+             '--config-dir', svntest.main.default_config_dir, wc_dir]
   redir_file = open(redirect_file, 'wb')
   pg_proc = subprocess.Popen(arglist, stdout=redir_file)
   pg_proc.wait()

Modified: subversion/branches/ev2-export/subversion/tests/cmdline/resolve_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/tests/cmdline/resolve_tests.py?rev=1400556&r1=1400555&r2=1400556&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/tests/cmdline/resolve_tests.py (original)
+++ subversion/branches/ev2-export/subversion/tests/cmdline/resolve_tests.py Sun Oct 21 02:00:31 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/ev2-export/subversion/tests/cmdline/schedule_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/tests/cmdline/schedule_tests.py?rev=1400556&r1=1400555&r2=1400556&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/tests/cmdline/schedule_tests.py (original)
+++ subversion/branches/ev2-export/subversion/tests/cmdline/schedule_tests.py Sun Oct 21 02:00:31 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/ev2-export/subversion/tests/cmdline/special_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/tests/cmdline/special_tests.py?rev=1400556&r1=1400555&r2=1400556&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/tests/cmdline/special_tests.py (original)
+++ subversion/branches/ev2-export/subversion/tests/cmdline/special_tests.py Sun Oct 21 02:00:31 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',



Mime
View raw message