You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by da...@apache.org on 2010/08/03 21:21:15 UTC

svn commit: r982007 [3/3] - in /subversion/branches/atomic-revprop: ./ subversion/bindings/javahl/src/org/apache/subversion/javahl/ subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/ subversion/bindings/swig/ subversion/bindings/swig...

Modified: subversion/branches/atomic-revprop/subversion/tests/cmdline/switch_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/tests/cmdline/switch_tests.py?rev=982007&r1=982006&r2=982007&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/tests/cmdline/switch_tests.py (original)
+++ subversion/branches/atomic-revprop/subversion/tests/cmdline/switch_tests.py Tue Aug  3 19:21:13 2010
@@ -567,7 +567,10 @@ def relocate_deleted_missing_copied(sbox
     'A/D2/H/omega' : Item(status='  ', wc_rev='-', copied='+'),
     'A/D2/H/psi'   : Item(status='  ', wc_rev='-', copied='+'),
     })
-  expected_status.tweak('A/B/F', status='! ', wc_rev='?')
+  if svntest.main.wc_is_singledb(wc_dir):
+    expected_status.tweak('A/B/F', status='! ', wc_rev='1')
+  else:
+    expected_status.tweak('A/B/F', status='! ', wc_rev='?')
   svntest.actions.run_and_verify_status(wc_dir, expected_status)
 
   # Relocate
@@ -581,20 +584,28 @@ def relocate_deleted_missing_copied(sbox
 
   # Deleted and missing entries should be preserved, so update should
   # show only A/B/F being reinstated
-  expected_output = svntest.wc.State(wc_dir, {
-    'A/B/F' : Item(status='A '),
-    })
+  if svntest.main.wc_is_singledb(wc_dir):
+    expected_output = svntest.wc.State(wc_dir, {
+        'A/B/F' : Item(verb='Restored'),
+        })
+  else:
+    expected_output = svntest.wc.State(wc_dir, {
+        'A/B/F' : Item(status='A '),
+        })
   expected_disk = svntest.main.greek_state.copy()
   expected_disk.remove('A/mu')
   expected_disk.add({
     'A/D2'       : Item(),
     'A/D2/gamma'   : Item("This is the file 'gamma'.\n"),
-    'A/D2/G'       : Item(),
     'A/D2/H'       : Item(),
     'A/D2/H/chi'   : Item("This is the file 'chi'.\n"),
     'A/D2/H/omega' : Item("This is the file 'omega'.\n"),
     'A/D2/H/psi'   : Item("This is the file 'psi'.\n"),
     })
+  if not svntest.main.wc_is_singledb(wc_dir):
+    expected_disk.add({
+        'A/D2/G'       : Item(),
+        })
   expected_status.add({
     'A/B/F'       : Item(status='  ', wc_rev='2'),
     })

Modified: subversion/branches/atomic-revprop/subversion/tests/libsvn_subr/dirent_uri-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/tests/libsvn_subr/dirent_uri-test.c?rev=982007&r1=982006&r2=982007&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/tests/libsvn_subr/dirent_uri-test.c (original)
+++ subversion/branches/atomic-revprop/subversion/tests/libsvn_subr/dirent_uri-test.c Tue Aug  3 19:21:13 2010
@@ -2792,6 +2792,73 @@ test_file_url_from_dirent(apr_pool_t *po
   return SVN_NO_ERROR;
 }
 
+static svn_error_t *
+test_dirent_is_under_root(apr_pool_t *pool)
+{
+  struct {
+    const char *base_path;
+    const char *path;
+    svn_boolean_t under_root;
+    const char *result;
+  } tests[] = {
+    { "/",        "/base",          FALSE},
+    { "/aa",      "/aa/bb",         FALSE},
+    { "/base",    "/base2",         FALSE},
+    { "/b",       "bb",             TRUE, "/b/bb"},
+    { "/b",       "../bb",          FALSE},
+    { "/b",       "r/./bb",         TRUE, "/b/r/bb"},
+    { "/b",       "r/../bb",        TRUE, "/b/bb"},
+    { "/b",       "r/../../bb",     FALSE},
+    { "/b",       "./bb",           TRUE, "/b/bb"},
+    { "/b",       ".",              TRUE, "/b"},
+    { "/b",       "",               TRUE, "/b"},
+    { "b",        "b",              TRUE, "b/b"},
+#ifdef SVN_USE_DOS_PATHS
+    { "C:/file",  "a\\d",           TRUE, "C:/file/a/d"},
+    { "C:/file",  "aa\\..\\d",      TRUE, "C:/file/d"},
+    { "C:/file",  "aa\\..\\..\\d",  FALSE},
+#else
+    { "C:/file",  "a\\d",           TRUE, "C:/file/a\\d"},
+    { "C:/file",  "aa\\..\\d",      TRUE, "C:/file/aa\\..\\d"},
+    { "C:/file",  "aa\\..\\..\\d",  TRUE, "C:/file/aa\\..\\..\\d"},
+#endif /* SVN_USE_DOS_PATHS */
+  };
+  int i;
+
+  for (i = 0; i < COUNT_OF(tests); i++)
+    {
+      svn_boolean_t under_root;
+      const char *result;
+      
+      SVN_ERR(svn_dirent_is_under_root(&under_root,
+                                       &result,
+                                       tests[i].base_path,
+                                       tests[i].path,
+                                       pool));
+
+      if (under_root != tests[i].under_root)
+        return svn_error_createf(SVN_ERR_TEST_FAILED, NULL,
+                                 "svn_dirent_is_under_root(..\"%s\", \"%s\"..)"
+                                 " returned %s expected %s.",
+                                 tests[i].base_path,
+                                 tests[i].path,
+                                 under_root ? "TRUE" : "FALSE",
+                                 tests[i].under_root ? "TRUE" : "FALSE");
+
+      if (under_root
+          && strcmp(result, tests[i].result) != 0)
+        return svn_error_createf(SVN_ERR_TEST_FAILED, NULL,
+                                 "svn_dirent_is_under_root(..\"%s\", \"%s\"..)"
+                                 " found \"%s\" expected \"%s\".",
+                                 tests[i].base_path,
+                                 tests[i].path,
+                                 result,
+                                 tests[i].result);
+    }
+
+  return SVN_NO_ERROR;
+}
+
 
 /* The test table.  */
 
@@ -2890,5 +2957,7 @@ struct svn_test_descriptor_t test_funcs[
                    "test svn_uri_get_dirent_from_file_url errors"),
     SVN_TEST_PASS2(test_file_url_from_dirent,
                    "test svn_uri_get_file_url_from_dirent"),
+    SVN_TEST_PASS2(test_dirent_is_under_root,
+                   "test svn_dirent_is_under_root"),
     SVN_TEST_NULL
   };

Modified: subversion/branches/atomic-revprop/tools/dev/unix-build/Makefile.svn
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/tools/dev/unix-build/Makefile.svn?rev=982007&r1=982006&r2=982007&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/tools/dev/unix-build/Makefile.svn (original)
+++ subversion/branches/atomic-revprop/tools/dev/unix-build/Makefile.svn Tue Aug  3 19:21:13 2010
@@ -129,7 +129,7 @@ nuke:
 			yes)    echo "You said $$ANSWER. I will continue."; \
 				echo rm -rf $(SRCDIR) $(OBJDIR) $(PREFIX); \
 				rm -rf $(SRCDIR) $(OBJDIR) $(PREFIX); \
-				echo "Remember to reset the build!"; \
+				$(MAKE) reset; \
 				;; \
 			"")     echo "You said no."; \
 				;; \