You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2013/10/30 02:33:40 UTC

svn commit: r1536950 [5/6] - in /subversion/branches/log-addressing: ./ build/ build/ac-macros/ build/generator/ notes/http-and-webdav/ subversion/bindings/javahl/ subversion/bindings/javahl/native/ subversion/bindings/javahl/src/org/apache/subversion/...

Modified: subversion/branches/log-addressing/subversion/tests/cmdline/log_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/log-addressing/subversion/tests/cmdline/log_tests.py?rev=1536950&r1=1536949&r2=1536950&view=diff
==============================================================================
--- subversion/branches/log-addressing/subversion/tests/cmdline/log_tests.py (original)
+++ subversion/branches/log-addressing/subversion/tests/cmdline/log_tests.py Wed Oct 30 01:33:37 2013
@@ -32,6 +32,7 @@ import svntest
 from svntest import wc
 
 from svntest.main import server_has_mergeinfo
+from svntest.main import server_has_auto_move
 from svntest.main import SVN_PROP_MERGEINFO
 from svntest.mergetrees import set_up_branch
 from diff_tests import make_diff_header, make_no_diff_deleted_header
@@ -407,7 +408,6 @@ def merge_history_repos(sbox):
   # Restore working directory
   os.chdir(was_cwd)
 
-
 # For errors seen while parsing log data.
 class SVNLogParseError(Exception):
   pass
@@ -2265,7 +2265,6 @@ def log_diff_moved(sbox):
   compare_diff_output(r3diff, log_chain[0]['diff_lines'])
   compare_diff_output(r2diff, log_chain[1]['diff_lines'])
 
-  # XFAIL mu3 not found at revisions 0 and 1
   exit_code, output, err = svntest.actions.run_and_verify_svn(None, None, [],
                                                               'log', '--diff',
                                                               mu3_at_3)
@@ -2361,13 +2360,9 @@ def merge_sensitive_log_with_search(sbox
   }
   check_merge_results(log_chain, expected_merges)
 
-#----------------------------------------------------------------------
-# Test for issue #4355 'svn_client_log5 broken with multiple revisions
-# which span a rename'.
-@Issue(4355)
-@SkipUnless(server_has_mergeinfo)
-def log_multiple_revs_spanning_rename(sbox):
-  "log for multiple revs which span a rename"
+# Helper function for a few tests
+def create_renaming_history_repos(sbox):
+  "create a repository containing renames and a suitable working copy"
 
   sbox.build()
   wc_dir = sbox.wc_dir
@@ -2375,7 +2370,6 @@ def log_multiple_revs_spanning_rename(sb
   msg_file=os.path.abspath(msg_file)
   mu_path1 = os.path.join(wc_dir, 'A', 'mu')
   mu_path2 = os.path.join(wc_dir, 'trunk', 'mu')
-  trunk_path = os.path.join(wc_dir, 'trunk')
 
   # r2 - Change a file.
   msg=""" Log message for revision 2
@@ -2400,6 +2394,27 @@ def log_multiple_revs_spanning_rename(sb
   svntest.main.run_svn(None, 'ci', '-F', msg_file, wc_dir)
   svntest.main.run_svn(None, 'up', wc_dir)
 
+  # r5 - Cyclic exchange.
+  svntest.main.run_svn(None, 'up', wc_dir)
+  sbox.simple_move(os.path.join('trunk', 'D'), os.path.join('trunk', 'X'))
+  sbox.simple_move(os.path.join('trunk', 'C'), os.path.join('trunk', 'D'))
+  sbox.simple_move(os.path.join('trunk', 'X'), os.path.join('trunk', 'C'))
+  svntest.main.run_svn(None, 'ci', '-m', "Log message for revision 5",
+                       wc_dir)
+
+
+#----------------------------------------------------------------------
+# Test for issue #4355 'svn_client_log5 broken with multiple revisions
+# which span a rename'.
+@Issue(4355)
+@SkipUnless(server_has_mergeinfo)
+def log_multiple_revs_spanning_rename(sbox):
+  "log for multiple revs which span a rename"
+
+  trunk_path = sbox.ospath('trunk')
+
+  create_renaming_history_repos(sbox)
+
   # Check that log can handle a revision range that spans a rename.
   exit_code, output, err = svntest.actions.run_and_verify_svn(
     None, None, [], 'log', '-r2:4', sbox.repo_url + '/trunk/mu')
@@ -2440,6 +2455,8 @@ def log_multiple_revs_spanning_rename(sb
   log_chain = parse_log_output(output)
   check_log_chain(log_chain, [2,3,1])
 
+  mu_path2 = sbox.ospath('trunk/mu')
+
   # Should work with a WC target too.
   exit_code, output, err = svntest.actions.run_and_verify_svn(
     None, None, [], 'log', '-c2,3,1', mu_path2)
@@ -2489,6 +2506,54 @@ def log_multiple_revs_spanning_rename(sb
   log_chain = parse_log_output(output)
   check_log_chain(log_chain, [1,4])
 
+#----------------------------------------------------------------------
+def verify_move_log(sbox, flag, has_moves):
+  "result checker for log_auto_move"
+
+  trunk_path = os.path.join(sbox.wc_dir, 'trunk')
+
+  exit_code, output, err = svntest.actions.run_and_verify_svn(
+    None, None, [], 'log', '-r3', '-v', trunk_path, flag)
+  log_chain = parse_log_output(output)
+  check_log_chain(log_chain, [3], [2])
+
+  paths = log_chain[0]['paths']
+  if paths[0][0] != 'D' or paths[0][1] != '/A':
+    raise SVNLogParseError("Deletion of '/A' expected, %s of %s found" % paths[0])
+  if has_moves:
+    if paths[1][0] != 'V' or paths[1][1] != '/trunk (from /A:2)':
+      raise SVNLogParseError("Move of '/A' to '/trunk' expected, %s of %s found" % paths[1])
+  else:
+    if paths[1][0] != 'A' or paths[1][1] != '/trunk (from /A:2)':
+      raise SVNLogParseError("Addition of '/A' to '/trunk' expected, %s of %s found" % paths[1])
+
+  exit_code, output, err = svntest.actions.run_and_verify_svn(
+    None, None, [], 'log', '-r5', '-v', trunk_path, flag)
+  log_chain = parse_log_output(output)
+  check_log_chain(log_chain, [5], [2])
+
+  paths = log_chain[0]['paths']
+  if has_moves:
+    if paths[0][0] != 'E' or paths[0][1] != '/trunk/C (from /trunk/D:4)':
+      raise SVNLogParseError("Replacing move of '/trunk/C' with '/trunk/D' expected, %s of %s found" % paths[0])
+    if paths[1][0] != 'E' or paths[1][1] != '/trunk/D (from /trunk/C:4)':
+      raise SVNLogParseError("Replacing move of '/trunk/D' with '/trunk/C' expected, %s of %s found" % paths[1])
+  else:
+    if paths[0][0] != 'R' or paths[0][1] != '/trunk/C (from /trunk/D:4)':
+      raise SVNLogParseError("Replace of '/trunk/C' with '/trunk/D' expected, %s of %s found" % paths[0])
+    if paths[1][0] != 'R' or paths[1][1] != '/trunk/D (from /trunk/C:4)':
+      raise SVNLogParseError("Replace of '/trunk/D' with '/trunk/C' expected, %s of %s found" % paths[1])
+
+@Issue(4355)
+def log_auto_move(sbox):
+  "test --auto-moves flag"
+
+  create_renaming_history_repos(sbox)
+  verify_move_log(sbox, '--auto-moves', server_has_auto_move())
+  verify_move_log(sbox, '-v', 0)
+
+
+
 ########################################################################
 # Run the tests
 
@@ -2535,6 +2600,7 @@ test_list = [ None,
               log_search,
               merge_sensitive_log_with_search,
               log_multiple_revs_spanning_rename,
+              log_auto_move,
              ]
 
 if __name__ == '__main__':

Modified: subversion/branches/log-addressing/subversion/tests/cmdline/merge_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/log-addressing/subversion/tests/cmdline/merge_tests.py?rev=1536950&r1=1536949&r2=1536950&view=diff
==============================================================================
--- subversion/branches/log-addressing/subversion/tests/cmdline/merge_tests.py (original)
+++ subversion/branches/log-addressing/subversion/tests/cmdline/merge_tests.py Wed Oct 30 01:33:37 2013
@@ -1977,7 +1977,7 @@ def merge_binary_with_common_ancestry(sb
   # Commit the second branch
   expected_output = wc.State(wc_dir, {
     'L'       : Item(verb='Adding'),
-    'L/theta' : Item(verb='Adding  (bin)'),
+    'L/theta' : Item(verb='Replacing'),
     })
 
   expected_status.add({

Modified: subversion/branches/log-addressing/subversion/tests/cmdline/move_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/log-addressing/subversion/tests/cmdline/move_tests.py?rev=1536950&r1=1536949&r2=1536950&view=diff
==============================================================================
--- subversion/branches/log-addressing/subversion/tests/cmdline/move_tests.py (original)
+++ subversion/branches/log-addressing/subversion/tests/cmdline/move_tests.py Wed Oct 30 01:33:37 2013
@@ -1501,7 +1501,6 @@ def move_many_update_add(sbox):
                                         wc_dir, '--accept', 'mine-conflict')
 
 @Issue(4437)
-@XFail()
 def move_del_moved(sbox):
   "delete moved node, still a move"
 
@@ -1522,6 +1521,30 @@ def move_del_moved(sbox):
   # deleted there.
   svntest.actions.run_and_verify_status(wc_dir, expected_status)
 
+def copy_move_commit(sbox):
+  "copy, move and commit"
+
+  sbox.build()
+  wc_dir = sbox.wc_dir
+    #repro
+    # Prepare
+    #   - Create folder aaa
+    #   - Add file bbb.sql
+    #     create table bbb (Id int not null)
+    #   - Commit
+    # Repro Issue 2
+    #    - Copy folder aaa under same parent folder (i.e. as a sibling). (using Ctrl drag/drop). 
+    #      Creates Copy of aaa
+    #    - Rename Copy of aaa to eee
+    #    - Commit
+    #      Get error need to update
+    #    - Update
+    #    - Commit
+    #      Get error need to update
+
+  sbox.simple_copy('A/D/G', 'A/D/GG')
+  sbox.simple_move('A/D/GG', 'A/D/GG-moved')
+  sbox.simple_commit('A/D/GG-moved')
 
 #######################################################################
 # Run the tests
@@ -1538,6 +1561,7 @@ test_list = [ None,
               move_many_update_delete,
               move_many_update_add,
               move_del_moved,
+              copy_move_commit,
             ]
 
 if __name__ == '__main__':

Modified: subversion/branches/log-addressing/subversion/tests/cmdline/svnadmin_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/log-addressing/subversion/tests/cmdline/svnadmin_tests.py?rev=1536950&r1=1536949&r2=1536950&view=diff
==============================================================================
--- subversion/branches/log-addressing/subversion/tests/cmdline/svnadmin_tests.py (original)
+++ subversion/branches/log-addressing/subversion/tests/cmdline/svnadmin_tests.py Wed Oct 30 01:33:37 2013
@@ -245,6 +245,27 @@ def load_dumpstream(sbox, dump, *varargs
   return load_and_verify_dumpstream(sbox, None, None, None, False, dump,
                                     *varargs)
 
+def set_changed_path_list(filename, changes):
+  """ Replace the changed paths list in the file given by FILENAME
+      with the text CHANGES."""
+
+  # read full file
+  fp = open(filename, 'r+b')
+  contents = fp.read()
+
+  # replace the changed paths list
+  length = len(contents)
+  header = contents[contents.rfind('\n', length - 64, length - 1):]
+  body_len = long(header.split(' ')[1])
+
+  contents = contents[:body_len] + changes + header
+
+  # set new contents
+  fp.seek(0)
+  fp.write(contents)
+  fp.truncate()
+  fp.close()
+
 ######################################################################
 # Tests
 
@@ -1889,7 +1910,7 @@ def verify_keep_going(sbox):
                                              ".*Verified revision 0.",
                                              ".*Verified revision 1.",
                                              ".*Error verifying revision 2.",
-                                             ".*Verified revision 3."])
+                                             ".*Error verifying revision 3."])
     exp_err = svntest.verify.RegexListOutput(["svnadmin: E160004:.*",
                                              "svnadmin: E165011:.*"], False)
   else:
@@ -1928,6 +1949,118 @@ def verify_keep_going(sbox):
                                    None, errput, None, "svnadmin: E165011:.*"):
     raise svntest.Failure
 
+@SkipUnless(svntest.main.is_fs_type_fsfs)
+def verify_invalid_path_changes(sbox):
+  "detect invalid changed path list entries"
+
+  sbox.build(create_wc = False)
+  repo_url = sbox.repo_url
+  B_url = sbox.repo_url + '/B'
+  C_url = sbox.repo_url + '/C'
+
+  # Create A/B/E/bravo in r2.
+  for r in range(2,20):
+    svntest.actions.run_and_verify_svn(None, None, [],
+                                       'mkdir', '-m', 'log_msg',
+                                       sbox.repo_url + '/B' + str(r))
+
+  # modify every other revision to make sure that errors are not simply
+  # "carried over" but that all corrupts we get detected independently
+
+  # add existing node
+  set_changed_path_list(fsfs_file(sbox.repo_dir, 'revs', '2'),
+                        "_0.0.t1-1 add-dir false false /A\n\n")
+
+  # add into non-existent parent
+  set_changed_path_list(fsfs_file(sbox.repo_dir, 'revs', '4'),
+                        "_0.0.t3-2 add-dir false false /C/X\n\n")
+
+  # del non-existent node
+  set_changed_path_list(fsfs_file(sbox.repo_dir, 'revs', '6'),
+                        "_0.0.t5-2 del-dir false false /C\n\n")
+
+  # del existent node of the wrong kind
+  set_changed_path_list(fsfs_file(sbox.repo_dir, 'revs', '8'),
+                        "_0.0.t7-2 dev-file false false /B3\n\n")
+
+  # copy from non-existent node
+  set_changed_path_list(fsfs_file(sbox.repo_dir, 'revs', '10'),
+                        "_0.0.t9-2 add-dir false false /B10\n"
+                        "6 /B8\n")
+
+  # copy from existing node of the wrong kind
+  set_changed_path_list(fsfs_file(sbox.repo_dir, 'revs', '12'),
+                        "_0.0.t11-2 add-file false false /B12\n"
+                        "9 /B8\n")
+
+  # modify non-existent node
+  set_changed_path_list(fsfs_file(sbox.repo_dir, 'revs', '14'),
+                        "_0.0.t13-2 modify-file false false /A/D/H/foo\n\n")
+
+  # modify existent node of the wrong kind
+  set_changed_path_list(fsfs_file(sbox.repo_dir, 'revs', '16'),
+                        "_0.0.t15-2 modify-file false false /B12\n\n")
+
+  # replace non-existent node
+  set_changed_path_list(fsfs_file(sbox.repo_dir, 'revs', '18'),
+                        "_0.0.t17-2 replace-file false false /A/D/H/foo\n\n")
+
+  # find corruptions
+  exit_code, output, errput = svntest.main.run_svnadmin("verify",
+                                                        "--keep-going",
+                                                        sbox.repo_dir)
+
+  exp_out = svntest.verify.RegexListOutput([".*Verifying repository metadata",
+                                           ".*Verified revision 0.",
+                                           ".*Verified revision 1.",
+                                           ".*Error verifying revision 2.",
+                                           ".*Verified revision 3.",
+                                           ".*Error verifying revision 4.",
+                                           ".*Verified revision 5.",
+                                           ".*Error verifying revision 6.",
+                                           ".*Verified revision 7.",
+                                           ".*Error verifying revision 8.",
+                                           ".*Verified revision 9.",
+                                           ".*Error verifying revision 10.",
+                                           ".*Verified revision 11.",
+                                           ".*Error verifying revision 12.",
+                                           ".*Verified revision 13.",
+                                           ".*Error verifying revision 14.",
+                                           ".*Verified revision 15.",
+                                           ".*Error verifying revision 16.",
+                                           ".*Verified revision 17.",
+                                           ".*Error verifying revision 18.",
+                                           ".*Verified revision 19."])
+
+  exp_err = svntest.verify.RegexListOutput(["svnadmin: E160020:.*",
+                                            "svnadmin: E165011:.*"], False)
+
+
+  if svntest.verify.verify_outputs("Unexpected error while running 'svnadmin verify'.",
+                                   output, errput, exp_out, exp_err):
+    raise svntest.Failure
+
+  exit_code, output, errput = svntest.main.run_svnadmin("verify",
+                                                        sbox.repo_dir)
+
+  exp_out = svntest.verify.RegexListOutput([".*Verifying repository metadata",
+                                           ".*Verified revision 0.",
+                                           ".*Verified revision 1.",
+                                           ".*Error verifying revision 2."])
+
+  if svntest.verify.verify_outputs("Unexpected error while running 'svnadmin verify'.",
+                                   output, errput, exp_out, exp_err):
+    raise svntest.Failure
+
+
+  exit_code, output, errput = svntest.main.run_svnadmin("verify",
+                                                        "--quiet",
+                                                        sbox.repo_dir)
+
+  if svntest.verify.verify_outputs("Output of 'svnadmin verify' is unexpected.",
+                                   None, errput, None, "svnadmin: E165011:.*"):
+    raise svntest.Failure
+
 ########################################################################
 # Run the tests
 
@@ -1965,6 +2098,7 @@ test_list = [ None,
               mergeinfo_race,
               recover_old,
               verify_keep_going,
+              verify_invalid_path_changes,
              ]
 
 if __name__ == '__main__':

Modified: subversion/branches/log-addressing/subversion/tests/cmdline/svntest/main.py
URL: http://svn.apache.org/viewvc/subversion/branches/log-addressing/subversion/tests/cmdline/svntest/main.py?rev=1536950&r1=1536949&r2=1536950&view=diff
==============================================================================
--- subversion/branches/log-addressing/subversion/tests/cmdline/svntest/main.py (original)
+++ subversion/branches/log-addressing/subversion/tests/cmdline/svntest/main.py Wed Oct 30 01:33:37 2013
@@ -1381,6 +1381,9 @@ def server_has_atomic_revprop():
 def server_has_reverse_get_file_revs():
   return options.server_minor_version >= 8
 
+def server_has_auto_move():
+  return options.server_minor_version >= 9
+
 def is_plaintext_password_storage_disabled():
   try:
     predicate = re.compile("^WARNING: Plaintext password storage is enabled!")

Propchange: subversion/branches/log-addressing/subversion/tests/libsvn_client/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Wed Oct 30 01:33:37 2013
@@ -1,9 +1,3 @@
 .libs
 client-test
 *.lo
-test-patch*
-test-wc*
-test-copy-crash
-test-youngest-common-ancestor
-foreign-copy1
-foreign-copy2

Modified: subversion/branches/log-addressing/subversion/tests/libsvn_client/client-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/log-addressing/subversion/tests/libsvn_client/client-test.c?rev=1536950&r1=1536949&r2=1536950&view=diff
==============================================================================
--- subversion/branches/log-addressing/subversion/tests/libsvn_client/client-test.c (original)
+++ subversion/branches/log-addressing/subversion/tests/libsvn_client/client-test.c Wed Oct 30 01:33:37 2013
@@ -57,7 +57,8 @@ create_greek_repos(const char **repos_ur
   svn_fs_root_t *txn_root;
 
   /* Create a filesytem and repository. */
-  SVN_ERR(svn_test__create_repos(&repos, name, opts, pool));
+  SVN_ERR(svn_test__create_repos(
+              &repos, svn_test_data_path(name, pool), opts, pool));
 
   /* Prepare and commit a txn containing the Greek tree. */
   SVN_ERR(svn_fs_begin_txn2(&txn, svn_repos_fs(repos), 0 /* rev */,
@@ -67,7 +68,8 @@ create_greek_repos(const char **repos_ur
   SVN_ERR(svn_repos_fs_commit_txn(NULL, repos, &committed_rev, txn, pool));
   SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(committed_rev));
 
-  SVN_ERR(svn_uri_get_file_url_from_dirent(repos_url, name, pool));
+  SVN_ERR(svn_uri_get_file_url_from_dirent(
+              repos_url, svn_test_data_path(name, pool), pool));
   return SVN_NO_ERROR;
 }
 
@@ -331,7 +333,6 @@ test_patch(const svn_test_opts_t *opts,
 {
   const char *repos_url;
   const char *wc_path;
-  const char *cwd;
   svn_opt_revision_t rev;
   svn_opt_revision_t peg_rev;
   svn_client_ctx_t *ctx;
@@ -370,12 +371,11 @@ test_patch(const svn_test_opts_t *opts,
   SVN_ERR(create_greek_repos(&repos_url, "test-patch-repos", opts, pool));
 
   /* Check out the HEAD revision */
-  SVN_ERR(svn_dirent_get_absolute(&cwd, "", pool));
 
   /* Put wc inside an unversioned directory.  Checking out a 1.7 wc
      directly inside a 1.6 wc doesn't work reliably, an intervening
      unversioned directory prevents the problems. */
-  wc_path = svn_dirent_join(cwd, "test-patch", pool);
+  wc_path = svn_test_data_path("test-patch", pool);
   SVN_ERR(svn_io_make_dir_recursively(wc_path, pool));
   svn_test_add_dir_cleanup(wc_path);
 
@@ -389,8 +389,9 @@ test_patch(const svn_test_opts_t *opts,
                                TRUE, FALSE, ctx, pool));
 
   /* Create the patch file. */
-  patch_file_path = svn_dirent_join_many(pool, cwd,
-                                         "test-patch", "test-patch.diff", NULL);
+  patch_file_path = svn_dirent_join_many(
+      pool, svn_test_data_path("test-patch", pool),
+      "test-patch.diff", SVN_VA_NULL);
   SVN_ERR(svn_io_file_open(&patch_file, patch_file_path,
                            (APR_READ | APR_WRITE | APR_CREATE | APR_TRUNCATE),
                            APR_OS_DEFAULT, pool));
@@ -445,7 +446,7 @@ test_wc_add_scenarios(const svn_test_opt
   SVN_ERR(create_greek_repos(&repos_url, "test-wc-add-repos", opts, pool));
   committed_rev = 1;
 
-  SVN_ERR(svn_dirent_get_absolute(&wc_path, "test-wc-add", pool));
+  wc_path = svn_test_data_path("test-wc-add", pool);
 
   /* Remove old test data from the previous run */
   SVN_ERR(svn_io_remove_dir2(wc_path, TRUE, NULL, NULL, pool));
@@ -598,7 +599,7 @@ test_16k_add(const svn_test_opts_t *opts
   svn_opt_revision_t rev;
   svn_client_ctx_t *ctx;
   const char *repos_url;
-  const char *cwd, *wc_path;
+  const char *wc_path;
   svn_opt_revision_t peg_rev;
   apr_array_header_t *targets;
   apr_pool_t *iterpool = svn_pool_create(pool);
@@ -608,12 +609,11 @@ test_16k_add(const svn_test_opts_t *opts
   SVN_ERR(create_greek_repos(&repos_url, "test-16k-repos", opts, pool));
 
   /* Check out the HEAD revision */
-  SVN_ERR(svn_dirent_get_absolute(&cwd, "", pool));
 
   /* Put wc inside an unversioned directory.  Checking out a 1.7 wc
      directly inside a 1.6 wc doesn't work reliably, an intervening
      unversioned directory prevents the problems. */
-  wc_path = svn_dirent_join(cwd, "test-16k", pool);
+  wc_path = svn_test_data_path("test-16k", pool);
   SVN_ERR(svn_io_make_dir_recursively(wc_path, pool));
   svn_test_add_dir_cleanup(wc_path);
 
@@ -735,7 +735,7 @@ test_foreign_repos_copy(const svn_test_o
   SVN_ERR(create_greek_repos(&repos_url, "foreign-copy1", opts, pool));
   SVN_ERR(create_greek_repos(&repos2_url, "foreign-copy2", opts, pool));
 
-  SVN_ERR(svn_dirent_get_absolute(&wc_path, "test-wc-add", pool));
+  wc_path = svn_test_data_path("test-wc-add", pool);
 
   wc_path = svn_dirent_join(wc_path, "foreign-wc", pool);
 

Modified: subversion/branches/log-addressing/subversion/tests/libsvn_delta/random-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/log-addressing/subversion/tests/libsvn_delta/random-test.c?rev=1536950&r1=1536949&r2=1536950&view=diff
==============================================================================
--- subversion/branches/log-addressing/subversion/tests/libsvn_delta/random-test.c (original)
+++ subversion/branches/log-addressing/subversion/tests/libsvn_delta/random-test.c Wed Oct 30 01:33:37 2013
@@ -109,12 +109,9 @@ open_tempfile(const char *name_template,
 {
   apr_status_t apr_err;
   apr_file_t *fp = NULL;
-  char *templ;
-
-  if (!name_template)
-    templ = apr_pstrdup(pool, "tempfile_XXXXXX");
-  else
-    templ = apr_pstrdup(pool, name_template);
+  char *templ = (char *)apr_pstrdup(
+      pool, svn_test_data_path(
+          name_template ? name_template : "tempfile_XXXXXX", pool));
 
   apr_err = apr_file_mktemp(&fp, templ, 0, pool);
   assert(apr_err == 0);

Propchange: subversion/branches/log-addressing/subversion/tests/libsvn_diff/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Wed Oct 30 01:33:37 2013
@@ -8,9 +8,3 @@ parse-diff-test
 *~
 .*~
 *.exe
-B*
-T*
-combined
-modified1
-modified2
-original

Modified: subversion/branches/log-addressing/subversion/tests/libsvn_diff/diff-diff3-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/log-addressing/subversion/tests/libsvn_diff/diff-diff3-test.c?rev=1536950&r1=1536949&r2=1536950&view=diff
==============================================================================
--- subversion/branches/log-addressing/subversion/tests/libsvn_diff/diff-diff3-test.c (original)
+++ subversion/branches/log-addressing/subversion/tests/libsvn_diff/diff-diff3-test.c Wed Oct 30 01:33:37 2013
@@ -137,9 +137,9 @@ make_file(const char *filename,
    "merge-FILENAME1-FILENAME2-FILENAME3".  The conflict style STYLE is
    used. */
 static svn_error_t *
-three_way_merge(const char *filename1,
-                const char *filename2,
-                const char *filename3,
+three_way_merge(const char *base_filename1,
+                const char *base_filename2,
+                const char *base_filename3,
                 const char *contents1,
                 const char *contents2,
                 const char *contents3,
@@ -152,8 +152,12 @@ three_way_merge(const char *filename1,
   apr_file_t *output;
   svn_stream_t *ostream;
   svn_stringbuf_t *actual;
-  char *merge_name = apr_psprintf(pool, "merge-%s-%s-%s",
-                                  filename1, filename2, filename3);
+  char *merge_name = apr_psprintf(
+      pool, "merge-%s-%s-%s", base_filename1, base_filename2, base_filename3);
+
+  const char *filename1 = svn_test_data_path(base_filename1, pool);
+  const char *filename2 = svn_test_data_path(base_filename2, pool);
+  const char *filename3 = svn_test_data_path(base_filename3, pool);
 
   /* We have an EXPECTED string we can match, because we don't support
      any other combinations (yet) than the ones above. */
@@ -171,9 +175,9 @@ three_way_merge(const char *filename1,
 
   SVN_ERR(svn_diff_mem_string_output_merge2
           (ostream, diff, original, modified, latest,
-           apr_psprintf(pool, "||||||| %s", filename1),
-           apr_psprintf(pool, "<<<<<<< %s", filename2),
-           apr_psprintf(pool, ">>>>>>> %s", filename3),
+           apr_psprintf(pool, "||||||| %s", base_filename1),
+           apr_psprintf(pool, "<<<<<<< %s", base_filename2),
+           apr_psprintf(pool, ">>>>>>> %s", base_filename3),
            NULL, /* separator */
            style, pool));
 
@@ -195,17 +199,20 @@ three_way_merge(const char *filename1,
                            APR_OS_DEFAULT, pool));
 
   ostream = svn_stream_from_aprfile2(output, FALSE, pool);
-  SVN_ERR(svn_diff_file_output_merge2(ostream, diff,
-                                      filename1, filename2, filename3,
-                                      NULL, NULL, NULL, NULL,
-                                      style,
-                                      pool));
+  SVN_ERR(svn_diff_file_output_merge2(
+              ostream, diff,
+              filename1, filename2, filename3,
+              apr_psprintf(pool, "||||||| %s", base_filename1),
+              apr_psprintf(pool, "<<<<<<< %s", base_filename2),
+              apr_psprintf(pool, ">>>>>>> %s", base_filename3),
+              NULL, /* separator */
+              style, pool));
   SVN_ERR(svn_stream_close(ostream));
   SVN_ERR(svn_stringbuf_from_file2(&actual, merge_name, pool));
   if (strcmp(actual->data, expected))
     return svn_error_createf(SVN_ERR_TEST_FAILED, NULL,
                              "failed merging diff '%s' to '%s' into '%s'",
-                             filename1, filename2, filename3);
+                             base_filename1, base_filename2, base_filename3);
 
   SVN_ERR(svn_io_remove_file2(filename1, TRUE, pool));
   if (strcmp(filename1, filename2))
@@ -227,8 +234,8 @@ three_way_merge(const char *filename1,
    preserved otherwise.  If the diff fails the diff output will be in
    a file called "diff-FILENAME1-FILENAME2".  */
 static svn_error_t *
-two_way_diff(const char *filename1,
-             const char *filename2,
+two_way_diff(const char *base_filename1,
+             const char *base_filename2,
              const char *contents1,
              const char *contents2,
              const char *expected,
@@ -239,7 +246,13 @@ two_way_diff(const char *filename1,
   apr_file_t *output;
   svn_stream_t *ostream;
   svn_stringbuf_t *actual;
-  char *diff_name = apr_psprintf(pool, "diff-%s-%s", filename1, filename2);
+  char *diff_name = (char *)apr_pstrdup(
+      pool, svn_test_data_path(
+          apr_psprintf(pool, "diff-%s-%s", base_filename1, base_filename2),
+          pool));
+
+  const char *filename1 = svn_test_data_path(base_filename1, pool);
+  const char *filename2 = svn_test_data_path(base_filename2, pool);
 
   /* Some of the tests have lots of lines, although not much data as
      the lines are short, and the in-memory diffs allocate a lot of
@@ -261,7 +274,7 @@ two_way_diff(const char *filename1,
   ostream = svn_stream_from_stringbuf(actual, pool);
 
   SVN_ERR(svn_diff_mem_string_output_unified(ostream, diff,
-                                             filename1, filename2,
+                                             base_filename1, base_filename2,
                                              SVN_APR_LOCALE_CHARSET,
                                              original, modified, subpool));
   svn_pool_clear(subpool);
@@ -286,7 +299,7 @@ two_way_diff(const char *filename1,
   ostream = svn_stream_from_aprfile2(output, FALSE, pool);
   SVN_ERR(svn_diff_file_output_unified2(ostream, diff,
                                         filename1, filename2,
-                                        filename1, filename2,
+                                        base_filename1, base_filename2,
                                         SVN_APR_LOCALE_CHARSET, pool));
   SVN_ERR(svn_stream_close(ostream));
 
@@ -312,16 +325,16 @@ two_way_diff(const char *filename1,
       return svn_error_createf(SVN_ERR_TEST_FAILED, NULL,
                                "failed comparing '%s' and '%s'"
                                " (memory and file results are different)",
-                               filename1, filename2);
+                               base_filename1, base_filename2);
     }
 
   /* May as well do the trivial merges while we are here */
-  SVN_ERR(three_way_merge(filename1, filename2, filename1,
+  SVN_ERR(three_way_merge(base_filename1, base_filename2, base_filename1,
                           contents1, contents2, contents1, contents2, NULL,
                           svn_diff_conflict_display_modified_latest,
                           subpool));
   svn_pool_clear(subpool);
-  SVN_ERR(three_way_merge(filename2, filename1, filename2,
+  SVN_ERR(three_way_merge(base_filename2, base_filename1, base_filename2,
                           contents2, contents1, contents2, contents1, NULL,
                           svn_diff_conflict_display_modified_latest,
                           subpool));
@@ -2141,14 +2154,20 @@ test_diff4(apr_pool_t *pool)
     "  /* line plus-four of context */\n"
     "  /* line plus-five of context */\n"
     "}\n");
-  SVN_ERR(make_file("B2", B2.data, pool));
-  SVN_ERR(make_file("T1", T1.data, pool));
-  SVN_ERR(make_file("T2", T2.data, pool));
-  SVN_ERR(make_file("T3", T3.data, pool));
+
+  const char *B2_path = svn_test_data_path("B2", pool);
+  const char *T1_path = svn_test_data_path("T1", pool);
+  const char *T2_path = svn_test_data_path("T2", pool);
+  const char *T3_path = svn_test_data_path("T3", pool);
+
+  SVN_ERR(make_file(B2_path, B2.data, pool));
+  SVN_ERR(make_file(T1_path, T1.data, pool));
+  SVN_ERR(make_file(T2_path, T2.data, pool));
+  SVN_ERR(make_file(T3_path, T3.data, pool));
 
   /* Usage: tools/diff/diff4 <mine> <older> <yours> <ancestor> */
   /* tools/diff/diff4 B2 T2 T3 T1 > B2new */
-  SVN_ERR(svn_diff_file_diff4(&diff, "T2", "B2", "T3", "T1", pool));
+  SVN_ERR(svn_diff_file_diff4(&diff, T2_path, B2_path, T3_path, T1_path, pool));
 
   /* Sanity. */
   SVN_TEST_ASSERT(! svn_diff_contains_conflicts(diff));
@@ -2161,7 +2180,7 @@ test_diff4(apr_pool_t *pool)
              svn_stringbuf_create_ensure(417, pool), /* 417 == wc -c < B2new */
              pool);
   SVN_ERR(svn_diff_file_output_merge(actual, diff,
-                                     "T2", "B2", "T3",
+                                     T2_path, B2_path, T3_path,
                                      NULL, NULL, NULL, NULL,
                                      FALSE,
                                      FALSE,
@@ -2179,12 +2198,16 @@ random_trivial_merge(apr_pool_t *pool)
   int i;
   apr_pool_t *subpool = svn_pool_create(pool);
 
+  const char *base_filename1 = "trivial1";
+  const char *base_filename2 = "trivial2";
+
+  const char *filename1 = svn_test_data_path(base_filename1, pool);
+  const char *filename2 = svn_test_data_path(base_filename2, pool);
+
   seed_val();
 
   for (i = 0; i < 5; ++i)
     {
-      const char *filename1 = "trivial1";
-      const char *filename2 = "trivial2";
       int min_lines = 1000;
       int max_lines = 1100;
       int var_lines = 50;
@@ -2201,12 +2224,12 @@ random_trivial_merge(apr_pool_t *pool)
       SVN_ERR(svn_stringbuf_from_file2(&contents1, filename1, subpool));
       SVN_ERR(svn_stringbuf_from_file2(&contents2, filename2, subpool));
 
-      SVN_ERR(three_way_merge(filename1, filename2, filename1,
+      SVN_ERR(three_way_merge(base_filename1, base_filename2, base_filename1,
                               contents1->data, contents2->data,
                               contents1->data, contents2->data, NULL,
                               svn_diff_conflict_display_modified_latest,
                               subpool));
-      SVN_ERR(three_way_merge(filename2, filename1, filename2,
+      SVN_ERR(three_way_merge(base_filename2, base_filename1, base_filename2,
                               contents2->data, contents1->data,
                               contents2->data, contents1->data, NULL,
                               svn_diff_conflict_display_modified_latest,
@@ -2231,14 +2254,20 @@ random_three_way_merge(apr_pool_t *pool)
   int i;
   apr_pool_t *subpool = svn_pool_create(pool);
 
+  const char *base_filename1 = "original";
+  const char *base_filename2 = "modified1";
+  const char *base_filename3 = "modified2";
+  const char *base_filename4 = "combined";
+
+  const char *filename1 = svn_test_data_path(base_filename1, pool);
+  const char *filename2 = svn_test_data_path(base_filename2, pool);
+  const char *filename3 = svn_test_data_path(base_filename3, pool);
+  const char *filename4 = svn_test_data_path(base_filename4, pool);
+
   seed_val();
 
   for (i = 0; i < 20; ++i)
     {
-      const char *filename1 = "original";
-      const char *filename2 = "modified1";
-      const char *filename3 = "modified2";
-      const char *filename4 = "combined";
       svn_stringbuf_t *original, *modified1, *modified2, *combined;
       /* Pick NUM_LINES large enough so that the 'strip identical suffix' code
          gets triggered with reasonable probability.  (Currently it ignores
@@ -2272,12 +2301,12 @@ random_three_way_merge(apr_pool_t *pool)
       SVN_ERR(svn_stringbuf_from_file2(&modified2, filename3, pool));
       SVN_ERR(svn_stringbuf_from_file2(&combined, filename4, pool));
 
-      SVN_ERR(three_way_merge(filename1, filename2, filename3,
+      SVN_ERR(three_way_merge(base_filename1, base_filename2, base_filename3,
                               original->data, modified1->data,
                               modified2->data, combined->data, NULL,
                               svn_diff_conflict_display_modified_latest,
                               subpool));
-      SVN_ERR(three_way_merge(filename1, filename3, filename2,
+      SVN_ERR(three_way_merge(base_filename1, base_filename3, base_filename2,
                               original->data, modified2->data,
                               modified1->data, combined->data, NULL,
                               svn_diff_conflict_display_modified_latest,
@@ -2303,14 +2332,20 @@ merge_with_part_already_present(apr_pool
   int i;
   apr_pool_t *subpool = svn_pool_create(pool);
 
+  const char *base_filename1 = "pap-original";
+  const char *base_filename2 = "pap-modified1";
+  const char *base_filename3 = "pap-modified2";
+  const char *base_filename4 = "pap-combined";
+
+  const char *filename1 = svn_test_data_path(base_filename1, pool);
+  const char *filename2 = svn_test_data_path(base_filename2, pool);
+  const char *filename3 = svn_test_data_path(base_filename3, pool);
+  const char *filename4 = svn_test_data_path(base_filename4, pool);
+
   seed_val();
 
   for (i = 0; i < 20; ++i)
     {
-      const char *filename1 = "pap-original";
-      const char *filename2 = "pap-modified1";
-      const char *filename3 = "pap-modified2";
-      const char *filename4 = "pap-combined";
       svn_stringbuf_t *original, *modified1, *modified2, *combined;
       int num_lines = 200, num_src = 20, num_dst = 20;
       svn_boolean_t *lines = apr_pcalloc(subpool, sizeof(*lines) * num_lines);
@@ -2345,12 +2380,12 @@ merge_with_part_already_present(apr_pool
       SVN_ERR(svn_stringbuf_from_file2(&modified2, filename3, pool));
       SVN_ERR(svn_stringbuf_from_file2(&combined, filename4, pool));
 
-      SVN_ERR(three_way_merge(filename1, filename2, filename3,
+      SVN_ERR(three_way_merge(base_filename1, base_filename2, base_filename3,
                               original->data, modified1->data,
                               modified2->data, combined->data, NULL,
                               svn_diff_conflict_display_modified_latest,
                               subpool));
-      SVN_ERR(three_way_merge(filename1, filename3, filename2,
+      SVN_ERR(three_way_merge(base_filename1, base_filename3, base_filename2,
                               original->data, modified2->data,
                               modified1->data, combined->data, NULL,
                               svn_diff_conflict_display_modified_latest,

Propchange: subversion/branches/log-addressing/subversion/tests/libsvn_fs_fs/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Wed Oct 30 01:33:37 2013
@@ -2,14 +2,13 @@ Debug
 Release
 .libs
 test-repo-*
+upgrade_*
 fs-pack-test
 fs-fs-pack-test
 test-get-set-revprop-packed-fs
+get_set_multiple_huge_revprops_packed_fs
 *.o
 *.lo
 *~
 .*~
 *.exe
-upgrade_txn_to_log_addressing
-upgrade_old_txns_to_log_addressing
-upgrade_new_txns_to_log_addressing

Modified: subversion/branches/log-addressing/subversion/tests/libsvn_fs_fs/fs-fs-pack-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/log-addressing/subversion/tests/libsvn_fs_fs/fs-fs-pack-test.c?rev=1536950&r1=1536949&r2=1536950&view=diff
==============================================================================
--- subversion/branches/log-addressing/subversion/tests/libsvn_fs_fs/fs-fs-pack-test.c (original)
+++ subversion/branches/log-addressing/subversion/tests/libsvn_fs_fs/fs-fs-pack-test.c Wed Oct 30 01:33:37 2013
@@ -323,7 +323,7 @@ pack_filesystem(const svn_test_opts_t *o
     {
       path = svn_dirent_join_many(pool, REPO_NAME, "revs",
                                   apr_psprintf(pool, "%d.pack", i / SHARD_SIZE),
-                                  "pack", NULL);
+                                  "pack", SVN_VA_NULL);
 
       /* These files should exist. */
       SVN_ERR(svn_io_check_path(path, &kind, pool));
@@ -335,7 +335,7 @@ pack_filesystem(const svn_test_opts_t *o
         {
           path = svn_dirent_join_many(pool, REPO_NAME, "revs",
                                       apr_psprintf(pool, "%d.pack", i / SHARD_SIZE),
-                                      "manifest", NULL);
+                                      "manifest", SVN_VA_NULL);
           SVN_ERR(svn_io_check_path(path, &kind, pool));
           if (kind != svn_node_file)
             return svn_error_createf(SVN_ERR_FS_GENERAL, NULL,
@@ -346,7 +346,7 @@ pack_filesystem(const svn_test_opts_t *o
         {
           path = svn_dirent_join_many(pool, REPO_NAME, "revs",
                                       apr_psprintf(pool, "%d.pack", i / SHARD_SIZE),
-                                      "pack.l2p", NULL);
+                                      "pack.l2p", SVN_VA_NULL);
           SVN_ERR(svn_io_check_path(path, &kind, pool));
           if (kind != svn_node_file)
             return svn_error_createf(SVN_ERR_FS_GENERAL, NULL,
@@ -366,7 +366,7 @@ pack_filesystem(const svn_test_opts_t *o
       /* This directory should not exist. */
       path = svn_dirent_join_many(pool, REPO_NAME, "revs",
                                   apr_psprintf(pool, "%d", i / SHARD_SIZE),
-                                  NULL);
+                                  SVN_VA_NULL);
       SVN_ERR(svn_io_check_path(path, &kind, pool));
       if (kind != svn_node_none)
         return svn_error_createf(SVN_ERR_FS_GENERAL, NULL,
@@ -388,7 +388,7 @@ pack_filesystem(const svn_test_opts_t *o
   /* Finally, make sure the final revision directory does exist. */
   path = svn_dirent_join_many(pool, REPO_NAME, "revs",
                               apr_psprintf(pool, "%d", (i / SHARD_SIZE) + 1),
-                              NULL);
+                              SVN_VA_NULL);
   SVN_ERR(svn_io_check_path(path, &kind, pool));
   if (kind != svn_node_none)
     return svn_error_createf(SVN_ERR_FS_GENERAL, NULL,
@@ -420,7 +420,7 @@ pack_even_filesystem(const svn_test_opts
   SVN_ERR(create_packed_filesystem(REPO_NAME, opts, MAX_REV, SHARD_SIZE,
                                    pool));
 
-  path = svn_dirent_join_many(pool, REPO_NAME, "revs", "2.pack", NULL);
+  path = svn_dirent_join_many(pool, REPO_NAME, "revs", "2.pack", SVN_VA_NULL);
   SVN_ERR(svn_io_check_path(path, &kind, pool));
   if (kind != svn_node_dir)
     return svn_error_createf(SVN_ERR_FS_GENERAL, NULL,
@@ -734,7 +734,7 @@ recover_fully_packed(const svn_test_opts
                                    apr_psprintf(pool, "%ld/%ld",
                                                 after_rev / SHARD_SIZE,
                                                 after_rev),
-                                   NULL),
+                                   SVN_VA_NULL),
               FALSE, pool));
   err = svn_fs_recover(REPO_NAME, NULL, NULL, pool);
   if (! err)

Propchange: subversion/branches/log-addressing/subversion/tests/libsvn_fs_x/
------------------------------------------------------------------------------
  Merged /subversion/trunk/subversion/tests/libsvn_fs_x:r1532580-1536946
  Merged /subversion/branches/fsfs-improvements/subversion/tests/libsvn_fs_x:r1532584-1536949

Modified: subversion/branches/log-addressing/subversion/tests/libsvn_fs_x/fs-x-pack-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/log-addressing/subversion/tests/libsvn_fs_x/fs-x-pack-test.c?rev=1536950&r1=1536949&r2=1536950&view=diff
==============================================================================
--- subversion/branches/log-addressing/subversion/tests/libsvn_fs_x/fs-x-pack-test.c (original)
+++ subversion/branches/log-addressing/subversion/tests/libsvn_fs_x/fs-x-pack-test.c Wed Oct 30 01:33:37 2013
@@ -288,7 +288,7 @@ pack_filesystem(const svn_test_opts_t *o
     {
       path = svn_dirent_join_many(pool, REPO_NAME, "revs",
                                   apr_psprintf(pool, "%d.pack", i / SHARD_SIZE),
-                                  "pack", NULL);
+                                  "pack", SVN_VA_NULL);
 
       /* These files should exist. */
       SVN_ERR(svn_io_check_path(path, &kind, pool));
@@ -300,7 +300,7 @@ pack_filesystem(const svn_test_opts_t *o
         {
           path = svn_dirent_join_many(pool, REPO_NAME, "revs",
                                       apr_psprintf(pool, "%d.pack", i / SHARD_SIZE),
-                                      "manifest", NULL);
+                                      "manifest", SVN_VA_NULL);
           SVN_ERR(svn_io_check_path(path, &kind, pool));
           if (kind != svn_node_file)
             return svn_error_createf(SVN_ERR_FS_GENERAL, NULL,
@@ -311,7 +311,7 @@ pack_filesystem(const svn_test_opts_t *o
         {
           path = svn_dirent_join_many(pool, REPO_NAME, "revs",
                                       apr_psprintf(pool, "%d.pack", i / SHARD_SIZE),
-                                      "pack.l2p", NULL);
+                                      "pack.l2p", SVN_VA_NULL);
           SVN_ERR(svn_io_check_path(path, &kind, pool));
           if (kind != svn_node_file)
             return svn_error_createf(SVN_ERR_FS_GENERAL, NULL,
@@ -320,7 +320,7 @@ pack_filesystem(const svn_test_opts_t *o
 
           path = svn_dirent_join_many(pool, REPO_NAME, "revs",
                                       apr_psprintf(pool, "%d.pack", i / SHARD_SIZE),
-                                      "pack.p2l", NULL);
+                                      "pack.p2l", SVN_VA_NULL);
           SVN_ERR(svn_io_check_path(path, &kind, pool));
           if (kind != svn_node_file)
             return svn_error_createf(SVN_ERR_FS_GENERAL, NULL,
@@ -331,7 +331,7 @@ pack_filesystem(const svn_test_opts_t *o
       /* This directory should not exist. */
       path = svn_dirent_join_many(pool, REPO_NAME, "revs",
                                   apr_psprintf(pool, "%d", i / SHARD_SIZE),
-                                  NULL);
+                                  SVN_VA_NULL);
       SVN_ERR(svn_io_check_path(path, &kind, pool));
       if (kind != svn_node_none)
         return svn_error_createf(SVN_ERR_FS_GENERAL, NULL,
@@ -353,7 +353,7 @@ pack_filesystem(const svn_test_opts_t *o
   /* Finally, make sure the final revision directory does exist. */
   path = svn_dirent_join_many(pool, REPO_NAME, "revs",
                               apr_psprintf(pool, "%d", (i / SHARD_SIZE) + 1),
-                              NULL);
+                              SVN_VA_NULL);
   SVN_ERR(svn_io_check_path(path, &kind, pool));
   if (kind != svn_node_none)
     return svn_error_createf(SVN_ERR_FS_GENERAL, NULL,
@@ -385,7 +385,7 @@ pack_even_filesystem(const svn_test_opts
   SVN_ERR(create_packed_filesystem(REPO_NAME, opts, MAX_REV, SHARD_SIZE,
                                    pool));
 
-  path = svn_dirent_join_many(pool, REPO_NAME, "revs", "2.pack", NULL);
+  path = svn_dirent_join_many(pool, REPO_NAME, "revs", "2.pack", SVN_VA_NULL);
   SVN_ERR(svn_io_check_path(path, &kind, pool));
   if (kind != svn_node_dir)
     return svn_error_createf(SVN_ERR_FS_GENERAL, NULL,
@@ -724,7 +724,7 @@ recover_fully_packed(const svn_test_opts
                                    apr_psprintf(pool, "%ld/%ld",
                                                 after_rev / SHARD_SIZE,
                                                 after_rev),
-                                   NULL),
+                                   SVN_VA_NULL),
               FALSE, pool));
   err = svn_fs_recover(REPO_NAME, NULL, NULL, pool);
   if (! err)

Modified: subversion/branches/log-addressing/subversion/tests/libsvn_ra_local/ra-local-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/log-addressing/subversion/tests/libsvn_ra_local/ra-local-test.c?rev=1536950&r1=1536949&r2=1536950&view=diff
==============================================================================
--- subversion/branches/log-addressing/subversion/tests/libsvn_ra_local/ra-local-test.c (original)
+++ subversion/branches/log-addressing/subversion/tests/libsvn_ra_local/ra-local-test.c Wed Oct 30 01:33:37 2013
@@ -220,7 +220,7 @@ check_split_url(const char *repos_path,
 
   SVN_ERR(svn_uri_get_file_url_from_dirent(&root_url, repos_path, pool));
   if (in_repos_path)
-    url = apr_pstrcat(pool, root_url, in_repos_path, (char *)NULL);
+    url = apr_pstrcat(pool, root_url, in_repos_path, SVN_VA_NULL);
   else
     url = root_url;
 

Modified: subversion/branches/log-addressing/subversion/tests/libsvn_repos/repos-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/log-addressing/subversion/tests/libsvn_repos/repos-test.c?rev=1536950&r1=1536949&r2=1536950&view=diff
==============================================================================
--- subversion/branches/log-addressing/subversion/tests/libsvn_repos/repos-test.c (original)
+++ subversion/branches/log-addressing/subversion/tests/libsvn_repos/repos-test.c Wed Oct 30 01:33:37 2013
@@ -485,19 +485,19 @@ print_chrevs(const apr_array_header_t *r
           outstr = apr_pstrcat(pool,
                                outstr,
                                apr_psprintf(pool, "%ld ", rev),
-                               (char *)NULL);
+                               SVN_VA_NULL);
         }
     }
-  outstr = apr_pstrcat(pool, outstr, "}  Expected: { ", (char *)NULL);
+  outstr = apr_pstrcat(pool, outstr, "}  Expected: { ", SVN_VA_NULL);
   for (i = 0; i < num_revs_expected; i++)
     {
       outstr = apr_pstrcat(pool,
                            outstr,
                            apr_psprintf(pool, "%ld ",
                                         revs_expected[i]),
-                           (char *)NULL);
+                           SVN_VA_NULL);
     }
-  return apr_pstrcat(pool, outstr, "}", (char *)NULL);
+  return apr_pstrcat(pool, outstr, "}", SVN_VA_NULL);
 }
 
 
@@ -1455,8 +1455,8 @@ in_repo_authz(const svn_test_opts_t *opt
 
   repos_root = svn_repos_path(repos, pool);
   SVN_ERR(svn_uri_get_file_url_from_dirent(&repos_url, repos_root, pool));
-  authz_url = apr_pstrcat(pool, repos_url, "/authz", (char *)NULL);
-  noent_authz_url = apr_pstrcat(pool, repos_url, "/A/authz", (char *)NULL);
+  authz_url = apr_pstrcat(pool, repos_url, "/authz", SVN_VA_NULL);
+  noent_authz_url = apr_pstrcat(pool, repos_url, "/A/authz", SVN_VA_NULL);
 
   /* absolute file URL. */
   SVN_ERR(svn_repos_authz_read2(&authz_cfg, authz_url, NULL, TRUE, pool));
@@ -1594,11 +1594,11 @@ in_repo_groups_authz(const svn_test_opts
   /* Calculate URLs */
   repos_root = svn_repos_path(repos, pool);
   SVN_ERR(svn_uri_get_file_url_from_dirent(&repos_url, repos_root, pool));
-  authz_url = apr_pstrcat(pool, repos_url, "/authz", (char *)NULL);
-  empty_authz_url = apr_pstrcat(pool, repos_url, "/empty-authz", (char *)NULL);
-  noent_authz_url = apr_pstrcat(pool, repos_url, "/A/authz", (char *)NULL);
-  groups_url = apr_pstrcat(pool, repos_url, "/groups", (char *)NULL);
-  noent_groups_url = apr_pstrcat(pool, repos_url, "/A/groups", (char *)NULL);
+  authz_url = apr_pstrcat(pool, repos_url, "/authz", SVN_VA_NULL);
+  empty_authz_url = apr_pstrcat(pool, repos_url, "/empty-authz", SVN_VA_NULL);
+  noent_authz_url = apr_pstrcat(pool, repos_url, "/A/authz", SVN_VA_NULL);
+  groups_url = apr_pstrcat(pool, repos_url, "/groups", SVN_VA_NULL);
+  noent_groups_url = apr_pstrcat(pool, repos_url, "/A/groups", SVN_VA_NULL);
 
 
   /* absolute file URLs. */

Propchange: subversion/branches/log-addressing/subversion/tests/libsvn_subr/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Wed Oct 30 01:33:37 2013
@@ -45,3 +45,6 @@ auth-clear
 prefix-string-test
 priority-queue-test
 packed-data-test
+root-pools-test
+aligned_seek_tmp
+read_length_tmp

Modified: subversion/branches/log-addressing/subversion/tests/libsvn_subr/auth-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/log-addressing/subversion/tests/libsvn_subr/auth-test.c?rev=1536950&r1=1536949&r2=1536950&view=diff
==============================================================================
--- subversion/branches/log-addressing/subversion/tests/libsvn_subr/auth-test.c (original)
+++ subversion/branches/log-addressing/subversion/tests/libsvn_subr/auth-test.c Wed Oct 30 01:33:37 2013
@@ -63,13 +63,14 @@ test_platform_specific_auth_providers(ap
   number_of_providers += 2;
 #endif
 #if defined(WIN32) && !defined(__MINGW32__)
-  number_of_providers += 2;
+  number_of_providers += 4;
 #endif
   if (providers->nelts != number_of_providers)
     return svn_error_createf
       (SVN_ERR_TEST_FAILED, NULL,
        "svn_auth_get_platform_specific_client_providers should return " \
-       "an array of %d providers", number_of_providers);
+       "an array of %d providers, but returned %d providers",
+       number_of_providers, providers->nelts);
 
   /* Test Keychain auth providers */
 #ifdef SVN_HAVE_KEYCHAIN_SERVICES

Modified: subversion/branches/log-addressing/subversion/tests/libsvn_subr/config-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/log-addressing/subversion/tests/libsvn_subr/config-test.c?rev=1536950&r1=1536949&r2=1536950&view=diff
==============================================================================
--- subversion/branches/log-addressing/subversion/tests/libsvn_subr/config-test.c (original)
+++ subversion/branches/log-addressing/subversion/tests/libsvn_subr/config-test.c Wed Oct 30 01:33:37 2013
@@ -35,6 +35,7 @@
 
 #include "svn_error.h"
 #include "svn_config.h"
+#include "private/svn_subr_private.h"
 
 #include "../svn_test.h"
 
@@ -108,7 +109,7 @@ test_text_retrieval(apr_pool_t *pool)
   if (!srcdir)
     SVN_ERR(init_params(pool));
 
-  cfg_file = apr_pstrcat(pool, srcdir, "/", "config-test.cfg", (char *)NULL);
+  cfg_file = apr_pstrcat(pool, srcdir, "/", "config-test.cfg", SVN_VA_NULL);
   SVN_ERR(svn_config_read3(&cfg, cfg_file, TRUE, FALSE, FALSE, pool));
 
   /* Test values retrieved from our ConfigParser instance against
@@ -159,7 +160,7 @@ test_boolean_retrieval(apr_pool_t *pool)
   if (!srcdir)
     SVN_ERR(init_params(pool));
 
-  cfg_file = apr_pstrcat(pool, srcdir, "/", "config-test.cfg", (char *)NULL);
+  cfg_file = apr_pstrcat(pool, srcdir, "/", "config-test.cfg", SVN_VA_NULL);
   SVN_ERR(svn_config_read3(&cfg, cfg_file, TRUE, FALSE, FALSE, pool));
 
   for (i = 0; true_keys[i] != NULL; i++)
@@ -219,7 +220,7 @@ test_has_section_case_insensitive(apr_po
   if (!srcdir)
     SVN_ERR(init_params(pool));
 
-  cfg_file = apr_pstrcat(pool, srcdir, "/", "config-test.cfg", (char *)NULL);
+  cfg_file = apr_pstrcat(pool, srcdir, "/", "config-test.cfg", SVN_VA_NULL);
   SVN_ERR(svn_config_read3(&cfg, cfg_file, TRUE, FALSE, FALSE, pool));
 
   if (! svn_config_has_section(cfg, "section1"))
@@ -249,7 +250,7 @@ test_has_section_case_sensitive(apr_pool
   if (!srcdir)
     SVN_ERR(init_params(pool));
 
-  cfg_file = apr_pstrcat(pool, srcdir, "/", "config-test.cfg", (char *)NULL);
+  cfg_file = apr_pstrcat(pool, srcdir, "/", "config-test.cfg", SVN_VA_NULL);
   SVN_ERR(svn_config_read3(&cfg, cfg_file, TRUE, TRUE, FALSE, pool));
 
   if (! svn_config_has_section(cfg, "section1"))
@@ -292,7 +293,7 @@ test_has_option_case_sensitive(apr_pool_
   if (!srcdir)
     SVN_ERR(init_params(pool));
 
-  cfg_file = apr_pstrcat(pool, srcdir, "/", "config-test.cfg", (char *)NULL);
+  cfg_file = apr_pstrcat(pool, srcdir, "/", "config-test.cfg", SVN_VA_NULL);
   SVN_ERR(svn_config_read3(&cfg, cfg_file, TRUE, TRUE, TRUE, pool));
 
   for (i = 0; i < test_data_size; ++i)
@@ -322,7 +323,7 @@ test_stream_interface(apr_pool_t *pool)
   if (!srcdir)
     SVN_ERR(init_params(pool));
 
-  cfg_file = apr_pstrcat(pool, srcdir, "/", "config-test.cfg", (char *)NULL);
+  cfg_file = apr_pstrcat(pool, srcdir, "/", "config-test.cfg", SVN_VA_NULL);
   SVN_ERR(svn_stream_open_readonly(&stream, cfg_file, pool, pool));
 
   SVN_ERR(svn_config_parse(&cfg, stream, TRUE, TRUE, pool));
@@ -352,6 +353,37 @@ test_ignore_bom(apr_pool_t *pool)
   return SVN_NO_ERROR;
 }
 
+static svn_error_t *
+test_read_only_mode(apr_pool_t *pool)
+{
+  svn_config_t *cfg;
+  svn_config_t *cfg2;
+  const char *cfg_file;
+
+  if (!srcdir)
+    SVN_ERR(init_params(pool));
+
+  cfg_file = apr_pstrcat(pool, srcdir, "/", "config-test.cfg", SVN_VA_NULL);
+  SVN_ERR(svn_config_read3(&cfg, cfg_file, TRUE, TRUE, FALSE, pool));
+
+  /* setting CFG to r/o mode shall toggle the r/o mode and expand values */
+
+  SVN_TEST_ASSERT(!svn_config__is_read_only(cfg));
+  SVN_TEST_ASSERT(!svn_config__is_expanded(cfg, "section1", "i"));
+
+  svn_config__set_read_only(cfg, pool);
+
+  SVN_TEST_ASSERT(svn_config__is_read_only(cfg));
+  SVN_TEST_ASSERT(svn_config__is_expanded(cfg, "section1", "i"));
+
+  /* copies should be r/w with values */
+
+  SVN_ERR(svn_config_dup(&cfg2, cfg, pool));
+  SVN_TEST_ASSERT(!svn_config__is_read_only(cfg2));
+
+  return SVN_NO_ERROR;
+}
+
 /*
    ====================================================================
    If you add a new test to this file, update this array.
@@ -375,6 +407,9 @@ struct svn_test_descriptor_t test_funcs[
                    "test case-sensitive option name lookup"),
     SVN_TEST_PASS2(test_stream_interface,
                    "test svn_config_parse"),
-    SVN_TEST_PASS2(test_ignore_bom, "test parsing config file with BOM"),
+    SVN_TEST_PASS2(test_ignore_bom,
+                   "test parsing config file with BOM"),
+    SVN_TEST_PASS2(test_read_only_mode,
+                   "test r/o mode"),
     SVN_TEST_NULL
   };

Modified: subversion/branches/log-addressing/subversion/tests/libsvn_subr/dirent_uri-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/log-addressing/subversion/tests/libsvn_subr/dirent_uri-test.c?rev=1536950&r1=1536949&r2=1536950&view=diff
==============================================================================
--- subversion/branches/log-addressing/subversion/tests/libsvn_subr/dirent_uri-test.c (original)
+++ subversion/branches/log-addressing/subversion/tests/libsvn_subr/dirent_uri-test.c Wed Oct 30 01:33:37 2013
@@ -269,7 +269,7 @@ test_dirent_join(apr_pool_t *pool)
                                  "\"%s\". expected \"%s\"",
                                  base, comp, result, expect);
 
-      result = svn_dirent_join_many(pool, base, comp, NULL);
+      result = svn_dirent_join_many(pool, base, comp, SVN_VA_NULL);
       if (strcmp(result, expect))
         return svn_error_createf(SVN_ERR_TEST_FAILED, NULL,
                                  "svn_dirent_join_many(\"%s\", \"%s\") returned "
@@ -1936,7 +1936,7 @@ test_dirent_get_absolute(apr_pool_t *poo
 
       expect_abs = expect;
       if (*expect == '%')
-        expect_abs = apr_pstrcat(pool, curdir, expect + 1, (char *)NULL);
+        expect_abs = apr_pstrcat(pool, curdir, expect + 1, SVN_VA_NULL);
 #ifdef SVN_USE_DOS_PATHS
       if (*expect == '@')
         expect_abs = apr_pstrcat(pool, curdironc, expect + 1, NULL);

Modified: subversion/branches/log-addressing/subversion/tests/libsvn_subr/path-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/log-addressing/subversion/tests/libsvn_subr/path-test.c?rev=1536950&r1=1536949&r2=1536950&view=diff
==============================================================================
--- subversion/branches/log-addressing/subversion/tests/libsvn_subr/path-test.c (original)
+++ subversion/branches/log-addressing/subversion/tests/libsvn_subr/path-test.c Wed Oct 30 01:33:37 2013
@@ -489,7 +489,7 @@ test_path_join(apr_pool_t *pool)
       if (svn_path_is_url(base))
         continue;
 
-      result = svn_path_join_many(pool, base, comp, NULL);
+      result = svn_path_join_many(pool, base, comp, SVN_VA_NULL);
       if (strcmp(result, expect))
         return svn_error_createf(SVN_ERR_TEST_FAILED, NULL,
                                  "svn_path_join_many(\"%s\", \"%s\") returned "
@@ -1527,7 +1527,7 @@ condense_targets_tests_helper(const char
 
   /* Verify the common part with the expected (prefix with cwd). */
   if (*exp_common == '%')
-    exp_common_abs = apr_pstrcat(pool, curdir, exp_common + 1, (char *)NULL);
+    exp_common_abs = apr_pstrcat(pool, curdir, exp_common + 1, SVN_VA_NULL);
 
   if (strcmp(common_path, exp_common_abs) != 0)
     {
@@ -1544,7 +1544,7 @@ condense_targets_tests_helper(const char
     {
       const char * target = APR_ARRAY_IDX(condensed_targets, i, const char*);
       if (token && (*token == '%'))
-        token = apr_pstrcat(pool, curdir, token + 1, (char *)NULL);
+        token = apr_pstrcat(pool, curdir, token + 1, SVN_VA_NULL);
       if (! token ||
           (target && (strcmp(target, token) != 0)))
         {

Modified: subversion/branches/log-addressing/subversion/tests/libsvn_subr/translate-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/log-addressing/subversion/tests/libsvn_subr/translate-test.c?rev=1536950&r1=1536949&r2=1536950&view=diff
==============================================================================
--- subversion/branches/log-addressing/subversion/tests/libsvn_subr/translate-test.c (original)
+++ subversion/branches/log-addressing/subversion/tests/libsvn_subr/translate-test.c Wed Oct 30 01:33:37 2013
@@ -325,8 +325,8 @@ substitute_and_verify(const char *test_n
   apr_size_t idx = 0;
   apr_size_t i;
   const char *expect[(sizeof(lines) / sizeof(*lines))];
-  const char *src_fname = apr_pstrcat(pool, test_name, ".src", (char *)NULL);
-  const char *dst_fname = apr_pstrcat(pool, test_name, ".dst", (char *)NULL);
+  const char *src_fname = apr_pstrcat(pool, test_name, ".src", SVN_VA_NULL);
+  const char *dst_fname = apr_pstrcat(pool, test_name, ".dst", SVN_VA_NULL);
   svn_string_t *val;
   apr_pool_t *subpool = svn_pool_create(pool);
 
@@ -419,27 +419,27 @@ substitute_and_verify(const char *test_n
                         "Valid $LastChangedRevision: ",
                         rev,
                         " $, started unexpanded.",
-                        (char *)NULL);
+                        SVN_VA_NULL);
           expect[5 - 1] =
             apr_pstrcat(pool, "Line 5: ",
                         "Valid $Rev: ", rev, " $, started unexpanded.",
-                        (char *)NULL);
+                        SVN_VA_NULL);
           expect[26 - 1] =
             apr_pstrcat(pool, "Line 26: ",
                         "Emptily expanded keyword $Rev: ", rev," $.",
-                        (char *)NULL);
+                        SVN_VA_NULL);
           expect[29 - 1] =
             apr_pstrcat(pool, "Line 29: ",
                         "Valid $LastChangedRevision: ",
                         rev,
                         " $, started expanded.",
-                        (char *)NULL);
+                        SVN_VA_NULL);
           expect[30 - 1] =
             apr_pstrcat(pool, "Line 30: ",
                         "Valid $Rev: ",
                         rev,
                         " $, started expanded.",
-                        (char *)NULL);
+                        SVN_VA_NULL);
         }
       else  /* unexpand */
         {
@@ -462,31 +462,31 @@ substitute_and_verify(const char *test_n
                         "Valid $LastChangedDate: ",
                         date,
                         " $, started unexpanded.",
-                        (char *)NULL);
+                        SVN_VA_NULL);
           expect[13 - 1] =
             apr_pstrcat(pool, "Line 13: ",
                         "Valid $Date: ", date, " $, started unexpanded.",
-                        (char *)NULL);
+                        SVN_VA_NULL);
           expect[33 - 1] =
             apr_pstrcat(pool, "Line 33: ",
                         "Valid $LastChangedDate: ",
                         date,
                         " $, started expanded.",
-                        (char *)NULL);
+                        SVN_VA_NULL);
           expect[34 - 1] =
             apr_pstrcat(pool, "Line 34: ",
                         "Valid $Date: ", date, " $, started expanded.",
-                        (char *)NULL);
+                        SVN_VA_NULL);
           expect[51 - 1] =
             apr_pstrcat(pool, "Line 51: ",
                         "same, but with embedded keyword ",
                         "$$$$$$$$Date: ", date, " $$$$$$$$$$.",
-                        (char *)NULL);
+                        SVN_VA_NULL);
           expect[52 - 1] =
             apr_pstrcat(pool, "Line 52: ",
                         "same, with expanded, empty keyword ",
                         "$$$$$$Date: ", date, " $$$$$$.",
-                        (char *)NULL);
+                        SVN_VA_NULL);
         }
       else  /* unexpand */
         {
@@ -511,46 +511,46 @@ substitute_and_verify(const char *test_n
                         "Valid $LastChangedBy: ",
                         author,
                         " $, started unexpanded.",
-                        (char *)NULL);
+                        SVN_VA_NULL);
           expect[9 - 1] =
             apr_pstrcat(pool, "Line 9: ",
                         "Valid $Author: ", author, " $, started unexpanded.",
-                        (char *)NULL);
+                        SVN_VA_NULL);
           expect[37 - 1] =
             apr_pstrcat(pool, "Line 37: ",
                         "Valid $LastChangedBy: ", author,
-                        " $, started expanded.", (char *)NULL);
+                        " $, started expanded.", SVN_VA_NULL);
           expect[38 - 1] =
             apr_pstrcat(pool, "Line 38: ",
                         "Valid $Author: ", author, " $, started expanded.",
-                        (char *)NULL);
+                        SVN_VA_NULL);
           expect[46 - 1] =
             apr_pstrcat(pool, "Line 46: ",
                         "Empty $Author: ", author, " $, started expanded.",
-                        (char *)NULL);
+                        SVN_VA_NULL);
           expect[71 - 1] =
-            apr_pstrcat(pool, ".$veR$Author: ", author, " $", (char *)NULL);
+            apr_pstrcat(pool, ".$veR$Author: ", author, " $", SVN_VA_NULL);
 
           expect[74 - 1] =
             apr_pstrcat(pool, "Line 74: ",
                         "Valid $Author: ", author, " $, started expanded.",
-                        (char *)NULL);
+                        SVN_VA_NULL);
           expect[79 - 1] =
             apr_pstrcat(pool, "Line 79: ",
                         "Valid $Author: ", author, " $, started expanded.",
-                        (char *)NULL);
+                        SVN_VA_NULL);
           expect[80 - 1] =
             apr_pstrcat(pool, "Line 80: ",
                         "Valid $Author: ", author, " $, started expanded.",
-                        (char *)NULL);
+                        SVN_VA_NULL);
           expect[81 - 1] =
             apr_pstrcat(pool, "Line 81: ",
                         "Valid $Author: ", author, " $, started expanded.",
-                        (char *)NULL);
+                        SVN_VA_NULL);
           expect[82 - 1] =
             apr_pstrcat(pool, "Line 82: ",
                         "Valid $Author: ", author, " $, started expanded.",
-                        (char *)NULL);
+                        SVN_VA_NULL);
         }
       else  /* unexpand */
         {
@@ -581,23 +581,23 @@ substitute_and_verify(const char *test_n
           expect[16 - 1] =
             apr_pstrcat(pool, "Line 16: ",
                         "Valid $HeadURL: ", url, " $, started unexpanded.",
-                        (char *)NULL);
+                        SVN_VA_NULL);
           expect[17 - 1] =
             apr_pstrcat(pool, "Line 17: ",
                         "Valid $URL: ", url, " $, started unexpanded.",
-                        (char *)NULL);
+                        SVN_VA_NULL);
           expect[41 - 1] =
             apr_pstrcat(pool, "Line 41: ",
                         "Valid $HeadURL: ", url, " $, started expanded.",
-                        (char *)NULL);
+                        SVN_VA_NULL);
           expect[42 - 1] =
             apr_pstrcat(pool, "Line 42: ",
                         "Valid $URL: ", url, " $, started expanded.",
-                        (char *)NULL);
+                        SVN_VA_NULL);
           expect[75 - 1] =
             apr_pstrcat(pool, "Line 75: ",
                         "Valid $URL: ", url, " $, started expanded.",
-                        (char *)NULL);
+                        SVN_VA_NULL);
         }
       else  /* unexpand */
         {
@@ -622,14 +622,14 @@ substitute_and_verify(const char *test_n
                         "Two keywords back to back: "
                         "$Author: ", author, " $"
                         "$Rev: ", rev, " $.",
-                        (char *)NULL);
+                        SVN_VA_NULL);
           expect[49 - 1] =
             apr_pstrcat(pool, "Line 49: ",
                         "One keyword, one not, back to back: "
                         "$Author: ", author, " $Rev$.",
-                        (char *)NULL);
+                        SVN_VA_NULL);
           expect[70 - 1] =
-            apr_pstrcat(pool, "$Author: ", author, " $Rev$.", (char *)NULL);
+            apr_pstrcat(pool, "$Author: ", author, " $Rev$.", SVN_VA_NULL);
         }
       /* Else Lines 48, 49, and 70 remain unchanged. */
     }
@@ -641,14 +641,14 @@ substitute_and_verify(const char *test_n
             apr_pstrcat(pool, "Line 48: ",
                         "Two keywords back to back: "
                         "$Author$$Rev: ", rev, " $.",
-                        (char *)NULL);
+                        SVN_VA_NULL);
           expect[49 - 1] =
             apr_pstrcat(pool, "Line 49: ",
                         "One keyword, one not, back to back: "
                         "$Author$Rev: ", rev, " $.",
-                        (char *)NULL);
+                        SVN_VA_NULL);
           expect[70 - 1] =
-            apr_pstrcat(pool, "$Author$Rev: ", rev, " $.", (char *)NULL);
+            apr_pstrcat(pool, "$Author$Rev: ", rev, " $.", SVN_VA_NULL);
         }
       /* Else Lines 48, 49, and 70 remain unchanged. */
     }
@@ -660,14 +660,14 @@ substitute_and_verify(const char *test_n
             apr_pstrcat(pool, "Line 48: ",
                         "Two keywords back to back: "
                         "$Author: ", author, " $$Rev$.",
-                        (char *)NULL);
+                        SVN_VA_NULL);
           expect[49 - 1] =
             apr_pstrcat(pool, "Line 49: ",
                         "One keyword, one not, back to back: "
                         "$Author: ", author, " $Rev$.",
-                        (char *)NULL);
+                        SVN_VA_NULL);
           expect[70 - 1] =
-            apr_pstrcat(pool, "$Author: ", author, " $Rev$.", (char *)NULL);
+            apr_pstrcat(pool, "$Author: ", author, " $Rev$.", SVN_VA_NULL);
         }
       /* Else Lines 48, 49, and 70 remain unchanged. */
     }
@@ -684,14 +684,14 @@ substitute_and_verify(const char *test_n
                         "keyword in a keyword: $Author: ",
                         author,
                         " $Date$ $",
-                        (char *)NULL);
+                        SVN_VA_NULL);
         }
       else  /* unexpand */
         {
           expect[24 - 1] =
             apr_pstrcat(pool, "Line 24: ",
                         "keyword in a keyword: $Author$Date$ $",
-                        (char *)NULL);
+                        SVN_VA_NULL);
         }
     }
   else if (date && (! author))
@@ -703,7 +703,7 @@ substitute_and_verify(const char *test_n
                         "keyword in a keyword: $Author: $Date: ",
                         date,
                         " $ $",
-                        (char *)NULL);
+                        SVN_VA_NULL);
         }
       /* Else Line 24 remains unchanged. */
     }
@@ -716,14 +716,14 @@ substitute_and_verify(const char *test_n
                         "keyword in a keyword: $Author: ",
                         author,
                         " $Date$ $",
-                        (char *)NULL);
+                        SVN_VA_NULL);
         }
       else  /* unexpand */
         {
           expect[24 - 1] =
             apr_pstrcat(pool, "Line 24: ",
                         "keyword in a keyword: $Author$Date$ $",
-                        (char *)NULL);
+                        SVN_VA_NULL);
         }
     }
   /* Else neither author nor date, so Line 24 remains unchanged. */

Modified: subversion/branches/log-addressing/subversion/tests/libsvn_wc/entries-compat.c
URL: http://svn.apache.org/viewvc/subversion/branches/log-addressing/subversion/tests/libsvn_wc/entries-compat.c?rev=1536950&r1=1536949&r2=1536950&view=diff
==============================================================================
--- subversion/branches/log-addressing/subversion/tests/libsvn_wc/entries-compat.c (original)
+++ subversion/branches/log-addressing/subversion/tests/libsvn_wc/entries-compat.c Wed Oct 30 01:33:37 2013
@@ -377,7 +377,7 @@ test_entries_alloc(apr_pool_t *pool)
                                        "fake-wc",
                                        WC_NAME,
                                        "D",
-                                       NULL);
+                                       SVN_VA_NULL);
   SVN_ERR(svn_wc_entry(&entry, local_relpath, adm_access, TRUE, pool));
   SVN_TEST_ASSERT(entry == apr_hash_get(entries, "D", APR_HASH_KEY_STRING));
 
@@ -413,7 +413,7 @@ test_stubs(apr_pool_t *pool)
                                        "fake-wc",
                                        WC_NAME,
                                        "M",
-                                       NULL);
+                                       SVN_VA_NULL);
 
   SVN_ERR(svn_wc_adm_open3(&adm_access,
                            NULL /* associated */,

Modified: subversion/branches/log-addressing/subversion/tests/libsvn_wc/op-depth-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/log-addressing/subversion/tests/libsvn_wc/op-depth-test.c?rev=1536950&r1=1536949&r2=1536950&view=diff
==============================================================================
--- subversion/branches/log-addressing/subversion/tests/libsvn_wc/op-depth-test.c (original)
+++ subversion/branches/log-addressing/subversion/tests/libsvn_wc/op-depth-test.c Wed Oct 30 01:33:37 2013
@@ -8406,17 +8406,18 @@ move_delete_intermediate(const svn_test_
   /* Let's delete A */
   SVN_ERR(sbox_wc_delete(&b, "A"));
 
-  /* AAA_1 should now be a copy, but AAA_2 and AAA_3 should still be moves,
-     but now from the original location instead of from "A/A/A" */
+  /* AAA_1, AAA_2 and AAA_3 should still be moves after deleting A */
   {
     nodes_row_t nodes[] = {
 
       {0, "",           "normal",       0, ""},
 
-      {1, "AAA_1",      "normal",       1, "A/A/A",},
-      {1, "AAA_1/A",    "normal",       1, "A/A/A/A"},
+      {1, "AAA_1",      "normal",       1, "A/A/A",             MOVED_HERE},
+      {1, "AAA_1/A",    "normal",       1, "A/A/A/A",           MOVED_HERE},
+
       {1, "AAA_2",      "normal",       1, "B/A/A",             MOVED_HERE},
       {1, "AAA_2/A",    "normal",       1, "B/A/A/A",           MOVED_HERE},
+
       {1, "AAA_3",      "normal",       1, "C/A/A",             MOVED_HERE},
       {1, "AAA_3/A",    "normal",       1, "C/A/A/A",           MOVED_HERE},
 
@@ -8425,6 +8426,11 @@ move_delete_intermediate(const svn_test_
       {0, "A/A/A",      "normal",       1, "A/A/A"},
       {0, "A/A/A/A",    "normal",       1, "A/A/A/A"},
 
+      {1, "A",          "base-deleted", NO_COPY_FROM},
+      {1, "A/A",        "base-deleted", NO_COPY_FROM},
+      {1, "A/A/A",      "base-deleted", NO_COPY_FROM, "AAA_1"},
+      {1, "A/A/A/A",    "base-deleted", NO_COPY_FROM},
+
       {0, "B",          "normal",       1, "B"},
       {0, "B/A",        "normal",       1, "B/A"},
       {0, "B/A/A",      "normal",       1, "B/A/A"},
@@ -8591,6 +8597,161 @@ move_revert_intermediate(const svn_test_
   return SVN_NO_ERROR;
 }
 
+static svn_error_t *
+move_replace_ancestor_with_child(const svn_test_opts_t *opts, apr_pool_t *pool)
+{
+    svn_test__sandbox_t b;
+
+    SVN_ERR(svn_test__sandbox_create(&b, "move_replace_ancestor_with_child", opts,
+        pool));
+
+    SVN_ERR(sbox_wc_mkdir(&b, "A"));
+    SVN_ERR(sbox_wc_mkdir(&b, "A/A"));
+
+    SVN_ERR(sbox_wc_commit(&b, ""));
+    SVN_ERR(sbox_wc_update(&b, "", 1));
+
+    SVN_ERR(sbox_wc_move(&b, "A", "A2"));
+
+    {
+      nodes_row_t nodes[] = {
+
+        { 0, "",            "normal",       1, "" },
+
+        { 0, "A",           "normal",       1, "A"},
+        { 0, "A/A",         "normal",       1, "A/A" },
+
+        { 1, "A",           "base-deleted", NO_COPY_FROM , "A2"},
+        { 1, "A/A",         "base-deleted", NO_COPY_FROM },
+
+        { 1, "A2",          "normal",       1, "A",     MOVED_HERE },
+        { 1, "A2/A",        "normal",       1, "A/A",   MOVED_HERE },
+
+        { 0 },
+      };
+      SVN_ERR(check_db_rows(&b, "", nodes));
+    }
+
+    SVN_ERR(sbox_wc_move(&b, "A2/A", "A"));
+
+    {
+      nodes_row_t nodes[] = {
+        { 0, "",            "normal",       1, "" },
+
+        { 0, "A",           "normal",       1, "A"},
+        { 0, "A/A",         "normal",       1, "A/A" },
+
+        { 1, "A",           "normal",       1, "A/A", FALSE, "A2", TRUE },
+        { 1, "A/A",         "base-deleted", NO_COPY_FROM },
+
+        { 1, "A2",          "normal",       1, "A",     MOVED_HERE },
+        { 1, "A2/A",        "normal",       1, "A/A",   MOVED_HERE },
+
+        { 2, "A2/A",        "base-deleted", NO_COPY_FROM, "A" },
+        { 0 },
+      };
+      SVN_ERR(check_db_rows(&b, "", nodes));
+    }
+
+    /* ### This currently fails with an assertion in maintainer mode */
+    SVN_ERR(sbox_wc_delete(&b, "A2"));
+
+    {
+      nodes_row_t nodes[] = {
+        { 0, "",            "normal",       1, "" },
+
+        { 0, "A",           "normal",       1, "A"},
+        { 0, "A/A",         "normal",       1, "A/A" },
+
+        { 1, "A",           "normal",       1, "A/A", MOVED_HERE },
+        { 1, "A/A",         "base-deleted", NO_COPY_FROM, "A" },
+
+        { 0 },
+      };
+      SVN_ERR(check_db_rows(&b, "", nodes));
+    }
+
+    SVN_ERR(sbox_wc_commit(&b, "A"));
+
+    return SVN_NO_ERROR;
+}
+
+static svn_error_t *
+move_twice_within_delete(const svn_test_opts_t *opts, apr_pool_t *pool)
+{
+    svn_test__sandbox_t b;
+
+    SVN_ERR(svn_test__sandbox_create(&b, "move_twice_within_delete", opts,
+        pool));
+
+    SVN_ERR(sbox_wc_mkdir(&b, "A"));
+    SVN_ERR(sbox_wc_mkdir(&b, "A/A"));
+    SVN_ERR(sbox_wc_mkdir(&b, "A/A/A"));
+
+    SVN_ERR(sbox_wc_commit(&b, ""));
+    SVN_ERR(sbox_wc_update(&b, "", 1));
+
+    SVN_ERR(sbox_wc_mkdir(&b, "B"));
+    SVN_ERR(sbox_wc_move(&b, "A", "B/A"));
+    SVN_ERR(sbox_wc_move(&b, "B/A/A", "B/AA"));
+    SVN_ERR(sbox_wc_move(&b, "B/AA/A", "AA"));
+
+    {
+      nodes_row_t nodes[] = {
+
+        { 0, "",          "normal",       1, "" },
+                          
+        { 0, "A",         "normal",       1, "A" },
+        { 0, "A/A",       "normal",       1, "A/A" },
+        { 0, "A/A/A",     "normal",       1, "A/A/A" },
+                          
+        { 1, "A",         "base-deleted", NO_COPY_FROM, "B/A" },
+        { 1, "A/A",       "base-deleted", NO_COPY_FROM },
+        { 1, "A/A/A",     "base-deleted", NO_COPY_FROM },
+                          
+        { 1, "AA",        "normal",       1, "A/A/A", MOVED_HERE },
+
+        { 1, "B",         "normal",       NO_COPY_FROM },
+        { 2, "B/A",       "normal",       1, "A",       MOVED_HERE },
+        { 2, "B/A/A",     "normal",       1, "A/A",     MOVED_HERE },
+        { 2, "B/A/A/A",   "normal",       1, "A/A/A",   MOVED_HERE },
+
+        { 3, "B/A/A",     "base-deleted", NO_COPY_FROM, "B/AA" },
+        { 3, "B/A/A/A",   "base-deleted", NO_COPY_FROM },
+
+        { 2, "B/AA",      "normal",       1, "A/A", MOVED_HERE},
+        { 2, "B/AA/A",    "normal",       1, "A/A/A", MOVED_HERE },
+
+        { 3, "B/AA/A",    "base-deleted", NO_COPY_FROM, "AA" },
+
+        { 0 },
+      };
+      SVN_ERR(check_db_rows(&b, "", nodes));
+    }
+
+    SVN_ERR(sbox_wc_delete(&b, "B"));
+
+    {
+      nodes_row_t nodes[] = {
+        { 0, "",        "normal", 1, "" },
+
+        { 0, "A",       "normal", 1, "A" },
+        { 0, "A/A",     "normal", 1, "A/A" },
+        { 0, "A/A/A",   "normal", 1, "A/A/A" },
+
+        { 1, "A",       "base-deleted", NO_COPY_FROM },
+        { 1, "A/A",     "base-deleted", NO_COPY_FROM },
+        { 1, "A/A/A",   "base-deleted", NO_COPY_FROM, "AA" },
+
+        { 1, "AA", "normal", 1, "A/A/A", MOVED_HERE },
+
+        { 0 },
+      };
+        SVN_ERR(check_db_rows(&b, "", nodes));
+    }
+
+    return SVN_NO_ERROR;
+}
 
 /* ---------------------------------------------------------------------- */
 /* The list of test functions */
@@ -8747,13 +8908,17 @@ struct svn_test_descriptor_t test_funcs[
                        "update with tree conflict (issue 4347)"),
     SVN_TEST_OPTS_PASS(move_update_parent_replace,
                        "move update with replaced parent (issue 4388)"),
-    SVN_TEST_OPTS_XFAIL(copy_mixed_rev_mods,
+    SVN_TEST_OPTS_PASS(copy_mixed_rev_mods,
                        "copy mixed-rev with mods"),
     SVN_TEST_OPTS_PASS(move_child_to_parent_revert,
                        "move child to parent and revert (issue 4436)"),
-    SVN_TEST_OPTS_XFAIL(move_delete_intermediate,
+    SVN_TEST_OPTS_PASS(move_delete_intermediate,
                        "move more than once, delete intermediate"),
     SVN_TEST_OPTS_XFAIL(move_revert_intermediate,
                        "move more than once, revert intermediate"),
+    SVN_TEST_OPTS_PASS(move_replace_ancestor_with_child,
+                       "move replace ancestor with child"),
+    SVN_TEST_OPTS_PASS(move_twice_within_delete,
+                       "move twice and then delete"),
     SVN_TEST_NULL
   };

Modified: subversion/branches/log-addressing/subversion/tests/libsvn_wc/utils.c
URL: http://svn.apache.org/viewvc/subversion/branches/log-addressing/subversion/tests/libsvn_wc/utils.c?rev=1536950&r1=1536949&r2=1536950&view=diff
==============================================================================
--- subversion/branches/log-addressing/subversion/tests/libsvn_wc/utils.c (original)
+++ subversion/branches/log-addressing/subversion/tests/libsvn_wc/utils.c Wed Oct 30 01:33:37 2013
@@ -354,7 +354,7 @@ sbox_wc_switch(svn_test__sandbox_t *b,
   svn_revnum_t result_rev;
   svn_opt_revision_t head_rev = { svn_opt_revision_head, {0} };
 
-  url = apr_pstrcat(b->pool, b->repos_url, url, (char*)NULL);
+  url = apr_pstrcat(b->pool, b->repos_url, url, SVN_VA_NULL);
   SVN_ERR(svn_client_create_context2(&ctx, NULL, b->pool));
   ctx->wc_ctx = b->wc_ctx;
   return svn_client_switch3(&result_rev, sbox_wc_path(b, path), url,

Modified: subversion/branches/log-addressing/subversion/tests/libsvn_wc/wc-queries-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/log-addressing/subversion/tests/libsvn_wc/wc-queries-test.c?rev=1536950&r1=1536949&r2=1536950&view=diff
==============================================================================
--- subversion/branches/log-addressing/subversion/tests/libsvn_wc/wc-queries-test.c (original)
+++ subversion/branches/log-addressing/subversion/tests/libsvn_wc/wc-queries-test.c Wed Oct 30 01:33:37 2013
@@ -30,22 +30,17 @@
 #include "../svn_test.h"
 
 #ifdef SVN_SQLITE_INLINE
-/* Include sqlite3 inline, making all symbols private. */
-  #define SQLITE_API static
-  #ifdef __APPLE__
-    #include <Availability.h>
-    #if __MAC_OS_X_VERSION_MIN_REQUIRED < 1060
-      /* <libkern/OSAtomic.h> is included on OS X by sqlite3.c, and
-         on old systems (Leopard or older), it cannot be compiled
-         with -std=c89 because it uses inline. This is a work-around. */
-      #define inline __inline__
-      #include <libkern/OSAtomic.h>
-      #undef inline
-    #endif
-  #endif
-  #include <sqlite3.c>
+/* Import the sqlite3 API vtable from sqlite3wrapper.c */
+#  define SQLITE_OMIT_DEPRECATED
+#  include <sqlite3ext.h>
+extern const sqlite3_api_routines *const svn_sqlite3__api_funcs;
+extern int (*const svn_sqlite3__api_initialize)(void);
+extern int (*const svn_sqlite3__api_config)(int, ...);
+#  define sqlite3_api svn_sqlite3__api_funcs
+#  define sqlite3_initialize svn_sqlite3__api_initialize
+#  define sqlite3_config svn_sqlite3__api_config
 #else
-  #include <sqlite3.h>
+#  include <sqlite3.h>
 #endif
 
 #include "../../libsvn_wc/wc-queries.h"
@@ -162,7 +157,7 @@ create_memory_db(sqlite3 **db,
 static svn_error_t *
 test_sqlite_version(apr_pool_t *scratch_pool)
 {
-  printf("DBG: Using Sqlite %s\n", sqlite3_version);
+  printf("DBG: Using Sqlite %s\n", sqlite3_libversion());
 
   if (sqlite3_libversion_number() != SQLITE_VERSION_NUMBER)
     printf("DBG: Compiled against Sqlite %s\n", SQLITE_VERSION);
@@ -170,7 +165,7 @@ test_sqlite_version(apr_pool_t *scratch_
   if (sqlite3_libversion_number() < SQLITE_VERSION_NUMBER)
     return svn_error_createf(SVN_ERR_TEST_FAILED, NULL,
             "Compiled against Sqlite %s (at runtime we have Sqlite %s)",
-            SQLITE_VERSION, sqlite3_version);
+            SQLITE_VERSION, sqlite3_libversion());
 
 #if !SQLITE_VERSION_AT_LEAST(3, 7, 9)
   return svn_error_create(SVN_ERR_TEST_FAILED, NULL,

Modified: subversion/branches/log-addressing/subversion/tests/svn_test.h
URL: http://svn.apache.org/viewvc/subversion/branches/log-addressing/subversion/tests/svn_test.h?rev=1536950&r1=1536949&r2=1536950&view=diff
==============================================================================
--- subversion/branches/log-addressing/subversion/tests/svn_test.h (original)
+++ subversion/branches/log-addressing/subversion/tests/svn_test.h Wed Oct 30 01:33:37 2013
@@ -222,6 +222,12 @@ svn_test__tree_t;
 extern const svn_test__tree_entry_t svn_test__greek_tree_nodes[21];
 
 
+/* Returns a path to BASENAME within the transient data area for the
+   current test. */
+const char *
+svn_test_data_path(const char* basename, apr_pool_t *result_pool);
+
+
 #ifdef __cplusplus
 }
 #endif /* __cplusplus */

Modified: subversion/branches/log-addressing/subversion/tests/svn_test_main.c
URL: http://svn.apache.org/viewvc/subversion/branches/log-addressing/subversion/tests/svn_test_main.c?rev=1536950&r1=1536949&r2=1536950&view=diff
==============================================================================
--- subversion/branches/log-addressing/subversion/tests/svn_test_main.c (original)
+++ subversion/branches/log-addressing/subversion/tests/svn_test_main.c Wed Oct 30 01:33:37 2013
@@ -44,6 +44,7 @@
 #include "svn_io.h"
 #include "svn_path.h"
 #include "svn_ctype.h"
+#include "svn_utf.h"
 
 #include "private/svn_cmdline_private.h"
 
@@ -54,6 +55,10 @@
 int test_argc;
 const char **test_argv;
 
+/* Many tests write to disk. Instead of writing to the current
+   directory, they should use this path as the root of the test data
+   area. */
+static const char *data_path;
 
 /* Test option: Print more output */
 static svn_boolean_t verbose_mode = FALSE;
@@ -365,6 +370,51 @@ static void help(const char *progname, a
   svn_error_clear(svn_cmdline_fprintf(stdout, pool, "\n"));
 }
 
+static svn_error_t *init_test_data(const char *argv0, apr_pool_t *pool)
+{
+  const char *temp_path;
+  const char *base_name;
+
+  /* Convert the program path to an absolute path. */
+  SVN_ERR(svn_utf_cstring_to_utf8(&temp_path, argv0, pool));
+  temp_path = svn_dirent_internal_style(temp_path, pool);
+  SVN_ERR(svn_dirent_get_absolute(&temp_path, temp_path, pool));
+  SVN_ERR_ASSERT(!svn_dirent_is_root(temp_path, strlen(temp_path)));
+
+  /* Extract the interesting bits of the path. */
+  temp_path = svn_dirent_dirname(temp_path, pool);
+  base_name = svn_dirent_basename(temp_path, pool);
+  if (0 == strcmp(base_name, ".libs"))
+    {
+      /* This is a libtoolized binary, skip the .libs directory. */
+      temp_path = svn_dirent_dirname(temp_path, pool);
+      base_name = svn_dirent_basename(temp_path, pool);
+    }
+  temp_path = svn_dirent_dirname(temp_path, pool);
+
+  /* temp_path should now point to the root of the test
+     builddir. Construct the path to the transient dir.  Note that we
+     put the path insinde the cmdline/svn-test-work area. This is
+     because trying to get the cmdline tests to use a different work
+     area is unprintable; so we put the C test transient dir in the
+     cmdline tests area, as the lesser of evils ... */
+  temp_path = svn_dirent_join_many(pool, temp_path,
+                                   "cmdline", "svn-test-work",
+                                   base_name, SVN_VA_NULL);
+
+  /* Finally, create the transient directory. */
+  SVN_ERR(svn_io_make_dir_recursively(temp_path, pool));
+
+  data_path = temp_path;
+  return SVN_NO_ERROR;
+}
+
+const char *
+svn_test_data_path(const char *basename, apr_pool_t *result_pool)
+{
+  return svn_dirent_join(data_path, basename, result_pool);
+}
+
 
 /* Standard svn test program */
 int
@@ -404,7 +454,20 @@ main(int argc, const char *argv[])
   test_argc = argc;
   test_argv = argv;
 
+  err = init_test_data(argv[0], pool);
+  if (err)
+    {
+      svn_handle_error2(err, stderr, TRUE, "svn_tests: ");
+      svn_error_clear(err);
+    }
+
   err = svn_cmdline__getopt_init(&os, argc, argv, pool);
+  if (err)
+    {
+      svn_handle_error2(err, stderr, TRUE, "svn_tests: ");
+      svn_error_clear(err);
+    }
+
 
   os->interleave = TRUE; /* Let options and arguments be interleaved */