subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hwri...@apache.org
Subject svn commit: r1300696 [4/6] - in /subversion/branches/fix-rdump-editor: ./ build/generator/ build/win32/ notes/ notes/directory-index/ subversion/bindings/javahl/ subversion/bindings/javahl/native/ subversion/bindings/javahl/tests/org/apache/subversion/...
Date Wed, 14 Mar 2012 19:40:24 GMT
Modified: subversion/branches/fix-rdump-editor/subversion/svnadmin/main.c
URL: http://svn.apache.org/viewvc/subversion/branches/fix-rdump-editor/subversion/svnadmin/main.c?rev=1300696&r1=1300695&r2=1300696&view=diff
==============================================================================
--- subversion/branches/fix-rdump-editor/subversion/svnadmin/main.c (original)
+++ subversion/branches/fix-rdump-editor/subversion/svnadmin/main.c Wed Mar 14 19:40:19 2012
@@ -363,7 +363,7 @@ static const svn_opt_subcommand_desc2_t 
    {'q', 'r', svnadmin__ignore_uuid, svnadmin__force_uuid,
     svnadmin__use_pre_commit_hook, svnadmin__use_post_commit_hook,
     svnadmin__parent_dir, svnadmin__bypass_prop_validation, 'M'} },
-  
+
   {"lock", subcommand_lock, {0}, N_
    ("usage: svnadmin lock REPOS_PATH PATH USERNAME COMMENT-FILE [TOKEN]\n\n"
     "Lock PATH by USERNAME setting comments from COMMENT-FILE.\n"
@@ -1027,7 +1027,7 @@ subcommand_load(apr_getopt_t *os, void *
     {
       lower = upper;
     }
-  
+
   /* Ensure correct range ordering. */
   if (lower > upper)
     {
@@ -1483,7 +1483,7 @@ subcommand_lock(apr_getopt_t *os, void *
     lock_token = APR_ARRAY_IDX(args, 3, const char *);
 
   SVN_ERR(target_arg_to_dirent(&comment_file_name, comment_file_name, pool));
-  
+
   SVN_ERR(open_repos(&repos, opt_state->repository_path, pool));
   fs = svn_repos_fs(repos);
 
@@ -1496,10 +1496,10 @@ subcommand_lock(apr_getopt_t *os, void *
   SVN_ERR(svn_stringbuf_from_file2(&file_contents, comment_file_name, pool));
 
   SVN_ERR(svn_utf_cstring_to_utf8(&lock_path_utf8, lock_path, pool));
-  
+
   if (opt_state->bypass_hooks)
     SVN_ERR(svn_fs_lock(&lock, fs, lock_path_utf8,
-                        lock_token,          
+                        lock_token,
                         file_contents->data, /* comment */
                         0,                   /* is_dav_comment */
                         0,                   /* no expiration time. */
@@ -1507,7 +1507,7 @@ subcommand_lock(apr_getopt_t *os, void *
                         FALSE, pool));
   else
     SVN_ERR(svn_repos_fs_lock(&lock, repos, lock_path_utf8,
-                              lock_token,          
+                              lock_token,
                               file_contents->data, /* comment */
                               0,                   /* is_dav_comment */
                               0,                   /* no expiration time. */

Modified: subversion/branches/fix-rdump-editor/subversion/svndumpfilter/main.c
URL: http://svn.apache.org/viewvc/subversion/branches/fix-rdump-editor/subversion/svndumpfilter/main.c?rev=1300696&r1=1300695&r2=1300696&view=diff
==============================================================================
--- subversion/branches/fix-rdump-editor/subversion/svndumpfilter/main.c (original)
+++ subversion/branches/fix-rdump-editor/subversion/svndumpfilter/main.c Wed Mar 14 19:40:19 2012
@@ -110,7 +110,10 @@ write_prop_to_stringbuf(svn_stringbuf_t 
 }
 
 
-/* Prefix matching function to compare node-path with set of prefixes. */
+/* Compare the node-path PATH with the (const char *) prefixes in PFXLIST.
+ * Return TRUE if any prefix is a prefix of PATH (matching whole path
+ * components); FALSE otherwise.
+ * PATH starts with a '/', as do the (const char *) paths in PREFIXES. */
 static svn_boolean_t
 ary_prefix_match(const apr_array_header_t *pfxlist, const char *path)
 {
@@ -125,7 +128,7 @@ ary_prefix_match(const apr_array_header_
       if (path_len < pfx_len)
         continue;
       if (strncmp(path, pfx, pfx_len) == 0
-          && (path[pfx_len] == '\0' || path[pfx_len] == '/'))
+          && (pfx_len == 1 || path[pfx_len] == '\0' || path[pfx_len] == '/'))
         return TRUE;
     }
 
@@ -134,7 +137,8 @@ ary_prefix_match(const apr_array_header_
 
 
 /* Check whether we need to skip this PATH based on its presence in
-   the PREFIXES list, and the DO_EXCLUDE option. */
+   the PREFIXES list, and the DO_EXCLUDE option.
+   PATH starts with a '/', as do the (const char *) paths in PREFIXES. */
 static APR_INLINE svn_boolean_t
 skip_path(const char *path, const apr_array_header_t *prefixes,
           svn_boolean_t do_exclude, svn_boolean_t glob)

Modified: subversion/branches/fix-rdump-editor/subversion/svnlook/main.c
URL: http://svn.apache.org/viewvc/subversion/branches/fix-rdump-editor/subversion/svnlook/main.c?rev=1300696&r1=1300695&r2=1300696&view=diff
==============================================================================
--- subversion/branches/fix-rdump-editor/subversion/svnlook/main.c (original)
+++ subversion/branches/fix-rdump-editor/subversion/svnlook/main.c Wed Mar 14 19:40:19 2012
@@ -875,7 +875,7 @@ display_prop_diffs(const apr_array_heade
 
         /* The last character in a property is often not a newline.
            An eol character is appended to prevent the diff API to add a
-           ' \ No newline at end of file' line. We add 
+           ' \ No newline at end of file' line. We add
            ' \ No newline at end of property' manually if needed. */
         tmp = orig_value ? orig_value : svn_string_create_empty(pool);
         orig = maybe_append_eol(tmp, NULL, pool);

Modified: subversion/branches/fix-rdump-editor/subversion/svnrdump/dump_editor.c
URL: http://svn.apache.org/viewvc/subversion/branches/fix-rdump-editor/subversion/svnrdump/dump_editor.c?rev=1300696&r1=1300695&r2=1300696&view=diff
==============================================================================
--- subversion/branches/fix-rdump-editor/subversion/svnrdump/dump_editor.c (original)
+++ subversion/branches/fix-rdump-editor/subversion/svnrdump/dump_editor.c Wed Mar 14 19:40:19 2012
@@ -226,7 +226,7 @@ get_props_content(svn_stringbuf_t **head
   svn_stream_t *content_stream;
   apr_hash_t *normal_props;
   const char *buf;
-  
+
   *content = svn_stringbuf_create_empty(result_pool);
   *header = svn_stringbuf_create_empty(result_pool);
 
@@ -866,7 +866,7 @@ fetch_base_func(const char **filename,
     }
   else if (err)
     return svn_error_trace(err);
-  
+
   SVN_ERR(svn_stream_close(fstream));
 
   return SVN_NO_ERROR;

Modified: subversion/branches/fix-rdump-editor/subversion/svnserve/main.c
URL: http://svn.apache.org/viewvc/subversion/branches/fix-rdump-editor/subversion/svnserve/main.c?rev=1300696&r1=1300695&r2=1300696&view=diff
==============================================================================
--- subversion/branches/fix-rdump-editor/subversion/svnserve/main.c (original)
+++ subversion/branches/fix-rdump-editor/subversion/svnserve/main.c Wed Mar 14 19:40:19 2012
@@ -147,6 +147,7 @@ void winservice_notify_stop(void)
 #define SVNSERVE_OPT_LOG_FILE        264
 #define SVNSERVE_OPT_CACHE_TXDELTAS  265
 #define SVNSERVE_OPT_CACHE_FULLTEXTS 266
+#define SVNSERVE_OPT_SINGLE_CONN     267
 
 static const apr_getopt_option_t svnserve__options[] =
   {
@@ -231,6 +232,10 @@ static const apr_getopt_option_t svnserv
      N_("run in foreground (useful for debugging)\n"
         "                             "
         "[mode: daemon]")},
+    {"single-thread",    SVNSERVE_OPT_SINGLE_CONN, 0,
+     N_("handle one connection at a time in the parent process\n"
+        "                             "
+        "(useful for debugging)")},
     {"log-file",         SVNSERVE_OPT_LOG_FILE, 1,
      N_("svnserve log file")},
     {"pid-file",         SVNSERVE_OPT_PID_FILE, 1,
@@ -428,10 +433,13 @@ int main(int argc, const char *argv[])
   const char *host = NULL;
   int family = APR_INET;
   apr_int32_t sockaddr_info_flags = 0;
+#if APR_HAVE_IPV6
   svn_boolean_t prefer_v6 = FALSE;
+#endif
   svn_boolean_t quiet = FALSE;
   svn_boolean_t is_version = FALSE;
   int mode_opt_count = 0;
+  int handling_opt_count = 0;
   const char *config_filename = NULL;
   const char *pid_filename = NULL;
   const char *log_filename = NULL;
@@ -486,7 +494,10 @@ int main(int argc, const char *argv[])
       switch (opt)
         {
         case '6':
+#if APR_HAVE_IPV6
           prefer_v6 = TRUE;
+#endif
+          /* ### Maybe error here if we don't have IPV6 support? */
           break;
 
         case 'h':
@@ -513,6 +524,11 @@ int main(int argc, const char *argv[])
           foreground = TRUE;
           break;
 
+        case SVNSERVE_OPT_SINGLE_CONN:
+          handling_mode = connection_mode_single;
+          handling_opt_count++;
+          break;
+
         case 'i':
           if (run_mode != run_mode_inetd)
             {
@@ -585,6 +601,7 @@ int main(int argc, const char *argv[])
 
         case 'T':
           handling_mode = connection_mode_thread;
+          handling_opt_count++;
           break;
 
         case 'c':
@@ -665,6 +682,14 @@ int main(int argc, const char *argv[])
       usage(argv[0], pool);
     }
 
+  if (handling_opt_count > 1)
+    {
+      svn_error_clear(svn_cmdline_fputs(
+                      _("You may only specify one of -T or --single-thread\n"),
+                      stderr, pool));
+      usage(argv[0], pool);
+    }
+
   /* If a configuration file is specified, load it and any referenced
    * password and authorization files. */
   if (config_filename)

Modified: subversion/branches/fix-rdump-editor/subversion/svnserve/serve.c
URL: http://svn.apache.org/viewvc/subversion/branches/fix-rdump-editor/subversion/svnserve/serve.c?rev=1300696&r1=1300695&r2=1300696&view=diff
==============================================================================
--- subversion/branches/fix-rdump-editor/subversion/svnserve/serve.c (original)
+++ subversion/branches/fix-rdump-editor/subversion/svnserve/serve.c Wed Mar 14 19:40:19 2012
@@ -1470,7 +1470,7 @@ static svn_error_t *get_dir(svn_ra_svn_c
                             apr_array_header_t *params, void *baton)
 {
   server_baton_t *b = baton;
-  const char *path, *full_path, *file_path, *cauthor, *cdate;
+  const char *path, *full_path, *file_path, *cdate;
   svn_revnum_t rev;
   apr_hash_t *entries, *props = NULL, *file_props;
   apr_hash_index_t *hi;
@@ -1540,9 +1540,15 @@ static svn_error_t *get_dir(svn_ra_svn_c
   if (want_props)
     SVN_CMD_ERR(get_props(&props, root, full_path, pool));
 
-  /* Fetch the directory entries if requested. */
+  /* Begin response ... */
+  SVN_ERR(svn_ra_svn_write_tuple(conn, pool, "w(r(!", "success", rev));
+  SVN_ERR(svn_ra_svn_write_proplist(conn, pool, props));
+  SVN_ERR(svn_ra_svn_write_tuple(conn, pool, "!)(!"));
+
+  /* Fetch the directory entries if requested and send them immediately. */
   if (want_contents)
     {
+      const char *zero_date = svn_time_to_cstring(0, pool);
       SVN_CMD_ERR(svn_fs_dir_entries(&entries, root, full_path, pool));
 
       /* Transform the hash table's FS entries into dirents.  This probably
@@ -1552,91 +1558,62 @@ static svn_error_t *get_dir(svn_ra_svn_c
         {
           const char *name = svn__apr_hash_index_key(hi);
           svn_fs_dirent_t *fsent = svn__apr_hash_index_val(hi);
-          svn_dirent_t *entry;
+
+          svn_dirent_t entry;
+          memset(&entry, 0, sizeof(entry));
 
           svn_pool_clear(subpool);
 
           file_path = svn_fspath__join(full_path, name, subpool);
-
           if (! lookup_access(subpool, b, conn, svn_authz_read,
                               file_path, FALSE))
-            {
-              apr_hash_set(entries, name, APR_HASH_KEY_STRING, NULL);
-              continue;
-            }
-
-          entry = apr_pcalloc(pool, sizeof(*entry));
+            continue;
 
           if (dirent_fields & SVN_DIRENT_KIND)
-            {
-              /* kind */
-              entry->kind = fsent->kind;
-            }
+              entry.kind = fsent->kind;
 
           if (dirent_fields & SVN_DIRENT_SIZE)
-            {
-              /* size */
-              if (entry->kind == svn_node_dir)
-                entry->size = 0;
-              else
-                SVN_CMD_ERR(svn_fs_file_length(&entry->size, root, file_path,
+              if (entry.kind != svn_node_dir)
+                SVN_CMD_ERR(svn_fs_file_length(&entry.size, root, file_path,
                                                subpool));
-            }
 
           if (dirent_fields & SVN_DIRENT_HAS_PROPS)
             {
               /* has_props */
               SVN_CMD_ERR(svn_fs_node_proplist(&file_props, root, file_path,
                                                subpool));
-              entry->has_props = (apr_hash_count(file_props) > 0);
+              entry.has_props = (apr_hash_count(file_props) > 0);
             }
 
+          cdate = NULL;
           if ((dirent_fields & SVN_DIRENT_LAST_AUTHOR)
               || (dirent_fields & SVN_DIRENT_TIME)
               || (dirent_fields & SVN_DIRENT_CREATED_REV))
             {
               /* created_rev, last_author, time */
-              SVN_CMD_ERR(svn_repos_get_committed_info(&entry->created_rev,
+              SVN_CMD_ERR(svn_repos_get_committed_info(&entry.created_rev,
                                                        &cdate,
-                                                       &cauthor, root,
+                                                       &entry.last_author, 
+                                                       root,
                                                        file_path,
                                                        subpool));
-              entry->last_author = apr_pstrdup(pool, cauthor);
-              if (cdate)
-                SVN_CMD_ERR(svn_time_from_cstring(&entry->time, cdate,
-                                                  subpool));
-              else
-                entry->time = (time_t) -1;
             }
 
-          /* Store the entry. */
-          apr_hash_set(entries, name, APR_HASH_KEY_STRING, entry);
-        }
-      svn_pool_destroy(subpool);
-    }
+          if (cdate == NULL)
+            cdate = zero_date;
 
-  /* Write out response. */
-  SVN_ERR(svn_ra_svn_write_tuple(conn, pool, "w(r(!", "success", rev));
-  SVN_ERR(svn_ra_svn_write_proplist(conn, pool, props));
-  SVN_ERR(svn_ra_svn_write_tuple(conn, pool, "!)(!"));
-  if (want_contents)
-    {
-      for (hi = apr_hash_first(pool, entries); hi; hi = apr_hash_next(hi))
-        {
-          const char *name = svn__apr_hash_index_key(hi);
-          svn_dirent_t *entry = svn__apr_hash_index_val(hi);
-
-          cdate = (entry->time == (time_t) -1) ? NULL
-            : svn_time_to_cstring(entry->time, pool);
+          /* Send the entry. */
           SVN_ERR(svn_ra_svn_write_tuple(conn, pool, "cwnbr(?c)(?c)", name,
-                                         svn_node_kind_to_word(entry->kind),
-                                         (apr_uint64_t) entry->size,
-                                         entry->has_props, entry->created_rev,
-                                         cdate, entry->last_author));
+                                         svn_node_kind_to_word(entry.kind),
+                                         (apr_uint64_t) entry.size,
+                                         entry.has_props, entry.created_rev,
+                                         cdate, entry.last_author));
         }
+      svn_pool_destroy(subpool);
     }
-  SVN_ERR(svn_ra_svn_write_tuple(conn, pool, "!))"));
-  return SVN_NO_ERROR;
+
+  /* Finish response. */
+  return svn_ra_svn_write_tuple(conn, pool, "!))");
 }
 
 static svn_error_t *update(svn_ra_svn_conn_t *conn, apr_pool_t *pool,
@@ -3094,6 +3071,140 @@ 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)
+{
+  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);
+    }
+  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));
+
+  err = svn_fs_node_proplist(props, fs_root, path, result_pool);
+  if (err && err->apr_err == SVN_ERR_FS_NOT_FOUND)
+    {
+      svn_error_clear(err);
+      *props = apr_hash_make(result_pool);
+      return SVN_NO_ERROR;
+    }
+  else if (err)
+    return svn_error_trace(err);
+
+  return SVN_NO_ERROR;
+}
+
+static svn_error_t *
+fetch_kind_func(svn_kind_t *kind,
+                void *baton,
+                const char *path,
+                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));
+
+  SVN_ERR(svn_fs_check_path(&node_kind, fs_root, path, scratch_pool));
+  *kind = svn__kind_from_node_kind(node_kind, FALSE);
+
+  return SVN_NO_ERROR;
+}
+
+static svn_error_t *
+fetch_base_func(const char **filename,
+                void *baton,
+                const char *path,
+                svn_revnum_t base_revision,
+                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));
+
+  err = svn_fs_file_contents(&contents, fs_root, path, scratch_pool);
+  if (err && err->apr_err == SVN_ERR_FS_NOT_FOUND)
+    {
+      svn_error_clear(err);
+      *filename = NULL;
+      return SVN_NO_ERROR;
+    }
+  else if (err)
+    return svn_error_trace(err);
+  SVN_ERR(svn_stream_open_unique(&file_stream, &tmp_filename, NULL,
+                                 svn_io_file_del_on_pool_cleanup,
+                                 scratch_pool, scratch_pool));
+  SVN_ERR(svn_stream_copy3(contents, file_stream, NULL, NULL, scratch_pool));
+
+  *filename = apr_pstrdup(result_pool, tmp_filename);
+
+  return SVN_NO_ERROR;
+}
+
 svn_error_t *serve(svn_ra_svn_conn_t *conn, serve_params_t *params,
                    apr_pool_t *pool)
 {
@@ -3257,5 +3368,18 @@ svn_error_t *serve(svn_ra_svn_conn_t *co
     SVN_ERR(svn_ra_svn_write_tuple(conn, pool, "!))"));
   }
 
+  /* Set up editor shims. */
+  {
+    svn_delta_shim_callbacks_t *callbacks =
+                                svn_delta_shim_callbacks_default(pool);
+
+    callbacks->fetch_base_func = fetch_base_func;
+    callbacks->fetch_props_func = fetch_props_func;
+    callbacks->fetch_kind_func = fetch_kind_func;
+    callbacks->fetch_baton = &b;
+
+    SVN_ERR(svn_ra_svn__set_shim_callbacks(conn, callbacks));
+  }
+
   return svn_ra_svn_handle_commands2(conn, pool, main_commands, &b, FALSE);
 }

Modified: subversion/branches/fix-rdump-editor/subversion/svnversion/main.c
URL: http://svn.apache.org/viewvc/subversion/branches/fix-rdump-editor/subversion/svnversion/main.c?rev=1300696&r1=1300695&r2=1300696&view=diff
==============================================================================
--- subversion/branches/fix-rdump-editor/subversion/svnversion/main.c (original)
+++ subversion/branches/fix-rdump-editor/subversion/svnversion/main.c Wed Mar 14 19:40:19 2012
@@ -225,7 +225,7 @@ main(int argc, const char *argv[])
     }
 
   SVN_INT_ERR(svn_utf_cstring_to_utf8(&wc_path,
-                                      (os->ind < argc) ? os->argv[os->ind] 
+                                      (os->ind < argc) ? os->argv[os->ind]
                                                        : ".",
                                       pool));
 

Modified: subversion/branches/fix-rdump-editor/subversion/tests/cmdline/README
URL: http://svn.apache.org/viewvc/subversion/branches/fix-rdump-editor/subversion/tests/cmdline/README?rev=1300696&r1=1300695&r2=1300696&view=diff
==============================================================================
--- subversion/branches/fix-rdump-editor/subversion/tests/cmdline/README (original)
+++ subversion/branches/fix-rdump-editor/subversion/tests/cmdline/README Wed Mar 14 19:40:19 2012
@@ -333,7 +333,8 @@ svntest/tree.py.  It will explain the ge
 
 Finally, try copying-and-pasting a simple test and then edit from
 there.  Don't forget to add your test to the 'test_list' variable at
-the bottom of the file.
+the bottom of the file. To avoid renumbering of existing tests, you
+should add new tests to the end of the list.
 
 
 Testing Compatability With Previous Release

Modified: subversion/branches/fix-rdump-editor/subversion/tests/cmdline/authz_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/fix-rdump-editor/subversion/tests/cmdline/authz_tests.py?rev=1300696&r1=1300695&r2=1300696&view=diff
==============================================================================
--- subversion/branches/fix-rdump-editor/subversion/tests/cmdline/authz_tests.py (original)
+++ subversion/branches/fix-rdump-editor/subversion/tests/cmdline/authz_tests.py Wed Mar 14 19:40:19 2012
@@ -1290,7 +1290,8 @@ def wc_commit_error_handling(sbox):
   # Allow the informative error for dav and the ra_svn specific one that is
   # returned on editor->edit_close().
   expected_err = "(svn: E195023: Changing directory '.*Z' is forbidden)|" + \
-                 "(svn: E220004: Access denied)"
+                 "(svn: E220004: Access denied)|" + \
+                 "(svn: E175013: Access to '.*Z' forbidden)"
   svntest.actions.run_and_verify_svn(None, None, expected_err,
                                      'ci', wc_dir, '-m', '')
 
@@ -1302,7 +1303,8 @@ def wc_commit_error_handling(sbox):
   # Allow the informative error for dav and the ra_svn specific one that is
   # returned on editor->edit_close().
   expected_err = "(svn: E195023: Changing file '.*zeta' is forbidden)|" + \
-                 "(svn: E220004: Access denied)"
+                 "(svn: E220004: Access denied)|" + \
+                 "(svn: E175013: Access to '.*zeta' forbidden)"
   svntest.actions.run_and_verify_svn(None, None, expected_err,
                                      'ci', wc_dir, '-m', '')
   sbox.simple_revert('A/zeta')
@@ -1323,7 +1325,8 @@ def wc_commit_error_handling(sbox):
   # Allow the informative error for dav and the ra_svn specific one that is
   # returned on editor->edit_close().
   expected_err = "(svn: E195023: Changing file '.*lambda' is forbidden.*)|" + \
-                 "(svn: E220004: Access denied)"
+                 "(svn: E220004: Access denied)|" + \
+                 "(svn: E175013: Access to '.*lambda' forbidden)"
   svntest.actions.run_and_verify_svn(None, None, expected_err,
                                      'ci', wc_dir, '-m', '')
 
@@ -1333,7 +1336,8 @@ def wc_commit_error_handling(sbox):
   # Allow the informative error for dav and the ra_svn specific one that is
   # returned on editor->edit_close().
   expected_err = "(svn: E195023: Changing file '.*lambda' is forbidden.*)|" + \
-                 "(svn: E220004: Access denied)"
+                 "(svn: E220004: Access denied)|" + \
+                 "(svn: E175013: Access to '.*lambda' forbidden)"
   svntest.actions.run_and_verify_svn(None, None, expected_err,
                                      'ci', wc_dir, '-m', '')
 
@@ -1343,7 +1347,8 @@ def wc_commit_error_handling(sbox):
   # Allow the informative error for dav and the ra_svn specific one that is
   # returned on editor->edit_close().
   expected_err = "(svn: E195023: Changing directory '.*F' is forbidden.*)|" + \
-                 "(svn: E220004: Access denied)"
+                 "(svn: E220004: Access denied)|" + \
+                 "(svn: E175013: Access to '.*F' forbidden)"
   svntest.actions.run_and_verify_svn(None, None, expected_err,
                                      'ci', wc_dir, '-m', '')
   sbox.simple_revert('A/B/F')
@@ -1352,7 +1357,8 @@ def wc_commit_error_handling(sbox):
   # Allow the informative error for dav and the ra_svn specific one that is
   # returned on editor->edit_close().
   expected_err = "(svn: E195023: Changing file '.*mu' is forbidden.*)|" + \
-                 "(svn: E220004: Access denied)"
+                 "(svn: E220004: Access denied)|" + \
+                 "(svn: E175013: Access to '.*mu' forbidden)"
   svntest.actions.run_and_verify_svn(None, None, expected_err,
                                      'ci', wc_dir, '-m', '')
 
@@ -1383,7 +1389,7 @@ def upgrade_absent(sbox):
   # Relocate to allow finding the repository
   svntest.actions.run_and_verify_svn(None, None, [], 'relocate',
                                      'svn://127.0.0.1/authz_tests-2',
-                                     sbox.repo_url, sbox.wc_dir)  
+                                     sbox.repo_url, sbox.wc_dir)
 
   expected_output = svntest.wc.State(sbox.wc_dir, {
   })

Modified: subversion/branches/fix-rdump-editor/subversion/tests/cmdline/basic_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/fix-rdump-editor/subversion/tests/cmdline/basic_tests.py?rev=1300696&r1=1300695&r2=1300696&view=diff
==============================================================================
--- subversion/branches/fix-rdump-editor/subversion/tests/cmdline/basic_tests.py (original)
+++ subversion/branches/fix-rdump-editor/subversion/tests/cmdline/basic_tests.py Wed Mar 14 19:40:19 2012
@@ -991,7 +991,7 @@ def verify_file_deleted(message, path):
   if message is not None:
     print(message)
   ###TODO We should raise a less generic error here. which?
-  raise Failure
+  raise svntest.Failure
 
 def verify_dir_deleted(path):
   if not os.path.isdir(path):
@@ -2898,17 +2898,17 @@ def rm_missing_with_case_clashing_ondisk
 
   iota_path = os.path.join(wc_dir, 'iota')
   IOTA_path = os.path.join(wc_dir, 'IOTA')
-  
+
   # Out-of-svn move, to make iota missing, while IOTA appears as unversioned.
   os.rename(iota_path, IOTA_path)
-  
+
   expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
   expected_status.add({
     'iota'              : Item(status='! ', wc_rev='1'),
     'IOTA'              : Item(status='? '),
     })
   svntest.actions.run_and_verify_unquiet_status(wc_dir, expected_status)
-    
+
   # 'svn rm' iota, should leave IOTA alone.
   svntest.actions.run_and_verify_svn(None, None, [],
                                      'rm', iota_path)
@@ -2922,6 +2922,29 @@ def rm_missing_with_case_clashing_ondisk
   svntest.actions.run_and_verify_unquiet_status(wc_dir, expected_status)
 
 
+def delete_conflicts_one_of_many(sbox):
+  """delete multiple targets one conflict"""
+
+  sbox.build()
+  wc_dir = sbox.wc_dir
+
+  svntest.main.file_append(sbox.ospath('A/D/G/rho'), 'new rho')
+  sbox.simple_commit()
+  svntest.main.file_append(sbox.ospath('A/D/G/rho'), 'conflict rho')
+  svntest.actions.run_and_verify_svn(None, None, [],
+                                     'update', '-r1', '--accept', 'postpone',
+                                     wc_dir)
+
+  if not os.path.exists(sbox.ospath('A/D/G/rho.mine')):
+    raise svntest.Failure("conflict file rho.mine missing")
+
+  svntest.actions.run_and_verify_svn(None, None, [],
+                                     'rm', '--force',
+                                     sbox.ospath('A/D/G/rho'),
+                                     sbox.ospath('A/D/G/tau'))
+
+  verify_file_deleted("failed to remove conflict file",
+                      sbox.ospath('A/D/G/rho.mine'))
 
 ########################################################################
 # Run the tests
@@ -2988,6 +3011,7 @@ test_list = [ None,
               add_multiple_targets,
               quiet_commits,
               rm_missing_with_case_clashing_ondisk_item,
+              delete_conflicts_one_of_many,
              ]
 
 if __name__ == '__main__':

Modified: subversion/branches/fix-rdump-editor/subversion/tests/cmdline/checkout_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/fix-rdump-editor/subversion/tests/cmdline/checkout_tests.py?rev=1300696&r1=1300695&r2=1300696&view=diff
==============================================================================
--- subversion/branches/fix-rdump-editor/subversion/tests/cmdline/checkout_tests.py (original)
+++ subversion/branches/fix-rdump-editor/subversion/tests/cmdline/checkout_tests.py Wed Mar 14 19:40:19 2012
@@ -31,6 +31,7 @@ import sys, re, os, time, subprocess
 # Our testing module
 import svntest
 from svntest import wc, actions
+import logging
 
 # (abbreviation)
 Skip = svntest.testcase.Skip_deco
@@ -41,6 +42,8 @@ Issue = svntest.testcase.Issue_deco
 Wimp = svntest.testcase.Wimp_deco
 Item = wc.StateItem
 
+logger = logging.getLogger()
+
 #----------------------------------------------------------------------
 # Helper function for testing stderr from co.
 # If none of the strings in STDERR list matches the regular expression
@@ -50,10 +53,9 @@ def test_stderr(re_string, stderr):
   for line in stderr:
     if exp_err_re.search(line):
       return
-  if svntest.main.options.verbose:
-    for x in stderr:
-      sys.stdout.write(x)
-    print("Expected stderr reg-ex: '" + re_string + "'")
+  for x in stderr:
+    logger.debug(x[:-1])
+  logger.info("Expected stderr reg-ex: '" + re_string + "'")
   raise svntest.Failure("Checkout failed but not in the expected way")
 
 #----------------------------------------------------------------------

Modified: subversion/branches/fix-rdump-editor/subversion/tests/cmdline/commit_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/fix-rdump-editor/subversion/tests/cmdline/commit_tests.py?rev=1300696&r1=1300695&r2=1300696&view=diff
==============================================================================
--- subversion/branches/fix-rdump-editor/subversion/tests/cmdline/commit_tests.py (original)
+++ subversion/branches/fix-rdump-editor/subversion/tests/cmdline/commit_tests.py Wed Mar 14 19:40:19 2012
@@ -1140,7 +1140,7 @@ def commit_in_dir_scheduled_for_addition
   mu_path = os.path.join(wc_dir, 'Z', 'mu')
 
   svntest.main.run_svn(None, 'move', A_path, Z_path)
-  
+
   # Make sure mu is a committable
   svntest.main.file_write(mu_path, "xxxx")
 
@@ -1183,7 +1183,7 @@ def commit_in_dir_scheduled_for_addition
                                         "svn: E200009: '" +
                                         re.escape(Z_abspath) +
                                         "' is not known to exist in the.*",
-                                        R_path)                                        
+                                        R_path)
 
 #----------------------------------------------------------------------
 
@@ -2846,7 +2846,7 @@ def commit_incomplete(sbox):
                                         expected_status,
                                         None,
                                         wc_dir)
-  
+
 #----------------------------------------------------------------------
 # Reported here:
 #   Message-ID: <4EBF0FC9.300@gmail.com>

Modified: subversion/branches/fix-rdump-editor/subversion/tests/cmdline/depth_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/fix-rdump-editor/subversion/tests/cmdline/depth_tests.py?rev=1300696&r1=1300695&r2=1300696&view=diff
==============================================================================
--- subversion/branches/fix-rdump-editor/subversion/tests/cmdline/depth_tests.py (original)
+++ subversion/branches/fix-rdump-editor/subversion/tests/cmdline/depth_tests.py Wed Mar 14 19:40:19 2012
@@ -2842,6 +2842,48 @@ def update_below_depth_empty(sbox):
   svntest.actions.run_and_verify_update(sbox.wc_dir, expected_output, None,
                                         None, None)
 
+# Test for issue #4136.
+@Issue(4136)
+def commit_then_immediates_update(sbox):
+  "deep commit followed by update --depth immediates"
+  sbox.build()
+
+  repo_url = sbox.repo_url
+  wc_dir = sbox.wc_dir
+  mu_path = sbox.ospath('A/mu')
+
+  # Modify A/mu and commit the changes.
+  svntest.main.file_write(mu_path, "modified mu\n")
+  expected_output = svntest.wc.State(wc_dir, {
+    'A/mu'        : Item(verb='Sending'),
+    })
+  expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
+  expected_status.tweak('A/mu', wc_rev=2, status='  ')
+  svntest.actions.run_and_verify_commit(wc_dir,
+                                        expected_output,
+                                        expected_status,
+                                        None,
+                                        wc_dir)
+
+  # Now, update --depth immediates in the root of the working copy.
+  expected_output = svntest.wc.State(wc_dir, { })
+  expected_disk = svntest.main.greek_state.copy()
+  expected_disk.tweak('A/mu', contents="modified mu\n")
+  expected_status = svntest.wc.State(wc_dir, { '' : svntest.wc.StateItem() })
+  expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
+  expected_status.tweak('',     wc_rev=2, status='  ')
+  expected_status.tweak('A',    wc_rev=2, status='  ')
+  expected_status.tweak('A/mu', wc_rev=2, status='  ')
+  expected_status.tweak('iota', wc_rev=2, status='  ')
+  svntest.actions.run_and_verify_update(wc_dir,
+                                        expected_output,
+                                        expected_disk,
+                                        expected_status,
+                                        None, None, None, None, None, False,
+                                        "--depth=immediates", wc_dir)
+  
+
+
 #----------------------------------------------------------------------
 # list all tests here, starting with None:
 test_list = [ None,
@@ -2889,6 +2931,7 @@ test_list = [ None,
               update_depth_empty_root_of_infinite_children,
               sparse_update_with_dash_dash_parents,
               update_below_depth_empty,
+              commit_then_immediates_update,
               ]
 
 if __name__ == "__main__":

Modified: subversion/branches/fix-rdump-editor/subversion/tests/cmdline/diff_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/fix-rdump-editor/subversion/tests/cmdline/diff_tests.py?rev=1300696&r1=1300695&r2=1300696&view=diff
==============================================================================
--- subversion/branches/fix-rdump-editor/subversion/tests/cmdline/diff_tests.py (original)
+++ subversion/branches/fix-rdump-editor/subversion/tests/cmdline/diff_tests.py Wed Mar 14 19:40:19 2012
@@ -161,7 +161,7 @@ def make_diff_prop_val(plus_minus, pval)
   if len(pval) > 0 and pval[-1] != '\n':
     return [plus_minus + pval + "\n","\\ No newline at end of property\n"]
   return [plus_minus + pval]
-  
+
 def make_diff_prop_deleted(pname, pval):
   """Return a property diff for deletion of property PNAME, old value PVAL.
      PVAL is a single string with no embedded newlines.  Return the result

Modified: subversion/branches/fix-rdump-editor/subversion/tests/cmdline/externals_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/fix-rdump-editor/subversion/tests/cmdline/externals_tests.py?rev=1300696&r1=1300695&r2=1300696&view=diff
==============================================================================
--- subversion/branches/fix-rdump-editor/subversion/tests/cmdline/externals_tests.py (original)
+++ subversion/branches/fix-rdump-editor/subversion/tests/cmdline/externals_tests.py Wed Mar 14 19:40:19 2012
@@ -1916,14 +1916,25 @@ def file_externals_different_url(sbox):
     'rr-e-1'            : Item(status='A '),
   })
 
+  expected_status = actions.get_virginal_state(wc_dir, 1)
+  expected_status.tweak('', status=' M')
+  expected_status.add({
+    'r2-e-1'            : Item(status='  ', wc_rev='1', switched='X'),
+    'r1-e-1'            : Item(status='  ', wc_rev='1', switched='X'),
+    'r1-e-2'            : Item(status='  ', wc_rev='1', switched='X'),
+    'rr-e-1'            : Item(status='  ', wc_rev='1', switched='X'),
+    'r2-e-2'            : Item(status='  ', wc_rev='1', switched='X'),
+  })
+
   svntest.actions.run_and_verify_update(wc_dir,
-                                        expected_output, None, None, None)
+                                        expected_output, None,
+                                        expected_status, None)
 
   # Verify that all file external URLs are descendants of r1_url
   for e in ['r1-e-1', 'r1-e-2', 'r2-e-1', 'r2-e-2', 'rr-e-1']:
     actions.run_and_verify_info([{'Repository Root' : r1_url}],
                                 os.path.join(sbox.wc_dir, e))
-    
+
 
   svntest.actions.run_and_verify_svn(None, None, [],
                                      'relocate', r1_url, r2_url, wc_dir)
@@ -1934,7 +1945,8 @@ def file_externals_different_url(sbox):
   })
 
   svntest.actions.run_and_verify_update(wc_dir,
-                                        expected_output, None, None, None)
+                                        expected_output, None,
+                                        expected_status, None)
 
   # Verify that all file external URLs are descendants of r2_url
   for e in ['r1-e-1', 'r1-e-2', 'r2-e-1', 'r2-e-2', 'rr-e-1']:
@@ -2554,10 +2566,10 @@ def include_immediate_dir_externals(sbox
   #     svn ps svn:externals "^/A/B/E X/XE" wc_dir
   #     svn ci
   #     svn up
-  # 
+  #
   #     svn ps some change X/XE
   #     echo mod >> X/XE/alpha
-  # 
+  #
   #     svn st X/XE
   #     # Expect only the propset on X/XE to be committed.
   #     # Should be like 'svn commit --include-externals --depth=empty X/XE'.
@@ -2808,7 +2820,7 @@ def url_to_wc_copy_of_externals(sbox):
   # Previously this failed with:
   #   >svn copy ^^/A/C External-WC-to-URL-Copy
   #    U   External-WC-to-URL-Copy
-  #   
+  #
   #   Fetching external item into 'External-WC-to-URL-Copy\external':
   #   A    External-WC-to-URL-Copy\external\pi
   #   A    External-WC-to-URL-Copy\external\rho

Modified: subversion/branches/fix-rdump-editor/subversion/tests/cmdline/info_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/fix-rdump-editor/subversion/tests/cmdline/info_tests.py?rev=1300696&r1=1300695&r2=1300696&view=diff
==============================================================================
--- subversion/branches/fix-rdump-editor/subversion/tests/cmdline/info_tests.py (original)
+++ subversion/branches/fix-rdump-editor/subversion/tests/cmdline/info_tests.py Wed Mar 14 19:40:19 2012
@@ -469,7 +469,7 @@ def info_show_exclude(sbox):
 
   sbox.simple_rm('iota')
   sbox.simple_commit()
-  
+
   expected_error = 'svn: E200009: Could not display info for all targets.*'
 
   # Expect error on iota (status = not-present)

Modified: subversion/branches/fix-rdump-editor/subversion/tests/cmdline/merge_authz_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/fix-rdump-editor/subversion/tests/cmdline/merge_authz_tests.py?rev=1300696&r1=1300695&r2=1300696&view=diff
==============================================================================
--- subversion/branches/fix-rdump-editor/subversion/tests/cmdline/merge_authz_tests.py (original)
+++ subversion/branches/fix-rdump-editor/subversion/tests/cmdline/merge_authz_tests.py Wed Mar 14 19:40:19 2012
@@ -443,7 +443,7 @@ def mergeinfo_and_skipped_paths(sbox):
   # and skipped). 'A_COPY_2/D/H/zeta' must therefore get its own explicit
   # mergeinfo from this merge.
   svntest.actions.run_and_verify_svn(None, None, [], 'revert', '--recursive',
-                                     wc_restricted)  
+                                     wc_restricted)
   expected_output = wc.State(A_COPY_2_H_path, {
     'omega' : Item(status='U '),
     'zeta'  : Item(status='A '),

Modified: subversion/branches/fix-rdump-editor/subversion/tests/cmdline/merge_reintegrate_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/fix-rdump-editor/subversion/tests/cmdline/merge_reintegrate_tests.py?rev=1300696&r1=1300695&r2=1300696&view=diff
==============================================================================
--- subversion/branches/fix-rdump-editor/subversion/tests/cmdline/merge_reintegrate_tests.py (original)
+++ subversion/branches/fix-rdump-editor/subversion/tests/cmdline/merge_reintegrate_tests.py Wed Mar 14 19:40:19 2012
@@ -2430,7 +2430,7 @@ def reintegrate_replaced_source(sbox):
   A_path         = os.path.join(sbox.wc_dir, "A")
   A_COPY_path    = os.path.join(sbox.wc_dir, "A_COPY")
   beta_COPY_path = os.path.join(sbox.wc_dir, "A_COPY", "B", "E", "beta")
-  mu_COPY_path   = os.path.join(sbox.wc_dir, "A_COPY", "mu")  
+  mu_COPY_path   = os.path.join(sbox.wc_dir, "A_COPY", "mu")
 
   # Using cherrypick merges, simulate a series of sync merges from A to
   # A_COPY with a replace of A_COPY along the way.
@@ -2470,7 +2470,7 @@ def reintegrate_replaced_source(sbox):
                        wc_dir)
 
   # r12 - Do a final sync merge of A to A_COPY in preparation for
-  # reintegration.  
+  # reintegration.
   svntest.main.run_svn(None, 'up', wc_dir)
   svntest.main.run_svn(None, 'merge', sbox.repo_url + '/A', A_COPY_path)
   svntest.main.run_svn(None, 'ci', '-m', 'Sycn A_COPY with A', wc_dir)
@@ -2541,7 +2541,7 @@ def reintegrate_replaced_source(sbox):
                                        expected_skip,
                                        [], None, None, None, None, True, True,
                                        '--reintegrate', A_path)
-  
+
 #----------------------------------------------------------------------
 @SkipUnless(svntest.main.is_posix_os)
 @Issue(4052)

Modified: subversion/branches/fix-rdump-editor/subversion/tests/cmdline/merge_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/fix-rdump-editor/subversion/tests/cmdline/merge_tests.py?rev=1300696&r1=1300695&r2=1300696&view=diff
==============================================================================
--- subversion/branches/fix-rdump-editor/subversion/tests/cmdline/merge_tests.py (original)
+++ subversion/branches/fix-rdump-editor/subversion/tests/cmdline/merge_tests.py Wed Mar 14 19:40:19 2012
@@ -14124,11 +14124,13 @@ def merge_range_prior_to_rename_source_e
                                      'move', sbox.repo_url + '/A/D/H/nu',
                                      sbox.repo_url + '/A/D/H/nu_moved',
                                      '-m', 'Move nu to nu_moved')
-  svntest.actions.run_and_verify_svn(None,
-                                     ["Updating '%s':\n" % (wc_dir),
-                                      "D    " + nu_path + "\n",
-                                      "A    " + nu_moved_path + "\n",
-                                      "Updated to revision 12.\n"],
+  expected_output = svntest.verify.UnorderedOutput(
+    ["Updating '%s':\n" % (wc_dir),
+     "D    " + nu_path + "\n",
+     "A    " + nu_moved_path + "\n",
+     "Updated to revision 12.\n"],
+    )
+  svntest.actions.run_and_verify_svn(None, expected_output,
                                      [], 'up', wc_dir)
 
   # Now merge -r7:12 from A to A_COPY.
@@ -17018,7 +17020,7 @@ def merged_deletion_causes_tree_conflict
                                      '-m', 'Copy ^/A to ^/branch')
   svntest.actions.run_and_verify_svn(None, None, [], 'up', wc_dir)
 
-  # r4 - Delete A/D/H/psi 
+  # r4 - Delete A/D/H/psi
   svntest.actions.run_and_verify_svn(None, None, [], 'delete', psi_path)
   svntest.actions.run_and_verify_svn(None, None, [], 'ci', '-m',
                                      'Delete a a path with native eol-style',
@@ -17213,7 +17215,7 @@ def unnecessary_noninheritable_mergeinfo
 
   B_branch_path = os.path.join(sbox.wc_dir, 'branch', 'B')
 
-  # Setup a simple branch to which 
+  # Setup a simple branch to which
   expected_output, expected_mergeinfo_output, expected_elision_output, \
     expected_status, expected_disk, expected_skip = \
     noninheritable_mergeinfo_test_set_up(sbox)
@@ -17258,7 +17260,7 @@ def unnecessary_noninheritable_mergeinfo
   B_branch_path = os.path.join(sbox.wc_dir, 'branch', 'B')
   E_path        = os.path.join(sbox.wc_dir, 'A', 'B', 'E')
 
-  # Setup a simple branch to which 
+  # Setup a simple branch to which
   expected_output, expected_mergeinfo_output, expected_elision_output, \
     expected_status, expected_disk, expected_skip = \
     noninheritable_mergeinfo_test_set_up(sbox)
@@ -17316,7 +17318,7 @@ def unnecessary_noninheritable_mergeinfo
   #       /A/B:4* <-- Should be inheritable
   #   Properties on 'branch\B\E':
   #     svn:mergeinfo
-  #       /A/B/E:4 <-- Not necessary 
+  #       /A/B/E:4 <-- Not necessary
   expected_output = wc.State(B_branch_path, {
     'E' : Item(status=' U'),
     })
@@ -17355,6 +17357,116 @@ def unnecessary_noninheritable_mergeinfo
                                        None, None, None, None, None, 1, 1,
                                        '--depth', 'immediates', B_branch_path)
 
+#----------------------------------------------------------------------
+# Test for issue #4132, "merge of replaced source asserts".
+# The original use-case is the following merges, which both asserted:
+#    svn merge -cr1295005 ^/subversion/trunk@1295000 ../src
+#    svn merge -cr1295004 ^/subversion/trunk/@r1295004 ../src
+@Issue(4132)
+@XFail()
+def svnmucc_abuse_1(sbox):
+  "svnmucc: merge a replacement"
+
+  sbox.build()
+  wc_dir = sbox.wc_dir
+
+  ## Using A/ as our trunk, since one cannot replace the root.
+
+  ## r2: open a branch
+  sbox.simple_repo_copy('A', 'A_COPY')
+
+  ## r3: padding (to make the revnums-mod-10 match)
+  sbox.simple_repo_copy('iota', 'padding')
+
+  ## r4: trunk: accidental change
+  sbox.simple_append('A/mu', 'accidental change')
+  sbox.simple_commit()
+
+  ## r5: fail to revert it
+  svntest.actions.run_and_verify_svnmucc(None, None, [],
+                                         '-m', 'r5',
+                                         '-U', sbox.repo_url,
+                                         'rm', 'A',
+                                         'cp', 'HEAD', 'A', 'A')
+
+  ## r6: really revert it
+  svntest.actions.run_and_verify_svnmucc(None, None, [],
+                                         '-m', 'r6',
+                                         '-U', sbox.repo_url,
+                                         'rm', 'A',
+                                         'cp', '3', 'A', 'A')
+
+  ## Attempt to merge that.
+  # This used to assert:
+  #   --- Recording mergeinfo for merge of r5 into 'svn-test-work/working_copies/merge_tests-125/A_COPY':
+  #   subversion/libsvn_subr/mergeinfo.c:1172: (apr_err=235000)
+  #   svn: E235000: In file 'subversion/libsvn_subr/mergeinfo.c' line 1172: assertion failed (IS_VALID_FORWARD_RANGE(first))
+  sbox.simple_update()
+  svntest.main.run_svn(None, 'merge', '-c', 'r5', '^/A@r5',
+                             sbox.ospath('A_COPY'))
+
+#----------------------------------------------------------------------
+# Test for issue #4138 'replacement in merge source not notified correctly'.
+@SkipUnless(server_has_mergeinfo)
+@XFail()
+@Issue(4138)
+def merge_source_with_replacement(sbox):
+  "replacement in merge source not notified correctly"
+
+  sbox.build()
+  wc_dir = sbox.wc_dir
+
+  # Some paths we'll care about.
+  A_path          = os.path.join(sbox.wc_dir, 'A')
+  omega_path      = os.path.join(sbox.wc_dir, 'A', 'D', 'H', 'omega')
+  A_COPY_path     = os.path.join(sbox.wc_dir, 'A_COPY')
+  beta_COPY_path  = os.path.join(sbox.wc_dir, 'A_COPY', 'B', 'E', 'beta')
+  psi_COPY_path   = os.path.join(sbox.wc_dir, 'A_COPY', 'D', 'H', 'psi')
+  rho_COPY_path   = os.path.join(sbox.wc_dir, 'A_COPY', 'D', 'G', 'rho')
+  omega_COPY_path = os.path.join(sbox.wc_dir, 'A_COPY', 'D', 'H', 'omega')
+  
+  # branch A@1 to A_COPY in r2, then make a few edits under A in r3-6:  
+  wc_disk, wc_status = set_up_branch(sbox)
+
+  # r7 Delete A, replace it with A@5, effectively reverting the change
+  # made to A/D/H/omega in r6:
+  svntest.main.run_svn(None, 'up', wc_dir)
+  svntest.main.run_svn(None, 'del', A_path)
+  svntest.main.run_svn(None, 'copy', sbox.repo_url + '/A@5', A_path)
+  svntest.main.run_svn(None, 'ci', '-m',
+                       'Replace A with older version of itself', wc_dir)
+
+  # r8: Make an edit to A/D/H/omega:
+  svntest.main.file_write(omega_path, "New content for 'omega'.\n")
+  svntest.main.run_svn(None, 'ci', '-m', 'file edit', wc_dir)
+
+  # Update and sync merge ^/A to A_COPY.
+  svntest.main.run_svn(None, 'up', wc_dir)
+  # This currently fails because the merge notifications make it look like
+  # r6 from ^/A was merged and recorded:
+  #
+  #   >svn merge ^^/A A_COPY
+  #   --- Merging r2 through r5 into 'A_COPY':
+  #   U    A_COPY\B\E\beta
+  #   U    A_COPY\D\G\rho
+  #   U    A_COPY\D\H\psi
+  #   --- Recording mergeinfo for merge of r2 through r5 into 'A_COPY':
+  #    U   A_COPY
+  #   --- Merging r6 through r8 into 'A_COPY':
+  #   U    A_COPY\D\H\omega
+  #   --- Recording mergeinfo for merge of r6 through r8 into 'A_COPY':
+  #   G   A_COPY
+  expected_output = expected_merge_output([[2,5],[7,8]],
+                          ['U    ' + beta_COPY_path  + '\n',
+                           'U    ' + rho_COPY_path   + '\n',
+                           'U    ' + omega_COPY_path + '\n',
+                           'U    ' + psi_COPY_path   + '\n',
+                           ' U   ' + A_COPY_path     + '\n',
+                           ' G   ' + A_COPY_path     + '\n',])
+  svntest.actions.run_and_verify_svn(None, expected_output, [],
+                                     'merge', sbox.repo_url + '/A',
+                                     A_COPY_path)
+
 ########################################################################
 # Run the tests
 
@@ -17485,6 +17597,8 @@ test_list = [ None,
               record_only_merge_adds_new_subtree_mergeinfo,
               unnecessary_noninheritable_mergeinfo_missing_subtrees,
               unnecessary_noninheritable_mergeinfo_shallow_merge,
+              svnmucc_abuse_1,
+              merge_source_with_replacement,
              ]
 
 if __name__ == '__main__':

Modified: subversion/branches/fix-rdump-editor/subversion/tests/cmdline/mergeinfo_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/fix-rdump-editor/subversion/tests/cmdline/mergeinfo_tests.py?rev=1300696&r1=1300695&r2=1300696&view=diff
==============================================================================
--- subversion/branches/fix-rdump-editor/subversion/tests/cmdline/mergeinfo_tests.py (original)
+++ subversion/branches/fix-rdump-editor/subversion/tests/cmdline/mergeinfo_tests.py Wed Mar 14 19:40:19 2012
@@ -532,7 +532,7 @@ def wc_target_inherits_mergeinfo_from_re
   gamma_2_path  = os.path.join(wc_dir, 'A_COPY_2', 'D', 'gamma')
   tau_path      = os.path.join(wc_dir, 'A', 'D', 'G', 'tau')
   D_COPY_path   = os.path.join(wc_dir, 'A_COPY', 'D')
-  
+
   # Merge -c5 ^/A/D/G/rho A_COPY\D\G\rho
   # Merge -c7 ^/A A_COPY
   # Commit as r8
@@ -565,7 +565,7 @@ def wc_target_inherits_mergeinfo_from_re
   # Check the merged and eligible revisions both recursively and
   # non-recursively.
 
-  # Eligible : Non-recursive  
+  # Eligible : Non-recursive
   svntest.actions.run_and_verify_mergeinfo(
     adjust_error_for_server_version(''),
     ['4','5'], sbox.repo_url + '/A/D', subtree_wc,
@@ -618,7 +618,7 @@ def wc_target_inherits_mergeinfo_from_re
   svntest.actions.run_and_verify_svn(None, None, [], 'ci', '-m',
                                      'Merge r8 from A_COPY_2 to A_COPY',
                                      wc_dir)
- 
+
   def test_svn_mergeinfo_4_way(wc_target):
     # Eligible : Non-recursive
     svntest.actions.run_and_verify_mergeinfo(
@@ -738,7 +738,7 @@ def noninheritabled_mergeinfo_not_always
   # unconditionally set for merges with shallow operational depths.
   svntest.actions.run_and_verify_svn(None, None, [],
                                      'propset', SVN_PROP_MERGEINFO,
-                                     '/A:3*\n', branch_path)  
+                                     '/A:3*\n', branch_path)
   svntest.main.run_svn(None, 'commit', '-m', 'shallow merge', wc_dir)
 
   # Now check that r3 is reported as fully merged from ^/A to ^/branch

Modified: subversion/branches/fix-rdump-editor/subversion/tests/cmdline/patch_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/fix-rdump-editor/subversion/tests/cmdline/patch_tests.py?rev=1300696&r1=1300695&r2=1300696&view=diff
==============================================================================
--- subversion/branches/fix-rdump-editor/subversion/tests/cmdline/patch_tests.py (original)
+++ subversion/branches/fix-rdump-editor/subversion/tests/cmdline/patch_tests.py Wed Mar 14 19:40:19 2012
@@ -3727,7 +3727,7 @@ def patch_deletes_prop(sbox):
   # *adds* the property.
   svntest.main.run_svn(None, 'revert', iota_path)
 
-  # Apply patch 
+  # Apply patch
   unidiff_patch = [
     "Index: iota\n",
     "===================================================================\n",
@@ -3750,7 +3750,7 @@ def patch_deletes_prop(sbox):
                                        None, # expected err
                                        1, # check-props
                                        1, # dry-run
-                                       '--reverse-diff') 
+                                       '--reverse-diff')
 
 @Issue(4004)
 def patch_reversed_add_with_props(sbox):
@@ -3799,7 +3799,7 @@ def patch_reversed_add_with_props(sbox):
                                        None, # expected err
                                        1, # check-props
                                        1, # dry-run
-                                       '--reverse-diff') 
+                                       '--reverse-diff')
 
 @Issue(4004)
 def patch_reversed_add_with_props2(sbox):
@@ -3854,7 +3854,7 @@ def patch_reversed_add_with_props2(sbox)
                                        None, # expected err
                                        1, # check-props
                                        1, # dry-run
-                                       '--reverse-diff') 
+                                       '--reverse-diff')
 
 def patch_dev_null(sbox):
   "patch with /dev/null filenames"

Modified: subversion/branches/fix-rdump-editor/subversion/tests/cmdline/special_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/fix-rdump-editor/subversion/tests/cmdline/special_tests.py?rev=1300696&r1=1300695&r2=1300696&view=diff
==============================================================================
--- subversion/branches/fix-rdump-editor/subversion/tests/cmdline/special_tests.py (original)
+++ subversion/branches/fix-rdump-editor/subversion/tests/cmdline/special_tests.py Wed Mar 14 19:40:19 2012
@@ -998,7 +998,7 @@ def replace_symlinks(sbox):
   os.symlink('../iota', wc('A/mu.sh'))
   sbox.simple_add('A/mu',
                   'A/mu.sh')
- 
+
   # Ditto, without the Subversion replacement.  Failing git-svn test
   # 'executable file becomes a symlink to bar/zzz (file)'.
   os.remove(wc('Ax/mu'))
@@ -1009,7 +1009,7 @@ def replace_symlinks(sbox):
                       'Ax/mu',
                       'Ax/mu.sh')
   sbox.simple_propdel('svn:executable', 'Ax/mu.sh')
-  
+
   ### TODO Replace a normal {file, exec, dir, dir} with a symlink to
   ### {dir, dir, file, exec}.  And the same symlink-to-normal.
 
@@ -1052,7 +1052,7 @@ def externals_as_symlink_targets(sbox):
   sbox.simple_add('sym_ext_E')
 
   sbox.simple_commit()
-    
+
 @XFail()
 @Issue(4119)
 @SkipUnless(svntest.main.is_posix_os)

Modified: subversion/branches/fix-rdump-editor/subversion/tests/cmdline/stat_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/fix-rdump-editor/subversion/tests/cmdline/stat_tests.py?rev=1300696&r1=1300695&r2=1300696&view=diff
==============================================================================
--- subversion/branches/fix-rdump-editor/subversion/tests/cmdline/stat_tests.py (original)
+++ subversion/branches/fix-rdump-editor/subversion/tests/cmdline/stat_tests.py Wed Mar 14 19:40:19 2012
@@ -936,7 +936,7 @@ def status_in_xml(sbox):
                                      'cp', '-m', 'repo-to-repo copy',
                                      sbox.repo_url + '/iota',
                                      sbox.repo_url + '/iota2')
-  
+
   file_path = sbox.ospath('iota2')
 
   expected_entries = {file_path : {'wcprops' : 'none',
@@ -1925,7 +1925,7 @@ def status_not_present(sbox):
   svntest.main.run_svn(None, 'up', '--set-depth', 'exclude',
                        sbox.ospath('A/mu'), sbox.ospath('A/B'))
   sbox.simple_commit()
-  
+
   svntest.actions.run_and_verify_svn(None, [], [],'status',
                                      sbox.ospath('iota'),
                                      sbox.ospath('A/B'),

Modified: subversion/branches/fix-rdump-editor/subversion/tests/cmdline/svnadmin_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/fix-rdump-editor/subversion/tests/cmdline/svnadmin_tests.py?rev=1300696&r1=1300695&r2=1300696&view=diff
==============================================================================
--- subversion/branches/fix-rdump-editor/subversion/tests/cmdline/svnadmin_tests.py (original)
+++ subversion/branches/fix-rdump-editor/subversion/tests/cmdline/svnadmin_tests.py Wed Mar 14 19:40:19 2012
@@ -111,10 +111,10 @@ def check_hotcopy_fsfs(src, dst):
               # both at EOF
               break
             elif buf1:
-              raise svntest.Failure("%s differs at offset %i" % 
+              raise svntest.Failure("%s differs at offset %i" %
                                     (dst_path, offset))
             elif buf2:
-              raise svntest.Failure("%s differs at offset %i" % 
+              raise svntest.Failure("%s differs at offset %i" %
                                     (dst_path, offset))
           if len(buf1) != len(buf2):
             raise svntest.Failure("%s differs in length" % dst_path)
@@ -1466,7 +1466,7 @@ def verify_non_utf8_paths(sbox):
 
 def test_lslocks_and_rmlocks(sbox):
   "test 'svnadmin lslocks' and 'svnadmin rmlocks'"
-  
+
   sbox.build(create_wc=False)
   iota_url = sbox.repo_url + '/iota'
   lambda_url = sbox.repo_url + '/A/B/lambda'
@@ -1480,7 +1480,7 @@ def test_lslocks_and_rmlocks(sbox):
   expected_output = UnorderedOutput(
     ["'A/B/lambda' locked by user 'jrandom'.\n",
      "'iota' locked by user 'jrandom'.\n"])
-  
+
   # Lock iota and A/B/lambda using svn client
   svntest.actions.run_and_verify_svn(None, expected_output,
                                      [], "lock", "-m", "Locking files",
@@ -1495,18 +1495,18 @@ def test_lslocks_and_rmlocks(sbox):
       "Comment \(1 line\):",
       "Locking files",
       "Path: /iota",
-      "UUID Token: opaquelocktoken.*",      
-      "\n", # empty line    
+      "UUID Token: opaquelocktoken.*",
+      "\n", # empty line
       ]
 
   # List all locks
   exit_code, output, errput = svntest.main.run_svnadmin("lslocks",
                                                         sbox.repo_dir)
-  
+
   if errput:
     raise SVNUnexpectedStderr(errput)
   svntest.verify.verify_exit_code(None, exit_code, 0)
-    
+
   try:
     expected_output = svntest.verify.UnorderedRegexOutput(expected_output_list)
     svntest.verify.compare_and_display_lines('lslocks output mismatch',
@@ -1540,7 +1540,7 @@ def test_lslocks_and_rmlocks(sbox):
     "Expires:",
     "Comment \(1 line\):",
     "Locking files",
-    "\n", # empty line    
+    "\n", # empty line
     ])
 
   svntest.verify.compare_and_display_lines('message', 'label',
@@ -1554,7 +1554,7 @@ def test_lslocks_and_rmlocks(sbox):
                                                         "A/B/lambda")
   expected_output = UnorderedOutput(["Removed lock on '/iota'.\n",
                                      "Removed lock on '/A/B/lambda'.\n"])
-  
+
   svntest.verify.verify_outputs(
     "Unexpected output while running 'svnadmin rmlocks'.",
     output, [], expected_output, None)
@@ -1652,7 +1652,7 @@ def hotcopy_incremental_packed(sbox):
 def locking(sbox):
   "svnadmin lock tests"
   sbox.build(create_wc=False)
-  
+
   comment_path = os.path.join(svntest.main.temp_dir, "comment")
   svntest.main.file_write(comment_path, "dummy comment")
 
@@ -1662,15 +1662,15 @@ def locking(sbox):
   # Test illegal character in comment file.
   expected_error = ".*svnadmin: E130004:.*"
   svntest.actions.run_and_verify_svnadmin(None, None,
-                                          expected_error, "lock", 
+                                          expected_error, "lock",
                                           sbox.repo_dir,
                                           "iota", "jrandom",
                                           invalid_comment_path)
-  
+
   # Test locking path with --bypass-hooks
   expected_output = "'iota' locked by user 'jrandom'."
   svntest.actions.run_and_verify_svnadmin(None, expected_output,
-                                          None, "lock", 
+                                          None, "lock",
                                           sbox.repo_dir,
                                           "iota", "jrandom",
                                           comment_path,
@@ -1678,13 +1678,13 @@ def locking(sbox):
 
   # Remove lock
   svntest.actions.run_and_verify_svnadmin(None, None,
-                                          None, "rmlocks", 
+                                          None, "rmlocks",
                                           sbox.repo_dir, "iota")
-  
+
   # Test locking path without --bypass-hooks
   expected_output = "'iota' locked by user 'jrandom'."
   svntest.actions.run_and_verify_svnadmin(None, expected_output,
-                                          None, "lock", 
+                                          None, "lock",
                                           sbox.repo_dir,
                                           "iota", "jrandom",
                                           comment_path)
@@ -1692,7 +1692,7 @@ def locking(sbox):
   # Test locking already locked path.
   expected_error = ".*svnadmin: E160035:.*"
   svntest.actions.run_and_verify_svnadmin(None, None,
-                                          expected_error, "lock", 
+                                          expected_error, "lock",
                                           sbox.repo_dir,
                                           "iota", "jrandom",
                                           comment_path)
@@ -1700,7 +1700,7 @@ def locking(sbox):
   # Test locking non-existent path.
   expected_error = ".*svnadmin: E160013:.*"
   svntest.actions.run_and_verify_svnadmin(None, None,
-                                          expected_error, "lock", 
+                                          expected_error, "lock",
                                           sbox.repo_dir,
                                           "non-existent", "jrandom",
                                           comment_path)
@@ -1709,7 +1709,7 @@ def locking(sbox):
   expected_output = "'A/D/G/rho' locked by user 'jrandom'."
   lock_token = "opaquelocktoken:01234567-89ab-cdef-89ab-cdef01234567"
   svntest.actions.run_and_verify_svnadmin(None, expected_output,
-                                          None, "lock", 
+                                          None, "lock",
                                           sbox.repo_dir,
                                           "A/D/G/rho", "jrandom",
                                           comment_path, lock_token)
@@ -1718,11 +1718,11 @@ def locking(sbox):
   expected_error = ".*svnadmin: E160040:.*"
   wrong_lock_token = "opaquelocktoken:12345670-9ab8-defc-9ab8-def01234567c"
   svntest.actions.run_and_verify_svnadmin(None, None,
-                                          expected_error, "unlock", 
+                                          expected_error, "unlock",
                                           sbox.repo_dir,
                                           "A/D/G/rho", "jrandom",
                                           wrong_lock_token)
-  
+
   # Test unlocking the path again, but this time provide the correct
   # lock token.
   expected_output = "'A/D/G/rho' unlocked."
@@ -1737,12 +1737,12 @@ def locking(sbox):
   svntest.main.create_python_hook_script(hook_path, 'import sys; sys.exit(1)')
   hook_path = svntest.main.get_pre_unlock_hook_path(sbox.repo_dir)
   svntest.main.create_python_hook_script(hook_path, 'import sys; sys.exit(1)')
-  
+
   # Test locking a path.  Don't use --bypass-hooks, though, as we wish
   # to verify that hook script is really getting executed.
   expected_error = ".*svnadmin: E165001:.*"
   svntest.actions.run_and_verify_svnadmin(None, None,
-                                          expected_error, "lock", 
+                                          expected_error, "lock",
                                           sbox.repo_dir,
                                           "iota", "jrandom",
                                           comment_path)
@@ -1764,7 +1764,7 @@ def locking(sbox):
   # with a preventative hook in place.
   expected_error = ".*svnadmin: E165001:.*"
   svntest.actions.run_and_verify_svnadmin(None, None,
-                                          expected_error, "unlock", 
+                                          expected_error, "unlock",
                                           sbox.repo_dir,
                                           "iota", "jrandom",
                                           iota_token)

Modified: subversion/branches/fix-rdump-editor/subversion/tests/cmdline/svndumpfilter_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/fix-rdump-editor/subversion/tests/cmdline/svndumpfilter_tests.py?rev=1300696&r1=1300695&r2=1300696&view=diff
==============================================================================
--- subversion/branches/fix-rdump-editor/subversion/tests/cmdline/svndumpfilter_tests.py (original)
+++ subversion/branches/fix-rdump-editor/subversion/tests/cmdline/svndumpfilter_tests.py Wed Mar 14 19:40:19 2012
@@ -164,6 +164,9 @@ def svndumpfilter_loses_mergeinfo(sbox):
 
 
 def _simple_dumpfilter_test(sbox, dumpfile, *dumpargs):
+  """Run svndumpfilter with arguments DUMPARGS, taking input from DUMPFILE.
+     Check that the output consists of the standard Greek tree excluding
+     all paths that start with 'A/B/E', 'A/D/G' or 'A/D/H'."""
   wc_dir = sbox.wc_dir
 
   filtered_output, filtered_err = filter_and_return_output(dumpfile, 0,
@@ -596,6 +599,58 @@ def dropped_but_not_renumbered_empty_rev
                                      'propget', 'svn:mergeinfo', '-R',
                                      sbox.repo_url)
 
+#----------------------------------------------------------------------
+def match_empty_prefix(sbox):
+  "svndumpfilter with an empty prefix"
+
+  dumpfile_location = os.path.join(os.path.dirname(sys.argv[0]),
+                                   'svndumpfilter_tests_data',
+                                   'greek_tree.dump')
+  dumpfile = open(dumpfile_location).read()
+
+  def test(sbox, dumpfile, *dumpargs):
+    """Run svndumpfilter with DUMPFILE as the input lines, load
+       the result and check it matches EXPECTED_DISK, EXPECTED_OUTPUT,
+       EXPECTED_STATUS."""
+
+    # Filter the Greek tree dump
+    filtered_output, filtered_err = filter_and_return_output(dumpfile, 0,
+                                                             '--quiet',
+                                                             *dumpargs)
+    if filtered_err:
+      raise verify.UnexpectedStderr(filtered_err)
+
+    # Load the filtered dump into a repo and check the result
+    test_create(sbox)
+    load_and_verify_dumpstream(sbox, [], [], None, filtered_output,
+                               '--ignore-uuid')
+    svntest.actions.run_and_verify_update(sbox.wc_dir,
+                                          expected_output,
+                                          expected_disk,
+                                          expected_status)
+
+  # Test excluding everything
+  expected_disk = svntest.wc.State(sbox.wc_dir, {})
+  expected_output = svntest.wc.State(sbox.wc_dir, {})
+  expected_status = svntest.wc.State(sbox.wc_dir, {
+                      '': Item(status='  ', wc_rev=1) })
+
+  test(sbox, dumpfile, 'exclude', '')
+
+  # Test including everything
+  expected_disk = svntest.main.greek_state.copy()
+  expected_output = svntest.main.greek_state.copy().tweak(status='A ')
+  expected_status = svntest.actions.get_virginal_state(sbox.wc_dir, 1)
+
+  test(sbox, dumpfile, 'include', '', '/A/D/G')
+
+  # Note: We also ought to test the '--pattern' option, including or
+  # excluding a pattern of '*'.  However, passing a wildcard parameter
+  # is troublesome on Windows: it may be expanded, depending on whether
+  # the svndumpfilter executable was linked with 'setargv.obj', and there
+  # doesn't seem to be a consistent way to quote such an argument to
+  # prevent expansion.
+
 ########################################################################
 # Run the tests
 
@@ -608,6 +663,7 @@ test_list = [ None,
               dumpfilter_with_patterns,
               filter_mergeinfo_revs_outside_of_dump_stream,
               dropped_but_not_renumbered_empty_revs,
+              match_empty_prefix,
               ]
 
 if __name__ == '__main__':

Modified: subversion/branches/fix-rdump-editor/subversion/tests/cmdline/svnrdump_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/fix-rdump-editor/subversion/tests/cmdline/svnrdump_tests.py?rev=1300696&r1=1300695&r2=1300696&view=diff
==============================================================================
--- subversion/branches/fix-rdump-editor/subversion/tests/cmdline/svnrdump_tests.py (original)
+++ subversion/branches/fix-rdump-editor/subversion/tests/cmdline/svnrdump_tests.py Wed Mar 14 19:40:19 2012
@@ -142,7 +142,7 @@ def run_dump_test(sbox, dumpfile_name, e
     svntest.verify.compare_and_display_lines(
       "Dump files", "DUMP", svnadmin_dumpfile, svnrdump_dumpfile,
       None, mismatched_headers_re)
-    
+
   else:
     compare_repos_dumps(sbox, svnadmin_dumpfile)
 

Modified: subversion/branches/fix-rdump-editor/subversion/tests/cmdline/svnsync_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/fix-rdump-editor/subversion/tests/cmdline/svnsync_tests.py?rev=1300696&r1=1300695&r2=1300696&view=diff
==============================================================================
--- subversion/branches/fix-rdump-editor/subversion/tests/cmdline/svnsync_tests.py (original)
+++ subversion/branches/fix-rdump-editor/subversion/tests/cmdline/svnsync_tests.py Wed Mar 14 19:40:19 2012
@@ -28,7 +28,7 @@
 import sys, os
 
 # Test suite-specific modules
-import locale, re
+import locale, re, urllib
 
 # Our testing module
 import svntest
@@ -191,14 +191,16 @@ def setup_and_sync(sbox, dump_file_conte
   repo_url = sbox.repo_url
   cwd = os.getcwd()
   if is_src_ra_local:
-    repo_url = svntest.main.file_scheme_prefix + svntest.main.pathname2url(os.path.join(cwd, sbox.repo_dir))
+    repo_url = svntest.main.file_scheme_prefix + \
+                        urllib.pathname2url(os.path.join(cwd, sbox.repo_dir))
 
   if subdir:
     repo_url = repo_url + subdir
 
   dest_repo_url = dest_sbox.repo_url
   if is_dest_ra_local:
-    dest_repo_url = svntest.main.file_scheme_prefix + svntest.main.pathname2url(os.path.join(cwd, dest_sbox.repo_dir))
+    dest_repo_url = svntest.main.file_scheme_prefix + \
+                    urllib.pathname2url(os.path.join(cwd, dest_sbox.repo_dir))
   run_init(dest_repo_url, repo_url, source_prop_encoding)
 
   run_sync(dest_repo_url, repo_url,
@@ -251,7 +253,7 @@ or another dump file."""
   # file.
   if exp_dump_file_name:
     build_repos(sbox)
-    svntest.actions.run_and_verify_load(sbox.repo_dir, 
+    svntest.actions.run_and_verify_load(sbox.repo_dir,
                                         open(os.path.join(svnsync_tests_dir,
                                                           exp_dump_file_name),
                                              'rb').readlines())
@@ -399,7 +401,7 @@ def basic_authz(sbox):
 
   run_init(dest_sbox.repo_url, sbox.repo_url)
 
-  args = map(lambda x: x.authz_name(), [sbox, sbox, dest_sbox])
+  args = tuple(s.authz_name() for s in [sbox, sbox, dest_sbox])
   svntest.main.file_write(sbox.authz_file,
                           "[%s:/]\n"
                           "* = r\n"
@@ -408,7 +410,7 @@ def basic_authz(sbox):
                           "* = \n"
                           "\n"
                           "[%s:/]\n"
-                          "* = rw\n" % tuple(args))
+                          "* = rw\n" % args)
 
   run_sync(dest_sbox.repo_url)
 
@@ -477,7 +479,7 @@ def copy_from_unreadable_dir(sbox):
 
   svntest.actions.enable_revprop_changes(dest_sbox.repo_dir)
 
-  args = map(lambda x: x.authz_name(), [sbox, sbox, dest_sbox])
+  args = tuple(s.authz_name() for s in [sbox, sbox, dest_sbox])
   open(sbox.authz_file, 'w').write(
              "[%s:/]\n"
              "* = r\n"
@@ -487,7 +489,7 @@ def copy_from_unreadable_dir(sbox):
              "\n"
              "[%s:/]\n"
              "* = rw"
-             % tuple(args))
+             % args)
 
   run_init(dest_sbox.repo_url, sbox.repo_url)
 
@@ -591,7 +593,7 @@ def copy_with_mod_from_unreadable_dir(sb
 
   svntest.actions.enable_revprop_changes(dest_sbox.repo_dir)
 
-  args = map(lambda x: x.authz_name(), [sbox, sbox, dest_sbox])
+  args = tuple(s.authz_name() for s in [sbox, sbox, dest_sbox])
   open(sbox.authz_file, 'w').write(
              "[%s:/]\n"
              "* = r\n"
@@ -601,7 +603,7 @@ def copy_with_mod_from_unreadable_dir(sb
              "\n"
              "[%s:/]\n"
              "* = rw"
-             % tuple(args))
+             % args)
 
   run_init(dest_sbox.repo_url, sbox.repo_url)
 
@@ -683,7 +685,7 @@ def copy_with_mod_from_unreadable_dir_an
 
   svntest.actions.enable_revprop_changes(dest_sbox.repo_dir)
 
-  args = map(lambda x: x.authz_name(), [sbox, sbox, dest_sbox])
+  args = tuple(s.authz_name() for s in [sbox, sbox, dest_sbox])
   open(sbox.authz_file, 'w').write(
              "[%s:/]\n"
              "* = r\n"
@@ -693,7 +695,7 @@ def copy_with_mod_from_unreadable_dir_an
              "\n"
              "[%s:/]\n"
              "* = rw"
-             % tuple(args))
+             % args)
 
   run_init(dest_sbox.repo_url, sbox.repo_url)
 
@@ -1005,37 +1007,36 @@ def fd_leak_sync_from_serf_to_local(sbox
 def copy_delete_unreadable_child(sbox):
   "copy, then rm at-src-unreadable child"
 
-  ## Prepare the source: Greek tree (r1), cp+rm (r2).
+  # Prepare the source: Greek tree (r1), cp+rm (r2).
   sbox.build("copy-delete-unreadable-child")
-  svntest.actions.run_and_verify_svnmucc(None, None, [], 
+  svntest.actions.run_and_verify_svnmucc(None, None, [],
                                          '-m', 'r2',
                                          '-U', sbox.repo_url,
                                          'cp', 'HEAD', '/', 'branch',
                                          'rm', 'branch/A')
 
-  ## Create the destination.
+  # Create the destination.
   dest_sbox = sbox.clone_dependent()
   build_repos(dest_sbox)
   svntest.actions.enable_revprop_changes(dest_sbox.repo_dir)
 
-  ## Lock down the source.
-  args = map(lambda x: x.authz_name(), [sbox, sbox])
+  # Lock down the source.
+  authz = sbox.authz_name()
   write_restrictive_svnserve_conf(sbox.repo_dir, anon_access='read')
   svntest.main.file_write(sbox.authz_file,
       "[%s:/]\n"
       "* = r\n"
       "[%s:/A]\n"
       "* =  \n"
-      % tuple(args)
-  )
+      % (authz, authz))
 
   dest_url = svntest.main.file_scheme_prefix \
-             + svntest.main.pathname2url(os.path.abspath(dest_sbox.repo_dir))
+                    + urllib.pathname2url(os.path.abspath(dest_sbox.repo_dir))
   run_init(dest_url, sbox.repo_url)
   run_sync(dest_url)
 
   # sanity check
-  svntest.actions.run_and_verify_svn(None, 
+  svntest.actions.run_and_verify_svn(None,
                                      ["iota\n"], [],
                                      'ls', dest_url+'/branch@2')
 



Mime
View raw message