subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1200926 [12/12] - in /subversion/branches/moves-scan-log: ./ build/ build/ac-macros/ build/generator/ build/generator/templates/ build/win32/ contrib/client-side/emacs/ notes/ subversion/bindings/javahl/native/ subversion/include/ subversi...
Date Fri, 11 Nov 2011 16:06:51 GMT
Modified: subversion/branches/moves-scan-log/subversion/tests/libsvn_subr/mergeinfo-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/moves-scan-log/subversion/tests/libsvn_subr/mergeinfo-test.c?rev=1200926&r1=1200925&r2=1200926&view=diff
==============================================================================
--- subversion/branches/moves-scan-log/subversion/tests/libsvn_subr/mergeinfo-test.c (original)
+++ subversion/branches/moves-scan-log/subversion/tests/libsvn_subr/mergeinfo-test.c Fri Nov
11 16:06:45 2011
@@ -483,8 +483,7 @@ test_rangelist_reverse(apr_pool_t *pool)
   svn_merge_range_t expected_rangelist[3] =
     { {10, 9, TRUE}, {7, 4, TRUE}, {3, 2, TRUE} };
 
-  SVN_ERR(svn_mergeinfo_parse(&info1, "/trunk: 3,5-7,10", pool));
-  rangelist = apr_hash_get(info1, "/trunk", APR_HASH_KEY_STRING);
+  SVN_ERR(svn_rangelist__parse(&rangelist, "3,5-7,10", pool));
 
   SVN_ERR(svn_rangelist_reverse(rangelist, pool));
 
@@ -506,11 +505,9 @@ test_rangelist_intersect(apr_pool_t *poo
     { {0, 1, TRUE}, {2, 4, TRUE}, {11, 12, TRUE}, {30, 32, FALSE},
       {39, 42, TRUE} };
 
-  SVN_ERR(svn_mergeinfo_parse(&info1, "/trunk: 1-6,12-16,30-32*,40-42", pool));
-  SVN_ERR(svn_mergeinfo_parse(&info2, "/trunk: 1,3-4*,7,9,11-12,31-34*,38-44",
-                              pool));
-  rangelist1 = apr_hash_get(info1, "/trunk", APR_HASH_KEY_STRING);
-  rangelist2 = apr_hash_get(info2, "/trunk", APR_HASH_KEY_STRING);
+  SVN_ERR(svn_rangelist__parse(&rangelist1, "1-6,12-16,30-32*,40-42", pool));
+  SVN_ERR(svn_rangelist__parse(&rangelist2, "1,3-4*,7,9,11-12,31-34*,38-44",
+                               pool));
 
   /* Check the intersection while considering inheritance twice, reversing
      the order of the rangelist arguments on the second call to
@@ -605,6 +602,7 @@ test_merge_mergeinfo(apr_pool_t *pool)
   struct mergeinfo_merge_path_range
     {
       const char *path;
+      int expected_n;
       svn_merge_range_t expected_rngs[MAX_NBR_MERGEINFO_RANGES];
     };
 
@@ -627,75 +625,75 @@ test_merge_mergeinfo(apr_pool_t *pool)
       /* One path, intersecting inheritable ranges */
       { "/trunk: 5-10",
         "/trunk: 6", 1,
-        { {"/trunk", { {4, 10, TRUE} } } } },
+        { {"/trunk", 1, { {4, 10, TRUE} } } } },
 
       /* One path, intersecting non-inheritable ranges */
       { "/trunk: 5-10*",
         "/trunk: 6*", 1,
-        { {"/trunk", { {4, 10, FALSE} } } } },
+        { {"/trunk", 1, { {4, 10, FALSE} } } } },
 
       /* One path, intersecting ranges with different inheritability */
       { "/trunk: 5-10",
         "/trunk: 6*", 1,
-        { {"/trunk", { {4, 10, TRUE} } } } },
+        { {"/trunk", 1, { {4, 10, TRUE} } } } },
 
       /* One path, intersecting ranges with different inheritability */
       { "/trunk: 5-10*",
         "/trunk: 6", 1,
-        { {"/trunk", { {4, 5, FALSE}, {5, 6, TRUE}, {6, 10, FALSE} } } } },
+        { {"/trunk", 3, { {4, 5, FALSE}, {5, 6, TRUE}, {6, 10, FALSE} } } } },
 
       /* Adjacent ranges all inheritable ranges */
       { "/trunk: 1,3,5-11,13",
         "/trunk: 2,4,12,14-22", 1,
-         { {"/trunk", { {0, 22, TRUE} } } } },
+        { {"/trunk", 1, { {0, 22, TRUE} } } } },
 
       /* Adjacent ranges all non-inheritable ranges */
       { "/trunk: 1*,3*,5-11*,13*",
         "/trunk: 2*,4*,12*,14-22*", 1,
-         { {"/trunk", { {0, 22, FALSE} } } } },
+        { {"/trunk", 1, { {0, 22, FALSE} } } } },
 
       /* Adjacent ranges differing inheritability */
       { "/trunk: 1*,3*,5-11*,13*",
         "/trunk: 2,4,12,14-22", 1,
-         { {"/trunk", { { 0,  1, FALSE}, { 1,  2, TRUE},
-                        { 2,  3, FALSE}, { 3,  4, TRUE},
-                        { 4, 11, FALSE}, {11, 12, TRUE},
-                        {12, 13, FALSE}, {13, 22, TRUE} } } } },
+        { {"/trunk", 8, { { 0,  1, FALSE}, { 1,  2, TRUE},
+                          { 2,  3, FALSE}, { 3,  4, TRUE},
+                          { 4, 11, FALSE}, {11, 12, TRUE},
+                          {12, 13, FALSE}, {13, 22, TRUE} } } } },
 
       /* Adjacent ranges differing inheritability */
       { "/trunk: 1,3,5-11,13",
         "/trunk: 2*,4*,12*,14-22*", 1,
-         { {"/trunk", { { 0,  1, TRUE}, { 1,  2, FALSE},
-                        { 2,  3, TRUE}, { 3,  4, FALSE},
-                        { 4, 11, TRUE}, {11, 12, FALSE},
-                        {12, 13, TRUE}, {13, 22, FALSE} } } } },
+        { {"/trunk", 8, { { 0,  1, TRUE}, { 1,  2, FALSE},
+                          { 2,  3, TRUE}, { 3,  4, FALSE},
+                          { 4, 11, TRUE}, {11, 12, FALSE},
+                          {12, 13, TRUE}, {13, 22, FALSE} } } } },
 
       /* Two paths all inheritable ranges */
       { "/trunk::1: 3,5,7-9,10,11,13,14\n/fred:8-10",
         "/trunk::1: 1-4,6\n/fred:9-12", 2,
-        { {"/trunk::1", { {0, 11, TRUE}, {12, 14, TRUE} } },
-          {"/fred",  { {7, 12, TRUE} } } } },
+        { {"/trunk::1", 2, { {0, 11, TRUE}, {12, 14, TRUE} } },
+          {"/fred",     1, { {7, 12, TRUE} } } } },
 
       /* Two paths all non-inheritable ranges */
       { "/trunk: 3*,5*,7-9*,10*,11*,13*,14*\n/fred:8-10*",
         "/trunk: 1-4*,6*\n/fred:9-12*", 2,
-        { {"/trunk", { {0, 11, FALSE}, {12, 14, FALSE} } },
-          {"/fred",  { {7, 12, FALSE} } } } },
+        { {"/trunk", 2, { {0, 11, FALSE}, {12, 14, FALSE} } },
+          {"/fred",  1, { {7, 12, FALSE} } } } },
 
       /* Two paths mixed inheritability */
       { "/trunk: 3,5*,7-9,10,11*,13,14\n/fred:8-10",
         "/trunk: 1-4,6\n/fred:9-12*", 2,
-        { {"/trunk", { { 0,  4, TRUE }, { 4,  5, FALSE}, {5, 10, TRUE},
-                       {10, 11, FALSE}, {12, 14, TRUE } } },
-          {"/fred",  { { 7, 10, TRUE }, {10, 12, FALSE} } } } },
+        { {"/trunk", 5, { { 0,  4, TRUE }, { 4,  5, FALSE}, {5, 10, TRUE},
+                          {10, 11, FALSE}, {12, 14, TRUE } } },
+          {"/fred",  2, { { 7, 10, TRUE }, {10, 12, FALSE} } } } },
 
       /* A slew of different paths but no ranges to be merged */
       { "/trunk: 3,5-9*\n/betty: 2-4",
         "/fred: 1-18\n/:barney: 1,3-43", 4,
-        { {"/trunk",   { {2,  3, TRUE}, {4,  9, FALSE} } },
-          {"/betty",   { {1,  4, TRUE} } },
-          {"/:barney", { {0,  1, TRUE}, {2, 43, TRUE} } },
-          {"/fred",    { {0, 18, TRUE} } } } }
+        { {"/trunk",   2, { {2,  3, TRUE}, {4,  9, FALSE} } },
+          {"/betty",   1, { {1,  4, TRUE} } },
+          {"/:barney", 2, { {0,  1, TRUE}, {2, 43, TRUE} } },
+          {"/fred",    1, { {0, 18, TRUE} } } } }
     };
 
   for (i = 0; i < NBR_MERGEINFO_MERGES; i++)
@@ -730,36 +728,18 @@ test_merge_mergeinfo(apr_pool_t *pool)
 
       for (j = 0; j < mergeinfo[i].expected_paths; j++)
         {
-          int k;
           apr_array_header_t *rangelist =
             apr_hash_get(info1, mergeinfo[i].path_rngs[j].path,
                          APR_HASH_KEY_STRING);
           if (!rangelist)
             return fail(pool, "Missing path '%s' in merged mergeinfo",
-                        mergeinfo[i].path_rngs->path);
-          for (k = 0; k < rangelist->nelts; k++)
-            {
-              svn_merge_range_t *ranges =
-                APR_ARRAY_IDX(rangelist, k, svn_merge_range_t *);
-              if (ranges->start
-                    != mergeinfo[i].path_rngs[j].expected_rngs[k].start
-                  || ranges->end
-                    != mergeinfo[i].path_rngs[j].expected_rngs[k].end
-                  || ranges->inheritable
-                    != mergeinfo[i].path_rngs[j].expected_rngs[k].inheritable)
-                return fail(
-                  pool,
-                  "Range'%i-%i%s' not found in merged mergeinfo",
-                  mergeinfo[i].path_rngs->expected_rngs[k].start,
-                  mergeinfo[i].path_rngs->expected_rngs[k].end,
-                  mergeinfo[i].path_rngs->expected_rngs[k].inheritable
-                  ? "" : "*");
-            }
-          /* Were more ranges expected? */
-          if (k < MAX_NBR_MERGEINFO_RANGES
-              && mergeinfo[i].path_rngs[j].expected_rngs[k].start != 0)
-            return fail(pool,
-                        "Not all expected ranges found in merged mergeinfo");
+                        mergeinfo[i].path_rngs[j].path);
+          SVN_ERR(verify_ranges_match(
+                    rangelist,
+                    mergeinfo[i].path_rngs[j].expected_rngs,
+                    mergeinfo[i].path_rngs[j].expected_n,
+                    apr_psprintf(pool, "svn_rangelist_merge case %i:%i", i, j),
+                    "merge", pool));
         }
     }
 
@@ -800,39 +780,39 @@ test_remove_rangelist(apr_pool_t *pool)
   struct rangelist_remove_test_data test_data[SIZE_OF_RANGE_REMOVE_TEST_ARRAY] =
     {
       /* Eraser is a proper subset of whiteboard */
-      {"/A: 1-44",  "/A: 5",  2, { {0,  4, TRUE }, {5, 44, TRUE }},
-                              2, { {0,  4, TRUE }, {5, 44, TRUE }}},
-      {"/A: 1-44*", "/A: 5",  1, { {0, 44, FALSE} },
-                              2, { {0,  4, FALSE}, {5, 44, FALSE}}},
-      {"/A: 1-44",  "/A: 5*", 1, { {0, 44, TRUE } },
-                              2, { {0,  4, TRUE }, {5, 44, TRUE }}},
-      {"/A: 1-44*", "/A: 5*", 2, { {0,  4, FALSE}, {5, 44, FALSE}},
-                              2, { {0,  4, FALSE}, {5, 44, FALSE}}},
+      {"1-44",  "5",  2, { {0,  4, TRUE }, {5, 44, TRUE }},
+                      2, { {0,  4, TRUE }, {5, 44, TRUE }}},
+      {"1-44*", "5",  1, { {0, 44, FALSE} },
+                      2, { {0,  4, FALSE}, {5, 44, FALSE}}},
+      {"1-44",  "5*", 1, { {0, 44, TRUE } },
+                      2, { {0,  4, TRUE }, {5, 44, TRUE }}},
+      {"1-44*", "5*", 2, { {0,  4, FALSE}, {5, 44, FALSE}},
+                      2, { {0,  4, FALSE}, {5, 44, FALSE}}},
       /* Non-intersecting ranges...nothing is removed */
-      {"/A: 2-9,14-19",   "/A: 12",  2, { {1, 9, TRUE }, {13, 19, TRUE }},
-                                     2, { {1, 9, TRUE }, {13, 19, TRUE }}},
-      {"/A: 2-9*,14-19*", "/A: 12",  2, { {1, 9, FALSE}, {13, 19, FALSE}},
-                                     2, { {1, 9, FALSE}, {13, 19, FALSE}}},
-      {"/A: 2-9,14-19",   "/A: 12*", 2, { {1, 9, TRUE }, {13, 19, TRUE }},
-                                     2, { {1, 9, TRUE }, {13, 19, TRUE }}},
-      {"/A: 2-9*,14-19*", "/A: 12*", 2, { {1, 9, FALSE}, {13, 19, FALSE}},
-                                     2, { {1, 9, FALSE}, {13, 19, FALSE}}},
+      {"2-9,14-19",   "12",  2, { {1, 9, TRUE }, {13, 19, TRUE }},
+                             2, { {1, 9, TRUE }, {13, 19, TRUE }}},
+      {"2-9*,14-19*", "12",  2, { {1, 9, FALSE}, {13, 19, FALSE}},
+                             2, { {1, 9, FALSE}, {13, 19, FALSE}}},
+      {"2-9,14-19",   "12*", 2, { {1, 9, TRUE }, {13, 19, TRUE }},
+                             2, { {1, 9, TRUE }, {13, 19, TRUE }}},
+      {"2-9*,14-19*", "12*", 2, { {1, 9, FALSE}, {13, 19, FALSE}},
+                             2, { {1, 9, FALSE}, {13, 19, FALSE}}},
       /* Eraser overlaps whiteboard */
-      {"/A: 1,9-17",  "/A: 12-20",  2, { {0,  1, TRUE }, {8, 11, TRUE }},
-                                    2, { {0,  1, TRUE }, {8, 11, TRUE }}},
-      {"/A: 1,9-17*", "/A: 12-20",  2, { {0,  1, TRUE }, {8, 17, FALSE}},
-                                    2, { {0,  1, TRUE }, {8, 11, FALSE}}},
-      {"/A: 1,9-17",  "/A: 12-20*", 2, { {0,  1, TRUE }, {8, 17, TRUE }},
-                                    2, { {0,  1, TRUE }, {8, 11, TRUE }}},
-      {"/A: 1,9-17*", "/A: 12-20*", 2, { {0,  1, TRUE }, {8, 11, FALSE}},
-                                    2, { {0,  1, TRUE }, {8, 11, FALSE}}},
-      /* Empty mergeinfo (i.e. empty rangelist) */
-      {"",  "",               0, { {0, 0, FALSE}},
-                              0, { {0, 0, FALSE}}},
-      {"",  "/A: 5-8,10-100", 0, { {0, 0, FALSE}},
-                              0, { {0, 0, FALSE}}},
-      {"/A: 5-8,10-100",  "", 2, { {4, 8, TRUE }, {9, 100, TRUE }},
-                              2, { {4, 8, TRUE }, {9, 100, TRUE }}}
+      {"1,9-17",  "12-20",  2, { {0,  1, TRUE }, {8, 11, TRUE }},
+                            2, { {0,  1, TRUE }, {8, 11, TRUE }}},
+      {"1,9-17*", "12-20",  2, { {0,  1, TRUE }, {8, 17, FALSE}},
+                            2, { {0,  1, TRUE }, {8, 11, FALSE}}},
+      {"1,9-17",  "12-20*", 2, { {0,  1, TRUE }, {8, 17, TRUE }},
+                            2, { {0,  1, TRUE }, {8, 11, TRUE }}},
+      {"1,9-17*", "12-20*", 2, { {0,  1, TRUE }, {8, 11, FALSE}},
+                            2, { {0,  1, TRUE }, {8, 11, FALSE}}},
+      /* Empty rangelist */
+      {"",  "",           0, { {0, 0, FALSE}},
+                          0, { {0, 0, FALSE}}},
+      {"",  "5-8,10-100", 0, { {0, 0, FALSE}},
+                          0, { {0, 0, FALSE}}},
+      {"5-8,10-100",  "", 2, { {4, 8, TRUE }, {9, 100, TRUE }},
+                          2, { {4, 8, TRUE }, {9, 100, TRUE }}}
     };
 
   err = child_err = SVN_NO_ERROR;
@@ -847,10 +827,8 @@ test_remove_rangelist(apr_pool_t *pool)
           svn_string_t *whiteboard_starting;
           svn_string_t *whiteboard_ending;
 
-          SVN_ERR(svn_mergeinfo_parse(&info1, (test_data[i]).eraser, pool));
-          SVN_ERR(svn_mergeinfo_parse(&info2, (test_data[i]).whiteboard, pool));
-          eraser = apr_hash_get(info1, "/A", APR_HASH_KEY_STRING);
-          whiteboard = apr_hash_get(info2, "/A", APR_HASH_KEY_STRING);
+          SVN_ERR(svn_rangelist__parse(&eraser, test_data[i].eraser, pool));
+          SVN_ERR(svn_rangelist__parse(&whiteboard, test_data[i].whiteboard, pool));
 
           /* Represent empty mergeinfo with an empty rangelist. */
           if (eraser == NULL)
@@ -1201,118 +1179,118 @@ test_rangelist_merge(apr_pool_t *pool)
   struct rangelist_merge_test_data test_data[SIZE_OF_RANGE_MERGE_TEST_ARRAY] =
     {
       /* Non-intersecting ranges */
-      {"/A: 1-44",    "/A: 70-101",  2, {{ 0, 44, TRUE }, {69, 101, TRUE }}},
-      {"/A: 1-44*",   "/A: 70-101",  2, {{ 0, 44, FALSE}, {69, 101, TRUE }}},
-      {"/A: 1-44",    "/A: 70-101*", 2, {{ 0, 44, TRUE }, {69, 101, FALSE}}},
-      {"/A: 1-44*",   "/A: 70-101*", 2, {{ 0, 44, FALSE}, {69, 101, FALSE}}},
-      {"/A: 70-101",  "/A: 1-44",    2, {{ 0, 44, TRUE }, {69, 101, TRUE }}},
-      {"/A: 70-101*", "/A: 1-44",    2, {{ 0, 44, TRUE }, {69, 101, FALSE}}},
-      {"/A: 70-101",  "/A: 1-44*",   2, {{ 0, 44, FALSE}, {69, 101, TRUE }}},
-      {"/A: 70-101*", "/A: 1-44*",   2, {{ 0, 44, FALSE}, {69, 101, FALSE}}},
+      {"1-44",    "70-101",  2, {{ 0, 44, TRUE }, {69, 101, TRUE }}},
+      {"1-44*",   "70-101",  2, {{ 0, 44, FALSE}, {69, 101, TRUE }}},
+      {"1-44",    "70-101*", 2, {{ 0, 44, TRUE }, {69, 101, FALSE}}},
+      {"1-44*",   "70-101*", 2, {{ 0, 44, FALSE}, {69, 101, FALSE}}},
+      {"70-101",  "1-44",    2, {{ 0, 44, TRUE }, {69, 101, TRUE }}},
+      {"70-101*", "1-44",    2, {{ 0, 44, TRUE }, {69, 101, FALSE}}},
+      {"70-101",  "1-44*",   2, {{ 0, 44, FALSE}, {69, 101, TRUE }}},
+      {"70-101*", "1-44*",   2, {{ 0, 44, FALSE}, {69, 101, FALSE}}},
 
       /* Intersecting ranges with same starting and ending revisions */
-      {"/A: 4-20",  "/A: 4-20",  1, {{3, 20, TRUE }}},
-      {"/A: 4-20*", "/A: 4-20",  1, {{3, 20, TRUE }}},
-      {"/A: 4-20",  "/A: 4-20*", 1, {{3, 20, TRUE }}},
-      {"/A: 4-20*", "/A: 4-20*", 1, {{3, 20, FALSE}}},
+      {"4-20",  "4-20",  1, {{3, 20, TRUE }}},
+      {"4-20*", "4-20",  1, {{3, 20, TRUE }}},
+      {"4-20",  "4-20*", 1, {{3, 20, TRUE }}},
+      {"4-20*", "4-20*", 1, {{3, 20, FALSE}}},
 
       /* Intersecting ranges with same starting revision */
-      {"/A: 6-17",  "/A: 6-12",  1, {{5, 17, TRUE}}},
-      {"/A: 6-17*", "/A: 6-12",  2, {{5, 12, TRUE }, {12, 17, FALSE}}},
-      {"/A: 6-17",  "/A: 6-12*", 1, {{5, 17, TRUE }}},
-      {"/A: 6-17*", "/A: 6-12*", 1, {{5, 17, FALSE}}},
-      {"/A: 6-12",  "/A: 6-17",  1, {{5, 17, TRUE }}},
-      {"/A: 6-12*", "/A: 6-17",  1, {{5, 17, TRUE }}},
-      {"/A: 6-12",  "/A: 6-17*", 2, {{5, 12, TRUE }, {12, 17, FALSE}}},
-      {"/A: 6-12*", "/A: 6-17*", 1, {{5, 17, FALSE}}},
+      {"6-17",  "6-12",  1, {{5, 17, TRUE}}},
+      {"6-17*", "6-12",  2, {{5, 12, TRUE }, {12, 17, FALSE}}},
+      {"6-17",  "6-12*", 1, {{5, 17, TRUE }}},
+      {"6-17*", "6-12*", 1, {{5, 17, FALSE}}},
+      {"6-12",  "6-17",  1, {{5, 17, TRUE }}},
+      {"6-12*", "6-17",  1, {{5, 17, TRUE }}},
+      {"6-12",  "6-17*", 2, {{5, 12, TRUE }, {12, 17, FALSE}}},
+      {"6-12*", "6-17*", 1, {{5, 17, FALSE}}},
 
       /* Intersecting ranges with same ending revision */
-      {"/A: 5-77",   "/A: 44-77",  1, {{4, 77, TRUE }}},
-      {"/A: 5-77*",  "/A: 44-77",  2, {{4, 43, FALSE}, {43, 77, TRUE}}},
-      {"/A: 5-77",   "/A: 44-77*", 1, {{4, 77, TRUE }}},
-      {"/A: 5-77*",  "/A: 44-77*", 1, {{4, 77, FALSE}}},
-      {"/A: 44-77",  "/A: 5-77",   1, {{4, 77, TRUE }}},
-      {"/A: 44-77*", "/A: 5-77",   1, {{4, 77, TRUE }}},
-      {"/A: 44-77",  "/A: 5-77*",  2, {{4, 43, FALSE}, {43, 77, TRUE}}},
-      {"/A: 44-77*", "/A: 5-77*",  1, {{4, 77, FALSE}}},
+      {"5-77",   "44-77",  1, {{4, 77, TRUE }}},
+      {"5-77*",  "44-77",  2, {{4, 43, FALSE}, {43, 77, TRUE}}},
+      {"5-77",   "44-77*", 1, {{4, 77, TRUE }}},
+      {"5-77*",  "44-77*", 1, {{4, 77, FALSE}}},
+      {"44-77",  "5-77",   1, {{4, 77, TRUE }}},
+      {"44-77*", "5-77",   1, {{4, 77, TRUE }}},
+      {"44-77",  "5-77*",  2, {{4, 43, FALSE}, {43, 77, TRUE}}},
+      {"44-77*", "5-77*",  1, {{4, 77, FALSE}}},
 
       /* Intersecting ranges with different starting and ending revision
          where one range is a proper subset of the other. */
-      {"/A: 12-24",  "/A: 20-23",  1, {{11, 24, TRUE }}},
-      {"/A: 12-24*", "/A: 20-23",  3, {{11, 19, FALSE}, {19, 23, TRUE },
-                                       {23, 24, FALSE}}},
-      {"/A: 12-24",  "/A: 20-23*", 1, {{11, 24, TRUE }}},
-      {"/A: 12-24*", "/A: 20-23*", 1, {{11, 24, FALSE}}},
-      {"/A: 20-23",  "/A: 12-24",  1, {{11, 24, TRUE }}},
-      {"/A: 20-23*", "/A: 12-24",  1, {{11, 24, TRUE }}},
-      {"/A: 20-23",  "/A: 12-24*", 3, {{11, 19, FALSE}, {19, 23, TRUE },
-                                       {23, 24, FALSE}}},
-      {"/A: 20-23*", "/A: 12-24*", 1, {{11, 24, FALSE}}},
+      {"12-24",  "20-23",  1, {{11, 24, TRUE }}},
+      {"12-24*", "20-23",  3, {{11, 19, FALSE}, {19, 23, TRUE },
+                               {23, 24, FALSE}}},
+      {"12-24",  "20-23*", 1, {{11, 24, TRUE }}},
+      {"12-24*", "20-23*", 1, {{11, 24, FALSE}}},
+      {"20-23",  "12-24",  1, {{11, 24, TRUE }}},
+      {"20-23*", "12-24",  1, {{11, 24, TRUE }}},
+      {"20-23",  "12-24*", 3, {{11, 19, FALSE}, {19, 23, TRUE },
+                               {23, 24, FALSE}}},
+      {"20-23*", "12-24*", 1, {{11, 24, FALSE}}},
 
       /* Intersecting ranges with different starting and ending revision
          where neither range is a proper subset of the other. */
-      {"/A: 50-73",  "/A: 60-99",  1, {{49, 99, TRUE }}},
-      {"/A: 50-73*", "/A: 60-99",  2, {{49, 59, FALSE}, {59, 99, TRUE }}},
-      {"/A: 50-73",  "/A: 60-99*", 2, {{49, 73, TRUE }, {73, 99, FALSE}}},
-      {"/A: 50-73*", "/A: 60-99*", 1, {{49, 99, FALSE}}},
-      {"/A: 60-99",  "/A: 50-73",  1, {{49, 99, TRUE }}},
-      {"/A: 60-99*", "/A: 50-73",  2, {{49, 73, TRUE }, {73, 99, FALSE}}},
-      {"/A: 60-99",  "/A: 50-73*", 2, {{49, 59, FALSE}, {59, 99, TRUE }}},
-      {"/A: 60-99*", "/A: 50-73*", 1, {{49, 99, FALSE}}},
+      {"50-73",  "60-99",  1, {{49, 99, TRUE }}},
+      {"50-73*", "60-99",  2, {{49, 59, FALSE}, {59, 99, TRUE }}},
+      {"50-73",  "60-99*", 2, {{49, 73, TRUE }, {73, 99, FALSE}}},
+      {"50-73*", "60-99*", 1, {{49, 99, FALSE}}},
+      {"60-99",  "50-73",  1, {{49, 99, TRUE }}},
+      {"60-99*", "50-73",  2, {{49, 73, TRUE }, {73, 99, FALSE}}},
+      {"60-99",  "50-73*", 2, {{49, 59, FALSE}, {59, 99, TRUE }}},
+      {"60-99*", "50-73*", 1, {{49, 99, FALSE}}},
 
       /* Multiple ranges. */
-      {"/A: 1-5,7,12-13",    "/A: 2-17",  1, {{0,  17, TRUE }}},
-      {"/A: 1-5*,7*,12-13*", "/A: 2-17*", 1, {{0,  17, FALSE}}},
+      {"1-5,7,12-13",    "2-17",  1, {{0,  17, TRUE }}},
+      {"1-5*,7*,12-13*", "2-17*", 1, {{0,  17, FALSE}}},
 
-      {"/A: 1-5,7,12-13",    "/A: 2-17*", 6,
+      {"1-5,7,12-13",    "2-17*", 6,
        {{0,  5, TRUE }, { 5,  6, FALSE}, { 6,  7, TRUE },
         {7, 11, FALSE}, {11, 13, TRUE }, {13, 17, FALSE}}},
 
-      {"/A: 1-5*,7*,12-13*", "/A: 2-17", 2,
+      {"1-5*,7*,12-13*", "2-17", 2,
        {{0, 1, FALSE}, {1, 17, TRUE }}},
 
-      {"/A: 2-17",  "/A: 1-5,7,12-13",    1, {{0,  17, TRUE }}},
-      {"/A: 2-17*", "/A: 1-5*,7*,12-13*", 1, {{0,  17, FALSE}}},
+      {"2-17",  "1-5,7,12-13",    1, {{0,  17, TRUE }}},
+      {"2-17*", "1-5*,7*,12-13*", 1, {{0,  17, FALSE}}},
 
-      {"/A: 2-17*", "/A: 1-5,7,12-13", 6,
+      {"2-17*", "1-5,7,12-13", 6,
        {{0,  5, TRUE }, { 5,  6, FALSE}, { 6,  7, TRUE },
         {7, 11, FALSE}, {11, 13, TRUE }, {13, 17, FALSE}}},
 
-      {"/A: 2-17", "/A: 1-5*,7*,12-13*", 2,
+      {"2-17", "1-5*,7*,12-13*", 2,
        {{0, 1, FALSE}, {1, 17, TRUE}}},
 
-      {"/A: 3-4*,10-15,20", "/A: 5-60*", 5,
+      {"3-4*,10-15,20", "5-60*", 5,
        {{2, 9, FALSE}, {9, 15, TRUE}, {15, 19, FALSE},{19, 20, TRUE},
         {20, 60, FALSE}}},
 
-      {"/A: 5-60*", "/A: 3-4*,10-15,20", 5,
+      {"5-60*", "3-4*,10-15,20", 5,
        {{2, 9, FALSE}, {9, 15, TRUE}, {15, 19, FALSE},{19, 20, TRUE},
         {20, 60, FALSE}}},
 
-      {"/A: 3-4*,50-100*", "/A: 5-60*", 1, {{2, 100, FALSE}}},
+      {"3-4*,50-100*", "5-60*", 1, {{2, 100, FALSE}}},
 
-      {"/A: 5-60*", "/A: 3-4*,50-100*", 1, {{2, 100, FALSE}}},
+      {"5-60*", "3-4*,50-100*", 1, {{2, 100, FALSE}}},
 
-      {"/A: 3-4*,50-100", "/A: 5-60*", 2, {{2, 49, FALSE}, {49, 100, TRUE}}},
+      {"3-4*,50-100", "5-60*", 2, {{2, 49, FALSE}, {49, 100, TRUE}}},
 
-      {"/A: 5-60*", "/A: 3-4*,50-100", 2, {{2, 49, FALSE}, {49, 100, TRUE}}},
+      {"5-60*", "3-4*,50-100", 2, {{2, 49, FALSE}, {49, 100, TRUE}}},
 
-      {"/A: 3-4,50-100*", "/A: 5-60", 2, {{2, 60, TRUE}, {60, 100, FALSE}}},
+      {"3-4,50-100*", "5-60", 2, {{2, 60, TRUE}, {60, 100, FALSE}}},
 
-      {"/A: 5-60", "/A: 3-4,50-100*", 2, {{2, 60, TRUE}, {60, 100, FALSE}}},
+      {"5-60", "3-4,50-100*", 2, {{2, 60, TRUE}, {60, 100, FALSE}}},
 
-      {"/A: 5,9,11-15,17,200-300,999", "/A: 7-50", 4,
+      {"5,9,11-15,17,200-300,999", "7-50", 4,
        {{4, 5, TRUE}, {6, 50, TRUE}, {199, 300, TRUE}, {998, 999, TRUE}}},
 
       /* A rangelist merged with an empty rangelist should equal the
          non-empty rangelist but in compacted form. */
-      {"/A: 1-44,45,46,47-50",       "",  1, {{ 0, 50, TRUE }}},
-      {"/A: 1,2,3,4,5,6,7,8",        "",  1, {{ 0, 8,  TRUE }}},
-      {"/A: 6-10,12-13,14,15,16-22", "",  2,
+      {"1-44,45,46,47-50",       "",  1, {{ 0, 50, TRUE }}},
+      {"1,2,3,4,5,6,7,8",        "",  1, {{ 0, 8,  TRUE }}},
+      {"6-10,12-13,14,15,16-22", "",  2,
        {{ 5, 10, TRUE }, { 11, 22, TRUE }}},
-      {"", "/A: 1-44,45,46,47-50",        1, {{ 0, 50, TRUE }}},
-      {"", "/A: 1,2,3,4,5,6,7,8",         1, {{ 0, 8,  TRUE }}},
-      {"", "/A: 6-10,12-13,14,15,16-22",  2,
+      {"", "1-44,45,46,47-50",        1, {{ 0, 50, TRUE }}},
+      {"", "1,2,3,4,5,6,7,8",         1, {{ 0, 8,  TRUE }}},
+      {"", "6-10,12-13,14,15,16-22",  2,
        {{ 5, 10, TRUE }, { 11, 22, TRUE }}},
 
       /* An empty rangelist merged with an empty rangelist is, drum-roll
@@ -1325,10 +1303,8 @@ test_rangelist_merge(apr_pool_t *pool)
     {
       svn_string_t *rangelist2_starting, *rangelist2_ending;
 
-      SVN_ERR(svn_mergeinfo_parse(&info1, (test_data[i]).mergeinfo1, pool));
-      SVN_ERR(svn_mergeinfo_parse(&info2, (test_data[i]).mergeinfo2, pool));
-      rangelist1 = apr_hash_get(info1, "/A", APR_HASH_KEY_STRING);
-      rangelist2 = apr_hash_get(info2, "/A", APR_HASH_KEY_STRING);
+      SVN_ERR(svn_rangelist__parse(&rangelist1, test_data[i].mergeinfo1, pool));
+      SVN_ERR(svn_rangelist__parse(&rangelist2, test_data[i].mergeinfo2, pool));
 
       /* Create empty rangelists if necessary. */
       if (rangelist1 == NULL)
@@ -1412,7 +1388,7 @@ test_rangelist_diff(apr_pool_t *pool)
   #define SIZE_OF_RANGE_DIFF_TEST_ARRAY 16
   /* The actual test data array.
 
-                    'from' --> {"/A: 1,5-8",  "/A: 1,6,10-12", <-- 'to'
+                    'from' --> {"1,5-8",  "1,6,10-12", <-- 'to'
       Number of adds when  -->  1, { { 9, 12, TRUE } },
       considering inheritance
 
@@ -1430,97 +1406,97 @@ test_rangelist_diff(apr_pool_t *pool)
   struct rangelist_diff_test_data test_data[SIZE_OF_RANGE_DIFF_TEST_ARRAY] =
     {
       /* Add and Delete */
-      {"/A: 1",  "/A: 3",
+      {"1",  "3",
        1, { { 2, 3, TRUE } },
        1, { { 0, 1, TRUE } },
        1, { { 2, 3, TRUE } },
        1, { { 0, 1, TRUE } } },
 
       /* Add only */
-      {"/A: 1",  "/A: 1,3",
+      {"1",  "1,3",
        1, { { 2, 3, TRUE } },
        0, { { 0, 0, FALSE } },
        1, { { 2, 3, TRUE } },
        0, { { 0, 0, FALSE } } },
 
       /* Delete only */
-      {"/A: 1,3",  "/A: 1",
+      {"1,3",  "1",
        0, { { 0, 0, FALSE } },
        1, { { 2, 3, TRUE  } },
        0, { { 0, 0, FALSE } },
        1, { { 2, 3, TRUE  } } },
 
       /* No diff */
-      {"/A: 1,3",  "/A: 1,3",
+      {"1,3",  "1,3",
        0, { { 0, 0, FALSE } },
        0, { { 0, 0, FALSE } },
        0, { { 0, 0, FALSE } },
        0, { { 0, 0, FALSE } } },
 
-      {"/A: 1,3*",  "/A: 1,3*",
+      {"1,3*",  "1,3*",
        0, { { 0, 0, FALSE } },
        0, { { 0, 0, FALSE } },
        0, { { 0, 0, FALSE } },
        0, { { 0, 0, FALSE } } },
 
       /* Adds and Deletes */
-      {"/A: 1,5-8",  "/A: 1,6,10-12",
+      {"1,5-8",  "1,6,10-12",
        1, { { 9, 12, TRUE } },
        2, { { 4, 5, TRUE }, { 6, 8, TRUE } },
        1, { { 9, 12, TRUE } },
        2, { { 4, 5, TRUE }, { 6, 8, TRUE } } },
 
-      {"/A: 6*",  "/A: 6",
+      {"6*",  "6",
        1, { { 5, 6, TRUE  } },
        1, { { 5, 6, FALSE } },
        0, { { 0, 0, FALSE } },
        0, { { 0, 0, FALSE } } },
 
       /* Intersecting range with different inheritability */
-      {"/A: 6",  "/A: 6*",
+      {"6",  "6*",
        1, { { 5, 6, FALSE } },
        1, { { 5, 6, TRUE  } },
        0, { { 0, 0, FALSE } },
        0, { { 0, 0, FALSE } } },
 
-      {"/A: 6*",  "/A: 6",
+      {"6*",  "6",
        1, { { 5, 6, TRUE  } },
        1, { { 5, 6, FALSE } },
        0, { { 0, 0, FALSE } },
        0, { { 0, 0, FALSE } } },
 
-      {"/A: 1,5-8",  "/A: 1,6*,10-12",
+      {"1,5-8",  "1,6*,10-12",
        2, { { 5,  6, FALSE }, { 9, 12, TRUE } },
        1, { { 4,  8, TRUE  } },
        1, { { 9, 12, TRUE  } },
        2, { { 4,  5, TRUE  }, { 6,  8, TRUE } } },
 
-     {"/A: 1,5-8*",  "/A: 1,6,10-12",
+     {"1,5-8*",  "1,6,10-12",
        2, { { 5,  6, TRUE  }, { 9, 12, TRUE  } },
        1, { { 4,  8, FALSE } },
        1, { { 9, 12, TRUE  } },
        2, { { 4,  5, FALSE }, { 6,  8, FALSE } } },
 
       /* Empty range diffs */
-      {"/A: 3-9",  "",
+      {"3-9",  "",
        0, { { 0, 0, FALSE } },
        1, { { 2, 9, TRUE  } },
        0, { { 0, 0, FALSE } },
        1, { { 2, 9, TRUE  } } },
 
-      {"/A: 3-9*",  "",
+      {"3-9*",  "",
        0, { { 0, 0, FALSE } },
        1, { { 2, 9, FALSE } },
        0, { { 0, 0, FALSE } },
        1, { { 2, 9, FALSE } } },
 
-      {"",  "/A: 3-9",
+      {"",  "3-9",
        1, { { 2, 9, TRUE  } },
        0, { { 0, 0, FALSE } },
        1, { { 2, 9, TRUE  } },
        0, { { 0, 0, FALSE } } },
 
-      {"",  "/A: 3-9*",
+      {"",  "3-9*",
        1, { { 2, 9, FALSE } },
        0, { { 0, 0, FALSE } },
        1, { { 2, 9, FALSE } },
@@ -1537,10 +1513,8 @@ test_rangelist_diff(apr_pool_t *pool)
   err = child_err = SVN_NO_ERROR;
   for (i = 0; i < SIZE_OF_RANGE_DIFF_TEST_ARRAY; i++)
     {
-      SVN_ERR(svn_mergeinfo_parse(&info1, (test_data[i]).to, pool));
-      SVN_ERR(svn_mergeinfo_parse(&info2, (test_data[i]).from, pool));
-      to = apr_hash_get(info1, "/A", APR_HASH_KEY_STRING);
-      from = apr_hash_get(info2, "/A", APR_HASH_KEY_STRING);
+      SVN_ERR(svn_rangelist__parse(&to, test_data[i].to, pool));
+      SVN_ERR(svn_rangelist__parse(&from, test_data[i].from, pool));
 
       /* Represent empty mergeinfo with an empty rangelist. */
       if (to == NULL)
@@ -1721,14 +1695,14 @@ struct svn_test_descriptor_t test_funcs[
     SVN_TEST_PASS2(test_diff_mergeinfo,
                    "diff of mergeinfo"),
     SVN_TEST_PASS2(test_merge_mergeinfo,
-                   "merging of mergeinfo hashs"),
+                   "merging of mergeinfo hashes"),
     SVN_TEST_PASS2(test_mergeinfo_intersect,
                    "intersection of mergeinfo"),
     SVN_TEST_PASS2(test_rangelist_to_string,
                    "turning rangelist back into a string"),
     SVN_TEST_PASS2(test_mergeinfo_to_string,
                    "turning mergeinfo back into a string"),
-    SVN_TEST_PASS2(test_rangelist_merge,
+    SVN_TEST_XFAIL2(test_rangelist_merge,
                    "merge of rangelists"),
     SVN_TEST_PASS2(test_rangelist_diff,
                    "diff of rangelists"),

Modified: subversion/branches/moves-scan-log/subversion/tests/libsvn_subr/path-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/moves-scan-log/subversion/tests/libsvn_subr/path-test.c?rev=1200926&r1=1200925&r2=1200926&view=diff
==============================================================================
--- subversion/branches/moves-scan-log/subversion/tests/libsvn_subr/path-test.c (original)
+++ subversion/branches/moves-scan-log/subversion/tests/libsvn_subr/path-test.c Fri Nov 11
16:06:45 2011
@@ -871,7 +871,7 @@ test_path_remove_component(apr_pool_t *p
   int i;
   svn_stringbuf_t *buf;
 
-  buf = svn_stringbuf_create("", pool);
+  buf = svn_stringbuf_create_empty(pool);
 
   i = 0;
   while (tests[i].path)

Modified: subversion/branches/moves-scan-log/subversion/tests/libsvn_subr/stream-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/moves-scan-log/subversion/tests/libsvn_subr/stream-test.c?rev=1200926&r1=1200925&r2=1200926&view=diff
==============================================================================
--- subversion/branches/moves-scan-log/subversion/tests/libsvn_subr/stream-test.c (original)
+++ subversion/branches/moves-scan-log/subversion/tests/libsvn_subr/stream-test.c Fri Nov
11 16:06:45 2011
@@ -67,7 +67,7 @@ test_stream_from_string(apr_pool_t *pool
       apr_size_t len;
 
       inbuf = svn_stringbuf_create(strings[i], subpool);
-      outbuf = svn_stringbuf_create("", subpool);
+      outbuf = svn_stringbuf_create_empty(subpool);
       stream = svn_stream_from_stringbuf(inbuf, subpool);
       len = TEST_BUF_SIZE;
       while (len == TEST_BUF_SIZE)
@@ -94,7 +94,7 @@ test_stream_from_string(apr_pool_t *pool
       apr_size_t amt_read, len;
 
       inbuf = svn_stringbuf_create(strings[i], subpool);
-      outbuf = svn_stringbuf_create("", subpool);
+      outbuf = svn_stringbuf_create_empty(subpool);
       stream = svn_stream_from_stringbuf(outbuf, subpool);
       amt_read = 0;
       while (amt_read < inbuf->len)
@@ -125,7 +125,7 @@ test_stream_from_string(apr_pool_t *pool
 static svn_stringbuf_t *
 generate_test_bytes(int num_bytes, apr_pool_t *pool)
 {
-  svn_stringbuf_t *buffer = svn_stringbuf_create("", pool);
+  svn_stringbuf_t *buffer = svn_stringbuf_create_empty(pool);
   int total, repeat, repeat_iter;
   char c;
 
@@ -189,8 +189,8 @@ test_stream_compressed(apr_pool_t *pool)
       apr_size_t len;
 
       origbuf = bufs[i];
-      inbuf = svn_stringbuf_create("", subpool);
-      outbuf = svn_stringbuf_create("", subpool);
+      inbuf = svn_stringbuf_create_empty(subpool);
+      outbuf = svn_stringbuf_create_empty(subpool);
 
       stream = svn_stream_compressed(svn_stream_from_stringbuf(outbuf,
                                                                subpool),
@@ -232,8 +232,8 @@ static svn_error_t *
 test_stream_tee(apr_pool_t *pool)
 {
   svn_stringbuf_t *test_bytes = generate_test_bytes(100, pool);
-  svn_stringbuf_t *output_buf1 = svn_stringbuf_create("", pool);
-  svn_stringbuf_t *output_buf2 = svn_stringbuf_create("", pool);
+  svn_stringbuf_t *output_buf1 = svn_stringbuf_create_empty(pool);
+  svn_stringbuf_t *output_buf2 = svn_stringbuf_create_empty(pool);
   svn_stream_t *source_stream = svn_stream_from_stringbuf(test_bytes, pool);
   svn_stream_t *output_stream1 = svn_stream_from_stringbuf(output_buf1, pool);
   svn_stream_t *output_stream2 = svn_stream_from_stringbuf(output_buf2, pool);
@@ -538,8 +538,8 @@ static svn_error_t *
 test_stream_base64(apr_pool_t *pool)
 {
   svn_stream_t *stream;
-  svn_stringbuf_t *actual = svn_stringbuf_create("", pool);
-  svn_stringbuf_t *expected = svn_stringbuf_create("", pool);
+  svn_stringbuf_t *actual = svn_stringbuf_create_empty(pool);
+  svn_stringbuf_t *expected = svn_stringbuf_create_empty(pool);
   int i;
   static const char *strings[] = {
     "fairly boring test data... blah blah",

Modified: subversion/branches/moves-scan-log/subversion/tests/libsvn_subr/string-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/moves-scan-log/subversion/tests/libsvn_subr/string-test.c?rev=1200926&r1=1200925&r2=1200926&view=diff
==============================================================================
--- subversion/branches/moves-scan-log/subversion/tests/libsvn_subr/string-test.c (original)
+++ subversion/branches/moves-scan-log/subversion/tests/libsvn_subr/string-test.c Fri Nov
11 16:06:45 2011
@@ -419,7 +419,7 @@ test15(apr_pool_t *pool)
 static svn_error_t *
 test16(apr_pool_t *pool)
 {
-  a = svn_stringbuf_create("", pool);
+  a = svn_stringbuf_create_empty(pool);
 
   return test_find_char_backward(a->data, a->len, ',', 0, pool);
 }

Modified: subversion/branches/moves-scan-log/subversion/tests/libsvn_subr/subst_translate-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/moves-scan-log/subversion/tests/libsvn_subr/subst_translate-test.c?rev=1200926&r1=1200925&r2=1200926&view=diff
==============================================================================
--- subversion/branches/moves-scan-log/subversion/tests/libsvn_subr/subst_translate-test.c
(original)
+++ subversion/branches/moves-scan-log/subversion/tests/libsvn_subr/subst_translate-test.c
Fri Nov 11 16:06:45 2011
@@ -115,7 +115,7 @@ test_svn_subst_translate_string2_null_en
     svn_string_t *new_value = NULL;
     svn_boolean_t translated_to_utf8 = FALSE;
     svn_boolean_t translated_line_endings = TRUE;
-    /* 'Æ', which is 0xc6 in both ISO-8859-1 and Windows-1252 */
+    /* 'Æ', which is 0xc6 in both ISO-8859-1 and Windows-1252 */
     svn_string_t *source_string = svn_string_create("\xc6", pool);
 
     SVN_ERR(svn_subst_translate_string2(&new_value, &translated_to_utf8,

Propchange: subversion/branches/moves-scan-log/subversion/tests/libsvn_wc/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Fri Nov 11 16:06:45 2011
@@ -8,3 +8,4 @@ svn-test-work
 entries-compat-test
 op-depth-test
 wc-lock-tester
+wc-incomplete-tester

Modified: subversion/branches/moves-scan-log/subversion/tests/libsvn_wc/op-depth-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/moves-scan-log/subversion/tests/libsvn_wc/op-depth-test.c?rev=1200926&r1=1200925&r2=1200926&view=diff
==============================================================================
--- subversion/branches/moves-scan-log/subversion/tests/libsvn_wc/op-depth-test.c (original)
+++ subversion/branches/moves-scan-log/subversion/tests/libsvn_wc/op-depth-test.c Fri Nov
11 16:06:45 2011
@@ -3670,6 +3670,56 @@ copy_wc_wc_absent(const svn_test_opts_t 
   return SVN_NO_ERROR;
 }
 
+/* Issue 4040 */
+static svn_error_t *
+incomplete_switch(const svn_test_opts_t *opts, apr_pool_t *pool)
+{
+  svn_test__sandbox_t b;
+
+  SVN_ERR(svn_test__sandbox_create(&b, "incomplete_switch", opts, pool));
+
+  SVN_ERR(wc_mkdir(&b, "A"));
+  SVN_ERR(wc_mkdir(&b, "A/B"));
+  SVN_ERR(wc_mkdir(&b, "A/B/C"));
+  SVN_ERR(wc_mkdir(&b, "A/B/C/D"));
+  SVN_ERR(wc_commit(&b, ""));
+  SVN_ERR(wc_copy(&b, "A", "X"));
+  SVN_ERR(wc_commit(&b, ""));
+  SVN_ERR(wc_copy(&b, "A", "X/A"));
+  SVN_ERR(wc_commit(&b, ""));
+  SVN_ERR(wc_delete(&b, "X/A"));
+  SVN_ERR(wc_commit(&b, ""));
+
+  {
+    /* Interrupted switch from A@1 to X@3 */
+    nodes_row_t before[] = {
+      {0, "",      "incomplete", 3, "X"},
+      {0, "A",     "incomplete", 3, "X/A"},
+      {0, "A/B",   "incomplete", 3, "X/A/B"},
+      {0, "A/B/C", "incomplete", 3, "X/A/B/C"},
+      {0, "B",     "normal",     1, "A/B"},
+      {0, "B/C",   "normal",     1, "A/B/C"},
+      {0, "B/C/D", "normal",     1, "A/B/C/D"},
+      {0}
+    };
+
+    nodes_row_t after_update[] = { 
+      {0, "",      "normal", 4, "X"},
+      {0, "B",     "normal", 4, "A/B"},
+      {0, "B/C",   "normal", 4, "A/B/C"},
+      {0, "B/C/D", "normal", 4, "A/B/C/D"},
+      {0}
+    };
+
+    SVN_ERR(insert_dirs(&b, before));
+    SVN_ERR(check_db_rows(&b, "", before));
+    SVN_ERR(wc_update(&b, "", 4));
+    SVN_ERR(check_db_rows(&b, "", after_update));
+  }
+
+  return SVN_NO_ERROR;
+}
+
 /* ---------------------------------------------------------------------- */
 /* The list of test functions */
 
@@ -3736,5 +3786,7 @@ struct svn_test_descriptor_t test_funcs[
                        "copy_file_externals"),
     SVN_TEST_OPTS_PASS(copy_wc_wc_absent,
                        "test_wc_wc_copy_absent"),
+    SVN_TEST_OPTS_PASS(incomplete_switch,
+                       "incomplete_switch (issue 4040)"),
     SVN_TEST_NULL
   };

Modified: subversion/branches/moves-scan-log/subversion/tests/svn_test_fs.c
URL: http://svn.apache.org/viewvc/subversion/branches/moves-scan-log/subversion/tests/svn_test_fs.c?rev=1200926&r1=1200925&r2=1200926&view=diff
==============================================================================
--- subversion/branches/moves-scan-log/subversion/tests/svn_test_fs.c (original)
+++ subversion/branches/moves-scan-log/subversion/tests/svn_test_fs.c Fri Nov 11 16:06:45
2011
@@ -251,7 +251,7 @@ svn_test__stream_to_string(svn_stringbuf
                    of priorities today, though. */
 
   apr_size_t len;
-  svn_stringbuf_t *str = svn_stringbuf_create("", pool);
+  svn_stringbuf_t *str = svn_stringbuf_create_empty(pool);
 
   do
     {
@@ -442,7 +442,7 @@ svn_test__validate_tree(svn_fs_root_t *r
             {
               /* If we don't have a corrupt entries string, make one. */
               if (! corrupt_entries)
-                corrupt_entries = svn_stringbuf_create("", subpool);
+                corrupt_entries = svn_stringbuf_create_empty(subpool);
 
               /* Append this entry name to the list of corrupt entries. */
               svn_stringbuf_appendcstr(corrupt_entries, "   ");
@@ -458,7 +458,7 @@ svn_test__validate_tree(svn_fs_root_t *r
         {
           /* If we don't have a missing entries string, make one. */
           if (! missing_entries)
-            missing_entries = svn_stringbuf_create("", subpool);
+            missing_entries = svn_stringbuf_create_empty(subpool);
 
           /* Append this entry name to the list of missing entries. */
           svn_stringbuf_appendcstr(missing_entries, "   ");
@@ -481,7 +481,7 @@ svn_test__validate_tree(svn_fs_root_t *r
 
       /* If we don't have an extra entries string, make one. */
       if (! extra_entries)
-        extra_entries = svn_stringbuf_create("", subpool);
+        extra_entries = svn_stringbuf_create_empty(subpool);
 
       /* Append this entry name to the list of missing entries. */
       svn_stringbuf_appendcstr(extra_entries, "   ");

Modified: subversion/branches/moves-scan-log/tools/dev/benchmarks/suite1/cronjob
URL: http://svn.apache.org/viewvc/subversion/branches/moves-scan-log/tools/dev/benchmarks/suite1/cronjob?rev=1200926&r1=1200925&r2=1200926&view=diff
==============================================================================
--- subversion/branches/moves-scan-log/tools/dev/benchmarks/suite1/cronjob (original)
+++ subversion/branches/moves-scan-log/tools/dev/benchmarks/suite1/cronjob Fri Nov 11 16:06:45
2011
@@ -58,7 +58,7 @@ if [ "$?" -ne "0" ]; then
   echo "$subject"
 else
 
-  rev="$(svn info /home/neels/pat/trunk/src | grep Revision)"
+  rev="$(/home/neels/pat/stable/prefix/bin/svn info /home/neels/pat/trunk/src | grep Revision)"
   if [ -z "$rev" ]; then
     subject="Working copy problem."
     echo "$subject" > "$results"

Modified: subversion/branches/moves-scan-log/tools/dev/benchmarks/suite1/run
URL: http://svn.apache.org/viewvc/subversion/branches/moves-scan-log/tools/dev/benchmarks/suite1/run?rev=1200926&r1=1200925&r2=1200926&view=diff
==============================================================================
--- subversion/branches/moves-scan-log/tools/dev/benchmarks/suite1/run (original)
+++ subversion/branches/moves-scan-log/tools/dev/benchmarks/suite1/run Fri Nov 11 16:06:45
2011
@@ -18,17 +18,10 @@
 # under the License.
 
 # Where are the svn binaries you want to benchmark?
-if [ "$USER" = "neels" ]; then
-  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_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
+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"
 
 benchmark="$PWD/benchmark.py"
 
@@ -71,6 +64,11 @@ cs=100
 started="$(date)"
 echo "Started at $started"
 
+echo "
+*Disclaimer:* this tests only file://-URL access on a GNU/Linux VM.
+This is intended to measure changes in performance of the local working
+copy layer, *only*. These results are *not* generally true for everyone."
+
 batch $al $as $N
 batch $bl $bs $N
 batch $cl $cs $N

Modified: subversion/branches/moves-scan-log/tools/server-side/svnauthz-validate.c
URL: http://svn.apache.org/viewvc/subversion/branches/moves-scan-log/tools/server-side/svnauthz-validate.c?rev=1200926&r1=1200925&r2=1200926&view=diff
==============================================================================
--- subversion/branches/moves-scan-log/tools/server-side/svnauthz-validate.c (original)
+++ subversion/branches/moves-scan-log/tools/server-side/svnauthz-validate.c Fri Nov 11 16:06:45
2011
@@ -40,10 +40,12 @@ main(int argc, const char **argv)
   svn_authz_t *authz;
   const char *authz_file;
 
-  if (argc <= 1)
+  if (argc != 2 && argc != 4 && argc != 5)
     {
-      printf("Usage:  %s PATH \n\n", argv[0]);
-      printf("Loads the authz file at PATH and validates its syntax. \n"
+      printf("Usage:  %s FILE [USER PATH [REPOS_NAME]]\n\n", argv[0]);
+      printf("Loads the authz file at FILE and validates its syntax.\n"
+             "Optionally reports the access available to USER for PATH in\n"
+             "repository REPOS_NAME.\n"
              "Returns:\n"
              "    0   when syntax is OK.\n"
              "    1   when syntax is invalid.\n"
@@ -62,6 +64,31 @@ main(int argc, const char **argv)
   /* Read the access file and validate it. */
   err = svn_repos_authz_read(&authz, authz_file, TRUE, pool);
 
+  if (!err && (argc == 4 || argc == 5))
+    {
+      const char *user = argv[2], *path = argv[3];
+      const char *repos = argc == 5 ? argv[4] : "";
+      svn_boolean_t read_access, write_access;
+
+      if (path[0] != '/')
+        path = apr_pstrcat(pool, "/", path, NULL);
+
+      err = svn_repos_authz_check_access(authz, repos, path, user,
+                                         svn_authz_write, &write_access,
+                                         pool);
+      if (!write_access && !err)
+        err = svn_repos_authz_check_access(authz, repos, path, user,
+                                           svn_authz_read, &read_access,
+                                           pool);
+      if (!err)
+        printf("user '%s' has %s access to '%s'%s%s\n",
+               user,
+               write_access ? "rw" : read_access ? "r" : "no",
+               path,
+               repos[0] ? "in repository " : "",
+               repos);
+    }
+
   svn_pool_destroy(pool);
 
   if (err)



Mime
View raw message