Modified: 
subversion/branches/ev2-export/subversion/tests/libsvn_wc/op-depth-test.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/tests/libsvn_wc/op-depth-test.c?rev=1308894&r1=1308893&r2=1308894&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/tests/libsvn_wc/op-depth-test.c 
(original)
+++ subversion/branches/ev2-export/subversion/tests/libsvn_wc/op-depth-test.c 
Tue Apr  3 13:32:48 2012
@@ -328,7 +328,7 @@ typedef struct nodes_row_t {
 
 /* Macro for filling in the REPO_* fields of a non-base NODES_ROW_T
  * that has no copy-from info. */
-#define NO_COPY_FROM SVN_INVALID_REVNUM, NULL
+#define NO_COPY_FROM SVN_INVALID_REVNUM, NULL, FALSE
 #define MOVED_HERE FALSE, NULL, TRUE
 
 /* Return a human-readable string representing ROW. */
@@ -342,12 +342,12 @@ print_row(const nodes_row_t *row,
     return "(null)";
 
   if (row->moved_to)
-    moved_to_str = apr_psprintf(result_pool, ", to %s", row->moved_to);
+    moved_to_str = apr_psprintf(result_pool, ", moved-to %s", row->moved_to);
   else
     moved_to_str = "";
 
   if (row->moved_here)
-    moved_here_str = ", here";
+    moved_here_str = ", moved-here";
   else
     moved_here_str = "";
 
@@ -362,8 +362,9 @@ print_row(const nodes_row_t *row,
                         moved_here_str, moved_to_str,
                         file_external_str);
   else
-    return apr_psprintf(result_pool, "%d, %s, %s, from ^/%s@%d%s%s%s",
+    return apr_psprintf(result_pool, "%d, %s, %s, %s ^/%s@%d%s%s%s",
                         row->op_depth, row->local_relpath, row->presence,
+                        row->op_depth == 0 ? "base" : "copyfrom",
                         row->repo_relpath, (int)row->repo_revnum,
                         moved_here_str, moved_to_str,
                         file_external_str);
@@ -1713,8 +1714,8 @@ test_wc_move(const svn_test_opts_t *opts
       { 0, "",           "normal",       1, "" },
       { 0, "A",          "normal",       1, "A" },
       { 0, "A/B",        "normal",       1, "A/B" },
-      { 0, "A/B/C",      "normal",       1, "A/B/C", FALSE, "A/B/C-move" },
-      { 3, "A/B/C",      "base-deleted", NO_COPY_FROM },
+      { 0, "A/B/C",      "normal",       1, "A/B/C"},
+      { 3, "A/B/C",      "base-deleted", NO_COPY_FROM, "A/B/C-move" },
       { 3, "A/B/C-move", "normal",       1, "A/B/C", MOVED_HERE },
       { 0 }
     };
@@ -1726,13 +1727,13 @@ test_wc_move(const svn_test_opts_t *opts
     nodes_row_t rows[] = {
       { 0, "",                "normal",       1, "" },
       { 0, "A",               "normal",       1, "A" },
-      { 0, "A/B",             "normal",       1, "A/B", FALSE, "A/B-move" },
-      { 0, "A/B/C",           "normal",       1, "A/B/C", FALSE, 
"A/B-move/C-move" },
-      { 2, "A/B",             "base-deleted", NO_COPY_FROM },
-      { 2, "A/B/C",           "base-deleted", NO_COPY_FROM },
+      { 0, "A/B",             "normal",       1, "A/B"},
+      { 0, "A/B/C",           "normal",       1, "A/B/C"},
+      { 2, "A/B",             "base-deleted", NO_COPY_FROM, "A/B-move" },
+      { 2, "A/B/C",           "base-deleted", NO_COPY_FROM},
       { 2, "A/B-move",        "normal",       1, "A/B", MOVED_HERE },
       { 2, "A/B-move/C",      "normal",       1, "A/B/C", MOVED_HERE },
-      { 3, "A/B-move/C",      "base-deleted", NO_COPY_FROM },
+      { 3, "A/B-move/C",      "base-deleted", NO_COPY_FROM, "A/B-move/C-move" 
},
       { 3, "A/B-move/C-move", "normal",       1, "A/B/C", MOVED_HERE },
       { 0 }
     };
@@ -3773,8 +3774,8 @@ nested_moves_child_first(const svn_test_
       {0, "",       "normal",       1, ""},
       {0, "A",      "normal",       1, "A"},
       {0, "A/B",    "normal",       1, "A/B"},
-      {0, "A/B/C",  "normal",       1, "A/B/C", FALSE, "A/B/C2"},
-      {3, "A/B/C",  "base-deleted", NO_COPY_FROM},
+      {0, "A/B/C",  "normal",       1, "A/B/C"},
+      {3, "A/B/C",  "base-deleted", NO_COPY_FROM, "A/B/C2"},
       {3, "A/B/C2", "normal",       1, "A/B/C", MOVED_HERE},
       {0}
     };
@@ -3785,13 +3786,13 @@ nested_moves_child_first(const svn_test_
     nodes_row_t nodes[] = {
       {0, "",        "normal",       1, ""},
       {0, "A",       "normal",       1, "A"},
-      {0, "A/B",     "normal",       1, "A/B",   FALSE, "A/B2"},
-      {0, "A/B/C",   "normal",       1, "A/B/C", FALSE, "A/B2/C2"},
-      {2, "A/B",     "base-deleted", NO_COPY_FROM},
+      {0, "A/B",     "normal",       1, "A/B"},
+      {0, "A/B/C",   "normal",       1, "A/B/C"},
+      {2, "A/B",     "base-deleted", NO_COPY_FROM, "A/B2"},
       {2, "A/B/C",   "base-deleted", NO_COPY_FROM},
       {2, "A/B2",    "normal",       1, "A/B",   MOVED_HERE},
       {2, "A/B2/C",  "normal",       1, "A/B/C", MOVED_HERE},
-      {3, "A/B2/C",  "base-deleted", NO_COPY_FROM},
+      {3, "A/B2/C",  "base-deleted", NO_COPY_FROM, "A/B2/C2"},
       {3, "A/B2/C2", "normal",       1, "A/B/C", MOVED_HERE},
       {0}
     };
@@ -3801,20 +3802,20 @@ nested_moves_child_first(const svn_test_
   {
     nodes_row_t nodes[] = {
       {0, "",        "normal",       1, ""},
-      {0, "A",       "normal",       1, "A",     FALSE, "A2"},
-      {0, "A/B",     "normal",       1, "A/B",   FALSE, "A2/B2"},
-      {0, "A/B/C",   "normal",       1, "A/B/C", FALSE, "A2/B2/C2"},
-      {1, "A",       "base-deleted", NO_COPY_FROM},
+      {0, "A",       "normal",       1, "A"},
+      {0, "A/B",     "normal",       1, "A/B"},
+      {0, "A/B/C",   "normal",       1, "A/B/C"},
+      {1, "A",       "base-deleted", NO_COPY_FROM, "A2"},
       {1, "A/B",     "base-deleted", NO_COPY_FROM},
       {1, "A/B/C",   "base-deleted", NO_COPY_FROM},
       {1, "A2",      "normal",       1, "A",     MOVED_HERE},
       {1, "A2/B",    "normal",       1, "A/B",   MOVED_HERE},
       {1, "A2/B/C",  "normal",       1, "A/B/C", MOVED_HERE},
-      {2, "A2/B",    "base-deleted", NO_COPY_FROM},
+      {2, "A2/B",    "base-deleted", NO_COPY_FROM, "A2/B2"},
       {2, "A2/B/C",  "base-deleted", NO_COPY_FROM},
       {2, "A2/B2",   "normal",       1, "A/B",   MOVED_HERE},
       {2, "A2/B2/C", "normal",       1, "A/B/C", MOVED_HERE},
-      {3, "A2/B2/C", "base-deleted", NO_COPY_FROM},
+      {3, "A2/B2/C", "base-deleted", NO_COPY_FROM, "A2/B2/C2"},
       {3, "A2/B2/C2","normal",       1, "A/B/C", MOVED_HERE},
       {0}
     };
@@ -3827,10 +3828,10 @@ nested_moves_child_first(const svn_test_
   {
     nodes_row_t nodes[] = {
       {0, "",        "normal",       1, ""},
-      {0, "A",       "normal",       1, "A",     FALSE, "A2"},
+      {0, "A",       "normal",       1, "A"},
       {0, "A/B",     "normal",       1, "A/B"},
       {0, "A/B/C",   "normal",       1, "A/B/C"},
-      {1, "A",       "base-deleted", NO_COPY_FROM},
+      {1, "A",       "base-deleted", NO_COPY_FROM, "A2"},
       {1, "A/B",     "base-deleted", NO_COPY_FROM},
       {1, "A/B/C",   "base-deleted", NO_COPY_FROM},
       {1, "A2",      "normal",       1, "A",     MOVED_HERE},
@@ -3871,10 +3872,10 @@ nested_moves_child_last(const svn_test_o
   {
     nodes_row_t nodes[] = {
       {0, "",        "normal",       1, ""},
-      {0, "A",       "normal",       1, "A",     FALSE, "A2"},
+      {0, "A",       "normal",       1, "A"},
       {0, "A/B",     "normal",       1, "A/B"},
       {0, "A/B/C",   "normal",       1, "A/B/C"},
-      {1, "A",       "base-deleted", NO_COPY_FROM},
+      {1, "A",       "base-deleted", NO_COPY_FROM, "A2"},
       {1, "A/B",     "base-deleted", NO_COPY_FROM},
       {1, "A/B/C",   "base-deleted", NO_COPY_FROM},
       {1, "A2",      "normal",       1, "A",     MOVED_HERE},
@@ -3888,16 +3889,16 @@ nested_moves_child_last(const svn_test_o
   {
     nodes_row_t nodes[] = {
       {0, "",        "normal",       1, ""},
-      {0, "A",       "normal",       1, "A",     FALSE, "A2"},
-      {0, "A/B",     "normal",       1, "A/B",   FALSE, "A2/B2"},
+      {0, "A",       "normal",       1, "A"},
+      {0, "A/B",     "normal",       1, "A/B"},
       {0, "A/B/C",   "normal",       1, "A/B/C"},
-      {1, "A",       "base-deleted", NO_COPY_FROM},
+      {1, "A",       "base-deleted", NO_COPY_FROM, "A2"},
       {1, "A/B",     "base-deleted", NO_COPY_FROM},
       {1, "A/B/C",   "base-deleted", NO_COPY_FROM},
       {1, "A2",      "normal",       1, "A",     MOVED_HERE},
       {1, "A2/B",    "normal",       1, "A/B",   MOVED_HERE},
       {1, "A2/B/C",  "normal",       1, "A/B/C", MOVED_HERE},
-      {2, "A2/B",    "base-deleted", NO_COPY_FROM},
+      {2, "A2/B",    "base-deleted", NO_COPY_FROM, "A2/B2"},
       {2, "A2/B/C",  "base-deleted", NO_COPY_FROM},
       {2, "A2/B2",   "normal",       1, "A/B",   MOVED_HERE},
       {2, "A2/B2/C", "normal",       1, "A/B/C", MOVED_HERE},
@@ -3909,20 +3910,20 @@ nested_moves_child_last(const svn_test_o
   {
     nodes_row_t nodes[] = {
       {0, "",        "normal",       1, ""},
-      {0, "A",       "normal",       1, "A",     FALSE, "A2"},
-      {0, "A/B",     "normal",       1, "A/B",   FALSE, "A2/B2"},
-      {0, "A/B/C",   "normal",       1, "A/B/C", FALSE, "A2/B2/C2"},
-      {1, "A",       "base-deleted", NO_COPY_FROM},
+      {0, "A",       "normal",       1, "A"},
+      {0, "A/B",     "normal",       1, "A/B"},
+      {0, "A/B/C",   "normal",       1, "A/B/C"},
+      {1, "A",       "base-deleted", NO_COPY_FROM, "A2"},
       {1, "A/B",     "base-deleted", NO_COPY_FROM},
       {1, "A/B/C",   "base-deleted", NO_COPY_FROM},
       {1, "A2",      "normal",       1, "A",     MOVED_HERE},
       {1, "A2/B",    "normal",       1, "A/B",   MOVED_HERE},
       {1, "A2/B/C",  "normal",       1, "A/B/C", MOVED_HERE},
-      {2, "A2/B",    "base-deleted", NO_COPY_FROM},
+      {2, "A2/B",    "base-deleted", NO_COPY_FROM, "A2/B2"},
       {2, "A2/B/C",  "base-deleted", NO_COPY_FROM},
       {2, "A2/B2",   "normal",       1, "A/B",   MOVED_HERE},
       {2, "A2/B2/C", "normal",       1, "A/B/C", MOVED_HERE},
-      {3, "A2/B2/C", "base-deleted", NO_COPY_FROM},
+      {3, "A2/B2/C", "base-deleted", NO_COPY_FROM, "A2/B2/C2"},
       {3, "A2/B2/C2","normal",       1, "A/B/C", MOVED_HERE},
       {0}
     };
@@ -3935,10 +3936,10 @@ nested_moves_child_last(const svn_test_o
   {
     nodes_row_t nodes[] = {
       {0, "",        "normal",       1, ""},
-      {0, "A",       "normal",       1, "A",     FALSE, "A2"},
+      {0, "A",       "normal",       1, "A"},
       {0, "A/B",     "normal",       1, "A/B"},
       {0, "A/B/C",   "normal",       1, "A/B/C"},
-      {1, "A",       "base-deleted", NO_COPY_FROM},
+      {1, "A",       "base-deleted", NO_COPY_FROM, "A2"},
       {1, "A/B",     "base-deleted", NO_COPY_FROM},
       {1, "A/B/C",   "base-deleted", NO_COPY_FROM},
       {1, "A2",      "normal",       1, "A",     MOVED_HERE},
@@ -3976,8 +3977,7 @@ move_in_copy(const svn_test_opts_t *opts
     };
     SVN_ERR(check_db_rows(&b, "", nodes));
   }
-  SVN_ERR(wc_move(&b, "A2/B", "A2/B2")); /* ### Moved-here gets recorded, but
-                                            not moved-to. */
+  SVN_ERR(wc_move(&b, "A2/B", "A2/B2"));
   {
     nodes_row_t nodes[] = {
       {0, "",      "normal",       1, ""},
@@ -3985,8 +3985,8 @@ move_in_copy(const svn_test_opts_t *opts
       {0, "A/B",   "normal",       1, "A/B"},
       {1, "A2",    "normal",       1, "A"},
       {1, "A2/B",  "normal",       1, "A/B"},
-      {2, "A2/B",  "base-deleted", NO_COPY_FROM},
-      {2, "A2/B2", "normal",       1, "A/B"},
+      {2, "A2/B",  "base-deleted", NO_COPY_FROM, "A2/B2"},
+      {2, "A2/B2", "normal",       1, "A/B", MOVED_HERE},
       {0}
     };
     SVN_ERR(check_db_rows(&b, "", nodes));
@@ -4024,9 +4024,7 @@ move_in_replace(const svn_test_opts_t *o
     };
     SVN_ERR(check_db_rows(&b, "", nodes));
   }
-  SVN_ERR(wc_move(&b, "A/B", "A/B2")); /* ### Moved-to gets recorded on A/B
-                                          at op-depth=0, that's not the node
-                                          that got moved. */
+  SVN_ERR(wc_move(&b, "A/B", "A/B2"));
   {
     nodes_row_t nodes[] = {
       {0, "",     "normal",       1, ""},
@@ -4036,7 +4034,7 @@ move_in_replace(const svn_test_opts_t *o
       {0, "X/B",  "normal",       1, "X/B"},
       {1, "A",    "normal",       1, "X"},
       {1, "A/B",  "normal",       1, "X/B"},
-      {2, "A/B",  "base-deleted", NO_COPY_FROM},
+      {2, "A/B",  "base-deleted", NO_COPY_FROM, "A/B2"},
       {2, "A/B2", "normal",       1, "X/B", MOVED_HERE},
       {0}
     };
@@ -4075,9 +4073,9 @@ copy_a_move(const svn_test_opts_t *opts,
       {0, "",      "normal",       1, ""},
       {0, "A",     "normal",       1, "A"},
       {0, "A/B",   "normal",       1, "A/B"},
-      {0, "A/B/C", "normal",       1, "A/B/C", FALSE, "A/C2"},
+      {0, "A/B/C", "normal",       1, "A/B/C"},
       {2, "A/C2",  "normal",       1, "A/B/C", MOVED_HERE},
-      {3, "A/B/C", "base-deleted", NO_COPY_FROM},
+      {3, "A/B/C", "base-deleted", NO_COPY_FROM, "A/C2"},
       {0}
     };
     SVN_ERR(check_db_rows(&b, "", nodes));
@@ -4091,14 +4089,14 @@ copy_a_move(const svn_test_opts_t *opts,
       {0, "",       "normal",       1, ""},
       {0, "A",      "normal",       1, "A"},
       {0, "A/B",    "normal",       1, "A/B"},
-      {0, "A/B/C",  "normal",       1, "A/B/C", FALSE, "A/C2"},
+      {0, "A/B/C",  "normal",       1, "A/B/C"},
       {2, "A/C2",   "normal",       1, "A/B/C", MOVED_HERE},
-      {3, "A/B/C",  "base-deleted", NO_COPY_FROM},
+      {3, "A/B/C",  "base-deleted", NO_COPY_FROM, "A/C2"},
       {1, "A2",     "normal",       1, "A"},
       {1, "A2/B",   "normal",       1, "A/B"},
       {1, "A2/B/C", "normal",       1, "A/B/C"},
-      {2, "A2/C2",  "normal",       1, "A/B/C"},
-      {3, "A2/B/C", "base-deleted", NO_COPY_FROM},
+      {2, "A2/C2",  "normal",       1, "A/B/C"},   /* MOVED_HERE? */
+      {3, "A2/B/C", "base-deleted", NO_COPY_FROM}, /* "A2/C2"? */
       {0}
     };
     SVN_ERR(check_db_rows(&b, "", nodes));
@@ -4128,12 +4126,12 @@ move_to_swap(const svn_test_opts_t *opts
     nodes_row_t nodes[] = {
       {0, "",    "normal",       1, ""},
       {0, "A",   "normal",       1, "A"},
-      {0, "A/B", "normal",       1, "A/B", FALSE, "X/B"},
+      {0, "A/B", "normal",       1, "A/B"},
       {0, "X",   "normal",       1, "X"},
-      {0, "X/Y", "normal",       1, "X/Y", FALSE, "A/Y"},
-      {2, "A/B", "base-deleted", NO_COPY_FROM},
+      {0, "X/Y", "normal",       1, "X/Y"},
+      {2, "A/B", "base-deleted", NO_COPY_FROM, "X/B"},
       {2, "A/Y", "normal",       1, "X/Y", MOVED_HERE},
-      {2, "X/Y", "base-deleted", NO_COPY_FROM},
+      {2, "X/Y", "base-deleted", NO_COPY_FROM, "A/Y"},
       {2, "X/B", "normal",       1, "A/B", MOVED_HERE},
       {0}
     };
@@ -4141,26 +4139,69 @@ move_to_swap(const svn_test_opts_t *opts
   }
 
   SVN_ERR(wc_move(&b, "A", "A2"));
+
+  {
+    nodes_row_t nodes[] = {
+      {0, "",     "normal",       1, ""},
+      {0, "A",    "normal",       1, "A"},
+      {0, "A/B",  "normal",       1, "A/B"},
+      {0, "X",    "normal",       1, "X"},
+      {0, "X/Y",  "normal",       1, "X/Y"},
+      {1, "A",    "base-deleted", NO_COPY_FROM, "A2"},
+      {1, "A/B",  "base-deleted", NO_COPY_FROM},
+      {1, "A2",   "normal",       1, "A", MOVED_HERE},
+      {1, "A2/B", "normal",       1, "A/B", MOVED_HERE},
+      {2, "A2/B", "base-deleted", NO_COPY_FROM, "X/B"},
+      {2, "A2/Y", "normal",       1, "X/Y", MOVED_HERE},
+      {2, "X/Y",  "base-deleted", NO_COPY_FROM, "A2/Y"},
+      {2, "X/B",  "normal",       1, "A/B", MOVED_HERE},
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+
   SVN_ERR(wc_move(&b, "X", "A"));
+
+  {
+    nodes_row_t nodes[] = {
+      {0, "",     "normal",       1, ""},
+      {0, "A",    "normal",       1, "A"},
+      {0, "A/B",  "normal",       1, "A/B"},
+      {0, "X",    "normal",       1, "X"},
+      {0, "X/Y",  "normal",       1, "X/Y"},
+      {1, "A",    "normal",       1, "X", FALSE, "A2", TRUE},
+      {1, "A/B",  "base-deleted", NO_COPY_FROM},
+      {1, "A/Y",  "normal",       1, "X/Y", MOVED_HERE},
+      {1, "A2",   "normal",       1, "A", MOVED_HERE},
+      {1, "A2/B", "normal",       1, "A/B", MOVED_HERE},
+      {1, "X",    "base-deleted", NO_COPY_FROM, "A"},
+      {1, "X/Y",  "base-deleted", NO_COPY_FROM},
+      {2, "A/B",  "normal",       1, "A/B", MOVED_HERE},
+      {2, "A/Y",  "base-deleted", NO_COPY_FROM, "A2/Y"},
+      {2, "A2/B", "base-deleted", NO_COPY_FROM, "A/B"},
+      {2, "A2/Y", "normal",       1, "X/Y", MOVED_HERE},
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+
   SVN_ERR(wc_move(&b, "A2", "X"));
 
-  /* Is this correct or should A/Y and X/B at op-depth=1 be marked
-     moved-here? */
   {
     nodes_row_t nodes[] = {
       {0, "",    "normal",       1, ""},
-      {0, "A",   "normal",       1, "A",   FALSE, "X"},
-      {0, "A/B", "normal",       1, "A/B", FALSE, "A/B"},
-      {0, "X",   "normal",       1, "X",   FALSE, "A"},
-      {0, "X/Y", "normal",       1, "X/Y", FALSE, "X/Y"},
-      {1, "A",   "normal",       1, "X",   MOVED_HERE},
+      {0, "A",   "normal",       1, "A"},
+      {0, "A/B", "normal",       1, "A/B"},
+      {0, "X",   "normal",       1, "X"},
+      {0, "X/Y", "normal",       1, "X/Y"},
+      {1, "A",   "normal",       1, "X",   FALSE, "X", TRUE},
       {1, "A/Y", "normal",       1, "X/Y", MOVED_HERE},
       {1, "A/B", "base-deleted", NO_COPY_FROM},
-      {1, "X",   "normal",       1, "A",   MOVED_HERE},
+      {1, "X",   "normal",       1, "A",   FALSE, "A", TRUE},
       {1, "X/B", "normal",       1, "A/B", MOVED_HERE},
       {1, "X/Y", "base-deleted", NO_COPY_FROM},
-      {2, "A/Y", "base-deleted", NO_COPY_FROM},
-      {2, "X/B", "base-deleted", NO_COPY_FROM},
+      {2, "A/Y", "base-deleted", NO_COPY_FROM, "X/Y"},
+      {2, "X/B", "base-deleted", NO_COPY_FROM, "A/B"},
       {2, "A/B", "normal",       1, "A/B", MOVED_HERE},
       {2, "X/Y", "normal",       1, "X/Y", MOVED_HERE},
       {0}
@@ -4178,14 +4219,14 @@ move_to_swap(const svn_test_opts_t *opts
   {
     nodes_row_t nodes[] = {
       {0, "",    "normal",       1, ""},
-      {0, "A",   "normal",       1, "A",   FALSE, "X"},
+      {0, "A",   "normal",       1, "A"},
       {0, "A/B", "normal",       1, "A/B"},
-      {0, "X",   "normal",       1, "X",   FALSE, "A"},
+      {0, "X",   "normal",       1, "X"},
       {0, "X/Y", "normal",       1, "X/Y"},
-      {1, "A",   "normal",       1, "X",   MOVED_HERE},
+      {1, "A",   "normal",       1, "X",   FALSE, "X", TRUE},
       {1, "A/Y", "normal",       1, "X/Y", MOVED_HERE},
       {1, "A/B", "base-deleted", NO_COPY_FROM},
-      {1, "X",   "normal",       1, "A",   MOVED_HERE},
+      {1, "X",   "normal",       1, "A",   FALSE, "A", TRUE},
       {1, "X/B", "normal",       1, "A/B", MOVED_HERE},
       {1, "X/Y", "base-deleted", NO_COPY_FROM},
       {0}
@@ -4199,18 +4240,18 @@ move_to_swap(const svn_test_opts_t *opts
   {
     nodes_row_t nodes[] = {
       {0, "",    "normal",       1, ""},
-      {0, "A",   "normal",       1, "A",   FALSE, "X"},
-      {0, "A/B", "normal",       1, "A/B", FALSE, "A/B"},
-      {0, "X",   "normal",       1, "X",   FALSE, "A"},
-      {0, "X/Y", "normal",       1, "X/Y", FALSE, "X/Y"},
-      {1, "A",   "normal",       1, "X",   MOVED_HERE},
+      {0, "A",   "normal",       1, "A"},
+      {0, "A/B", "normal",       1, "A/B"},
+      {0, "X",   "normal",       1, "X"},
+      {0, "X/Y", "normal",       1, "X/Y"},
+      {1, "A",   "normal",       1, "X",   FALSE, "X", TRUE},
       {1, "A/Y", "normal",       1, "X/Y", MOVED_HERE},
       {1, "A/B", "base-deleted", NO_COPY_FROM},
-      {1, "X",   "normal",       1, "A",   MOVED_HERE},
+      {1, "X",   "normal",       1, "A",   FALSE, "A", TRUE},
       {1, "X/B", "normal",       1, "A/B", MOVED_HERE},
       {1, "X/Y", "base-deleted", NO_COPY_FROM},
-      {2, "A/Y", "base-deleted", NO_COPY_FROM},
-      {2, "X/B", "base-deleted", NO_COPY_FROM},
+      {2, "A/Y", "base-deleted", NO_COPY_FROM, "X/Y"},
+      {2, "X/B", "base-deleted", NO_COPY_FROM, "A/B"},
       {2, "A/B", "normal",       1, "A/B", MOVED_HERE},
       {2, "X/Y", "normal",       1, "X/Y", MOVED_HERE},
       {0}
@@ -4227,10 +4268,10 @@ revert_nested_move(const svn_test_opts_t
   svn_test__sandbox_t b;
   nodes_row_t nodes_A_moved[] = {
     {0, "",       "normal",       1, ""},
-    {0, "A",      "normal",       1, "A",     FALSE, "A2"},
+    {0, "A",      "normal",       1, "A"},
     {0, "A/B",    "normal",       1, "A/B"},
     {0, "A/B/C",  "normal",       1, "A/B/C"},
-    {1, "A",      "base-deleted", NO_COPY_FROM},
+    {1, "A",      "base-deleted", NO_COPY_FROM, "A2"},
     {1, "A/B",    "base-deleted", NO_COPY_FROM},
     {1, "A/B/C",  "base-deleted", NO_COPY_FROM},
     {1, "A2",     "normal",       1, "A",     MOVED_HERE},
@@ -4240,16 +4281,16 @@ revert_nested_move(const svn_test_opts_t
   };
   nodes_row_t nodes_AB_moved[] = {
     {0, "",        "normal",       1, ""},
-    {0, "A",       "normal",       1, "A",     FALSE, "A2"},
-    {0, "A/B",     "normal",       1, "A/B",   FALSE, "A2/B2"},
+    {0, "A",       "normal",       1, "A"},
+    {0, "A/B",     "normal",       1, "A/B"},
     {0, "A/B/C",   "normal",       1, "A/B/C"},
-    {1, "A",       "base-deleted", NO_COPY_FROM},
+    {1, "A",       "base-deleted", NO_COPY_FROM, "A2"},
     {1, "A/B",     "base-deleted", NO_COPY_FROM},
     {1, "A/B/C",   "base-deleted", NO_COPY_FROM},
     {1, "A2",      "normal",       1, "A",     MOVED_HERE},
     {1, "A2/B",    "normal",       1, "A/B",   MOVED_HERE},
     {1, "A2/B/C",  "normal",       1, "A/B/C", MOVED_HERE},
-    {2, "A2/B",    "base-deleted", NO_COPY_FROM},
+    {2, "A2/B",    "base-deleted", NO_COPY_FROM, "A2/B2"},
     {2, "A2/B/C",  "base-deleted", NO_COPY_FROM},
     {2, "A2/B2",   "normal",       1, "A/B",   MOVED_HERE},
     {2, "A2/B2/C", "normal",       1, "A/B/C", MOVED_HERE},
@@ -4257,20 +4298,20 @@ revert_nested_move(const svn_test_opts_t
   };
   nodes_row_t nodes_ABC_moved[] = {
     {0, "",         "normal",       1, ""},
-    {0, "A",        "normal",       1, "A",     FALSE, "A2"},
-    {0, "A/B",      "normal",       1, "A/B",   FALSE, "A2/B2"},
-    {0, "A/B/C",    "normal",       1, "A/B/C", FALSE, "A2/B2/C2"},
-    {1, "A",        "base-deleted", NO_COPY_FROM},
+    {0, "A",        "normal",       1, "A"},
+    {0, "A/B",      "normal",       1, "A/B"},
+    {0, "A/B/C",    "normal",       1, "A/B/C"},
+    {1, "A",        "base-deleted", NO_COPY_FROM, "A2"},
     {1, "A/B",      "base-deleted", NO_COPY_FROM},
     {1, "A/B/C",    "base-deleted", NO_COPY_FROM},
     {1, "A2",       "normal",       1, "A",     MOVED_HERE},
     {1, "A2/B",     "normal",       1, "A/B",   MOVED_HERE},
     {1, "A2/B/C",   "normal",       1, "A/B/C", MOVED_HERE},
-    {2, "A2/B",     "base-deleted", NO_COPY_FROM},
+    {2, "A2/B",     "base-deleted", NO_COPY_FROM, "A2/B2"},
     {2, "A2/B/C",   "base-deleted", NO_COPY_FROM},
     {2, "A2/B2",    "normal",       1, "A/B",   MOVED_HERE},
     {2, "A2/B2/C",  "normal",       1, "A/B/C", MOVED_HERE},
-    {3, "A2/B2/C",  "base-deleted", NO_COPY_FROM},
+    {3, "A2/B2/C",  "base-deleted", NO_COPY_FROM, "A2/B2/C2"},
     {3, "A2/B2/C2", "normal",       1, "A/B/C", MOVED_HERE},
     {0}
   };
@@ -4308,6 +4349,13 @@ revert_nested_move(const svn_test_opts_t
   SVN_ERR(wc_revert(&b, "A2/B2", svn_depth_infinity));
   SVN_ERR(check_db_rows(&b, "", nodes_A_moved));
 
+  /* Check moves in reverse order */
+  SVN_ERR(wc_revert(&b, "", svn_depth_infinity));
+  SVN_ERR(wc_move(&b, "A/B/C", "A/B/C2"));
+  SVN_ERR(wc_move(&b, "A/B", "A/B2"));
+  SVN_ERR(wc_move(&b, "A", "A2"));
+  SVN_ERR(check_db_rows(&b, "", nodes_ABC_moved));
+
   return SVN_NO_ERROR;
 }
 
@@ -4333,34 +4381,30 @@ move_on_move(const svn_test_opts_t *opts
     nodes_row_t nodes[] = {
       {0, "",         "normal",       1, ""},
       {0, "A",        "normal",       1, "A"},
-      {0, "A/B",      "normal",       1, "A/B", FALSE, "B2"},
+      {0, "A/B",      "normal",       1, "A/B"},
       {0, "X",        "normal",       1, "X"},
       {0, "X/B",      "normal",       1, "X/B"},
       {1, "B2",       "normal",       1, "A/B", MOVED_HERE},
       {1, "A",        "normal",       1, "X"},
-      {1, "A/B",      "normal",       1, "X/B"},
+      {1, "A/B",      "normal",       1, "X/B", FALSE, "B2"},
       {0}
     };
     SVN_ERR(check_db_rows(&b, "", nodes));
   }
 
-  /* A/B to B2 is already recorded in A/B but the copy has given us
-     another A/B that we can move.  A second move overwites the first
-     move stored in A/B even though it's a different node being moved,
-     and that breaks the recording of the move to B2. */
   SVN_ERR(wc_move(&b, "A/B", "B3"));
   {
     nodes_row_t nodes[] = {
       {0, "",         "normal",       1, ""},
       {0, "A",        "normal",       1, "A"},
-      {0, "A/B",      "normal",       1, "A/B",   FALSE, "B2"}, /* XFAIL */
+      {0, "A/B",      "normal",       1, "A/B"},
       {0, "X",        "normal",       1, "X"},
       {0, "X/B",      "normal",       1, "X/B"},
       {1, "B2",       "normal",       1, "A/B",   MOVED_HERE},
       {1, "B3",       "normal",       1, "X/B",   MOVED_HERE},
       {1, "A",        "normal",       1, "X"},
-      {1, "A/B",      "normal",       1, "X/B"},         /* moved_to=B3? */
-      {2, "A/B",      "base-deleted", NO_COPY_FROM},
+      {1, "A/B",      "normal",       1, "X/B", FALSE, "B2"},
+      {2, "A/B",      "base-deleted", NO_COPY_FROM, "B3"},
       {0}
     };
     SVN_ERR(check_db_rows(&b, "", nodes));
@@ -4390,37 +4434,33 @@ move_on_move2(const svn_test_opts_t *opt
   {
     nodes_row_t nodes[] = {
       {0, "",         "normal",       1, ""},
-      {0, "A",        "normal",       1, "A",   FALSE, "A2"},
+      {0, "A",        "normal",       1, "A"},
       {0, "A/B",      "normal",       1, "A/B"},
       {0, "X",        "normal",       1, "X"},
       {0, "X/B",      "normal",       1, "X/B"},
       {1, "A2",       "normal",       1, "A",   MOVED_HERE},
       {1, "A2/B",     "normal",       1, "A/B", MOVED_HERE},
-      {1, "A",        "normal",       1, "X"},
+      {1, "A",        "normal",       1, "X", FALSE, "A2"},
       {1, "A/B",      "normal",       1, "X/B"},
       {0}
     };
     SVN_ERR(check_db_rows(&b, "", nodes));
   }
 
-  /* A/B is already moved to A2/B but there is no explicit moved_to,
-     we derive it from A.  The copy has given us another A/B that we
-     can move doing so stores explicit moved_to in A/B that breaks the
-     recording of the first move to A2/B. */
   SVN_ERR(wc_move(&b, "A/B", "B3"));
   {
     nodes_row_t nodes[] = {
       {0, "",         "normal",       1, ""},
-      {0, "A",        "normal",       1, "A",   FALSE, "A2"},
-      {0, "A/B",      "normal",       1, "A/B"},               /* XFAIL */
+      {0, "A",        "normal",       1, "A"},
+      {0, "A/B",      "normal",       1, "A/B"},
       {0, "X",        "normal",       1, "X"},
       {0, "X/B",      "normal",       1, "X/B"},
       {1, "A2",       "normal",       1, "A",   MOVED_HERE},
       {1, "A2/B",     "normal",       1, "A/B", MOVED_HERE},
       {1, "B3",       "normal",       1, "X/B", MOVED_HERE},
-      {1, "A",        "normal",       1, "X"},
-      {1, "A/B",      "normal",       1, "X/B"},           /* moved_to=B3? */
-      {2, "A/B",      "base-deleted", NO_COPY_FROM},
+      {1, "A",        "normal",       1, "X", FALSE, "A2"},
+      {1, "A/B",      "normal",       1, "X/B"},
+      {2, "A/B",      "base-deleted", NO_COPY_FROM, "B3"},
       {0}
     };
     SVN_ERR(check_db_rows(&b, "", nodes));
@@ -4450,13 +4490,13 @@ move_added(const svn_test_opts_t *opts, 
   {
     nodes_row_t nodes[] = {
       {0, "",         "normal",       1, ""},
-      {0, "A",        "normal",       1, "A",   FALSE, "A2"},
+      {0, "A",        "normal",       1, "A"},
       {0, "A/B",      "normal",       1, "A/B"},
-      {1, "A",        "base-deleted", NO_COPY_FROM},
+      {1, "A",        "base-deleted", NO_COPY_FROM, "A2"},
       {1, "A/B",      "base-deleted", NO_COPY_FROM},
       {1, "A2",       "normal",       1, "A",   MOVED_HERE},
       {1, "A2/B",     "normal",       1, "A/B", MOVED_HERE},
-      {3, "A2/B/C",   "normal",       NO_COPY_FROM},          /* XFAIL */
+      {3, "A2/B/C",   "normal",       NO_COPY_FROM},
       {3, "A2/B/C2",  "normal",       NO_COPY_FROM},
       {0}
     };
@@ -4466,6 +4506,78 @@ move_added(const svn_test_opts_t *opts, 
   return SVN_NO_ERROR;
 }
 
+static svn_error_t *
+move_update(const svn_test_opts_t *opts, apr_pool_t *pool)
+{
+  svn_test__sandbox_t b;
+
+  SVN_ERR(svn_test__sandbox_create(&b, "move_update", opts, pool));
+
+  SVN_ERR(wc_mkdir(&b, "A"));
+  SVN_ERR(wc_mkdir(&b, "A/B"));
+  SVN_ERR(wc_commit(&b, ""));
+  SVN_ERR(wc_mkdir(&b, "A/B/C"));
+  SVN_ERR(wc_commit(&b, ""));
+  SVN_ERR(wc_update(&b, "", 1));
+
+  /* A is single-revision so A2 is a single-revision copy */
+  SVN_ERR(wc_move(&b, "A", "A2"));
+  {
+    nodes_row_t nodes[] = {
+      {0, "",         "normal",       1, ""},
+      {0, "A",        "normal",       1, "A"},
+      {0, "A/B",      "normal",       1, "A/B"},
+      {1, "A",        "base-deleted", NO_COPY_FROM, "A2"},
+      {1, "A/B",      "base-deleted", NO_COPY_FROM},
+      {1, "A2",       "normal",       1, "A", MOVED_HERE},
+      {1, "A2/B",     "normal",       1, "A/B", MOVED_HERE},
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+
+  /* Update A/B makes A2 a mixed-revision copy */
+  SVN_ERR(wc_update(&b, "A/B", 2));
+  {
+    nodes_row_t nodes[] = {
+      {0, "",         "normal",       1, ""},
+      {0, "A",        "normal",       1, "A"},
+      {0, "A/B",      "normal",       2, "A/B"},
+      {0, "A/B/C",    "normal",       2, "A/B/C"},
+      {1, "A",        "base-deleted", NO_COPY_FROM, "A2"},
+      {1, "A/B",      "base-deleted", NO_COPY_FROM},
+      {1, "A/B/C",    "base-deleted", NO_COPY_FROM},
+      {1, "A2",       "normal",       1, "A", MOVED_HERE},
+      {1, "A2/B",     "not-present",  2, "A/B"},                 /* XFAIL */
+      {2, "A2/B",     "normal",       2, "A/B", MOVED_HERE},
+      {2, "A2/B/C",   "normal",       2, "A/B/C", MOVED_HERE},
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+
+  /* Update A makes A2 back into a single-revision copy */
+  SVN_ERR(wc_update(&b, "A", 2));
+  {
+    nodes_row_t nodes[] = {
+      {0, "",         "normal",       1, ""},
+      {0, "A",        "normal",       2, "A"},
+      {0, "A/B",      "normal",       2, "A/B"},
+      {0, "A/B/C",    "normal",       2, "A/B/C"},
+      {1, "A",        "base-deleted", NO_COPY_FROM, "A2"},
+      {1, "A/B",      "base-deleted", NO_COPY_FROM},
+      {1, "A/B/C",    "base-deleted", NO_COPY_FROM},
+      {1, "A2",       "normal",       2, "A", MOVED_HERE},
+      {1, "A2/B",     "normal",       2, "A/B", MOVED_HERE},
+      {1, "A2/B/C",   "normal",       2, "A/B/C", MOVED_HERE},
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+
+  return SVN_NO_ERROR;
+}
+
 
 
 /* ---------------------------------------------------------------------- */
@@ -4540,9 +4652,9 @@ struct svn_test_descriptor_t test_funcs[
                        "nested_moves_child_first"),
     SVN_TEST_OPTS_PASS(nested_moves_child_last,
                        "nested_moves_child_last"),
-    SVN_TEST_OPTS_XFAIL(move_in_copy,
+    SVN_TEST_OPTS_PASS(move_in_copy,
                        "move_in_copy"),
-    SVN_TEST_OPTS_XFAIL(move_in_replace,
+    SVN_TEST_OPTS_PASS(move_in_replace,
                        "move_in_replace"),
     SVN_TEST_OPTS_PASS(copy_a_move,
                        "copy_a_move"),
@@ -4550,11 +4662,13 @@ struct svn_test_descriptor_t test_funcs[
                        "move_to_swap"),
     SVN_TEST_OPTS_PASS(revert_nested_move,
                        "revert_nested_move"),
-    SVN_TEST_OPTS_XFAIL(move_on_move,
+    SVN_TEST_OPTS_PASS(move_on_move,
                        "move_on_move"),
-    SVN_TEST_OPTS_XFAIL(move_on_move2,
+    SVN_TEST_OPTS_PASS(move_on_move2,
                        "move_on_move2"),
-    SVN_TEST_OPTS_XFAIL(move_added,
+    SVN_TEST_OPTS_PASS(move_added,
                        "move_added"),
+    SVN_TEST_OPTS_XFAIL(move_update,
+                       "move_update"),
     SVN_TEST_NULL
   };

Modified: 
subversion/branches/ev2-export/tools/buildbot/slaves/win32-SharpSvn/svntest-bindings.cmd
URL: 
http://svn.apache.org/viewvc/subversion/branches/ev2-export/tools/buildbot/slaves/win32-SharpSvn/svntest-bindings.cmd?rev=1308894&r1=1308893&r2=1308894&view=diff
==============================================================================
--- 
subversion/branches/ev2-export/tools/buildbot/slaves/win32-SharpSvn/svntest-bindings.cmd
 (original)
+++ 
subversion/branches/ev2-export/tools/buildbot/slaves/win32-SharpSvn/svntest-bindings.cmd
 Tue Apr  3 13:32:48 2012
@@ -72,7 +72,7 @@ pushd subversion\bindings\swig\perl\nati
 perl -MExtUtils::Command::MM -e test_harness() t\*.t
 IF ERRORLEVEL 1 (
   echo [Perl reported error %ERRORLEVEL%]
-  REM SET result=1
+  SET result=1
 )
 popd
 

Modified: 
subversion/branches/ev2-export/tools/client-side/mergeinfo-sanitizer.py
URL: 
http://svn.apache.org/viewvc/subversion/branches/ev2-export/tools/client-side/mergeinfo-sanitizer.py?rev=1308894&r1=1308893&r2=1308894&view=diff
==============================================================================
--- subversion/branches/ev2-export/tools/client-side/mergeinfo-sanitizer.py 
(original)
+++ subversion/branches/ev2-export/tools/client-side/mergeinfo-sanitizer.py Tue 
Apr  3 13:32:48 2012
@@ -25,7 +25,6 @@ import getopt
 import hashlib
 import pickle
 import getpass
-import re
 from svn import client, core, ra, wc
 
 ## This script first fetches the mergeinfo of the working copy and tries
@@ -42,7 +41,7 @@ except AttributeError:
 mergeinfo = {}
 
 def usage():
-  sys.stderr.write(""" Usage: %s WCPATH
+  sys.stderr.write(""" Usage: %s WCPATH [OPTION]
 
 Analyze the mergeinfo property of the given WCPATH.
 Look for the existence of merge_source's locations at their recorded

Propchange: 
subversion/branches/ev2-export/tools/client-side/mergeinfo-sanitizer.py
------------------------------------------------------------------------------
    svn:executable = *

Modified: subversion/branches/ev2-export/tools/client-side/svnmucc/svnmucc.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/ev2-export/tools/client-side/svnmucc/svnmucc.c?rev=1308894&r1=1308893&r2=1308894&view=diff
==============================================================================
--- subversion/branches/ev2-export/tools/client-side/svnmucc/svnmucc.c 
(original)
+++ subversion/branches/ev2-export/tools/client-side/svnmucc/svnmucc.c Tue Apr  
3 13:32:48 2012
@@ -52,7 +52,9 @@
 #include "svn_subst.h"
 #include "svn_utf.h"
 #include "svn_version.h"
+
 #include "private/svn_cmdline_private.h"
+#include "private/svn_ra_private.h"
 
 static void handle_error(svn_error_t *err, apr_pool_t *pool)
 {
@@ -611,6 +613,54 @@ struct action {
 };
 
 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)
+{
+  *filename = NULL;
+  return SVN_NO_ERROR;
+}
+
+static svn_error_t *
+fetch_props_func(apr_hash_t **props,
+                 void *baton,
+                 const char *path,
+                 svn_revnum_t base_revision,
+                 apr_pool_t *result_pool,
+                 apr_pool_t *scratch_pool)
+{
+  *props = apr_hash_make(result_pool);
+  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)
+{
+  *kind = svn_kind_unknown;
+  return SVN_NO_ERROR;
+}
+
+static svn_delta_shim_callbacks_t *
+get_shim_callbacks(apr_pool_t *result_pool)
+{
+  svn_delta_shim_callbacks_t *callbacks =
+                            svn_delta_shim_callbacks_default(result_pool);
+
+  callbacks->fetch_props_func = fetch_props_func;
+  callbacks->fetch_kind_func = fetch_kind_func;
+  callbacks->fetch_base_func = fetch_base_func;
+
+  return callbacks;
+}
+
+static svn_error_t *
 execute(const apr_array_header_t *actions,
         const char *anchor,
         apr_hash_t *revprops,
@@ -713,6 +763,8 @@ execute(const apr_array_header_t *action
         }
     }
 
+  SVN_ERR(svn_ra__register_editor_shim_callbacks(session,
+                                                 get_shim_callbacks(pool)));
   SVN_ERR(svn_ra_get_commit_editor3(session, &editor, &editor_baton, revprops,
                                     commit_callback, NULL, NULL, FALSE, pool));
 

Modified: subversion/branches/ev2-export/tools/dev/gdb-py/svndbg/printers.py
URL: 
http://svn.apache.org/viewvc/subversion/branches/ev2-export/tools/dev/gdb-py/svndbg/printers.py?rev=1308894&r1=1308893&r2=1308894&view=diff
==============================================================================
--- subversion/branches/ev2-export/tools/dev/gdb-py/svndbg/printers.py 
(original)
+++ subversion/branches/ev2-export/tools/dev/gdb-py/svndbg/printers.py Tue Apr  
3 13:32:48 2012
@@ -24,8 +24,168 @@ import gdb
 import re
 
 import gdb.printing
+from gdb.printing import RegexpCollectionPrettyPrinter
 
 
+class TypedefRegexCollectionPrettyPrinter(RegexpCollectionPrettyPrinter):
+    """Class for implementing a collection of regular-expression based
+       pretty-printers, matching on the type name at the point of use, such
+       as (but not necessarily) a 'typedef' name, ignoring 'const' or
+       'volatile' qualifiers.
+
+       This is modeled on RegexpCollectionPrettyPrinter, which (in GDB 7.3)
+       matches on the base type's tag name and can't match a pointer type or
+       any other type that doesn't have a tag name."""
+
+    def __init__(self, name):
+        super(TypedefRegexCollectionPrettyPrinter, self).__init__(name)
+
+    def __call__(self, val):
+        """Lookup the pretty-printer for the provided value."""
+
+        # Get the type name, without 'const' or 'volatile' qualifiers.
+        typename = str(val.type.unqualified())
+        if not typename:
+            return None
+
+        # Iterate over table of type regexps to find an enabled printer for
+        # that type.  Return an instantiation of the printer if found.
+        for printer in self.subprinters:
+            if printer.enabled and printer.compiled_re.search(typename):
+                return printer.gen_printer(val)
+
+        # Cannot find a pretty printer.  Return None.
+        return None
+
+class InferiorFunction:
+    """A class whose instances are callable functions on the inferior
+       process."""
+    def __init__(self, function_name):
+        self.function_name = function_name
+        self.func = None
+
+    def __call__(self, *args):
+        if not self.func:
+            self.func = gdb.parse_and_eval(self.function_name)
+        return self.func(*args)
+
+def children_as_map(children_iterator):
+    """Convert an iteration of (key, value) pairs into the form required for
+       a pretty-printer 'children' method when the display-hint is 'map'."""
+    for k, v in children_iterator:
+        yield 'key', k
+        yield 'val', v
+
+
+########################################################################
+
+# Pretty-printing for APR library types.
+
+# Some useful gdb.Type instances that can be initialized before any object
+# files are loaded.
+pvoidType = gdb.lookup_type('void').pointer()
+cstringType = gdb.lookup_type('char').pointer()
+
+# Some functions that resolve to calls into the inferior process.
+apr_hash_count = InferiorFunction('apr_hash_count')
+apr_hash_first = InferiorFunction('apr_hash_first')
+apr_hash_next = InferiorFunction('apr_hash_next')
+svn__apr_hash_index_key = InferiorFunction('svn__apr_hash_index_key')
+svn__apr_hash_index_val = InferiorFunction('svn__apr_hash_index_val')
+
+def children_of_apr_hash(hash_p, value_type=None):
+    """Iterate over an 'apr_hash_t *' GDB value, in the way required for a
+       pretty-printer 'children' method when the display-hint is 'array'.
+       Cast the value pointers to VALUE_TYPE, or return values as '...' if
+       VALUE_TYPE is None."""
+    hi = apr_hash_first(0, hash_p)
+    while (hi):
+        k = svn__apr_hash_index_key(hi).reinterpret_cast(cstringType)
+        if value_type:
+            val = svn__apr_hash_index_val(hi).reinterpret_cast(value_type)
+        else:
+            val = '...'
+        try:
+            key = k.string()
+        except:
+            key = '<unreadable>'
+        yield key, val
+        hi = apr_hash_next(hi)
+
+class AprHashPrinter:
+    """for 'apr_hash_t' of 'char *' keys and unknown values"""
+    def __init__(self, val):
+        self.hash_p = val.address
+
+    def to_string(self):
+        """Return a string to be displayed before children are displayed, or
+           return None if we don't want any such."""
+        return 'hash of ' + str(apr_hash_count(self.hash_p)) + ' items'
+
+    def children(self):
+        if not self.hash_p:
+            return []
+        return children_as_map(children_of_apr_hash(self.hash_p))
+
+    def display_hint(self):
+        return 'map'
+
+class PtrAprHashPrinter(AprHashPrinter):
+    """for pointer to 'apr_hash_t' of 'char *' keys and unknown values"""
+    def __init__(self, val):
+        self.hash_p = val
+
+    def to_string(self):
+        if not self.hash_p:
+            return 'NULL'
+        return AprHashPrinter.to_string(self)
+
+    def children(self):
+        if not self.hash_p:
+            return []
+        return AprHashPrinter.children(self)
+
+class AprArrayPrinter:
+    """for 'apr_array_header_t' of unknown elements"""
+    def __init__(self, val):
+        self.array = val
+
+    def to_string(self):
+        if not self.array:
+            return 'NULL'
+        nelts = self.array['nelts']
+        return 'array of ' + str(int(nelts)) + ' items'
+
+    def children(self):
+        # We can't display the children as we don't know their type.
+        return []
+
+    def display_hint(self):
+        return 'array'
+
+class PtrAprArrayPrinter(AprArrayPrinter):
+    """for pointer to 'apr_array_header_t' of unknown elements"""
+    def __init__(self, val):
+        if not val:
+            self.array = None
+        else:
+            self.array = val.dereference()
+
+    def to_string(self):
+        if not self.array:
+            return 'NULL'
+        return AprArrayPrinter.to_string(self)
+
+    def children(self):
+        if not self.array:
+            return []
+        return AprArrayPrinter.children(self)
+
+
+########################################################################
+
+# Pretty-printing for Subversion library types.
+
 class SvnStringPrinter:
     def __init__(self, val):
         self.val = val
@@ -42,22 +202,86 @@ class SvnStringPrinter:
     def display_hint(self):
         return 'string'
 
+class SvnMergeinfoCatalogPrinter:
+    """for svn_mergeinfo_catalog_t"""
+    def __init__(self, val):
+        self.hash_p = val
+
+    def to_string(self):
+        if self.hash_p == 0:
+            return 'NULL'
+        return 'mergeinfo catalog of ' + str(apr_hash_count(self.hash_p)) + ' 
items'
+
+    def children(self):
+        if self.hash_p == 0:
+            return None
+        mergeinfoType = gdb.lookup_type('svn_mergeinfo_t')
+        return children_as_map(children_of_apr_hash(self.hash_p, 
mergeinfoType))
+
+    def display_hint(self):
+        return 'map'
 
-def build_libsvn_printer():
-    global libsvn_printer
 
-    libsvn_printer = gdb.printing.RegexpCollectionPrettyPrinter("libsvn")
+########################################################################
+
+libapr_printer = None
+libapr_printer2 = None
+libsvn_printer = None
+libsvn_printer2 = None
 
-    libsvn_printer.add_printer('svn_string_t', '^svn_string_t$',
+def build_libsvn_printers():
+    """Construct the pretty-printer objects."""
+
+    global libapr_printer, libapr_printer2, libsvn_printer, libsvn_printer2
+
+    # These sub-printers match a struct's (or union)'s tag name,
+    # after stripping typedefs, references and const/volatile qualifiers.
+    libapr_printer = RegexpCollectionPrettyPrinter("libapr")
+    libapr_printer.add_printer('apr_hash_t', r'^apr_hash_t$',
+                               AprHashPrinter)
+    libapr_printer.add_printer('apr_array_header_t', r'^apr_array_header_t$',
+                               AprArrayPrinter)
+
+    # These sub-printers match a type name at the point of use,
+    # after stripping const/volatile qualifiers.
+    #
+    # TODO: The "apr_foo_t *" entries are in this collection merely because
+    #       the collection above can't match them, but ideally we'd fix that
+    #       matching and move these entries to there so that they get used
+    #       for any typedef that doesn't have its own specific pretty-printer
+    #       registered.
+    libapr_printer2 = TypedefRegexCollectionPrettyPrinter("libapr2")
+    libapr_printer2.add_printer('apr_hash_t *', r'^apr_hash_t \*$',
+                                PtrAprHashPrinter)
+    libapr_printer2.add_printer('apr_array_header_t *', r'^apr_array_header_t 
\*$',
+                                PtrAprArrayPrinter)
+
+    # These sub-printers match a struct's (or union)'s tag name,
+    # after stripping typedefs, references and const/volatile qualifiers.
+    libsvn_printer = RegexpCollectionPrettyPrinter("libsvn")
+    libsvn_printer.add_printer('svn_string_t', r'^svn_string_t$',
                                SvnStringPrinter)
 
+    # These sub-printers match a type name at the point of use,
+    # after stripping const/volatile qualifiers.
+    libsvn_printer2 = TypedefRegexCollectionPrettyPrinter("libsvn2")
+    libsvn_printer2.add_printer('svn_mergeinfo_catalog_t', 
r'^svn_mergeinfo_catalog_t$',
+                                SvnMergeinfoCatalogPrinter)
 
-libsvn_printer = None
 
 def register_libsvn_printers(obj):
-    global libsvn_printer
+    """Register the pretty-printers for the object file OBJ."""
+
+    global libapr_printer, libapr_printer2, libsvn_printer, libsvn_printer2
 
+    # Printers registered later take precedence.
+    gdb.printing.register_pretty_printer(obj, libapr_printer)
+    gdb.printing.register_pretty_printer(obj, libapr_printer2)
     gdb.printing.register_pretty_printer(obj, libsvn_printer)
+    gdb.printing.register_pretty_printer(obj, libsvn_printer2)
 
 
-build_libsvn_printer()
+# Construct the pretty-printer objects, once, at GDB start-up time when this
+# Python module is loaded.  (Registration happens later, once per object
+# file.)
+build_libsvn_printers()

Modified: subversion/branches/ev2-export/tools/dev/merge-graph.py
URL: 
http://svn.apache.org/viewvc/subversion/branches/ev2-export/tools/dev/merge-graph.py?rev=1308894&r1=1308893&r2=1308894&view=diff
==============================================================================
--- subversion/branches/ev2-export/tools/dev/merge-graph.py (original)
+++ subversion/branches/ev2-export/tools/dev/merge-graph.py Tue Apr  3 13:32:48 
2012
@@ -37,7 +37,7 @@ if __name__ == '__main__':
 
   for config_filename in sys.argv[1:]:
     print prog_name + ": reading '" + config_filename + "',",
-    graph = MergeDot(config_filename, rankdir='LR')
+    graph = MergeDot(config_filename, rankdir='LR', dpi='72')
     print "writing '" + graph.filename + "'"
     graph.write_png(graph.filename)
 

Modified: subversion/branches/ev2-export/tools/dev/mergegraph/mergegraph.py
URL: 
http://svn.apache.org/viewvc/subversion/branches/ev2-export/tools/dev/mergegraph/mergegraph.py?rev=1308894&r1=1308893&r2=1308894&view=diff
==============================================================================
--- subversion/branches/ev2-export/tools/dev/mergegraph/mergegraph.py (original)
+++ subversion/branches/ev2-export/tools/dev/mergegraph/mergegraph.py Tue Apr  
3 13:32:48 2012
@@ -136,7 +136,7 @@ class MergeGraph(pydot.Graph):
              label='"' + label + '"',
              color=color, fontcolor=color,
              style='bold')
-    if kind == 'cherry':
+    if kind.startswith('cherry'):
       e.set_style('dashed')
     graph.add_edge(e)
 
@@ -158,7 +158,7 @@ class MergeGraph(pydot.Graph):
     """Add a merge"""
     base_node, src_node, tgt_node, kind = merge
 
-    if base_node and src_node:  # and kind != 'cherry':
+    if base_node and src_node:  # and not kind.startwith('cherry'):
       graph.mk_mergeinfo_edge(base_node, src_node, important)
 
     # Merge target node

Modified: subversion/branches/ev2-export/tools/dev/unix-build/Makefile.svn
URL: 
http://svn.apache.org/viewvc/subversion/branches/ev2-export/tools/dev/unix-build/Makefile.svn?rev=1308894&r1=1308893&r2=1308894&view=diff
==============================================================================
--- subversion/branches/ev2-export/tools/dev/unix-build/Makefile.svn (original)
+++ subversion/branches/ev2-export/tools/dev/unix-build/Makefile.svn Tue Apr  3 
13:32:48 2012
@@ -62,16 +62,16 @@ BDB_MAJOR_VER       = 4.7
 BDB_VER                = $(BDB_MAJOR_VER).25
 APR_VER                = 1.4.5
 APR_ICONV_VER  = 1.2.1
-GNU_ICONV_VER  = 1.13.1
+GNU_ICONV_VER  = 1.14
 APR_UTIL_VER   = 1.3.12
-HTTPD_VER      = 2.2.19
+HTTPD_VER      = 2.2.22
 NEON_VER       = 0.29.6
-SERF_VER       = 1.0.0
+SERF_VER       = 1.0.3
 SERF_OLD_VER   = 0.3.1
-CYRUS_SASL_VER = 2.1.23
-SQLITE_VER     = 3070603
+CYRUS_SASL_VER = 2.1.25
+SQLITE_VER     = 3071100
 LIBMAGIC_VER   = 5.11
-RUBY_VER       = 1.8.7-p334
+RUBY_VER       = 1.8.7-p358
 BZ2_VER        = 1.0.6
 PYTHON_VER     = 2.7.2
 

Modified: subversion/branches/ev2-export/tools/dev/which-error.py
URL: 
http://svn.apache.org/viewvc/subversion/branches/ev2-export/tools/dev/which-error.py?rev=1308894&r1=1308893&r2=1308894&view=diff
==============================================================================
--- subversion/branches/ev2-export/tools/dev/which-error.py (original)
+++ subversion/branches/ev2-export/tools/dev/which-error.py Tue Apr  3 13:32:48 
2012
@@ -29,6 +29,7 @@
 # $LastChangedRevision$
 #
 
+import errno
 import sys
 import os.path
 import re
@@ -68,6 +69,13 @@ codes.  This can be done in variety of w
 
 def get_errors():
   errs = {}
+  ## errno values.
+  errs.update(errno.errorcode)
+  ## APR-defined errors, from apr_errno.h.
+  for line in open(os.path.join(os.path.dirname(sys.argv[0]), 'aprerr.txt')):
+    key, _, val = line.split()
+    errs[int(val)] = key
+  ## Subversion errors, from svn_error_codes.h.
   for key in vars(core):
     if key.find('SVN_ERR_') == 0:
       try:


Reply via email to