You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2011/10/11 21:52:46 UTC

svn commit: r1182053 [29/30] - in /subversion/branches/svn_mutex: ./ build/ build/ac-macros/ build/generator/ build/generator/swig/ build/generator/templates/ contrib/client-side/ contrib/hook-scripts/enforcer/ contrib/server-side/ notes/ notes/merge-t...

Modified: subversion/branches/svn_mutex/subversion/tests/libsvn_wc/op-depth-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn_mutex/subversion/tests/libsvn_wc/op-depth-test.c?rev=1182053&r1=1182052&r2=1182053&view=diff
==============================================================================
--- subversion/branches/svn_mutex/subversion/tests/libsvn_wc/op-depth-test.c (original)
+++ subversion/branches/svn_mutex/subversion/tests/libsvn_wc/op-depth-test.c Tue Oct 11 19:52:34 2011
@@ -40,6 +40,7 @@
 
 #include "private/svn_wc_private.h"
 #include "private/svn_sqlite.h"
+#include "private/svn_dep_compat.h"
 #include "../../libsvn_wc/wc.h"
 #include "../../libsvn_wc/wc_db.h"
 #define SVN_WC__I_AM_WC_DB
@@ -162,9 +163,14 @@ static svn_error_t *
 wc_revert(svn_test__sandbox_t *b, const char *path, svn_depth_t depth)
 {
   const char *abspath = wc_path(b, path);
-  const char *dir_abspath = svn_dirent_dirname(abspath, b->pool);
+  const char *dir_abspath;
   const char *lock_root_abspath;
 
+  if (strcmp(abspath, b->wc_abspath))
+    dir_abspath = svn_dirent_dirname(abspath, b->pool);
+  else
+    dir_abspath = abspath;
+
   SVN_ERR(svn_wc__acquire_write_lock(&lock_root_abspath, b->wc_ctx,
                                      dir_abspath, FALSE /* lock_anchor */,
                                      b->pool, b->pool));
@@ -263,45 +269,40 @@ wc_move(svn_test__sandbox_t *b, const ch
                           FALSE, FALSE, NULL, NULL, NULL, ctx, b->pool);
 }
 
+static svn_error_t *
+wc_propset(svn_test__sandbox_t *b,
+           const char *name,
+           const char *value,
+           const char *path)
+{
+  svn_client_ctx_t *ctx;
+  apr_array_header_t *paths = apr_array_make(b->pool, 1,
+                                             sizeof(const char *));
+
+  SVN_ERR(svn_client_create_context(&ctx, b->pool));
+  APR_ARRAY_PUSH(paths, const char *) = wc_path(b, path);
+  return svn_client_propset_local(name, svn_string_create(value, b->pool),
+                                  paths, svn_depth_empty, TRUE, NULL, ctx,
+                                  b->pool);
+}
+
 /* Create the Greek tree on disk in the WC, and commit it. */
 static svn_error_t *
 add_and_commit_greek_tree(svn_test__sandbox_t *b)
 {
-  const char *greek_tree_dirs[8] =
-  {
-    "A",
-    "A/B",
-    "A/B/E",
-    "A/B/F",
-    "A/C",
-    "A/D",
-    "A/D/G",
-    "A/D/H"
-  };
-  const char *greek_tree_files[12][2] =
-  {
-    { "iota",         "This is the file 'iota'.\n" },
-    { "A/mu",         "This is the file 'mu'.\n" },
-    { "A/B/lambda",   "This is the file 'lambda'.\n" },
-    { "A/B/E/alpha",  "This is the file 'alpha'.\n" },
-    { "A/B/E/beta",   "This is the file 'beta'.\n" },
-    { "A/D/gamma",    "This is the file 'gamma'.\n" },
-    { "A/D/G/pi",     "This is the file 'pi'.\n" },
-    { "A/D/G/rho",    "This is the file 'rho'.\n" },
-    { "A/D/G/tau",    "This is the file 'tau'.\n" },
-    { "A/D/H/chi",    "This is the file 'chi'.\n" },
-    { "A/D/H/psi",    "This is the file 'psi'.\n" },
-    { "A/D/H/omega",  "This is the file 'omega'.\n" }
-  };
-  int i;
-
-  for (i = 0; i < 8; i++)
-    SVN_ERR(wc_mkdir(b, greek_tree_dirs[i]));
+  const struct svn_test__tree_entry_t *node;
 
-  for (i = 0; i < 12; i++)
+  for (node = svn_test__greek_tree_nodes; node->path; node++)
     {
-      file_write(b, greek_tree_files[i][0], greek_tree_files[i][1]);
-      SVN_ERR(wc_add(b, greek_tree_files[i][0]));
+      if (node->contents)
+        {
+          file_write(b, node->path, node->contents);
+          SVN_ERR(wc_add(b, node->path));
+        }
+      else
+        {
+          SVN_ERR(wc_mkdir(b, node->path));
+        }
     }
 
   SVN_ERR(wc_commit(b, ""));
@@ -320,6 +321,7 @@ typedef struct nodes_row_t {
     const char *presence;
     svn_revnum_t repo_revnum;
     const char *repo_relpath;
+    svn_boolean_t file_external;
 } nodes_row_t;
 
 /* Macro for filling in the REPO_* fields of a non-base NODES_ROW_T
@@ -331,15 +333,25 @@ static const char *
 print_row(const nodes_row_t *row,
           apr_pool_t *result_pool)
 {
+  const char *file_external_str;
+
   if (row == NULL)
     return "(null)";
+
+  if (row->file_external)
+    file_external_str = ", file-external";
+  else
+    file_external_str = "";
+      
   if (row->repo_revnum == SVN_INVALID_REVNUM)
-    return apr_psprintf(result_pool, "%d, %s, %s",
-                        row->op_depth, row->local_relpath, row->presence);
+    return apr_psprintf(result_pool, "%d, %s, %s%s",
+                        row->op_depth, row->local_relpath, row->presence,
+                        file_external_str);
   else
-    return apr_psprintf(result_pool, "%d, %s, %s, from ^/%s@%d",
+    return apr_psprintf(result_pool, "%d, %s, %s, from ^/%s@%d%s",
                         row->op_depth, row->local_relpath, row->presence,
-                        row->repo_relpath, (int)row->repo_revnum);
+                        row->repo_relpath, (int)row->repo_revnum,
+                        file_external_str);
 }
 
 /* A baton to pass through svn_hash_diff() to compare_nodes_rows(). */
@@ -380,7 +392,8 @@ compare_nodes_rows(const void *key, apr_
     }
   else if (expected->repo_revnum != found->repo_revnum
            || (strcmp_null(expected->repo_relpath, found->repo_relpath) != 0)
-           || (strcmp_null(expected->presence, found->presence) != 0))
+           || (strcmp_null(expected->presence, found->presence) != 0)
+           || (expected->file_external != found->file_external))
     {
       b->errors = svn_error_createf(
                     SVN_ERR_TEST_FAILED, b->errors,
@@ -409,9 +422,12 @@ check_db_rows(svn_test__sandbox_t *b,
   int i;
   svn_sqlite__stmt_t *stmt;
   static const char *const statements[] = {
-    "SELECT op_depth, presence, local_relpath, revision, repos_path "
-      "FROM nodes "
-      "WHERE local_relpath = ?1 OR local_relpath LIKE ?2",
+    "SELECT op_depth, nodes.presence, nodes.local_relpath, revision,"
+    "       repos_path, file_external, def_local_relpath"
+    " FROM nodes "
+    " LEFT OUTER JOIN externals"
+    "             ON nodes.local_relpath = externals.local_relpath"
+    " WHERE nodes.local_relpath = ?1 OR nodes.local_relpath LIKE ?2",
     NULL };
 #define STMT_SELECT_NODES_INFO 0
 
@@ -439,6 +455,11 @@ check_db_rows(svn_test__sandbox_t *b,
       row->local_relpath = svn_sqlite__column_text(stmt, 2, b->pool);
       row->repo_revnum = svn_sqlite__column_revnum(stmt, 3);
       row->repo_relpath = svn_sqlite__column_text(stmt, 4, b->pool);
+      row->file_external = !svn_sqlite__column_is_null(stmt, 5);
+      if (row->file_external && svn_sqlite__column_is_null(stmt, 6))
+        comparison_baton.errors
+          = svn_error_createf(SVN_ERR_TEST_FAILED, comparison_baton.errors,
+                              "incomplete {%s}", print_row(row, b->pool));
 
       key = apr_psprintf(b->pool, "%d %s", row->op_depth, row->local_relpath);
       apr_hash_set(found_hash, key, APR_HASH_KEY_STRING, row);
@@ -2784,7 +2805,7 @@ do_delete(svn_test__sandbox_t *b,
   SVN_ERR(insert_actual(b, actual_before));
   SVN_ERR(check_db_rows(b, "", before));
   SVN_ERR(check_db_actual(b, actual_before));
-  SVN_ERR(svn_wc__db_op_delete(b->wc_ctx->db, local_abspath,
+  SVN_ERR(svn_wc__db_op_delete(b->wc_ctx->db, local_abspath, NULL,
                                NULL, NULL /* notification */,
                                NULL, NULL /* cancellation */,
                                b->pool));
@@ -3426,6 +3447,228 @@ test_case_rename(const svn_test_opts_t *
 
   return SVN_NO_ERROR;
 }
+
+static svn_error_t *
+commit_file_external(const svn_test_opts_t *opts, apr_pool_t *pool)
+{
+  svn_test__sandbox_t b;
+
+  SVN_ERR(svn_test__sandbox_create(&b, "commit_file_external", opts, pool));
+  file_write(&b, "f", "this is f\n");
+  SVN_ERR(wc_add(&b, "f"));
+  SVN_ERR(wc_propset(&b, "svn:externals", "^/f g", ""));
+  SVN_ERR(wc_commit(&b, ""));
+  SVN_ERR(wc_update(&b, "", 1));
+  file_write(&b, "g", "this is f\nmodified via g\n");
+  SVN_ERR(wc_commit(&b, ""));
+  SVN_ERR(wc_update(&b, "", 2));
+
+  {
+    nodes_row_t rows[] = {
+      { 0, "",  "normal",       2, "" },
+      { 0, "f", "normal",       2, "f" },
+      { 0, "g", "normal",       2, "f", TRUE },
+      { 0 }
+    };
+    SVN_ERR(check_db_rows(&b, "", rows));
+  }
+
+  return SVN_NO_ERROR;
+}
+
+static svn_error_t *
+revert_file_externals(const svn_test_opts_t *opts, apr_pool_t *pool)
+{
+  svn_test__sandbox_t b;
+
+  SVN_ERR(svn_test__sandbox_create(&b, "revert_file_externals", opts, pool));
+  file_write(&b, "f", "this is f\n");
+  SVN_ERR(wc_add(&b, "f"));
+  SVN_ERR(wc_propset(&b, "svn:externals", "^/f g", ""));
+  SVN_ERR(wc_commit(&b, ""));
+  SVN_ERR(wc_update(&b, "", 1));
+  SVN_ERR(wc_propset(&b, "svn:externals", "^/f h", ""));
+  SVN_ERR(wc_mkdir(&b, "A"));
+  SVN_ERR(wc_propset(&b, "svn:externals", "^/f g", "A"));
+  {
+    nodes_row_t rows[] = {
+      { 0, "",    "normal", 1, "" },
+      { 0, "f",   "normal", 1, "f" },
+      { 0, "g",   "normal", 1, "f", TRUE },
+      { 1, "A",   "normal", NO_COPY_FROM },
+      { 0 }
+    };
+    SVN_ERR(check_db_rows(&b, "", rows));
+  }
+
+  SVN_ERR(wc_update(&b, "", 1));
+  {
+    nodes_row_t rows[] = {
+      { 0, "",    "normal", 1, "" },
+      { 0, "f",   "normal", 1, "f" },
+      { 1, "A",   "normal", NO_COPY_FROM },
+      { 0, "h",   "normal", 1, "f", TRUE },
+      { 0, "A/g", "normal", 1, "f", TRUE },
+      { 0 }
+    };
+    SVN_ERR(check_db_rows(&b, "", rows));
+  }
+
+  SVN_ERR(wc_revert(&b, "", svn_depth_infinity));
+  {
+    nodes_row_t rows[] = {
+      { 0, "",    "normal", 1, "" },
+      { 0, "f",   "normal", 1, "f" },
+      { 0, "h",   "normal", 1, "f", TRUE },
+      { 0, "A/g", "normal", 1, "f", TRUE },
+      { 0 }
+    };
+    SVN_ERR(check_db_rows(&b, "", rows));
+  }
+
+  SVN_ERR(wc_update(&b, "", 1));
+  {
+    nodes_row_t rows[] = {
+      { 0, "",    "normal", 1, "" },
+      { 0, "f",   "normal", 1, "f" },
+      { 0, "g",   "normal", 1, "f", TRUE },
+      { 0 }
+    };
+    SVN_ERR(check_db_rows(&b, "", rows));
+  }
+
+  return SVN_NO_ERROR;
+}
+
+static svn_error_t *
+copy_file_externals(const svn_test_opts_t *opts, apr_pool_t *pool)
+{
+  svn_test__sandbox_t b;
+
+  SVN_ERR(svn_test__sandbox_create(&b, "copy_file_externals", opts, pool));
+  file_write(&b, "f", "this is f\n");
+  SVN_ERR(wc_add(&b, "f"));
+  SVN_ERR(wc_mkdir(&b, "A"));
+  SVN_ERR(wc_propset(&b, "svn:externals", "^/f g", "A"));
+  SVN_ERR(wc_commit(&b, ""));
+  SVN_ERR(wc_mkdir(&b, "A/B"));
+  SVN_ERR(wc_propset(&b, "svn:externals", "^/f g", "A/B"));
+  SVN_ERR(wc_update(&b, "", 1));
+  {
+    nodes_row_t rows[] = {
+      { 0, "",      "normal", 1, "" },
+      { 0, "f",     "normal", 1, "f" },
+      { 0, "A",     "normal", 1, "A" },
+      { 2, "A/B",   "normal", NO_COPY_FROM },
+      { 0, "A/g",   "normal", 1, "f", TRUE },
+      { 0, "A/B/g", "normal", 1, "f", TRUE },
+      { 0 }
+    };
+    SVN_ERR(check_db_rows(&b, "", rows));
+  }
+
+  SVN_ERR(wc_copy(&b, "A", "X"));
+  {
+    nodes_row_t rows[] = {
+      { 0, "",      "normal", 1, "" },
+      { 0, "f",     "normal", 1, "f" },
+      { 0, "A",     "normal", 1, "A" },
+      { 2, "A/B",   "normal", NO_COPY_FROM },
+      { 0, "A/g",   "normal", 1, "f", TRUE },
+      { 0, "A/B/g", "normal", 1, "f", TRUE },
+      { 1, "X",     "normal", 1, "A" },
+      { 2, "X/B",   "normal", NO_COPY_FROM },
+      { 0 }
+    };
+    SVN_ERR(check_db_rows(&b, "", rows));
+  }
+
+  SVN_ERR(wc_update(&b, "", 1));
+  {
+    nodes_row_t rows[] = {
+      { 0, "",      "normal", 1, "" },
+      { 0, "f",     "normal", 1, "f" },
+      { 0, "A",     "normal", 1, "A" },
+      { 2, "A/B",   "normal", NO_COPY_FROM },
+      { 0, "A/g",   "normal", 1, "f", TRUE },
+      { 0, "A/B/g", "normal", 1, "f", TRUE },
+      { 1, "X",     "normal", 1, "A" },
+      { 2, "X/B",   "normal", NO_COPY_FROM },
+      { 0, "X/g",   "normal", 1, "f", TRUE },
+      { 0, "X/B/g", "normal", 1, "f", TRUE },
+      { 0 }
+    };
+    SVN_ERR(check_db_rows(&b, "", rows));
+  }
+
+  SVN_ERR(wc_delete(&b, "X"));
+  {
+    nodes_row_t rows[] = {
+      { 0, "",      "normal", 1, "" },
+      { 0, "f",     "normal", 1, "f" },
+      { 0, "A",     "normal", 1, "A" },
+      { 2, "A/B",   "normal", NO_COPY_FROM },
+      { 0, "A/g",   "normal", 1, "f", TRUE },
+      { 0, "A/B/g", "normal", 1, "f", TRUE },
+      { 0, "X/g",   "normal", 1, "f", TRUE },
+      { 0, "X/B/g", "normal", 1, "f", TRUE },
+      { 0 }
+    };
+    SVN_ERR(check_db_rows(&b, "", rows));
+  }
+
+  SVN_ERR(wc_update(&b, "", 1));
+  {
+    nodes_row_t rows[] = {
+      { 0, "",      "normal", 1, "" },
+      { 0, "f",     "normal", 1, "f" },
+      { 0, "A",     "normal", 1, "A" },
+      { 2, "A/B",   "normal", NO_COPY_FROM },
+      { 0, "A/g",   "normal", 1, "f", TRUE },
+      { 0, "A/B/g", "normal", 1, "f", TRUE },
+      { 0 }
+    };
+    SVN_ERR(check_db_rows(&b, "", rows));
+  }
+
+  return SVN_NO_ERROR;
+}
+
+static svn_error_t *
+copy_wc_wc_absent(const svn_test_opts_t *opts, apr_pool_t *pool)
+{
+  svn_test__sandbox_t b;
+  nodes_row_t before[] = {
+    {0, "",      "normal",  1, ""},
+    {0, "A",     "normal",  1, "A"},
+    {0, "A/B",   "normal",  1, "A/B"},
+    {0, "A/B/E", "absent",  1, "A/B/E"},
+    {0}
+  };
+  nodes_row_t after[] = {
+    {0, "",      "normal",  1, ""},
+    {0, "A",     "normal",      1, "A"},
+    {0, "A/B",   "normal",      1, "A/B"},
+    {0, "A/B/E", "absent",      1, "A/B/E"},
+    {1, "X",     "normal",      1, "A"},
+    {1, "X/B",   "normal",      1, "A/B"},
+    {1, "X/B/E", "incomplete",  1, "A/B/E"},
+    {0}
+  };
+  svn_error_t *err;
+
+  SVN_ERR(svn_test__sandbox_create(&b, "copy_wc_wc_absent", opts, pool));
+  SVN_ERR(insert_dirs(&b, before));
+  SVN_ERR(check_db_rows(&b, "", before));
+  SVN_ERR(disk_mkdir(&b, "A"));
+  err = wc_copy(&b, "A", "X");
+  SVN_TEST_ASSERT(err && err->apr_err == SVN_ERR_WC_PATH_UNEXPECTED_STATUS);
+  svn_error_clear(err);
+  SVN_ERR(check_db_rows(&b, "", after));
+
+  return SVN_NO_ERROR;
+}
+
 /* ---------------------------------------------------------------------- */
 /* The list of test functions */
 
@@ -3484,5 +3727,13 @@ struct svn_test_descriptor_t test_funcs[
     SVN_TEST_OPTS_XFAIL(test_case_rename,
                         "test_case_rename on case (in)sensitive system"),
 #endif
+    SVN_TEST_OPTS_PASS(commit_file_external,
+                       "commit_file_external (issue #4002)"),
+    SVN_TEST_OPTS_PASS(revert_file_externals,
+                       "revert_file_externals"),
+    SVN_TEST_OPTS_PASS(copy_file_externals,
+                       "copy_file_externals"),
+    SVN_TEST_OPTS_PASS(copy_wc_wc_absent,
+                       "test_wc_wc_copy_absent"),
     SVN_TEST_NULL
   };

Modified: subversion/branches/svn_mutex/subversion/tests/svn_test.h
URL: http://svn.apache.org/viewvc/subversion/branches/svn_mutex/subversion/tests/svn_test.h?rev=1182053&r1=1182052&r2=1182053&view=diff
==============================================================================
--- subversion/branches/svn_mutex/subversion/tests/svn_test.h (original)
+++ subversion/branches/svn_mutex/subversion/tests/svn_test.h Tue Oct 11 19:52:34 2011
@@ -53,6 +53,23 @@ extern "C" {
                                #expr, __FILE__, __LINE__);        \
   } while (0)
 
+/** Handy macro for testing an expected svn_error_t return value.
+ * EXPECTED must be a real error (neither SVN_NO_ERROR nor APR_SUCCESS). */
+#define SVN_TEST_ASSERT_ERROR(expr, expected)                             \
+  do {                                                                    \
+    svn_error_t *err__ = (expr);                                          \
+    SVN_ERR_ASSERT((expected));                                           \
+    if (err__ == SVN_NO_ERROR || err__->apr_err != (expected))            \
+      return err__ ? svn_error_createf(SVN_ERR_TEST_FAILED, err__,        \
+                                       "Expected error %d but got %d",    \
+                                       (expected),                        \
+                                       err__->apr_err)                    \
+                   : svn_error_createf(SVN_ERR_TEST_FAILED, err__,        \
+                                        "Expected error %d but got %s",   \
+                                        (expected),                       \
+                                        "SVN_NO_ERROR");                  \
+  } while (0)
+
 /** Handy macro for testing string equality.
  */
 #define SVN_TEST_STRING_ASSERT(expr, expected_expr)                 \
@@ -177,6 +194,27 @@ apr_uint32_t svn_test_rand(apr_uint32_t 
 void svn_test_add_dir_cleanup(const char *path);
 
 
+/* A simple representation for a tree node. */
+typedef struct svn_test__tree_entry_t
+{
+  const char *path;     /* relpath of this node */
+  const char *contents; /* text contents, or NULL for a directory */
+}
+svn_test__tree_entry_t;
+
+/* Wrapper for an array of svn_test__tree_entry_t's. */
+typedef struct svn_test__tree_t
+{
+  svn_test__tree_entry_t *entries;
+  int num_entries;
+}
+svn_test__tree_t;
+
+
+/* The standard Greek tree, terminated by a node with path=NULL. */
+extern const svn_test__tree_entry_t svn_test__greek_tree_nodes[21];
+
+
 #ifdef __cplusplus
 }
 #endif /* __cplusplus */

Modified: subversion/branches/svn_mutex/subversion/tests/svn_test_fs.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn_mutex/subversion/tests/svn_test_fs.c?rev=1182053&r1=1182052&r2=1182053&view=diff
==============================================================================
--- subversion/branches/svn_mutex/subversion/tests/svn_test_fs.c (original)
+++ subversion/branches/svn_mutex/subversion/tests/svn_test_fs.c Tue Oct 11 19:52:34 2011
@@ -82,8 +82,7 @@ make_fs_config(const char *fs_type,
   if (server_minor_version)
     {
       if (server_minor_version == 6)
-        apr_hash_set(fs_config, SVN_FS_CONFIG_PRE_1_7_COMPATIBLE,
-                     APR_HASH_KEY_STRING, "1");
+        /* no SVN_FS_CONFIG_PRE_1_7_COMPATIBLE */;
       else if (server_minor_version == 5)
         apr_hash_set(fs_config, SVN_FS_CONFIG_PRE_1_6_COMPATIBLE,
                      APR_HASH_KEY_STRING, "1");
@@ -136,6 +135,9 @@ create_fs(svn_fs_t **fs_p,
   return SVN_NO_ERROR;
 }
 
+/* If OPTS specifies a filesystem type of 'fsfs' and provides a config file,
+ * copy that file into the filesystem FS and set *MUST_REOPEN to TRUE, else
+ * set *MUST_REOPEN to FALSE. */
 static svn_error_t *
 maybe_install_fsfs_conf(svn_fs_t *fs,
                         const svn_test_opts_t *opts,
@@ -150,7 +152,7 @@ maybe_install_fsfs_conf(svn_fs_t *fs,
   return svn_io_copy_file(opts->config_file,
                           svn_path_join(svn_fs_path(fs, pool),
                                         "fsfs.conf", pool),
-                          FALSE,
+                          FALSE /* copy_perms */,
                           pool);
 }
 
@@ -570,6 +572,30 @@ svn_test__txn_script_exec(svn_fs_root_t 
 }
 
 
+const struct svn_test__tree_entry_t svn_test__greek_tree_nodes[21] = {
+  { "iota",         "This is the file 'iota'.\n" },
+  { "A",            NULL },
+  { "A/mu",         "This is the file 'mu'.\n" },
+  { "A/B",          NULL },
+  { "A/B/lambda",   "This is the file 'lambda'.\n" },
+  { "A/B/E",        NULL },
+  { "A/B/E/alpha",  "This is the file 'alpha'.\n" },
+  { "A/B/E/beta",   "This is the file 'beta'.\n" },
+  { "A/B/F",        NULL },
+  { "A/C",          NULL },
+  { "A/D",          NULL },
+  { "A/D/gamma",    "This is the file 'gamma'.\n" },
+  { "A/D/G",        NULL },
+  { "A/D/G/pi",     "This is the file 'pi'.\n" },
+  { "A/D/G/rho",    "This is the file 'rho'.\n" },
+  { "A/D/G/tau",    "This is the file 'tau'.\n" },
+  { "A/D/H",        NULL },
+  { "A/D/H/chi",    "This is the file 'chi'.\n" },
+  { "A/D/H/psi",    "This is the file 'psi'.\n" },
+  { "A/D/H/omega",  "This is the file 'omega'.\n" },
+  { NULL,           NULL },
+};
+
 svn_error_t *
 svn_test__check_greek_tree(svn_fs_root_t *root,
                            apr_pool_t *pool)
@@ -577,115 +603,47 @@ svn_test__check_greek_tree(svn_fs_root_t
   svn_stream_t *rstream;
   svn_stringbuf_t *rstring;
   svn_stringbuf_t *content;
-  int i;
-
-  const char *file_contents[12][2] =
-  {
-    { "iota", "This is the file 'iota'.\n" },
-    { "A/mu", "This is the file 'mu'.\n" },
-    { "A/B/lambda", "This is the file 'lambda'.\n" },
-    { "A/B/E/alpha", "This is the file 'alpha'.\n" },
-    { "A/B/E/beta", "This is the file 'beta'.\n" },
-    { "A/D/gamma", "This is the file 'gamma'.\n" },
-    { "A/D/G/pi", "This is the file 'pi'.\n" },
-    { "A/D/G/rho", "This is the file 'rho'.\n" },
-    { "A/D/G/tau", "This is the file 'tau'.\n" },
-    { "A/D/H/chi", "This is the file 'chi'.\n" },
-    { "A/D/H/psi", "This is the file 'psi'.\n" },
-    { "A/D/H/omega", "This is the file 'omega'.\n" }
-  };
+  const struct svn_test__tree_entry_t *node;
 
   /* Loop through the list of files, checking for matching content. */
-  for (i = 0; i < 12; i++)
+  for (node = svn_test__greek_tree_nodes; node->path; node++)
     {
-      SVN_ERR(svn_fs_file_contents(&rstream, root,
-                                   file_contents[i][0], pool));
-      SVN_ERR(svn_test__stream_to_string(&rstring, rstream, pool));
-      content = svn_stringbuf_create(file_contents[i][1], pool);
-      if (! svn_stringbuf_compare(rstring, content))
-        return svn_error_createf(SVN_ERR_FS_GENERAL, NULL,
-                                 "data read != data written in file '%s'.",
-                                 file_contents[i][0]);
+      if (node->contents)
+        {
+          SVN_ERR(svn_fs_file_contents(&rstream, root, node->path, pool));
+          SVN_ERR(svn_test__stream_to_string(&rstring, rstream, pool));
+          content = svn_stringbuf_create(node->contents, pool);
+          if (! svn_stringbuf_compare(rstring, content))
+            return svn_error_createf(SVN_ERR_FS_GENERAL, NULL,
+                                     "data read != data written in file '%s'.",
+                                     node->path);
+        }
     }
   return SVN_NO_ERROR;
 }
 
-/**
- * Loads the greek tree in a directory at ROOT_DIR under transaction TXN_ROOT.
- * ROOT_DIR should be created by the caller.
- *
- * Note: this function will not commit the transaction.
- */
 svn_error_t *
 svn_test__create_greek_tree_at(svn_fs_root_t *txn_root,
                                const char *root_dir,
                                apr_pool_t *pool)
 {
-  char *iota =     svn_relpath_join(root_dir, "iota", pool);
-  char *A =        svn_relpath_join(root_dir, "A", pool);
-  char *Amu =      svn_relpath_join(root_dir, "A/mu", pool);
-  char *AB =       svn_relpath_join(root_dir, "A/B", pool);
-  char *ABlambda = svn_relpath_join(root_dir, "A/B/lambda", pool);
-  char *ABE =      svn_relpath_join(root_dir, "A/B/E", pool);
-  char *ABEalpha = svn_relpath_join(root_dir, "A/B/E/alpha", pool);
-  char *ABEbeta =  svn_relpath_join(root_dir, "A/B/E/beta", pool);
-  char *ABF =      svn_relpath_join(root_dir, "A/B/F", pool);
-  char *AC =       svn_relpath_join(root_dir, "A/C", pool);
-  char *AD =       svn_relpath_join(root_dir, "A/D", pool);
-  char *ADgamma =  svn_relpath_join(root_dir, "A/D/gamma", pool);
-  char *ADG =      svn_relpath_join(root_dir, "A/D/G", pool);
-  char *ADGpi =    svn_relpath_join(root_dir, "A/D/G/pi", pool);
-  char *ADGrho =   svn_relpath_join(root_dir, "A/D/G/rho", pool);
-  char *ADGtau =   svn_relpath_join(root_dir, "A/D/G/tau", pool);
-  char *ADH =      svn_relpath_join(root_dir, "A/D/H", pool);
-  char *ADHchi =   svn_relpath_join(root_dir, "A/D/H/chi", pool);
-  char *ADHpsi =   svn_relpath_join(root_dir, "A/D/H/psi", pool);
-  char *ADHomega = svn_relpath_join(root_dir, "A/D/H/omega", pool);
-
-  SVN_ERR(svn_fs_make_file(txn_root, iota, pool));
-  SVN_ERR(svn_test__set_file_contents
-          (txn_root, iota, "This is the file 'iota'.\n", pool));
-  SVN_ERR(svn_fs_make_dir  (txn_root, A, pool));
-  SVN_ERR(svn_fs_make_file(txn_root, Amu, pool));
-  SVN_ERR(svn_test__set_file_contents
-          (txn_root, Amu, "This is the file 'mu'.\n", pool));
-  SVN_ERR(svn_fs_make_dir  (txn_root, AB, pool));
-  SVN_ERR(svn_fs_make_file(txn_root, ABlambda, pool));
-  SVN_ERR(svn_test__set_file_contents
-          (txn_root, ABlambda, "This is the file 'lambda'.\n", pool));
-  SVN_ERR(svn_fs_make_dir  (txn_root, ABE, pool));
-  SVN_ERR(svn_fs_make_file(txn_root, ABEalpha, pool));
-  SVN_ERR(svn_test__set_file_contents
-          (txn_root, ABEalpha, "This is the file 'alpha'.\n", pool));
-  SVN_ERR(svn_fs_make_file(txn_root, ABEbeta, pool));
-  SVN_ERR(svn_test__set_file_contents
-          (txn_root, ABEbeta, "This is the file 'beta'.\n", pool));
-  SVN_ERR(svn_fs_make_dir  (txn_root, ABF, pool));
-  SVN_ERR(svn_fs_make_dir  (txn_root, AC, pool));
-  SVN_ERR(svn_fs_make_dir  (txn_root, AD, pool));
-  SVN_ERR(svn_fs_make_file(txn_root, ADgamma, pool));
-  SVN_ERR(svn_test__set_file_contents
-          (txn_root, ADgamma, "This is the file 'gamma'.\n", pool));
-  SVN_ERR(svn_fs_make_dir  (txn_root, ADG, pool));
-  SVN_ERR(svn_fs_make_file(txn_root, ADGpi, pool));
-  SVN_ERR(svn_test__set_file_contents
-          (txn_root, ADGpi, "This is the file 'pi'.\n", pool));
-  SVN_ERR(svn_fs_make_file(txn_root, ADGrho, pool));
-  SVN_ERR(svn_test__set_file_contents
-          (txn_root, ADGrho, "This is the file 'rho'.\n", pool));
-  SVN_ERR(svn_fs_make_file(txn_root, ADGtau, pool));
-  SVN_ERR(svn_test__set_file_contents
-          (txn_root, ADGtau, "This is the file 'tau'.\n", pool));
-  SVN_ERR(svn_fs_make_dir  (txn_root, ADH, pool));
-  SVN_ERR(svn_fs_make_file(txn_root, ADHchi, pool));
-  SVN_ERR(svn_test__set_file_contents
-          (txn_root, ADHchi, "This is the file 'chi'.\n", pool));
-  SVN_ERR(svn_fs_make_file(txn_root, ADHpsi, pool));
-  SVN_ERR(svn_test__set_file_contents
-          (txn_root, ADHpsi, "This is the file 'psi'.\n", pool));
-  SVN_ERR(svn_fs_make_file(txn_root, ADHomega, pool));
-  SVN_ERR(svn_test__set_file_contents
-          (txn_root, ADHomega, "This is the file 'omega'.\n", pool));
+  const struct svn_test__tree_entry_t *node;
+
+  for (node = svn_test__greek_tree_nodes; node->path; node++)
+    {
+      const char *path = svn_relpath_join(root_dir, node->path, pool);
+
+      if (node->contents)
+        {
+          SVN_ERR(svn_fs_make_file(txn_root, path, pool));
+          SVN_ERR(svn_test__set_file_contents(txn_root, path, node->contents,
+                                              pool));
+        }
+      else
+        {
+          SVN_ERR(svn_fs_make_dir(txn_root, path, pool));
+        }
+    }
   return SVN_NO_ERROR;
 }
 

Modified: subversion/branches/svn_mutex/subversion/tests/svn_test_fs.h
URL: http://svn.apache.org/viewvc/subversion/branches/svn_mutex/subversion/tests/svn_test_fs.h?rev=1182053&r1=1182052&r2=1182053&view=diff
==============================================================================
--- subversion/branches/svn_mutex/subversion/tests/svn_test_fs.h (original)
+++ subversion/branches/svn_mutex/subversion/tests/svn_test_fs.h Tue Oct 11 19:52:34 2011
@@ -102,25 +102,6 @@ svn_test__get_file_contents(svn_fs_root_
 
 /* The Helper Functions to End All Helper Functions */
 
-/* Structure used for testing integrity of the filesystem's revision
-   using validate_tree(). */
-typedef struct svn_test__tree_entry_t
-{
-  const char *path;     /* full path of this node */
-  const char *contents; /* text contents (NULL for directories) */
-}
-svn_test__tree_entry_t;
-
-
-/* Wrapper for an array of the above svn_test__tree_entry_t's.  */
-typedef struct svn_test__tree_t
-{
-  svn_test__tree_entry_t *entries;
-  int num_entries;
-}
-svn_test__tree_t;
-
-
 /* Given a transaction or revision root (ROOT), check to see if the
    tree that grows from that root has all the path entries, and only
    those entries, passed in the array ENTRIES (which is an array of
@@ -168,7 +149,10 @@ svn_error_t *
 svn_test__create_greek_tree(svn_fs_root_t *txn_root,
                             apr_pool_t *pool);
 
-/* Create the Greek Tree under TXN_ROOT at dir ROOT_DIR.  */
+/* Create the Greek Tree under TXN_ROOT at dir ROOT_DIR.
+ * ROOT_DIR should be created by the caller.
+ *
+ * Note: this function will not commit the transaction.  */
 svn_error_t *
 svn_test__create_greek_tree_at(svn_fs_root_t *txn_root,
                                const char *root_dir,

Modified: subversion/branches/svn_mutex/subversion/tests/svn_test_main.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn_mutex/subversion/tests/svn_test_main.c?rev=1182053&r1=1182052&r2=1182053&view=diff
==============================================================================
--- subversion/branches/svn_mutex/subversion/tests/svn_test_main.c (original)
+++ subversion/branches/svn_mutex/subversion/tests/svn_test_main.c Tue Oct 11 19:52:34 2011
@@ -53,13 +53,6 @@ const char **test_argv;
 /* Test option: Print more output */
 static svn_boolean_t verbose_mode = FALSE;
 
-/* Test option: Trap SVN_ERR_ASSERT failures in the code under test. Default
- * is false so the test can easily be run in a debugger with the debugger
- * catching the assertion failure. Test suites should enable this in order
- * to be able to continue with other sub-tests and report the results even
- * when a test hits an assertion failure. */
-static svn_boolean_t trap_assertion_failures = FALSE;
-
 /* Test option: Print only unexpected results */
 static svn_boolean_t quiet_mode = FALSE;
 
@@ -79,7 +72,6 @@ enum {
   fstype_opt,
   list_opt,
   verbose_opt,
-  trap_assert_opt,
   quiet_opt,
   config_opt,
   server_minor_version_opt,
@@ -106,8 +98,6 @@ static const apr_getopt_option_t cl_opti
   {"server-minor-version", server_minor_version_opt, 1,
                     N_("set the minor version for the server ('3', '4',\n"
                        "'5', or '6')")},
-  {"trap-assertion-failures", trap_assert_opt, 0,
-                    N_("catch and report SVN_ERR_ASSERT failures")},
   {"quiet",         quiet_opt, 0,
                     N_("print only unexpected results")},
   {"allow-segfaults", allow_segfault_opt, 0,
@@ -462,9 +452,6 @@ main(int argc, const char *argv[])
         case verbose_opt:
           verbose_mode = TRUE;
           break;
-        case trap_assert_opt:
-          trap_assertion_failures = TRUE;
-          break;
         case quiet_opt:
           quiet_mode = TRUE;
           break;
@@ -506,7 +493,7 @@ main(int argc, const char *argv[])
   cleanup_pool = svn_pool_create(pool);
   test_pool = svn_pool_create(pool);
 
-  if (trap_assertion_failures)
+  if (!allow_segfaults)
     svn_error_set_malfunction_handler(svn_error_raise_on_malfunction);
 
   if (argc >= 2)  /* notice command-line arguments */

Modified: subversion/branches/svn_mutex/tools/client-side/bash_completion
URL: http://svn.apache.org/viewvc/subversion/branches/svn_mutex/tools/client-side/bash_completion?rev=1182053&r1=1182052&r2=1182053&view=diff
==============================================================================
--- subversion/branches/svn_mutex/tools/client-side/bash_completion (original)
+++ subversion/branches/svn_mutex/tools/client-side/bash_completion Tue Oct 11 19:52:34 2011
@@ -167,7 +167,7 @@ _svn()
 	cmds="$cmds info list ls lock log merge mergeinfo mkdir move mv rename"
 	cmds="$cmds patch propdel pdel propedit pedit propget pget proplist"
 	cmds="$cmds plist propset pset relocate resolve resolved revert status"
-	cmds="$cmds  switch unlock update"
+	cmds="$cmds  switch unlock update upgrade"
 
 	# help options have a strange command status...
 	local helpOpts='--help -h'
@@ -182,7 +182,7 @@ _svn()
 	optsParam="$optsParam|--old|--new|--config-dir|--config-option"
 	optsParam="$optsParam|--native-eol|-l|--limit|-c|--change"
 	optsParam="$optsParam|--depth|--set-depth|--with-revprop"
-	optsParam="$optsParam|--changelist|--accept|--show-revs"
+	optsParam="$optsParam|--cl|--changelist|--accept|--show-revs"
 
 	# svn:* and other (env SVN_BASH_*_PROPS) properties
 	local svnProps revProps allProps psCmds propCmds
@@ -788,12 +788,14 @@ _svn()
 	fi
 
 	# otherwise build possible options for the command
-	pOpts="--username --password --no-auth-cache --non-interactive"
+	pOpts="--username --password --no-auth-cache --non-interactive \
+	       --trust-server-cert"
 	mOpts="-m --message -F --file --encoding --force-log --with-revprop"
 	rOpts="-r --revision"
 	qOpts="-q --quiet"
 	nOpts="-N --non-recursive --depth"
 	gOpts="-g --use-merge-history"
+	cOpts="--cl --changelist"
 
 	cmdOpts=
 	case $cmd in
@@ -812,22 +814,23 @@ _svn()
 		cmdOpts="$rOpts $pOpts"
 		;;
 	changelist|cl)
-		cmdOpts="--targets $pOpts $qOpts --changelist \
+		cmdOpts="--targets $pOpts $qOpts $cOpts \
                          -R --recursive --depth --remove"
 		;;
 	checkout|co)
 		cmdOpts="$rOpts $qOpts $nOpts $pOpts --ignore-externals \
-                         --force --accept"
+                         --force"
 		;;
 	cleanup)
 		cmdOpts="--diff3-cmd $pOpts"
 		;;
 	commit|ci)
 		cmdOpts="$mOpts $qOpts $nOpts --targets --editor-cmd $pOpts \
-		         --no-unlock --changelist --keep-changelists"
+		         --no-unlock $cOpts --keep-changelists"
 		;;
 	copy|cp)
-		cmdOpts="$mOpts $rOpts $qOpts --editor-cmd $pOpts --parents"
+		cmdOpts="$mOpts $rOpts $qOpts --editor-cmd $pOpts --parents \
+		         --ignore-externals"
 		;;
 	delete|del|remove|rm)
 		cmdOpts="--force $mOpts $qOpts --targets --editor-cmd $pOpts \
@@ -836,11 +839,12 @@ _svn()
 	diff|di)
 		cmdOpts="$rOpts -x --extensions --diff-cmd --no-diff-deleted \
 		         $nOpts $pOpts --force --old --new --notice-ancestry \
-		         -c --change --summarize --changelist --xml --svnpatch"
+		         -c --change --summarize $cOpts --xml --git \
+		         --internal-diff --show-copies-as-adds"
 		;;
 	export)
 		cmdOpts="$rOpts $qOpts $pOpts $nOpts --force --native-eol \
-                         --ignore-externals"
+                         --ignore-externals --ignore-keywords"
 		;;
 	help|h|\?)
 		cmdOpts=
@@ -851,7 +855,7 @@ _svn()
 		;;
 	info)
 		cmdOpts="$pOpts $rOpts --targets -R --recursive --depth \
-                         --incremental --xml --changelist"
+                         --incremental --xml $cOpts"
 		;;
 	list|ls)
 		cmdOpts="$rOpts -v --verbose -R --recursive $pOpts \
@@ -864,15 +868,18 @@ _svn()
 	log)
 		cmdOpts="$rOpts -v --verbose --targets $pOpts --stop-on-copy \
 		         --incremental --xml $qOpts -l --limit -c --change \
-                         $gOpts --with-all-revprops --with-revprop"
+                         $gOpts --with-all-revprops --with-revprop --depth \
+		         --diff --diff-cmd -x --extensions --internal-diff \
+		         --with-no-revprops"
 		;;
 	merge)
 		cmdOpts="$rOpts $nOpts $qOpts --force --dry-run --diff3-cmd \
 		         $pOpts --ignore-ancestry -c --change -x --extensions \
-                         --record-only --accept --reintegrate"
+                         --record-only --accept --reintegrate \
+		         --allow-mixed-revisions"
 		;;
 	mergeinfo)
-	        cmdOpts="$rOpts $pOpts --show-revs"
+	        cmdOpts="$rOpts $pOpts --depth --show-revs -R --recursive"
 		;;
 	mkdir)
 		cmdOpts="$mOpts $qOpts --editor-cmd $pOpts --parents"
@@ -882,10 +889,10 @@ _svn()
                          --parents"
 		;;
 	patch)
-		cmdOpts="$qOpts --force"
+		cmdOpts="$qOpts $pOpts --dry-run --ignore-whitespace --reverse-diff --strip"
 		;;
 	propdel|pdel|pd)
-		cmdOpts="$qOpts -R --recursive $rOpts $pOpts --changelist \
+		cmdOpts="$qOpts -R --recursive $rOpts $pOpts $cOpts \
                          --depth"
 		[[ $isRevProp || ! $prop ]] && cmdOpts="$cmdOpts --revprop"
 		;;
@@ -895,23 +902,23 @@ _svn()
 		    cmdOpts="$cmdOpts --revprop $rOpts"
 		;;
 	propget|pget|pg)
-	        cmdOpts="-v --verbose -R --recursive $rOpts --strict $pOpts --changelist \
+	        cmdOpts="-v --verbose -R --recursive $rOpts --strict $pOpts $cOpts \
                          --depth --xml"
 		[[ $isRevProp || ! $prop ]] && cmdOpts="$cmdOpts --revprop"
 		;;
 	proplist|plist|pl)
 		cmdOpts="-v --verbose -R --recursive $rOpts --revprop $qOpts \
-		         $pOpts --changelist --depth --xml"
+		         $pOpts $cOpts --depth --xml"
 		;;
 	propset|pset|ps)
 		cmdOpts="$qOpts --targets -R --recursive \
-		         --encoding $pOpts --force --changelist --depth"
+		         --encoding $pOpts --force $cOpts --depth"
 		[[ $isRevProp || ! $prop ]] && \
 		    cmdOpts="$cmdOpts --revprop $rOpts"
 		[[ $val ]] || cmdOpts="$cmdOpts -F --file"
 		;;
         relocate)
-		cmdOpts="--ignore-externals"
+		cmdOpts="--ignore-externals $pOpts"
 		;;
         resolve)
                 cmdOpts="--targets -R --recursive $qOpts $pOpts --accept \
@@ -921,25 +928,29 @@ _svn()
 		cmdOpts="--targets -R --recursive $qOpts $pOpts --depth"
 		;;
 	revert)
-		cmdOpts="--targets -R --recursive $qOpts --changelist \
+		cmdOpts="--targets -R --recursive $qOpts $cOpts \
                          --depth $pOpts"
 		;;
 	status|stat|st)
 		cmdOpts="-u --show-updates -v --verbose $nOpts $qOpts $pOpts \
 		         --no-ignore --ignore-externals --incremental --xml \
-                         --changelist"
+                         $cOpts"
 		;;
 	switch|sw)
 		cmdOpts="--relocate $rOpts $nOpts $qOpts $pOpts --diff3-cmd \
-                         --force --accept --ignore-externals --set-depth"
+                         --force --accept --ignore-externals --set-depth \
+		         --ignore-ancestry"
 		;;
 	unlock)
 		cmdOpts="--targets --force $pOpts"
 		;;
 	update|up)
 		cmdOpts="$rOpts $nOpts $qOpts $pOpts --diff3-cmd \
-                         --ignore-externals --force --accept --changelist \
-                         --editor-cmd --set-depth"
+                         --ignore-externals --force --accept $cOpts \
+                         --parents --editor-cmd --set-depth"
+		;;
+	upgrade)
+		cmdOpts="$qOpts $pOpts"
 		;;
 	*)
 		;;

Modified: subversion/branches/svn_mutex/tools/client-side/bash_completion_test
URL: http://svn.apache.org/viewvc/subversion/branches/svn_mutex/tools/client-side/bash_completion_test?rev=1182053&r1=1182052&r2=1182053&view=diff
==============================================================================
--- subversion/branches/svn_mutex/tools/client-side/bash_completion_test (original)
+++ subversion/branches/svn_mutex/tools/client-side/bash_completion_test Tue Oct 11 19:52:34 2011
@@ -116,7 +116,7 @@ get_svn_options() {
   { svn help "$1" |
       # Find the relevant lines; remove "arg" and description.
       sed -n -e '1,/^Valid options:$/d;/^  -/!d' \
-             -e 's/\( arg\)* * : .*//;p' |
+             -e 's/\( ARG\)* * : .*//;p' |
       # Remove brackets; put each word on its own line.
       tr -d '] ' | tr '[' '\n'
     # The following options are always accepted but not listed in the help

Modified: subversion/branches/svn_mutex/tools/client-side/svn-viewspec.py
URL: http://svn.apache.org/viewvc/subversion/branches/svn_mutex/tools/client-side/svn-viewspec.py?rev=1182053&r1=1182052&r2=1182053&view=diff
==============================================================================
--- subversion/branches/svn_mutex/tools/client-side/svn-viewspec.py (original)
+++ subversion/branches/svn_mutex/tools/client-side/svn-viewspec.py Tue Oct 11 19:52:34 2011
@@ -20,6 +20,8 @@
 # ====================================================================
 
 """\
+__SCRIPTNAME__: checkout utility for sparse Subversion working copies
+
 Usage: 1. __SCRIPTNAME__ checkout VIEWSPEC-FILE TARGET-DIR
        2. __SCRIPTNAME__ examine VIEWSPEC-FILE
        3. __SCRIPTNAME__ help

Modified: subversion/branches/svn_mutex/tools/client-side/svnmucc/svnmucc.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn_mutex/tools/client-side/svnmucc/svnmucc.c?rev=1182053&r1=1182052&r2=1182053&view=diff
==============================================================================
--- subversion/branches/svn_mutex/tools/client-side/svnmucc/svnmucc.c (original)
+++ subversion/branches/svn_mutex/tools/client-side/svnmucc/svnmucc.c Tue Oct 11 19:52:34 2011
@@ -1,21 +1,24 @@
 /*
+ * svnmucc.c: Subversion Multiple URL Client
  *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
+ * ====================================================================
+ *    Licensed to the Apache Software Foundation (ASF) under one
+ *    or more contributor license agreements.  See the NOTICE file
+ *    distributed with this work for additional information
+ *    regarding copyright ownership.  The ASF licenses this file
+ *    to you under the Apache License, Version 2.0 (the
+ *    "License"); you may not use this file except in compliance
+ *    with the License.  You may obtain a copy of the License at
  *
- *   http://www.apache.org/licenses/LICENSE-2.0
+ *      http://www.apache.org/licenses/LICENSE-2.0
  *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
+ *    Unless required by applicable law or agreed to in writing,
+ *    software distributed under the License is distributed on an
+ *    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *    KIND, either express or implied.  See the License for the
+ *    specific language governing permissions and limitations
+ *    under the License.
+ * ====================================================================
  *
  */
 
@@ -23,10 +26,6 @@
 
     Combine a list of mv, cp and rm commands on URLs into a single commit.
 
-    Copyright 2005 Philip Martin <ph...@codematters.co.uk>
-
-    Licenced under the same terms as Subversion.
-
     How it works: the command line arguments are parsed into an array of
     action structures.  The action structures are interpreted to build a
     tree of operation structures.  The tree of operation structures is
@@ -109,14 +108,17 @@ static svn_error_t *
 create_ra_callbacks(svn_ra_callbacks2_t **callbacks,
                     const char *username,
                     const char *password,
+                    const char *config_dir,
                     svn_boolean_t non_interactive,
+                    svn_boolean_t no_auth_cache,
                     apr_pool_t *pool)
 {
   SVN_ERR(svn_ra_create_callbacks(callbacks, pool));
 
   SVN_ERR(svn_cmdline_create_auth_baton(&(*callbacks)->auth_baton,
                                         non_interactive,
-                                        username, password, NULL, FALSE,
+                                        username, password, config_dir,
+                                        no_auth_cache,
                                         FALSE, NULL, NULL, NULL, pool));
 
   (*callbacks)->open_tmp_file = open_tmp_file;
@@ -364,10 +366,7 @@ get_operation(const char *path,
 static const char *
 subtract_anchor(const char *anchor, const char *url, apr_pool_t *pool)
 {
-  if (! strcmp(url, anchor))
-    return "";
-  else
-    return svn_uri__is_child(anchor, url, pool);
+  return svn_uri_skip_ancestor(anchor, url, pool);
 }
 
 /* Add PATH to the operations tree rooted at OPERATION, creating any
@@ -618,6 +617,7 @@ execute(const apr_array_header_t *action
         const char *config_dir,
         const apr_array_header_t *config_options,
         svn_boolean_t non_interactive,
+        svn_boolean_t no_auth_cache,
         svn_revnum_t base_revision,
         apr_pool_t *pool)
 {
@@ -634,8 +634,8 @@ execute(const apr_array_header_t *action
   SVN_ERR(svn_config_get_config(&config, config_dir, pool));
   SVN_ERR(svn_cmdline__apply_config_options(config, config_options,
                                             "svnmucc: ", "--config-option"));
-  SVN_ERR(create_ra_callbacks(&ra_callbacks, username, password,
-                              non_interactive, pool));
+  SVN_ERR(create_ra_callbacks(&ra_callbacks, username, password, config_dir,
+                              non_interactive, no_auth_cache, pool));
   SVN_ERR(svn_ra_open4(&session, NULL, anchor, NULL, ra_callbacks,
                        NULL, config, pool));
 
@@ -780,7 +780,9 @@ usage(apr_pool_t *pool, int exit_val)
     "  -X, --extra-args ARG  append arguments from file ARG (one per line;\n"
     "                        use \"-\" to read from standard input)\n"
     "  --config-dir ARG      use ARG to override the config directory\n"
-    "  --config-option ARG   use ARG so override a configuration option\n";
+    "  --config-option ARG   use ARG so override a configuration option\n"
+    "  --no-auth-cache       do not cache authentication tokens\n"
+    "  --version             print version information\n";
   svn_error_clear(svn_cmdline_fputs(msg, stream, pool));
   apr_pool_destroy(pool);
   exit(exit_val);
@@ -794,6 +796,22 @@ insufficient(apr_pool_t *pool)
                pool);
 }
 
+static svn_error_t *
+display_version(apr_getopt_t *os, apr_pool_t *pool)
+{
+  const char *ra_desc_start
+    = "The following repository access (RA) modules are available:\n\n";
+  svn_stringbuf_t *version_footer;
+
+  version_footer = svn_stringbuf_create(ra_desc_start, pool);
+  SVN_ERR(svn_ra_print_modules(version_footer, pool));
+
+  SVN_ERR(svn_opt_print_help3(os, "svnmucc", TRUE, FALSE, version_footer->data,
+                              NULL, NULL, NULL, NULL, NULL, pool));
+
+  return SVN_NO_ERROR;
+}
+
 int
 main(int argc, const char **argv)
 {
@@ -806,6 +824,8 @@ main(int argc, const char **argv)
   enum {
     config_dir_opt = SVN_OPT_FIRST_LONGOPT_ID,
     config_inline_opt,
+    no_auth_cache_opt,
+    version_opt,
     with_revprop_opt
   };
   const apr_getopt_option_t options[] = {
@@ -821,6 +841,8 @@ main(int argc, const char **argv)
     {"non-interactive", 'n', 0, ""},
     {"config-dir", config_dir_opt, 1, ""},
     {"config-option",  config_inline_opt, 1, ""},
+    {"no-auth-cache",  no_auth_cache_opt, 0, ""},
+    {"version", version_opt, 0, ""},
     {NULL, 0, 0, NULL}
   };
   const char *message = NULL;
@@ -829,6 +851,7 @@ main(int argc, const char **argv)
   const char *config_dir = NULL;
   apr_array_header_t *config_options;
   svn_boolean_t non_interactive = FALSE;
+  svn_boolean_t no_auth_cache = FALSE;
   svn_revnum_t base_revision = SVN_INVALID_REVNUM;
   apr_array_header_t *action_args;
   apr_hash_t *revprops = apr_hash_make(pool);
@@ -924,6 +947,13 @@ main(int argc, const char **argv)
           if (err)
             handle_error(err, pool);
           break;
+        case no_auth_cache_opt:
+          no_auth_cache = TRUE;
+          break;
+        case version_opt:
+          SVN_INT_ERR(display_version(getopt, pool));
+          exit(EXIT_SUCCESS);
+          break;
         case 'h':
           usage(pool, EXIT_SUCCESS);
           break;
@@ -1159,7 +1189,7 @@ main(int argc, const char **argv)
 
   if ((err = execute(actions, anchor, revprops, username, password,
                      config_dir, config_options, non_interactive,
-                     base_revision, pool)))
+                     no_auth_cache, base_revision, pool)))
     handle_error(err, pool);
 
   svn_pool_destroy(pool);

Modified: subversion/branches/svn_mutex/tools/dev/benchmarks/suite1/benchmark.py
URL: http://svn.apache.org/viewvc/subversion/branches/svn_mutex/tools/dev/benchmarks/suite1/benchmark.py?rev=1182053&r1=1182052&r2=1182053&view=diff
==============================================================================
--- subversion/branches/svn_mutex/tools/dev/benchmarks/suite1/benchmark.py (original)
+++ subversion/branches/svn_mutex/tools/dev/benchmarks/suite1/benchmark.py Tue Oct 11 19:52:34 2011
@@ -164,10 +164,10 @@ class Timings:
     s = ['COMPARE %s to %s' % (othername, selfname)]
 
     if TOTAL_RUN in self.timings and TOTAL_RUN in other.timings:
-      s.append('  %s times: %5.1f seconds avg for %s' % (TOTAL_RUN,
-                                                         othertotal, othername))
-      s.append('  %s        %5.1f seconds avg for %s' % (' ' * len(TOTAL_RUN),
-                                                         selftotal, selfname))
+      s.append('  %s timings: %5.1f seconds avg for %s'
+               % (TOTAL_RUN, othertotal, othername))
+      s.append('  %s          %5.1f seconds avg for %s'
+               % (' ' * len(TOTAL_RUN), selftotal, selfname))
 
 
     s.append('      min              max              avg         operation')
@@ -201,9 +201,9 @@ class Timings:
                  name))
 
     s.extend([
-         '("1.23|+0.45"  means factor=1.23, difference in seconds = 0.45',
-         'factor < 1 or difference < 0 means \'%s\' is faster than \'%s\')'
-           % (self.name, othername)])
+      '(legend: "1.23|+0.45" means: slower by factor 1.23 and by 0.45 seconds;',
+      ' factor < 1 and difference < 0 means \'%s\' is faster than \'%s\')'
+      % (self.name, othername)])
 
     return '\n'.join(s)
 
@@ -418,7 +418,8 @@ def run(levels, spread, N):
 
       so, se = svn('--version')
       if not so:
-        print "Can't find svn."
+        ### options comes from the global namespace; it should be passed
+        print "Can't find svn at", options.svn
         exit(1)
       version = ', '.join([s.strip() for s in so.split('\n')[:2]])
 
@@ -565,6 +566,9 @@ def cmd_run(timings_path, levels, spread
   print '\n\nHi, going to run a Subversion benchmark series of %d runs...' % N
 
   ### UGH! should pass to run()
+  ### neels: Today I contemplated doing that, but at the end of the day
+  ###        it merely blows up the code without much benefit. If this
+  ###        ever becomes part of an imported python package, call again.
   global timings
 
   if os.path.isfile(timings_path):

Modified: subversion/branches/svn_mutex/tools/dev/benchmarks/suite1/cronjob
URL: http://svn.apache.org/viewvc/subversion/branches/svn_mutex/tools/dev/benchmarks/suite1/cronjob?rev=1182053&r1=1182052&r2=1182053&view=diff
==============================================================================
--- subversion/branches/svn_mutex/tools/dev/benchmarks/suite1/cronjob (original)
+++ subversion/branches/svn_mutex/tools/dev/benchmarks/suite1/cronjob Tue Oct 11 19:52:34 2011
@@ -1,4 +1,24 @@
 #!/bin/bash
+#
+# ====================================================================
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+# ====================================================================
+#
 # This is the cronjob as run on our ASF box aka svn-qavm.
 # It uses neels' mad bash script magic called 'pat' to update and
 # build the latest trunk, invokes a benchmark and sends as mail.

Modified: subversion/branches/svn_mutex/tools/dev/benchmarks/suite1/run
URL: http://svn.apache.org/viewvc/subversion/branches/svn_mutex/tools/dev/benchmarks/suite1/run?rev=1182053&r1=1182052&r2=1182053&view=diff
==============================================================================
--- subversion/branches/svn_mutex/tools/dev/benchmarks/suite1/run (original)
+++ subversion/branches/svn_mutex/tools/dev/benchmarks/suite1/run Tue Oct 11 19:52:34 2011
@@ -19,11 +19,15 @@
 
 # Where are the svn binaries you want to benchmark?
 if [ "$USER" = "neels" ]; then
-  SVN_1_6="$HOME/pat/stable/prefix/bin/svn"
-  SVN_trunk="$HOME/pat/trunk/prefix/bin/svn"
+  SVN_A_NAME="1.7.x"
+  SVN_A="$HOME/pat/bench/prefix/bin/svn"
+  SVN_B_NAME="trunk"
+  SVN_B="$HOME/pat/trunk/prefix/bin/svn"
 else
-  SVN_1_6="$HOME/src/svn-1.6.x/subversion/svn/svn"
-  SVN_trunk="$HOME/src/svn/subversion/svn/svn"
+  SVN_A_NAME="1.6"
+  SVN_A="$HOME/src/svn-1.6.x/subversion/svn/svn"
+  SVN_B_NAME="trunk"
+  SVN_B="$HOME/src/svn/subversion/svn/svn"
 fi
 
 benchmark="$PWD/benchmark.py"
@@ -44,9 +48,9 @@ batch(){
   echo "---------------------------------------------------------------------"
   echo
   echo "Results for dir levels: $levels  spread: $spread"
-  "$benchmark" "--svn=${SVN_1_6}" run ${pre}1.6 $levels $spread $N >/dev/null
-  "$benchmark" "--svn=${SVN_trunk}" run ${pre}trunk $levels $spread $N > /dev/null
-  "$benchmark" compare ${pre}1.6 ${pre}trunk
+  "$benchmark" "--svn=$SVN_A" run "${pre}$SVN_A_NAME" $levels $spread $N >/dev/null
+  "$benchmark" "--svn=$SVN_B" run "${pre}$SVN_B_NAME" $levels $spread $N >/dev/null
+  "$benchmark" compare "${pre}$SVN_A_NAME" "${pre}$SVN_B_NAME"
 }
 
 N=6
@@ -80,11 +84,11 @@ batch $cl $cs $N
 echo ""
 echo =========================================================================
 echo ""
-"$benchmark" combine total_1.6 *x*_1.6 >/dev/null
-"$benchmark" combine total_trunk *x*_trunk >/dev/null
+"$benchmark" combine "total_$SVN_A_NAME" *x*"_$SVN_A_NAME" >/dev/null
+"$benchmark" combine "total_$SVN_B_NAME" *x*"_$SVN_B_NAME" >/dev/null
 
 echo "comparing averaged totals..."
-"$benchmark" compare total_1.6 total_trunk
+"$benchmark" compare "total_$SVN_A_NAME" "total_$SVN_B_NAME"
 
 echo ""
 echo "Had started at $started,"

Modified: subversion/branches/svn_mutex/tools/dev/unix-build/Makefile.svn
URL: http://svn.apache.org/viewvc/subversion/branches/svn_mutex/tools/dev/unix-build/Makefile.svn?rev=1182053&r1=1182052&r2=1182053&view=diff
==============================================================================
--- subversion/branches/svn_mutex/tools/dev/unix-build/Makefile.svn (original)
+++ subversion/branches/svn_mutex/tools/dev/unix-build/Makefile.svn Tue Oct 11 19:52:34 2011
@@ -29,7 +29,6 @@
 #   | the bot's health after making changes to this file.          |
 #   |______________________________________________________________|
 
-ENABLE_PYTHON_BINDINGS ?= yes
 ENABLE_PERL_BINDINGS ?= yes
 ENABLE_JAVA_BINDINGS ?= no # they don't build with thread-less APR...
 USE_APR_ICONV ?= no # set to yes to use APR iconv instead of GNU iconv
@@ -67,12 +66,14 @@ GNU_ICONV_VER	= 1.13.1
 APR_UTIL_VER	= 1.3.12
 HTTPD_VER	= 2.2.19
 NEON_VER	= 0.29.6
-SERF_VER	= 0.7.x
+SERF_VER	= 1.0.0
 SERF_OLD_VER	= 0.3.1
 CYRUS_SASL_VER	= 2.1.23
 SQLITE_VER	= 3070603
 LIBMAGIC_VER	= 5.07
 RUBY_VER	= 1.8.7-p334
+BZ2_VER	= 1.0.6
+PYTHON_VER	= 2.7.2
 
 BDB_DIST	= db-$(BDB_VER).tar.gz
 APR_ICONV_DIST	= apr-iconv-$(APR_ICONV_VER).tar.gz
@@ -83,6 +84,8 @@ CYRUS_SASL_DIST	= cyrus-sasl-$(CYRUS_SAS
 HTTPD_DIST	= httpd-$(HTTPD_VER).tar.bz2
 LIBMAGIC_DIST	= file-$(LIBMAGIC_VER).tar.gz
 RUBY_DIST	= ruby-$(RUBY_VER).tar.gz
+BZ2_DIST	= bzip2-$(BZ2_VER).tar.gz
+PYTHON_DIST	= Python-$(PYTHON_VER).tgz
 
 DISTFILES	= $(DISTDIR)/$(NEON_DIST) \
 		$(DISTDIR)/$(SERF_DIST) \
@@ -92,7 +95,9 @@ DISTFILES	= $(DISTDIR)/$(NEON_DIST) \
 		$(DISTDIR)/$(GNU_ICONV_DIST) \
 		$(DISTDIR)/$(CYRUS_SASL_DIST) \
 		$(DISTDIR)/$(LIBMAGIC_DIST) \
-		$(DISTDIR)/$(RUBY_DIST)
+		$(DISTDIR)/$(RUBY_DIST) \
+		$(DISTDIR)/$(BZ2_DIST) \
+		$(DISTDIR)/$(PYTHON_DIST)
 
 FETCH_CMD	= wget -c
 
@@ -105,12 +110,14 @@ APR_UTIL_URL	= http://svn.apache.org/rep
 HTTPD_URL	= http://archive.apache.org/dist/httpd/$(HTTPD_DIST)
 NEON_URL	= http://webdav.org/neon/$(NEON_DIST)
 #SERF_URL	= http://serf.googlecode.com/files/$(SERF_DIST)
-SERF_URL	= http://serf.googlecode.com/svn/branches/$(SERF_VER)
+SERF_URL	= http://serf.googlecode.com/svn/tags/$(SERF_VER)
 SERF_OLD_URL	= http://serf.googlecode.com/svn/tags/$(SERF_OLD_VER)
 SQLITE_URL	= http://www.sqlite.org/$(SQLITE_DIST)
 CYRUS_SASL_URL	= ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/$(CYRUS_SASL_DIST)
 LIBMAGIC_URL	= ftp://ftp.astron.com/pub/file/$(LIBMAGIC_DIST)
 RUBY_URL	= http://ftp.ruby-lang.org/pub/ruby/1.8/$(RUBY_DIST)
+BZ2_URL		= http://bzip.org/$(BZ2_VER)/$(BZ2_DIST)
+PYTHON_URL	= http://python.org/ftp/python/2.7.2/$(PYTHON_DIST)
 
 BDB_SRCDIR	= $(SRCDIR)/db-$(BDB_VER)
 APR_SRCDIR	= $(SRCDIR)/apr-$(APR_VER)
@@ -125,6 +132,8 @@ SQLITE_SRCDIR	= $(SRCDIR)/sqlite-autocon
 CYRUS_SASL_SRCDIR	= $(SRCDIR)/cyrus-sasl-$(CYRUS_SASL_VER)
 LIBMAGIC_SRCDIR	= $(SRCDIR)/file-$(LIBMAGIC_VER)
 RUBY_SRCDIR	= $(SRCDIR)/ruby-$(RUBY_VER)
+BZ2_SRCDIR	= $(SRCDIR)/bzip2-$(BZ2_VER)
+PYTHON_SRCDIR	= $(SRCDIR)/Python-$(PYTHON_VER)
 SVN_SRCDIR	= $(SVN_WC)
 
 BDB_OBJDIR	= $(OBJDIR)/db-$(BDB_VER)
@@ -140,6 +149,8 @@ SQLITE_OBJDIR	= $(OBJDIR)/sqlite-$(SQLIT
 CYRUS_SASL_OBJDIR	= $(OBJDIR)/cyrus-sasl-$(CYRUS_SASL_VER)
 LIBMAGIC_OBJDIR	= $(OBJDIR)/file-$(LIBMAGIC_VER)
 RUBY_OBJDIR	= $(OBJDIR)/ruby-$(RUBY_VER)
+BZ2_OBJDIR	= $(OBJDIR)/bzip2-$(BZ2_VER)
+PYTHON_OBJDIR	= $(OBJDIR)/python-$(PYTHON_VER)
 SVN_OBJDIR	= $(OBJDIR)/$(SVN_REL_WC)
 
 # Tweak this for out-of-tree builds. Note that running individual
@@ -151,6 +162,9 @@ ifdef PROFILE
 PROFILE_CFLAGS=-pg
 endif
 
+# We need this to make sure some targets below pick up the right libraries
+LD_LIBRARY_PATH=$(PREFIX)/apr/lib:$(PREFIX)/iconv/lib:$(PREFIX)/bdb/lib:$(PREFIX)/neon/lib:$(PREFIX)/serf/lib:$(PREFIX)/sqlite/lib:$(PREFIX)/cyrus-sasl/lib:$(PREFIX)/iconv/lib:$(PREFIX)/libmagic/lib:$(PREFIX)/ruby/lib:$(PREFIX)/python/lib:$(PREFIX)/svn-$(WC)/lib
+
 #######################################################################
 # Main targets.
 #######################################################################
@@ -160,17 +174,19 @@ endif
 all: dirs-create bdb-install apr-install iconv-install apr-util-install \
 	httpd-install neon-install serf-install serf-old-install \
 	sqlite-install cyrus-sasl-install libmagic-install \
-	ruby-install svn-install svn-bindings-install
+	ruby-install bz2-install python-install \
+	svn-install svn-bindings-install
 
 # Use these to start a build from the beginning.
 reset: dirs-reset bdb-reset apr-reset iconv-reset apr-util-reset \
 	httpd-reset neon-reset serf-reset serf-old-reset sqlite-reset \
-	cyrus-sasl-reset libmagic-reset ruby-reset svn-reset
+	cyrus-sasl-reset libmagic-reset ruby-reset python-reset \
+	bz2-reset svn-reset
 
 # Use to save disk space.
 clean: bdb-clean apr-clean iconv-clean apr-util-clean httpd-clean \
 	neon-clean serf-clean serf-old-clean sqlite-clean cyrus-sasl-clean \
-	libmagic-clean ruby-clean svn-clean
+	libmagic-clean ruby-clean bz2-clean python-clean svn-clean
 
 # Nukes everything (including installed binaries!)
 # Use this to start ALL OVER AGAIN! Use with caution!
@@ -282,6 +298,10 @@ else
 THREADS_FLAG=--disable-threads
 endif
 
+ifdef POOL_DEBUG
+POOL_DEBUG_FLAG=--enable-pool-debug=all
+endif
+
 # configure apr
 $(APR_OBJDIR)/.configured: $(APR_OBJDIR)/.retrieved
 	cp $(APR_SRCDIR)/build/apr_hints.m4 \
@@ -295,7 +315,8 @@ $(APR_OBJDIR)/.configured: $(APR_OBJDIR)
 		$(APR_SRCDIR)/configure \
 		--prefix=$(PREFIX)/apr \
 		--enable-maintainer-mode \
-		$(THREADS_FLAG)
+		$(THREADS_FLAG) \
+		$(POOL_DEBUG_FLAG)
 	touch $@
 
 # compile apr
@@ -820,6 +841,12 @@ ifeq ($(UNAME),OpenBSD)
 	done
 	chmod +x $(CYRUS_SASL_SRCDIR)/configure
 endif
+	# Fixes excessive auth log spam from sasl if broken .la files exist
+	sed 's/SASL_LOG_WARN/SASL_LOG_DEBUG/' \
+		< $(CYRUS_SASL_SRCDIR)/lib/dlopen.c \
+		> $(CYRUS_SASL_SRCDIR)/lib/dlopen.c.patched
+	mv $(CYRUS_SASL_SRCDIR)/lib/dlopen.c.patched \
+		$(CYRUS_SASL_SRCDIR)/lib/dlopen.c
 	touch $@
 
 # configure cyrus-sasl
@@ -934,12 +961,121 @@ $(RUBY_OBJDIR)/.compiled: $(RUBY_OBJDIR)
 	(cd $(RUBY_OBJDIR) && make)
 	touch $@
 
-# install ruby and the test-unit gem needed to run SVN bindings tests
+# install ruby
 $(RUBY_OBJDIR)/.installed: $(RUBY_OBJDIR)/.compiled
 	(cd $(RUBY_OBJDIR) && make install)
 	touch $@
 
 #######################################################################
+# bz2
+#######################################################################
+
+bz2-retrieve:	$(BZ2_OBJDIR)/.retrieved
+bz2-compile:	$(BZ2_OBJDIR)/.compiled
+bz2-install:	$(BZ2_OBJDIR)/.installed
+bz2-reset:
+	$(foreach f, .retrieved .configured .compiled .installed, \
+		rm -f $(BZ2_OBJDIR)/$(f);)
+
+bz2-clean:
+	-(cd $(BZ2_SRCDIR) && make distclean)
+
+# fetch distfile for bz2
+$(DISTDIR)/$(BZ2_DIST):
+	cd $(DISTDIR) && $(FETCH_CMD) $(BZ2_URL)
+
+# retrieve bz2
+$(BZ2_OBJDIR)/.retrieved: $(DISTDIR)/$(BZ2_DIST)
+	[ -d $(BZ2_OBJDIR) ] || mkdir -p $(BZ2_OBJDIR)
+	tar -C $(SRCDIR) -zxf $(DISTDIR)/$(BZ2_DIST)
+	touch $@
+
+# compile bz2
+$(BZ2_OBJDIR)/.compiled: $(BZ2_OBJDIR)/.retrieved
+	(cd $(BZ2_SRCDIR) && make CFLAGS="-g $(PROFILE_CFLAGS) -fPIC")
+	touch $@
+
+# install bz2
+$(BZ2_OBJDIR)/.installed: $(BZ2_OBJDIR)/.compiled
+	(cd $(BZ2_SRCDIR) && make install PREFIX=$(PREFIX)/bz2)
+	touch $@
+
+
+#######################################################################
+# python
+#######################################################################
+
+python-retrieve:	$(PYTHON_OBJDIR)/.retrieved
+python-configure:	$(PYTHON_OBJDIR)/.configured
+python-compile:	$(PYTHON_OBJDIR)/.compiled
+python-install:	$(PYTHON_OBJDIR)/.installed
+python-reset:
+	$(foreach f, .retrieved .configured .compiled .installed, \
+		rm -f $(PYTHON_OBJDIR)/$(f);)
+
+python-clean:
+	-(cd $(PYTHON_OBJDIR) && make distclean)
+
+# fetch distfile for python
+$(DISTDIR)/$(PYTHON_DIST):
+	cd $(DISTDIR) && $(FETCH_CMD) $(PYTHON_URL)
+
+# retrieve python
+#
+$(PYTHON_OBJDIR)/.retrieved: $(DISTDIR)/$(PYTHON_DIST)
+	[ -d $(PYTHON_OBJDIR) ] || mkdir -p $(PYTHON_OBJDIR)
+	tar -C $(SRCDIR) -zxf $(DISTDIR)/$(PYTHON_DIST)
+	# Make setup.py use our own dependencies instead of system ones
+	sed -e "s#sqlite_inc_paths = \[ '/usr/include',#sqlite_inc_paths = [ '$(PREFIX)/sqlite/include',#" \
+		-e "s#'/usr/include/db4'#'$(PREFIX)/bdb/include'#" \
+		-e "s|\(add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')\)|#\1|" \
+		-e "s|\(add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')\)|#\1|" \
+		-e "s#find_library_file(lib_dirs, 'bz2'#find_library_file(['$(PREFIX)/bz2/lib'] + lib_dirs, 'bz2'#" \
+		< $(PYTHON_SRCDIR)/setup.py \
+		> $(PYTHON_SRCDIR)/setup.py.patched
+	mv $(PYTHON_SRCDIR)/setup.py.patched $(PYTHON_SRCDIR)/setup.py
+	chmod +x $(PYTHON_SRCDIR)/setup.py
+	# Fixes shared library linking on OpenBSD
+	# http://bugs.python.org/issue12560
+	# Also fix compilation error on OpenBSD 5.0 and later (undefined
+	# reference to 'lstat' -- already fixed in hg.python.org/cpython).
+	sed -e '4930s#NetBSD\*|#NetBSD*|OpenBSD*|#' \
+	 	-e 's#OpenBSD/4\.\[789\]#OpenBSD/*#' \
+		< $(PYTHON_SRCDIR)/configure \
+		> $(PYTHON_SRCDIR)/configure.patched
+	mv $(PYTHON_SRCDIR)/configure.patched $(PYTHON_SRCDIR)/configure
+	chmod +x $(PYTHON_SRCDIR)/configure
+	touch $@
+
+# configure python
+ifdef PROFILE
+PYTHON_PROFILING=--enable-profiling
+endif
+$(PYTHON_OBJDIR)/.configured: $(PYTHON_OBJDIR)/.retrieved
+	cd $(PYTHON_OBJDIR) \
+		&& env CFLAGS="-g $(PROFILE_CFLAGS)" GREP="`which grep`" \
+		CPPFLAGS="-I$(PREFIX)/bz2/include" \
+		LDFLAGS="-Wl,-rpath=$(PREFIX)/python/lib -L$(PREFIX)/bz2/lib" \
+		$(PYTHON_SRCDIR)/configure \
+		--prefix=$(PREFIX)/python \
+		--enable-shared \
+		--with-system-expat \
+		--with-dbmliborder=bdb \
+		$(PYTHON_PROFILING)
+	touch $@
+
+# compile python
+$(PYTHON_OBJDIR)/.compiled: $(PYTHON_OBJDIR)/.configured
+	(cd $(PYTHON_OBJDIR) && make)
+	touch $@
+
+# install python
+$(PYTHON_OBJDIR)/.installed: $(PYTHON_OBJDIR)/.compiled
+	(cd $(PYTHON_OBJDIR) && make install)
+	touch $@
+
+
+#######################################################################
 # svn
 #######################################################################
 
@@ -1060,9 +1196,9 @@ $(SVN_OBJDIR)/.configured: $(SVN_OBJDIR)
 	cd $(SVN_SRCDIR) && ./autogen.sh
 	cd $(svn_builddir) && \
 		env LDFLAGS="-L$(PREFIX)/neon/lib -L$(PREFIX)/apr/lib" \
-			LD_LIBRARY_PATH="$(PREFIX)/bdb/lib:$(PREFIX)/iconv/lib:$$LD_LIBRARY_PATH" \
+			LD_LIBRARY_PATH="$(LD_LIBRARY_PATH):$$LD_LIBRARY_PATH" \
 			GREP="`which grep`" \
-			PATH=$(PREFIX)/ruby/bin:$$PATH \
+			PATH=$(PREFIX)/ruby/bin:$(PREFIX)/python/bin:$$PATH \
 			$(SVN_SRCDIR)/configure \
 			--enable-maintainer-mode \
 			--with-ssl \
@@ -1095,16 +1231,27 @@ $(SVN_OBJDIR)/.installed: $(SVN_OBJDIR)/
 		&& make install
 	touch $@
 
-$(SVN_OBJDIR)/.bindings-compiled: $(SVN_OBJDIR)/.installed
-	if [ $(ENABLE_PYTHON_BINDINGS) = yes ]; then \
-		cd $(svn_builddir) \
-			&& make swig-py; \
-	fi
+# SWIG 1.x and 2.x are not compatible. If SWIG 2.x is used to generated .swg
+# files and 1.x is used to build the bindings, the Python bindings fail to
+# load with errors such as "undefined symbol 'SWIG_Python_str_AsChar'".
+# So clean any pre-generated .swg files to make sure everything is done
+# by the same version of SWIG.
+$(SVN_OBJDIR)/.pre-generated-swig-cleaned:
+	-cd $(svn_builddir) \
+		&& make extraclean-swig
+	touch $@
+
+$(SVN_OBJDIR)/.bindings-compiled: $(SVN_OBJDIR)/.installed $(SVN_OBJDIR)/.pre-generated-swig-cleaned
+	cd $(svn_builddir) \
+		&& env LD_LIBRARY_PATH=$(LD_LIBRARY_PATH) \
+			make swig-py
 	cd $(svn_builddir) && \
-		PATH=$(PREFIX)/ruby/bin:$$PATH make swig-rb
+		env PATH=$(PREFIX)/ruby/bin:$$PATH \
+		LD_LIBRARY_PATH=$(LD_LIBRARY_PATH) make swig-rb
 	if [ $(ENABLE_PERL_BINDINGS) = yes ]; then \
 		cd $(svn_builddir) \
-			&& make swig-pl; \
+			&& env LD_LIBRARY_PATH=$(LD_LIBRARY_PATH) \
+				make swig-pl; \
 	fi
 	if [ $(ENABLE_JAVA_BINDINGS) = yes ]; then \
 		cd $(svn_builddir) \
@@ -1113,12 +1260,12 @@ $(SVN_OBJDIR)/.bindings-compiled: $(SVN_
 	touch $@
 
 $(SVN_OBJDIR)/.bindings-installed: $(SVN_OBJDIR)/.bindings-compiled
-	if [ $(ENABLE_PYTHON_BINDINGS) = yes ]; then \
-		cd $(svn_builddir) \
-		  && make install-swig-py; \
-	fi
+	cd $(svn_builddir) \
+	  && env LD_LIBRARY_PATH=$(LD_LIBRARY_PATH) \
+		make install-swig-py
 	cd $(svn_builddir) && \
-		PATH=$(PREFIX)/ruby/bin:$$PATH make install-swig-rb
+		env PATH=$(PREFIX)/ruby/bin:$$PATH \
+		LD_LIBRARY_PATH=$(LD_LIBRARY_PATH) make install-swig-rb
 	if [ $(ENABLE_PERL_BINDINGS) = yes ]; then \
 		cd $(svn_builddir) \
 	    && make install-swig-pl-lib; \
@@ -1203,9 +1350,6 @@ endif
 	echo >>$@.tmp 'RedirectMatch ^/svn-test-work/repositories/REDIRECT-TEMP-(.*)$$ /svn-test-work/repositories/$$1'
 	mv -f $@.tmp $@
 
-# We need this to make sure some targets below pick up the right libraries
-LD_LIBRARY_PATH=$(PREFIX)/apr/lib:$(PREFIX)/iconv/lib:$(PREFIX)/bdb/lib:$(PREFIX)/neon/lib:$(PREFIX)/serf/lib:$(PREFIX)/sqlite/lib:$(PREFIX)/cyrus-sasl/lib:$(PREFIX)/iconv/lib:$(PREFIX)/libmagic/lib:$(PREFIX)/ruby/lib:$(PREFIX)/svn-$(WC)/lib
-
 .PHONY: libpath
 libpath:
 	@echo export LD_LIBRARY_PATH=$(LD_LIBRARY_PATH):$$LD_LIBRARY_PATH
@@ -1259,7 +1403,8 @@ define do_check
 -cd $(svn_builddir) && for fs in fsfs bdb; do \
     echo "Begin test: $(subst svn-check-,,$@) x $$fs"; \
     test -d "$(RAMDISK)/tmp" && export TMPDIR="$(RAMDISK)/tmp"; \
-    make check PARALLEL=$(PARALLEL) CLEANUP=$(CLEANUP) $1 FS_TYPE=$$fs; \
+    env LD_LIBRARY_PATH=$(LD_LIBRARY_PATH) \
+        make check PARALLEL=$(PARALLEL) CLEANUP=$(CLEANUP) $1 FS_TYPE=$$fs; \
     for log in tests.log fails.log; do \
         test -f $$log && mv -f $$log $$log.$@-$$fs; \
     done; \
@@ -1313,22 +1458,19 @@ svn-check-swig-pl:
 	fi
 
 svn-check-swig-py:
-	-if [ $(ENABLE_PYTHON_BINDINGS) = yes ]; then \
-		(cd $(svn_builddir) && \
-			env LD_LIBRARY_PATH=$(LD_LIBRARY_PATH) \
-			make check-swig-py 2>&1) | \
-				tee $(svn_builddir)/tests.log.bindings.py; \
-	fi
+	-(cd $(svn_builddir) && \
+		env LD_LIBRARY_PATH=$(LD_LIBRARY_PATH) \
+		make check-swig-py 2>&1) | \
+			tee $(svn_builddir)/tests.log.bindings.py
 
 # We add the svn prefix to PATH here because the ruby tests
 # attempt to start an svnserve binary found in PATH.
 svn-check-swig-rb:
-	(cd $(svn_builddir)/subversion/bindings/swig/ruby/test && \
+	(cd $(svn_builddir) && \
 		env RUBYLIB=$(RUBYLIB) \
 		LD_LIBRARY_PATH=$(LD_LIBRARY_PATH) \
 		PATH=$(SVN_PREFIX)/bin:$$PATH \
-		$(PREFIX)/ruby/bin/ruby run-test.rb \
-			--verbose=verbose 2>&1) | \
+			make check-swig-rb 2>&1) | \
 			tee $(svn_builddir)/tests.log.bindings.rb
 
 svn-check-javahl:
@@ -1372,7 +1514,7 @@ endif
 	@echo "sqlite:     $(SQLITE_VER)"
 	@echo "openssl:    `openssl version | cut -d' ' -f2`"
 	@echo "swig:       `swig -version | grep Version | cut -d' ' -f3`"
-	@echo "python:     `python --version 2>&1 | cut -d' ' -f2`"
+	@echo "python:     $(PYTHON_VER)"
 	@echo "perl:       `eval \`perl -V:version\`; echo $$version`"
 	@echo "ruby:       $(RUBY_VER)"
 ifeq ($(ENABLE_JAVA_BINDINGS),yes)
@@ -1380,3 +1522,9 @@ ifeq ($(ENABLE_JAVA_BINDINGS),yes)
 endif
 	@echo ""
 	@echo "Signatures:"
+	@echo
+	@echo "subversion-$(TAG).tar.gz"
+	@echo "`cat subversion-$(TAG).tar.gz.asc`" 
+	@echo
+	@echo "subversion-$(TAG).tar.bz2"
+	@echo "`cat subversion-$(TAG).tar.bz2.asc`" 

Modified: subversion/branches/svn_mutex/tools/dev/wc-format.py
URL: http://svn.apache.org/viewvc/subversion/branches/svn_mutex/tools/dev/wc-format.py?rev=1182053&r1=1182052&r2=1182053&view=diff
==============================================================================
--- subversion/branches/svn_mutex/tools/dev/wc-format.py (original)
+++ subversion/branches/svn_mutex/tools/dev/wc-format.py Tue Oct 11 19:52:34 2011
@@ -51,7 +51,7 @@ def print_format(wc_path):
   #   1.4.x: format 8
   #   1.5.x: format 9
   #   1.6.x: format 10
-  #   1.7.x: format XXX
+  #   1.7.x: format 29
   formatno = get_format(wc_path)
   print '%s: %s' % (wc_path, formatno)
 

Modified: subversion/branches/svn_mutex/tools/dev/which-error.py
URL: http://svn.apache.org/viewvc/subversion/branches/svn_mutex/tools/dev/which-error.py?rev=1182053&r1=1182052&r2=1182053&view=diff
==============================================================================
--- subversion/branches/svn_mutex/tools/dev/which-error.py (original)
+++ subversion/branches/svn_mutex/tools/dev/which-error.py Tue Oct 11 19:52:34 2011
@@ -113,6 +113,7 @@ if __name__ == "__main__":
   else:
     for code in sys.argv[1:]:
       try:
+        code = code.lstrip('EW')
         codes.append(int(code))
       except ValueError:
         usage_and_exit()

Modified: subversion/branches/svn_mutex/tools/dev/windows-build/README
URL: http://svn.apache.org/viewvc/subversion/branches/svn_mutex/tools/dev/windows-build/README?rev=1182053&r1=1182052&r2=1182053&view=diff
==============================================================================
--- subversion/branches/svn_mutex/tools/dev/windows-build/README (original)
+++ subversion/branches/svn_mutex/tools/dev/windows-build/README Tue Oct 11 19:52:34 2011
@@ -1,5 +1,9 @@
 Makefiles for automating the Windows build.
 
+Should work either either nmake or GNU make.
+
+Doesn't require Cygwin.
+
 * TODO:
   - document: how to use
   - known bugs/shortcomings
@@ -11,3 +15,8 @@ Makefiles for automating the Windows bui
 
 See: http://svn.haxx.se/users/archive-2009-07/0764.shtml
 (Message-Id: <al...@daniel2.local>)
+
+
+'cp' and friends can be obtained from gnuwin32.sf.net, unxutils.sf.net,
+cygwin, etc.  Or tweak the makefile to use cp.pl or the built-in 'copy'
+command instead.:

Modified: subversion/branches/svn_mutex/tools/dev/windows-build/document-version.pl
URL: http://svn.apache.org/viewvc/subversion/branches/svn_mutex/tools/dev/windows-build/document-version.pl?rev=1182053&r1=1182052&r2=1182053&view=diff
==============================================================================
--- subversion/branches/svn_mutex/tools/dev/windows-build/document-version.pl (original)
+++ subversion/branches/svn_mutex/tools/dev/windows-build/document-version.pl Tue Oct 11 19:52:34 2011
@@ -1,48 +1,48 @@
-#!/usr/local/bin/perl -w
-
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-use strict;
-
-use Tie::File;
-#use Cwd 'getcwd';
-
-die "Bad args '@ARGV'" unless (@ARGV >= 3  && @ARGV <= 4);
-
-my ($filename, $TARGETDIR, $SVNDIR, $BUILDDESCR) = (@ARGV, "");
-
-my (@file, $version, $lines);
-
-tie (@file, 'Tie::File', $filename)
-	or die $!;
-
-$version  =  `svnversion -n` or die;
-$version  =~ tr/M//d;
-$version .=  '-' . $BUILDDESCR if $BUILDDESCR;
-
-/^#define SVN_VER_TAG/ and s/(?<=dev build).*(?=\)"$)/-r$version/
-	for @file;
-/^#define SVN_VER_NUMTAG/ and s/(?<=-dev).*(?="$)/-r$version/
-	for @file;
-
-mkdir $TARGETDIR unless -d $TARGETDIR;
-
-chdir $SVNDIR;
-system "svn diff -x-p > $TARGETDIR\\$version.diff"
-	and die $!;
-
+#!/usr/local/bin/perl -w
+
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+use strict;
+
+use Tie::File;
+#use Cwd 'getcwd';
+
+die "Bad args '@ARGV'" unless (@ARGV >= 3  && @ARGV <= 4);
+
+my ($filename, $TARGETDIR, $SVNDIR, $BUILDDESCR) = (@ARGV, "");
+
+my (@file, $version, $lines);
+
+tie (@file, 'Tie::File', $filename)
+	or die $!;
+
+$version  =  `svnversion -n` or die;
+$version  =~ tr/M//d;
+$version .=  '-' . $BUILDDESCR if $BUILDDESCR;
+
+/^#define SVN_VER_TAG/ and s/(?<=dev build).*(?=\)"$)/-r$version/
+	for @file;
+/^#define SVN_VER_NUMTAG/ and s/(?<=-dev).*(?="$)/-r$version/
+	for @file;
+
+mkdir $TARGETDIR unless -d $TARGETDIR;
+
+chdir $SVNDIR;
+system "svn diff -x-p > $TARGETDIR\\$version.diff"
+	and die $!;
+

Propchange: subversion/branches/svn_mutex/tools/dev/windows-build/document-version.pl
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: subversion/branches/svn_mutex/tools/dist/backport.pl
URL: http://svn.apache.org/viewvc/subversion/branches/svn_mutex/tools/dist/backport.pl?rev=1182053&r1=1182052&r2=1182053&view=diff
==============================================================================
--- subversion/branches/svn_mutex/tools/dist/backport.pl (original)
+++ subversion/branches/svn_mutex/tools/dist/backport.pl Tue Oct 11 19:52:34 2011
@@ -28,6 +28,7 @@ my $SVN = $ENV{SVN} || 'svn'; # passed u
 my $VIM = 'vim';
 my $STATUS = './STATUS';
 my $BRANCHES = '^/subversion/branches';
+my $WET_RUN = qw[false true][1]; # don't commit
 
 sub usage {
   my $basename = $0;
@@ -61,27 +62,33 @@ sub merge {
   my %entry = @_;
 
   my ($logmsg_fh, $logmsg_filename) = tempfile();
-  my $mergeargs;
+  my ($mergeargs, $pattern);
 
   my $backupfile = "backport_pl.$$.tmp";
 
   if ($entry{branch}) {
+    # NOTE: This doesn't escape the branch into the pattern.
+    $pattern = printf '^ [*] %s branch\|Branch:\n *%s', $entry{branch}, $entry{branch};
     $mergeargs = "--reintegrate $BRANCHES/$entry{branch}";
-    print $logmsg_fh "Reintergrate the $BRANCHES/$entry{branch} branch:";
+    print $logmsg_fh "Reintergrate the $entry{header}:";
     print $logmsg_fh "";
-  } else {
+  } elsif (@{$entry{revisions}}) {
+    $pattern = 'r' . $entry{revisions}->[0];
     $mergeargs = join " ", (map { "-c$_" } @{$entry{revisions}}), '^/subversion/trunk';
     if (@{$entry{revisions}} > 1) {
-      print $logmsg_fh "Merge the r$entry{revisions}->[0] group from trunk:";
+      print $logmsg_fh "Merge the $entry{header} from trunk:";
       print $logmsg_fh "";
     } else {
       print $logmsg_fh "Merge r$entry{revisions}->[0] from trunk:";
       print $logmsg_fh "";
     }
+  } else {
+    die "Don't know how to call $entry{header}";
   }
   print $logmsg_fh $_ for @{$entry{entry}};
   close $logmsg_fh or die "Can't close $logmsg_filename: $!";
 
+  $pattern = '\V'.$pattern;
   my $script = <<"EOF";
 #!/bin/sh
 set -e
@@ -89,14 +96,24 @@ $SVN diff > $backupfile
 $SVN revert -R .
 $SVN up
 $SVN merge $mergeargs
-$VIM -e -s -n -N -i NONE -u NONE -c '/^ [*] r$entry{revisions}->[0]/normal! dap' -c wq $STATUS
-$SVN commit -F $logmsg_filename
+$VIM -e -s -n -N -i NONE -u NONE -c '/^ [*] $pattern/normal! dap' -c wq $STATUS
+if $WET_RUN; then
+  $SVN commit -F $logmsg_filename
+else
+  echo "Committing:"
+  $SVN status -q
+  cat $logmsg_filename
+fi
 EOF
 
   $script .= <<"EOF" if $entry{branch};
 reinteg_rev=\`$SVN info $STATUS | sed -ne 's/Last Changed Rev: //p'\`
-$SVN rm $BRANCHES/$entry{branch}\
-        -m "Remove the '$entry{branch}' branch, reintegrated in r\$reinteg_rev."
+if $WET_RUN; then
+  $SVN rm $BRANCHES/$entry{branch}\
+          -m "Remove the '$entry{branch}' branch, reintegrated in r\$reinteg_rev."
+else
+  echo "Removing reintegrated '$entry{branch}' branch"
+fi
 EOF
 
   open SHELL, '|-', qw#/bin/sh -x# or die $!;
@@ -107,6 +124,14 @@ EOF
   unlink $logmsg_filename unless $? or $!;
 }
 
+sub sanitize_branch {
+  local $_ = shift;
+  s#.*/##;
+  s/^\s*//;
+  s/\s*$//;
+  return $_;
+}
+
 # TODO: may need to parse other headers too?
 sub parse_entry {
   my @lines = @_;
@@ -118,6 +143,7 @@ sub parse_entry {
   s/^   // for @_;
 
   # revisions
+  $branch = sanitize_branch $1 if $_[0] =~ /^(\S*) branch$/;
   while ($_[0] =~ /^r/) {
     while ($_[0] =~ s/^r(\d+)(?:,\s*)?//) {
       push @revisions, $1;
@@ -126,25 +152,29 @@ sub parse_entry {
   }
 
   # summary
-  push @logsummary, shift until $_[0] =~ /^\w+:/;
+  push @logsummary, shift until $_[0] =~ /^\s*\w+:/ or not defined $_[0];
 
   # votes
-  unshift @votes, pop until $_[-1] =~ /^Votes:/;
+  unshift @votes, pop until $_[-1] =~ /^\s*Votes:/ or not defined $_[-1];
   pop;
 
   # branch
   while (@_) {
-    shift and next unless $_[0] =~ s/^Branch:\s*//;
-    $branch = (shift || shift || die "Branch header found without value");
-    $branch =~ s#.*/##;
-    $branch =~ s/^\s*//;
-    $branch =~ s/\s*$//;
+    shift and next unless $_[0] =~ s/^\s*Branch:\s*//;
+    $branch = sanitize_branch (shift || shift || die "Branch header found without value");
   }
 
+  # Compute a header.
+  my $header;
+  $header = "r$revisions[0] group" if @revisions;
+  $header = "$branch branch" if $branch;
+  warn "No header for [@lines]" unless $header;
+
   return (
     revisions => [@revisions],
     logsummary => [@logsummary],
     branch => $branch,
+    header => $header,
     votes => [@votes],
     entry => [@lines],
   );
@@ -154,7 +184,7 @@ sub handle_entry {
   my %entry = parse_entry @_;
 
   print "";
-  print "\n>>> The r$entry{revisions}->[0] group:";
+  print "\n>>> The $entry{header}:";
   print join ", ", map { "r$_" } @{$entry{revisions}};
   print "$BRANCHES/$entry{branch}" if $entry{branch};
   print "";

Propchange: subversion/branches/svn_mutex/tools/dist/backport.pl
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: subversion/branches/svn_mutex/tools/dist/collect_sigs.py
URL: http://svn.apache.org/viewvc/subversion/branches/svn_mutex/tools/dist/collect_sigs.py?rev=1182053&r1=1182052&r2=1182053&view=diff
==============================================================================
--- subversion/branches/svn_mutex/tools/dist/collect_sigs.py (original)
+++ subversion/branches/svn_mutex/tools/dist/collect_sigs.py Tue Oct 11 19:52:34 2011
@@ -75,10 +75,12 @@ def generate_asc_files(target_dir='.'):
 
   db = sqlite3.connect(os.path.join(target_dir, 'sigs.db'))
   curs = db.cursor()
-  curs.execute('SELECT filename, signature FROM signatures;')
+  like_filename = 'subversion-%s.%%' % config.version
+  curs.execute('''SELECT filename, signature FROM signatures
+                  WHERE filename LIKE ?''', (like_filename, ) )
   for filename, signature in curs:
     fd = _open(filename)
-    fd.write(signature + "\n")
+    fd.write(signature)
 
   for fd in fds.values():
     fd.flush()
@@ -181,8 +183,11 @@ def list_signatures():
 
   lines = ""
   curs = db.cursor()
+  like_filename = 'subversion-%s.%%' % config.version
   curs.execute('''SELECT filename, COUNT(*) FROM signatures
-                  GROUP BY filename ORDER BY filename''')
+                  WHERE filename LIKE ?
+                  GROUP BY filename ORDER BY filename''',
+               (like_filename, ) )
   for filename, count in curs:
     lines += '<a href="%s/%s.asc">%s.asc</a>: %d signature%s<br/>\n' \
              % (os.getenv('SCRIPT_NAME'), filename, filename,

Modified: subversion/branches/svn_mutex/tools/dist/dist.sh
URL: http://svn.apache.org/viewvc/subversion/branches/svn_mutex/tools/dist/dist.sh?rev=1182053&r1=1182052&r2=1182053&view=diff
==============================================================================
--- subversion/branches/svn_mutex/tools/dist/dist.sh (original)
+++ subversion/branches/svn_mutex/tools/dist/dist.sh Tue Oct 11 19:52:34 2011
@@ -268,19 +268,19 @@ vsn_file="$DISTPATH/subversion/include/s
 
 if [ "$VERSION" != "trunk" ]; then
   sed \
-   -e "/#define *SVN_VER_MAJOR/s/[0-9]\+/$ver_major/" \
-   -e "/#define *SVN_VER_MINOR/s/[0-9]\+/$ver_minor/" \
-   -e "/#define *SVN_VER_PATCH/s/[0-9]\+/$ver_patch/" \
+   -e "/#define *SVN_VER_MAJOR/s/[0-9]\\+/$ver_major/" \
+   -e "/#define *SVN_VER_MINOR/s/[0-9]\\+/$ver_minor/" \
+   -e "/#define *SVN_VER_PATCH/s/[0-9]\\+/$ver_patch/" \
    -e "/#define *SVN_VER_TAG/s/\".*\"/\" ($VER_TAG)\"/" \
    -e "/#define *SVN_VER_NUMTAG/s/\".*\"/\"$VER_NUMTAG\"/" \
-   -e "/#define *SVN_VER_REVISION/s/[0-9]\+/$REVISION/" \
+   -e "/#define *SVN_VER_REVISION/s/[0-9]\\+/$REVISION/" \
     < "$vsn_file" > "$vsn_file.tmp"
 else
   # Don't munge the version number if we are creating a nightly trunk tarball
   sed \
    -e "/#define *SVN_VER_TAG/s/\".*\"/\" ($VER_TAG)\"/" \
    -e "/#define *SVN_VER_NUMTAG/s/\".*\"/\"$VER_NUMTAG\"/" \
-   -e "/#define *SVN_VER_REVISION/s/[0-9]\+/$REVISION/" \
+   -e "/#define *SVN_VER_REVISION/s/[0-9]\\+/$REVISION/" \
     < "$vsn_file" > "$vsn_file.tmp"
 fi
 

Modified: subversion/branches/svn_mutex/tools/dist/nightly.sh
URL: http://svn.apache.org/viewvc/subversion/branches/svn_mutex/tools/dist/nightly.sh?rev=1182053&r1=1182052&r2=1182053&view=diff
==============================================================================
--- subversion/branches/svn_mutex/tools/dist/nightly.sh (original)
+++ subversion/branches/svn_mutex/tools/dist/nightly.sh Tue Oct 11 19:52:34 2011
@@ -76,7 +76,7 @@ echo '-------------------moving results-
     --target $target
 if [ ! -d "$target/dist" ]; then mkdir "$target/dist"; fi
 if [ -d "$target/dist/r$head" ]; then rm -r "$target/dist/r$head"; fi
-mv $target/deploy $target/dist/r$head
+mv roll/deploy $target/dist/r$head
 
 # Some static links for the most recent artifacts.
 ln -sf "r$head" "$target/dist/current"

Modified: subversion/branches/svn_mutex/tools/dist/rat-excludes
URL: http://svn.apache.org/viewvc/subversion/branches/svn_mutex/tools/dist/rat-excludes?rev=1182053&r1=1182052&r2=1182053&view=diff
==============================================================================
--- subversion/branches/svn_mutex/tools/dist/rat-excludes (original)
+++ subversion/branches/svn_mutex/tools/dist/rat-excludes Tue Oct 11 19:52:34 2011
@@ -15,6 +15,7 @@ doc/doxygen.conf
 notes/**
 packages/
 subversion/tests/cmdline/getopt_tests_data/*
+subversion/tests/cmdline/diff_tests_data/*
 subversion/bindings/swig/NOTES
 subversion/libsvn_fs_base/notes/TODO
 subversion/libsvn_fs_base/notes/fs-history
@@ -31,8 +32,11 @@ subversion/bindings/ctypes-python/csvn/e
 subversion/tests/cmdline/svntest/err.py
 tools/buildbot/master/public_html/buildbot.css
 tools/dist/rat-excludes
+tools/dist/_gnupg.py
+tools/dist/templates/*.ezt
 tools/dev/iz/defect.dem
 tools/dev/iz/ff2csv.command
+tools/dev/benchmarks/suite1/crontab.entry
 tools/hook-scripts/mailer/tests/mailer-t1.output
 **/*.dump
 **/*.icns