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 2010/12/29 22:12:38 UTC

svn commit: r1053735 [7/8] - in /subversion/branches/performance: ./ build/ build/ac-macros/ build/generator/ build/generator/swig/ contrib/client-side/svn_load_dirs/ notes/ subversion/bindings/javahl/native/ subversion/bindings/swig/ subversion/includ...

Modified: subversion/branches/performance/subversion/tests/cmdline/entries-dump.c
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/tests/cmdline/entries-dump.c?rev=1053735&r1=1053734&r2=1053735&view=diff
==============================================================================
--- subversion/branches/performance/subversion/tests/cmdline/entries-dump.c (original)
+++ subversion/branches/performance/subversion/tests/cmdline/entries-dump.c Wed Dec 29 21:12:33 2010
@@ -67,11 +67,33 @@ entries_dump(const char *dir_path, apr_p
   apr_hash_t *entries;
   apr_hash_index_t *hi;
   svn_boolean_t locked;
+  svn_error_t *err;
+
+  err = svn_wc_adm_open3(&adm_access, NULL, dir_path, FALSE, 0,
+                         NULL, NULL, pool);
+  if (!err)
+    {
+      SVN_ERR(svn_wc_locked(&locked, dir_path, pool));
+      SVN_ERR(svn_wc_entries_read(&entries, adm_access, TRUE, pool));
+    }
+  else
+    {
+      const char *dir_abspath, *lockfile_path;
+      svn_node_kind_t kind;
 
-  SVN_ERR(svn_wc_locked(&locked, dir_path, pool));
-  SVN_ERR(svn_wc_adm_open3(&adm_access, NULL, dir_path, FALSE, 0,
-                           NULL, NULL, pool));
-  SVN_ERR(svn_wc_entries_read(&entries, adm_access, TRUE, pool));
+      /* ### Should svn_wc_adm_open3 be returning UPGRADE_REQUIRED? */
+      if (err->apr_err != SVN_ERR_WC_NOT_DIRECTORY)
+        return err;
+      svn_error_clear(err);
+      adm_access = NULL;
+      SVN_ERR(svn_dirent_get_absolute(&dir_abspath, dir_path, pool));
+      SVN_ERR(svn_wc__read_entries_old(&entries, dir_abspath, pool, pool));
+      lockfile_path = svn_dirent_join_many(pool, dir_path,
+                                           svn_wc_get_adm_dir(pool),
+                                           "lock", NULL);
+      SVN_ERR(svn_io_check_path(lockfile_path, &kind, pool));
+      locked = (kind == svn_node_file);
+    }
 
   for (hi = apr_hash_first(pool, entries); hi; hi = apr_hash_next(hi))
     {
@@ -128,7 +150,10 @@ entries_dump(const char *dir_path, apr_p
       printf("entries['%s'] = e\n", (const char *)key);
     }
 
-  return svn_wc_adm_close2(adm_access, pool);
+  if (adm_access)
+    SVN_ERR(svn_wc_adm_close2(adm_access, pool));
+
+  return SVN_NO_ERROR;
 }
 
 
@@ -143,14 +168,11 @@ struct directory_walk_baton
 /* svn_wc__node_found_func_t implementation for directory_dump */
 static svn_error_t *
 print_dir(const char *local_abspath,
+          svn_node_kind_t kind,
           void *walk_baton,
           apr_pool_t *scratch_pool)
 {
   struct directory_walk_baton *bt = walk_baton;
-  svn_node_kind_t kind;
-
-  SVN_ERR(svn_wc_read_kind(&kind, bt->wc_ctx, local_abspath, FALSE,
-                           scratch_pool));
 
   if (kind != svn_node_dir)
     return SVN_NO_ERROR;
@@ -166,21 +188,59 @@ print_dir(const char *local_abspath,
   return SVN_NO_ERROR;
 }
 
+static svn_error_t *
+directory_dump_old(struct directory_walk_baton *bt,
+                   const char *dir_abspath,
+                   apr_pool_t *scratch_pool)
+{
+  apr_hash_t *entries;
+  apr_hash_index_t *hi;
+
+  SVN_ERR(svn_wc__read_entries_old(&entries, dir_abspath,
+                                   scratch_pool, scratch_pool));
+  for (hi = apr_hash_first(scratch_pool, entries); hi; hi = apr_hash_next(hi))
+    {
+      const svn_wc_entry_t *entry = svn__apr_hash_index_val(hi);
+      const char *local_abspath;
+
+      if (entry->deleted || entry->absent || entry->kind != svn_node_dir)
+        continue;
+
+      local_abspath = svn_dirent_join(dir_abspath, entry->name, scratch_pool);
+      if (strcmp(entry->name, SVN_WC_ENTRY_THIS_DIR))
+        SVN_ERR(directory_dump_old(bt, local_abspath, scratch_pool));
+      else
+        SVN_ERR(print_dir(local_abspath, entry->kind, bt, scratch_pool));
+    }
+  return SVN_NO_ERROR;
+}
+
 /* Print all not-hidden subdirectories in the working copy, starting by path */
 static svn_error_t *
 directory_dump(const char *path,
                apr_pool_t *scratch_pool)
 {
   struct directory_walk_baton bt;
+  svn_error_t *err;
 
   SVN_ERR(svn_wc_context_create(&bt.wc_ctx, NULL, scratch_pool, scratch_pool));
   SVN_ERR(svn_dirent_get_absolute(&bt.root_abspath, path, scratch_pool));
 
   bt.prefix_path = path;
 
-  SVN_ERR(svn_wc__node_walk_children(bt.wc_ctx, bt.root_abspath, FALSE,
-                                     print_dir, &bt, svn_depth_infinity,
-                                     NULL, NULL, scratch_pool));
+  err = svn_wc__node_walk_children(bt.wc_ctx, bt.root_abspath, FALSE,
+                                   print_dir, &bt, svn_depth_infinity,
+                                   NULL, NULL, scratch_pool);
+  if (err)
+    {
+      const char *dir_abspath;
+
+      if (err->apr_err != SVN_ERR_WC_UPGRADE_REQUIRED)
+        return err;
+      svn_error_clear(err);
+      SVN_ERR(svn_dirent_get_absolute(&dir_abspath, path, scratch_pool));
+      SVN_ERR(directory_dump_old(&bt, dir_abspath, scratch_pool));
+    }
 
   return svn_error_return(svn_wc_context_destroy(bt.wc_ctx));
 }

Modified: subversion/branches/performance/subversion/tests/cmdline/merge_tree_conflict_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/tests/cmdline/merge_tree_conflict_tests.py?rev=1053735&r1=1053734&r2=1053735&view=diff
==============================================================================
--- subversion/branches/performance/subversion/tests/cmdline/merge_tree_conflict_tests.py (original)
+++ subversion/branches/performance/subversion/tests/cmdline/merge_tree_conflict_tests.py Wed Dec 29 21:12:33 2010
@@ -35,6 +35,7 @@ from svntest import main, wc, verify, ac
 # (abbreviation)
 Item = wc.StateItem
 XFail = svntest.testcase.XFail
+Wimp = svntest.testcase.Wimp
 Skip = svntest.testcase.Skip
 SkipUnless = svntest.testcase.SkipUnless
 
@@ -1877,7 +1878,7 @@ def merge_replace_causes_tree_conflict2(
 test_list = [ None,
               SkipUnless(delete_file_and_dir,
                          server_has_mergeinfo),
-              SkipUnless(XFail(merge_catches_nonexistent_target),
+              SkipUnless(merge_catches_nonexistent_target,
                          server_has_mergeinfo),
               SkipUnless(merge_tree_deleted_in_target,
                          server_has_mergeinfo),

Modified: subversion/branches/performance/subversion/tests/cmdline/stat_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/tests/cmdline/stat_tests.py?rev=1053735&r1=1053734&r2=1053735&view=diff
==============================================================================
--- subversion/branches/performance/subversion/tests/cmdline/stat_tests.py (original)
+++ subversion/branches/performance/subversion/tests/cmdline/stat_tests.py Wed Dec 29 21:12:33 2010
@@ -964,8 +964,8 @@ def status_unversioned_dir(sbox):
   "status on unversioned dir (issue 2030)"
   sbox.build(read_only = True)
   dir = sbox.repo_dir
-  expected_err = ["svn: warning: '" + dir + "' is not a working copy\n",
-                  "svn: warning: '" + dir + "' is not a working copy\n"]
+  expected_err = "svn: warning: '.*(/|\\\\)" + os.path.basename(dir) + \
+                 "' is not a working copy"
   svntest.actions.run_and_verify_svn2(None, [], expected_err, 0,
                                       "status", dir, dir)
 

Modified: subversion/branches/performance/subversion/tests/cmdline/svnadmin_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/tests/cmdline/svnadmin_tests.py?rev=1053735&r1=1053734&r2=1053735&view=diff
==============================================================================
--- subversion/branches/performance/subversion/tests/cmdline/svnadmin_tests.py (original)
+++ subversion/branches/performance/subversion/tests/cmdline/svnadmin_tests.py Wed Dec 29 21:12:33 2010
@@ -1228,6 +1228,67 @@ def hotcopy_symlink(sbox):
     if os.readlink(symlink_path + '_abs') != target_abspath:
       raise svntest.Failure
 
+def load_bad_props(sbox):
+  "svadmin load with invalid svn: props"
+
+  dump_str = """SVN-fs-dump-format-version: 2
+
+UUID: dc40867b-38f6-0310-9f5f-f81aa277e06f
+
+Revision-number: 0
+Prop-content-length: 56
+Content-length: 56
+
+K 8
+svn:date
+V 27
+2005-05-03T19:09:41.129900Z
+PROPS-END
+
+Revision-number: 1
+Prop-content-length: 99
+Content-length: 99
+
+K 7
+svn:log
+V 3
+\n\r\n
+K 10
+svn:author
+V 2
+pl
+K 8
+svn:date
+V 27
+2005-05-03T19:10:19.975578Z
+PROPS-END
+
+Node-path: file
+Node-kind: file
+Node-action: add
+Prop-content-length: 10
+Text-content-length: 5
+Text-content-md5: e1cbb0c3879af8347246f12c559a86b5
+Content-length: 15
+
+PROPS-END
+text
+
+
+"""
+  test_create(sbox)
+
+  # Try to load the dumpstream, expecting a failure (because of mixed EOLs).
+  load_and_verify_dumpstream(sbox, [], svntest.verify.AnyOutput,
+                             dumpfile_revisions, dump_str,
+                             '--ignore-uuid')
+
+  # Now try it again bypassing prop validation.  (This interface takes
+  # care of the removal and recreation of the original repository.)
+  svntest.actions.load_repo(sbox, dump_str=dump_str,
+                            bypass_prop_validation=True)
+    
+
 ########################################################################
 # Run the tests
 
@@ -1257,6 +1318,7 @@ test_list = [ None,
                          svntest.main.is_fs_type_fsfs),
               dont_drop_valid_mergeinfo_during_incremental_loads,
               SkipUnless(hotcopy_symlink, svntest.main.is_posix_os),
+              load_bad_props,
              ]
 
 if __name__ == '__main__':

Modified: subversion/branches/performance/subversion/tests/cmdline/svnlook_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/tests/cmdline/svnlook_tests.py?rev=1053735&r1=1053734&r2=1053735&view=diff
==============================================================================
--- subversion/branches/performance/subversion/tests/cmdline/svnlook_tests.py (original)
+++ subversion/branches/performance/subversion/tests/cmdline/svnlook_tests.py Wed Dec 29 21:12:33 2010
@@ -337,7 +337,8 @@ text
 """
 
   # load dumpfile with inconsistent newlines into repos.
-  svntest.actions.load_repo(sbox, dump_str=dump_str)
+  svntest.actions.load_repo(sbox, dump_str=dump_str,
+                            bypass_prop_validation=True)
 
   exit_code, output, errput = svntest.main.run_svnlook("info",
                                                        sbox.repo_dir, "-r1")
@@ -471,14 +472,14 @@ def diff_ignore_whitespace(sbox):
   # Check the output of 'svnlook diff -x --ignore-space-change' on mu.
   # It should not print anything.
   output = run_svnlook('diff', '-r2', '-x', '--ignore-space-change',
-                       repo_dir, '/A/mu')
+                       repo_dir)
   if output != []:
     raise svntest.Failure
 
   # Check the output of 'svnlook diff -x --ignore-all-space' on mu.
   # It should not print anything.
   output = run_svnlook('diff', '-r2', '-x', '--ignore-all-space',
-                       repo_dir, '/A/mu')
+                       repo_dir)
   if output != []:
     raise svntest.Failure
 
@@ -528,7 +529,7 @@ def diff_ignore_eolstyle(sbox):
 
 
     output = run_svnlook('diff', '-r', str(rev + 1), '-x',
-                         '--ignore-eol-style', repo_dir, '/A/mu')
+                         '--ignore-eol-style', repo_dir)
     rev += 1
 
     canonical_mu_path = mu_path.replace(os.path.sep, '/')
@@ -565,7 +566,7 @@ def diff_binary(sbox):
   svntest.main.run_svn(None, 'ci', '-m', 'log msg', mu_path)
 
   # Now run 'svnlook diff' and look for the "Binary files differ" message.
-  output = run_svnlook('diff', repo_dir, '/A/mu')
+  output = run_svnlook('diff', repo_dir)
   if not "(Binary files differ)\n" in output:
     raise svntest.Failure("No 'Binary files differ' indication in "
                           "'svnlook diff' output.")
@@ -637,7 +638,7 @@ def output_command(fp, cmd, opt):
   return status
 
 for (svnlook_cmd, svnlook_opt) in %s:
-  output_command(fp, svnlook_cmd, svnlook_opt.split(' '))
+  output_command(fp, svnlook_cmd, svnlook_opt.split())
 fp.close()"""
   pre_commit_hook = svntest.main.get_pre_commit_hook_path(repo_dir)
 

Modified: subversion/branches/performance/subversion/tests/cmdline/svnrdump_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/tests/cmdline/svnrdump_tests.py?rev=1053735&r1=1053734&r2=1053735&view=diff
==============================================================================
--- subversion/branches/performance/subversion/tests/cmdline/svnrdump_tests.py (original)
+++ subversion/branches/performance/subversion/tests/cmdline/svnrdump_tests.py Wed Dec 29 21:12:33 2010
@@ -66,7 +66,7 @@ def build_repos(sbox):
   svntest.main.create_repos(sbox.repo_dir)
 
 def run_dump_test(sbox, dumpfile_name, expected_dumpfile_name = None,
-                  subdir = None):
+                  subdir = None, bypass_prop_validation = False):
   """Load a dumpfile using 'svnadmin load', dump it with 'svnrdump
   dump' and check that the same dumpfile is produced or that
   expected_dumpfile_name is produced if provided. Additionally, the
@@ -85,7 +85,8 @@ def run_dump_test(sbox, dumpfile_name, e
                                         dumpfile_name),
                            'rb').readlines()
 
-  svntest.actions.run_and_verify_load(sbox.repo_dir, svnadmin_dumpfile)
+  svntest.actions.run_and_verify_load(sbox.repo_dir, svnadmin_dumpfile,
+                                      bypass_prop_validation)
   
   repo_url = sbox.repo_url
   if subdir:
@@ -301,7 +302,8 @@ def url_encoding_load(sbox):
 def copy_bad_line_endings_dump(sbox):
   "dump: inconsistent line endings in svn:props"
   run_dump_test(sbox, "copy-bad-line-endings.dump",
-           expected_dumpfile_name="copy-bad-line-endings.expected.dump")
+                expected_dumpfile_name="copy-bad-line-endings.expected.dump",
+                bypass_prop_validation=True)
 
 def commit_a_copy_of_root_dump(sbox):
   "dump: commit a copy of root"
@@ -356,7 +358,7 @@ test_list = [ None,
               copy_bad_line_endings_dump,
               commit_a_copy_of_root_dump,
               commit_a_copy_of_root_load,
-              descend_into_replace_dump,
+              XFail(descend_into_replace_dump, svntest.main.is_fs_type_bdb),
              ]
 
 if __name__ == '__main__':

Modified: subversion/branches/performance/subversion/tests/cmdline/svnsync_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/tests/cmdline/svnsync_tests.py?rev=1053735&r1=1053734&r2=1053735&view=diff
==============================================================================
--- subversion/branches/performance/subversion/tests/cmdline/svnsync_tests.py (original)
+++ subversion/branches/performance/subversion/tests/cmdline/svnsync_tests.py Wed Dec 29 21:12:33 2010
@@ -136,14 +136,16 @@ def run_info(url, expected_error=None):
     raise SVNUnexpectedStdout("Missing stdout")
 
 
-def setup_and_sync(sbox, dump_file_contents, subdir=None):
+def setup_and_sync(sbox, dump_file_contents, subdir=None,
+                   bypass_prop_validation=False):
   """Create a repository for SBOX, load it with DUMP_FILE_CONTENTS, then create a mirror repository and sync it with SBOX.  Return the mirror sandbox."""
 
   # Create the empty master repository.
   build_repos(sbox)
 
   # Load the repository from DUMP_FILE_PATH.
-  svntest.actions.run_and_verify_load(sbox.repo_dir, dump_file_contents)
+  svntest.actions.run_and_verify_load(sbox.repo_dir, dump_file_contents,
+                                      bypass_prop_validation)
 
   # Create the empty destination repository.
   dest_sbox = sbox.clone_dependent()
@@ -185,7 +187,8 @@ def verify_mirror(dest_sbox, exp_dump_fi
   svntest.verify.compare_and_display_lines(
     "Dump files", "DUMP", exp_dump_file_contents, dest_dump)
   
-def run_test(sbox, dump_file_name, subdir=None, exp_dump_file_name=None):
+def run_test(sbox, dump_file_name, subdir=None, exp_dump_file_name=None,
+             bypass_prop_validation=False):
   """Load a dump file, sync repositories, and compare contents with the original
 or another dump file."""
 
@@ -198,7 +201,8 @@ or another dump file."""
                                                dump_file_name),
                                   'rb').readlines()
 
-  dest_sbox = setup_and_sync(sbox, master_dumpfile_contents, subdir)
+  dest_sbox = setup_and_sync(sbox, master_dumpfile_contents, subdir,
+                             bypass_prop_validation)
 
   # Compare the dump produced by the mirror repository with either the original
   # dump file (used to create the master repository) or another specified dump
@@ -778,7 +782,8 @@ def info_not_synchronized(sbox):
 def copy_bad_line_endings(sbox):
   "copy with inconsistent lineendings in svn:props"
   run_test(sbox, "copy-bad-line-endings.dump",
-           exp_dump_file_name="copy-bad-line-endings.expected.dump")
+           exp_dump_file_name="copy-bad-line-endings.expected.dump",
+           bypass_prop_validation=True)
 
 #----------------------------------------------------------------------
 
@@ -884,9 +889,8 @@ test_list = [ None,
               detect_meddling,
               Skip(basic_authz, svntest.main.is_ra_type_file),
               Skip(copy_from_unreadable_dir, svntest.main.is_ra_type_file),
-              Wimp("Needs local add below copy support in WC-NG",
-                   Skip(copy_with_mod_from_unreadable_dir,
-                        svntest.main.is_ra_type_file)),
+              Skip(copy_with_mod_from_unreadable_dir,
+                   svntest.main.is_ra_type_file),
               Skip(copy_with_mod_from_unreadable_dir_and_copy,
                    svntest.main.is_ra_type_file),
               url_encoding,

Modified: subversion/branches/performance/subversion/tests/cmdline/svntest/actions.py
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/tests/cmdline/svntest/actions.py?rev=1053735&r1=1053734&r2=1053735&view=diff
==============================================================================
--- subversion/branches/performance/subversion/tests/cmdline/svntest/actions.py (original)
+++ subversion/branches/performance/subversion/tests/cmdline/svntest/actions.py Wed Dec 29 21:12:33 2010
@@ -304,14 +304,20 @@ def run_and_verify_svn2(message, expecte
   verify.verify_exit_code(message, exit_code, expected_exit)
   return exit_code, out, err
 
-def run_and_verify_load(repo_dir, dump_file_content):
+def run_and_verify_load(repo_dir, dump_file_content,
+                        bypass_prop_validation = False):
   "Runs 'svnadmin load' and reports any errors."
   if not isinstance(dump_file_content, list):
     raise TypeError("dump_file_content argument should have list type")
   expected_stderr = []
-  exit_code, output, errput = main.run_command_stdin(
-    main.svnadmin_binary, expected_stderr, 0, 1, dump_file_content,
-    'load', '--force-uuid', '--quiet', repo_dir)
+  if bypass_prop_validation:
+    exit_code, output, errput = main.run_command_stdin(
+      main.svnadmin_binary, expected_stderr, 0, 1, dump_file_content,
+      'load', '--force-uuid', '--quiet', '--bypass-prop-validation', repo_dir)
+  else:
+    exit_code, output, errput = main.run_command_stdin(
+      main.svnadmin_binary, expected_stderr, 0, 1, dump_file_content,
+      'load', '--force-uuid', '--quiet', repo_dir)
 
   verify.verify_outputs("Unexpected stderr output", None, errput,
                         None, expected_stderr)
@@ -340,7 +346,8 @@ def run_and_verify_svnrdump(dumpfile_con
   verify.verify_exit_code("Unexpected return code", exit_code, expected_exit)
   return output
 
-def load_repo(sbox, dumpfile_path = None, dump_str = None):
+def load_repo(sbox, dumpfile_path = None, dump_str = None,
+              bypass_prop_validation = False):
   "Loads the dumpfile into sbox"
   if not dump_str:
     dump_str = open(dumpfile_path, "rb").read()
@@ -351,7 +358,8 @@ def load_repo(sbox, dumpfile_path = None
   main.create_repos(sbox.repo_dir)
 
   # Load the mergetracking dumpfile into the repos, and check it out the repo
-  run_and_verify_load(sbox.repo_dir, dump_str.splitlines(True))
+  run_and_verify_load(sbox.repo_dir, dump_str.splitlines(True),
+                      bypass_prop_validation)
   run_and_verify_svn(None, None, [], "co", sbox.repo_url, sbox.wc_dir)
 
   return dump_str

Modified: subversion/branches/performance/subversion/tests/cmdline/svntest/main.py
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/tests/cmdline/svntest/main.py?rev=1053735&r1=1053734&r2=1053735&view=diff
==============================================================================
--- subversion/branches/performance/subversion/tests/cmdline/svntest/main.py (original)
+++ subversion/branches/performance/subversion/tests/cmdline/svntest/main.py Wed Dec 29 21:12:33 2010
@@ -1049,6 +1049,9 @@ def is_fs_type_fsfs():
   # This assumes that fsfs is the default fs implementation.
   return options.fs_type == 'fsfs' or options.fs_type is None
 
+def is_fs_type_bdb():
+  return options.fs_type == 'bdb'
+
 def is_os_windows():
   return os.name == 'nt'
 

Modified: subversion/branches/performance/subversion/tests/cmdline/switch_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/tests/cmdline/switch_tests.py?rev=1053735&r1=1053734&r2=1053735&view=diff
==============================================================================
--- subversion/branches/performance/subversion/tests/cmdline/switch_tests.py (original)
+++ subversion/branches/performance/subversion/tests/cmdline/switch_tests.py Wed Dec 29 21:12:33 2010
@@ -35,6 +35,7 @@ from svntest import verify, actions, mai
 Skip = svntest.testcase.Skip
 SkipUnless = svntest.testcase.SkipUnless
 XFail = svntest.testcase.XFail
+Wimp = svntest.testcase.Wimp
 Item = svntest.wc.StateItem
 
 from svntest.main import SVN_PROP_MERGEINFO, server_has_mergeinfo
@@ -3165,7 +3166,7 @@ test_list = [ None,
               tolerate_local_mods,
               tree_conflicts_on_switch_1_1,
               tree_conflicts_on_switch_1_2,
-              XFail(tree_conflicts_on_switch_2_1),
+              tree_conflicts_on_switch_2_1,
               tree_conflicts_on_switch_2_2,
               tree_conflicts_on_switch_3,
               single_file_relocate,

Modified: subversion/branches/performance/subversion/tests/cmdline/update_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/tests/cmdline/update_tests.py?rev=1053735&r1=1053734&r2=1053735&view=diff
==============================================================================
--- subversion/branches/performance/subversion/tests/cmdline/update_tests.py (original)
+++ subversion/branches/performance/subversion/tests/cmdline/update_tests.py Wed Dec 29 21:12:33 2010
@@ -38,6 +38,7 @@ from merge_tests import set_up_branch
 Skip = svntest.testcase.Skip
 SkipUnless = svntest.testcase.SkipUnless
 XFail = svntest.testcase.XFail
+Wimp = svntest.testcase.Wimp
 Item = svntest.wc.StateItem
 exp_noop_up_out = svntest.actions.expected_noop_update_output
 
@@ -5397,7 +5398,7 @@ test_list = [ None,
               restarted_update_should_delete_dir_prop,
               tree_conflicts_on_update_1_1,
               tree_conflicts_on_update_1_2,
-              XFail(tree_conflicts_on_update_2_1),
+              tree_conflicts_on_update_2_1,
               tree_conflicts_on_update_2_2,
               XFail(tree_conflicts_on_update_2_3),
               tree_conflicts_on_update_3,

Modified: subversion/branches/performance/subversion/tests/cmdline/upgrade_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/tests/cmdline/upgrade_tests.py?rev=1053735&r1=1053734&r2=1053735&view=diff
==============================================================================
--- subversion/branches/performance/subversion/tests/cmdline/upgrade_tests.py (original)
+++ subversion/branches/performance/subversion/tests/cmdline/upgrade_tests.py Wed Dec 29 21:12:33 2010
@@ -43,8 +43,7 @@ Item = svntest.wc.StateItem
 XFail = svntest.testcase.XFail
 SkipUnless = svntest.testcase.SkipUnless
 
-wc_is_too_old_regex = (".*Working copy format of '.*' is too old \(\d+\); " +
-                    "please run 'svn upgrade'")
+wc_is_too_old_regex = (".*Working copy '.*' is too old \(format \d+.*\).*")
 
 
 def get_current_format():
@@ -183,6 +182,22 @@ def simple_property_verify(dir_path, exp
     print('Actual properties: %s' % actual_props)
     raise svntest.Failure("Properties unequal")
 
+def simple_checksum_verify(expected_checksums):
+
+  for path, checksum in expected_checksums:
+    exit_code, output, errput = svntest.main.run_svn(None, 'info', path)
+    if exit_code:
+      raise svntest.Failure()
+    if checksum:
+      if not svntest.verify.RegexOutput('Checksum: ' + checksum,
+                                        match_all=False).matches(output):
+        raise svntest.Failure("did not get expected checksum " + checksum)
+    if not checksum:
+      if svntest.verify.RegexOutput('Checksum: ',
+                                    match_all=False).matches(output):
+        raise svntest.Failure("unexpected checksum")
+
+
 def run_and_verify_status_no_server(wc_dir, expected_status):
   "same as svntest.actions.run_and_verify_status(), but without '-u'"
 
@@ -672,7 +687,22 @@ def dirs_only_upgrade(sbox):
       })
   run_and_verify_status_no_server(sbox.wc_dir, expected_status)
 
-
+def read_tree_conflict_data(sbox, path):
+  dot_svn = svntest.main.get_admin_name()
+  db = svntest.sqlite3.connect(os.path.join(sbox.wc_dir, dot_svn, 'wc.db'))
+  for row in db.execute("select tree_conflict_data from actual_node "
+                        "where tree_conflict_data is not null "
+                        "and local_relpath = '%s'" % path):
+    return
+  raise svntest.Failure("conflict expected for '%s'" % path)
+  
+def no_actual_node(sbox, path):
+  dot_svn = svntest.main.get_admin_name()
+  db = svntest.sqlite3.connect(os.path.join(sbox.wc_dir, dot_svn, 'wc.db'))
+  for row in db.execute("select 1 from actual_node "
+                        "where local_relpath = '%s'" % path):
+    raise svntest.Failure("no actual node expected for '%s'" % path)
+  
 def upgrade_tree_conflict_data(sbox):
   "upgrade tree conflict data (f20->f21)"
 
@@ -688,7 +718,31 @@ def upgrade_tree_conflict_data(sbox):
   expected_status.tweak('A/D/G/rho', status='A ', copied='+',
                         treeconflict='C', wc_rev='-')
 
-  run_and_verify_status_no_server(wc_dir, expected_status)
+  # Look inside pre-upgrade database
+  read_tree_conflict_data(sbox, 'A/D/G')
+  no_actual_node(sbox, 'A/D/G/pi')
+  no_actual_node(sbox, 'A/D/G/rho')
+  no_actual_node(sbox, 'A/D/G/tau')
+
+  # While the upgrade from f20 to f21 will work the upgrade from f22
+  # to f23 will not, since working nodes are present, so the
+  # auto-upgrade will fail.  If this happens we cannot use the
+  # Subversion libraries to query the working copy.
+  exit_code, output, errput = svntest.main.run_svn('format 22', 'st', wc_dir)
+
+  if not exit_code:
+    run_and_verify_status_no_server(wc_dir, expected_status)
+  else:
+    if not svntest.verify.RegexOutput('.*format 22 with WORKING nodes.*',
+                                      match_all=False).matches(errput):
+      raise svntest.Failure()
+
+  # Look insde post-upgrade database
+  read_tree_conflict_data(sbox, 'A/D/G/pi')
+  read_tree_conflict_data(sbox, 'A/D/G/rho')
+  read_tree_conflict_data(sbox, 'A/D/G/tau')
+  # no_actual_node(sbox, 'A/D/G')  ### not removed but should be?
+
 
 def delete_in_copy_upgrade(sbox):
   "upgrade a delete within a copy"
@@ -715,6 +769,67 @@ def delete_in_copy_upgrade(sbox):
       })
   run_and_verify_status_no_server(sbox.wc_dir, expected_status)
 
+def replaced_files(sbox):
+  "upgrade with base and working replaced files"
+
+  sbox.build(create_wc = False)
+  wc_dir = sbox.wc_dir
+  replace_sbox_with_tarfile(sbox, 'replaced-files.tar.bz2')
+
+  svntest.actions.run_and_verify_svn(None, None, [],
+                                     'upgrade', sbox.wc_dir)
+
+  # A is a checked-out dir containing A/f and A/g, then
+  # svn cp wc/A wc/B
+  # svn rm wc/A/f wc/B/f
+  # svn cp wc/A/g wc/A/f     # A/f replaced by copied A/g
+  # svn cp wc/A/g wc/B/f     # B/f replaced by copied A/g (working-only)
+  # svn rm wc/A/g wc/B/g
+  # touch wc/A/g wc/B/g
+  # svn add wc/A/g wc/B/g    # A/g replaced, B/g replaced (working-only)
+  # svn ps pX vX wc/A/g
+  # svn ps pY vY wc/B/g
+  expected_status = svntest.wc.State(sbox.wc_dir,
+    {
+      ''    : Item(status='  ', wc_rev='5'),
+      'A'   : Item(status='  ', wc_rev='5'),
+      'A/f' : Item(status='R ', wc_rev='-', copied='+'),
+      'A/g' : Item(status='RM', wc_rev='5'),
+      'B'   : Item(status='A ', wc_rev='-', copied='+'),
+      'B/f' : Item(status='R ', wc_rev='-', copied='+'),
+      'B/g' : Item(status='RM', wc_rev='0'),
+  })
+  run_and_verify_status_no_server(sbox.wc_dir, expected_status)
+
+  simple_property_verify(sbox.wc_dir, {
+      'A/f' : {'pAg' : 'vAg' },
+      'A/g' : {'pX'  : 'vX' },
+      'B/f' : {'pAg' : 'vAg' },
+      'B/g' : {'pY'  : 'vY' },
+      })
+
+  simple_checksum_verify([
+      [sbox.ospath('A/f'), '395dfb603d8a4e0348d0b082803f2b7426c76eb9'],
+      [sbox.ospath('A/g'), None],
+      [sbox.ospath('B/f'), '395dfb603d8a4e0348d0b082803f2b7426c76eb9'],
+      [sbox.ospath('B/g'), None]])
+
+  svntest.actions.run_and_verify_svn(None, 'Reverted.*', [], 'revert',
+                                     sbox.ospath('A/f'), sbox.ospath('B/f'),
+                                     sbox.ospath('A/g'), sbox.ospath('B/g'))
+
+  simple_property_verify(sbox.wc_dir, {
+      'A/f' : {'pAf' : 'vAf' },
+      'A/g' : {'pAg' : 'vAg' },
+      'B/f' : {'pAf' : 'vAf' },
+      'B/g' : {'pAg' : 'vAg' },
+      })
+
+  simple_checksum_verify([
+      [sbox.ospath('A/f'), '958eb2d755df2d9e0de6f7b835aec16b64d83f6f'],
+      [sbox.ospath('A/g'), '395dfb603d8a4e0348d0b082803f2b7426c76eb9'],
+      [sbox.ospath('B/f'), '958eb2d755df2d9e0de6f7b835aec16b64d83f6f'],
+      [sbox.ospath('B/g'), '395dfb603d8a4e0348d0b082803f2b7426c76eb9']])
 
 ########################################################################
 # Run the tests
@@ -731,14 +846,15 @@ test_list = [ None,
               # Upgrading from 1.4.0-1.4.5 with specific states fails
               # See issue #2530
               XFail(x3_1_4_0),
-              XFail(x3_1_4_6),
-              XFail(x3_1_6_12),
+              x3_1_4_6,
+              x3_1_6_12,
               missing_dirs,
               missing_dirs2,
               XFail(delete_and_keep_local),
               dirs_only_upgrade,
               upgrade_tree_conflict_data,
               delete_in_copy_upgrade,
+              replaced_files,
              ]
 
 

Modified: subversion/branches/performance/subversion/tests/libsvn_client/client-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/tests/libsvn_client/client-test.c?rev=1053735&r1=1053734&r2=1053735&view=diff
==============================================================================
--- subversion/branches/performance/subversion/tests/libsvn_client/client-test.c (original)
+++ subversion/branches/performance/subversion/tests/libsvn_client/client-test.c Wed Dec 29 21:12:33 2010
@@ -23,6 +23,8 @@
 
 
 
+#define SVN_DEPRECATED
+
 #include <limits.h>
 #include "svn_mergeinfo.h"
 #include "../../libsvn_client/mergeinfo.h"
@@ -240,7 +242,7 @@ check_patch_result(const char *path, con
     }
   svn_pool_destroy(iterpool);
 
-  SVN_ERR_ASSERT(i == num_expected_lines);
+  SVN_TEST_ASSERT(i == num_expected_lines);
   SVN_ERR(svn_io_remove_file2(path, FALSE, pool));
 
   return SVN_NO_ERROR;
@@ -339,6 +341,7 @@ test_patch(const svn_test_opts_t *opts,
   SVN_ERR(svn_fs_txn_root(&txn_root, txn, pool));
   SVN_ERR(svn_test__create_greek_tree(txn_root, pool));
   SVN_ERR(svn_repos_fs_commit_txn(NULL, repos, &committed_rev, txn, pool));
+  SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(committed_rev));
 
   /* Check out the HEAD revision */
   SVN_ERR(svn_dirent_get_absolute(&cwd, "", pool));
@@ -371,7 +374,7 @@ test_patch(const svn_test_opts_t *opts,
     {
       apr_size_t len = strlen(unidiff_patch[i]);
       SVN_ERR(svn_io_file_write(patch_file, unidiff_patch[i], &len, pool));
-      SVN_ERR_ASSERT(len == strlen(unidiff_patch[i]));
+      SVN_TEST_ASSERT(len == strlen(unidiff_patch[i]));
     }
   SVN_ERR(svn_io_file_flush_to_disk(patch_file, pool));
 
@@ -384,13 +387,13 @@ test_patch(const svn_test_opts_t *opts,
                            ctx, pool, pool));
   SVN_ERR(svn_io_file_close(patch_file, pool));
 
-  SVN_ERR_ASSERT(apr_hash_count(pcb.patched_tempfiles) == 1);
+  SVN_TEST_ASSERT(apr_hash_count(pcb.patched_tempfiles) == 1);
   key = "A/D/gamma";
   patched_tempfile_path = apr_hash_get(pcb.patched_tempfiles, key,
                                        APR_HASH_KEY_STRING);
   SVN_ERR(check_patch_result(patched_tempfile_path, expected_gamma, "\n",
                              EXPECTED_GAMMA_LINES, pool));
-  SVN_ERR_ASSERT(apr_hash_count(pcb.reject_tempfiles) == 1);
+  SVN_TEST_ASSERT(apr_hash_count(pcb.reject_tempfiles) == 1);
   key = "A/D/gamma";
   reject_tempfile_path = apr_hash_get(pcb.reject_tempfiles, key,
                                      APR_HASH_KEY_STRING);
@@ -428,6 +431,7 @@ test_wc_add_scenarios(const svn_test_opt
   SVN_ERR(svn_fs_txn_root(&txn_root, txn, pool));
   SVN_ERR(svn_test__create_greek_tree(txn_root, pool));
   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, "test-wc-add-repos",
                                            pool));
@@ -545,6 +549,56 @@ test_wc_add_scenarios(const svn_test_opt
   return SVN_NO_ERROR;
 }
 
+/* This is for issue #3234. */
+static svn_error_t *
+test_copy_crash(const svn_test_opts_t *opts,
+                apr_pool_t *pool)
+{
+  svn_repos_t *repos;
+  svn_fs_t *fs;
+  svn_fs_txn_t *txn;
+  svn_fs_root_t *txn_root;
+  apr_array_header_t *sources;
+  svn_revnum_t committed_rev;
+  svn_opt_revision_t rev;
+  svn_client_copy_source_t source;
+  svn_client_ctx_t *ctx;
+  const char *dest;
+  const char *repos_url;
+
+  /* Create a filesytem and repository. */
+  SVN_ERR(svn_test__create_repos(&repos, "test-copy-crash",
+                                 opts, pool));
+  fs = svn_repos_fs(repos);
+
+  /* Prepare a txn to receive the greek tree. */
+  SVN_ERR(svn_fs_begin_txn2(&txn, fs, 0, 0, pool));
+  SVN_ERR(svn_fs_txn_root(&txn_root, txn, pool));
+  SVN_ERR(svn_test__create_greek_tree(txn_root, pool));
+  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, "test-copy-crash",
+                                           pool));
+
+  svn_client_create_context(&ctx, pool);
+
+  rev.kind = svn_opt_revision_head;
+  dest = svn_path_url_add_component2(repos_url, "A/E", pool);
+  source.path = svn_path_url_add_component2(repos_url, "A/B", pool);
+  source.revision = &rev;
+  source.peg_revision = &rev;
+  sources = apr_array_make(pool, 1, sizeof(svn_client_copy_source_t *));
+  APR_ARRAY_PUSH(sources, svn_client_copy_source_t *) = &source;
+
+  /* This shouldn't crash. */
+  SVN_ERR(svn_client_copy6(sources, dest, FALSE, TRUE, FALSE, NULL, NULL, NULL,
+                           ctx, pool));
+
+  return SVN_NO_ERROR;
+}
+
+
 /* ========================================================================== */
 
 struct svn_test_descriptor_t test_funcs[] =
@@ -556,5 +610,6 @@ struct svn_test_descriptor_t test_funcs[
                    "test svn_client_args_to_target_array"),
     SVN_TEST_OPTS_PASS(test_patch, "test svn_client_patch"),
     SVN_TEST_OPTS_PASS(test_wc_add_scenarios, "test svn_wc_add3 scenarios"),
+    SVN_TEST_OPTS_PASS(test_copy_crash, "test a crash in svn_client_copy5"),
     SVN_TEST_NULL
   };

Modified: subversion/branches/performance/subversion/tests/libsvn_fs/fs-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/tests/libsvn_fs/fs-test.c?rev=1053735&r1=1053734&r2=1053735&view=diff
==============================================================================
--- subversion/branches/performance/subversion/tests/libsvn_fs/fs-test.c (original)
+++ subversion/branches/performance/subversion/tests/libsvn_fs/fs-test.c Wed Dec 29 21:12:33 2010
@@ -61,6 +61,7 @@
  * EXPECTED_CONFLICT.  If they don't match, return error.
  *
  * If a conflict is expected but the commit succeeds anyway, return
+ * error.  If the commit fails but does not provide an error, return
  * error.
  */
 static svn_error_t *
@@ -110,13 +111,24 @@ test_commit_txn(svn_revnum_t *new_rev,
              "conflicting commit returned valid new revision");
         }
     }
-  else if (err)   /* commit failed, but not due to conflict */
+  else if (err)   /* commit may have succeeded, but always report an error */
     {
-      return svn_error_quick_wrap
-        (err, "commit failed due to something other than a conflict");
+      if (SVN_IS_VALID_REVNUM(*new_rev))
+        return svn_error_quick_wrap
+          (err, "commit succeeded but something else failed");
+      else
+        return svn_error_quick_wrap
+          (err, "commit failed due to something other than a conflict");
     }
-  else            /* err == NULL, so commit succeeded */
+  else            /* err == NULL, commit should have succeeded */
     {
+      if (! SVN_IS_VALID_REVNUM(*new_rev))
+        {
+          return svn_error_create
+            (SVN_ERR_FS_GENERAL, NULL,
+             "commit failed but no error was returned");
+        }
+
       if (expected_conflict)
         {
           return svn_error_createf
@@ -1109,6 +1121,7 @@ basic_commit(const svn_test_opts_t *opts
 
   /* Commit it. */
   SVN_ERR(svn_fs_commit_txn(&conflict, &after_rev, txn, pool));
+  SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(after_rev));
 
   /* Make sure it's a different revision than before. */
   if (after_rev == before_rev)
@@ -1178,6 +1191,7 @@ test_tree_node_validation(const svn_test
 
     /* Go ahead and commit the tree, and destroy the txn object.  */
     SVN_ERR(svn_fs_commit_txn(&conflict, &after_rev, txn, subpool));
+    SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(after_rev));
 
     /* Carefully validate that tree in the new revision, now. */
     SVN_ERR(svn_fs_revision_root(&revision_root, fs, after_rev, subpool));
@@ -1239,6 +1253,7 @@ test_tree_node_validation(const svn_test
 
     /* Go ahead and commit the tree, and destroy the txn object.  */
     SVN_ERR(svn_fs_commit_txn(&conflict, &after_rev, txn, subpool));
+    SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(after_rev));
 
     /* Carefully validate that tree in the new revision, now. */
     SVN_ERR(svn_fs_revision_root(&revision_root, fs, after_rev, subpool));
@@ -2631,6 +2646,7 @@ delete(const svn_test_opts_t *opts,
 
   /* Commit the greek tree. */
   SVN_ERR(svn_fs_commit_txn(NULL, &new_rev, txn, pool));
+  SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(new_rev));
 
   /* Create new transaction. */
   SVN_ERR(svn_fs_begin_txn(&txn, fs, new_rev, pool));
@@ -2852,6 +2868,7 @@ commit_date(const svn_test_opts_t *opts,
   SVN_ERR(svn_fs_txn_root(&txn_root, txn, pool));
   SVN_ERR(svn_test__create_greek_tree(txn_root, pool));
   SVN_ERR(svn_fs_commit_txn(NULL, &rev, txn, pool));
+  SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(rev));
 
   after_commit = apr_time_now();
 
@@ -2899,6 +2916,7 @@ check_old_revisions(const svn_test_opts_
   SVN_ERR(svn_fs_txn_root(&txn_root, txn, subpool));
   SVN_ERR(svn_test__create_greek_tree(txn_root, subpool));
   SVN_ERR(svn_fs_commit_txn(NULL, &rev, txn, subpool));
+  SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(rev));
   svn_pool_clear(subpool);
 
   /* Modify and commit iota a few times, then test to see if we can
@@ -2934,6 +2952,7 @@ not a dot, will pass from the law until 
     SVN_ERR(svn_test__set_file_contents
             (txn_root, "iota", iota_contents_2, subpool));
     SVN_ERR(svn_fs_commit_txn(NULL, &rev, txn, subpool));
+    SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(rev));
     svn_pool_clear(subpool);
 
     /* Revision 3. */
@@ -2942,6 +2961,7 @@ not a dot, will pass from the law until 
     SVN_ERR(svn_test__set_file_contents
             (txn_root, "iota", iota_contents_3, subpool));
     SVN_ERR(svn_fs_commit_txn(NULL, &rev, txn, subpool));
+    SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(rev));
     svn_pool_clear(subpool);
 
     /* Revision 4. */
@@ -2950,6 +2970,7 @@ not a dot, will pass from the law until 
     SVN_ERR(svn_test__set_file_contents
             (txn_root, "iota", iota_contents_4, subpool));
     SVN_ERR(svn_fs_commit_txn(NULL, &rev, txn, subpool));
+    SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(rev));
     svn_pool_clear(subpool);
 
     /* Revision 5. */
@@ -2958,6 +2979,7 @@ not a dot, will pass from the law until 
     SVN_ERR(svn_test__set_file_contents
             (txn_root, "iota", iota_contents_5, subpool));
     SVN_ERR(svn_fs_commit_txn(NULL, &rev, txn, subpool));
+    SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(rev));
     svn_pool_clear(subpool);
 
     /* Revision 6. */
@@ -2966,6 +2988,7 @@ not a dot, will pass from the law until 
     SVN_ERR(svn_test__set_file_contents
             (txn_root, "iota", iota_contents_6, subpool));
     SVN_ERR(svn_fs_commit_txn(NULL, &rev, txn, subpool));
+    SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(rev));
     svn_pool_clear(subpool);
 
     /* Revision 7. */
@@ -2974,6 +2997,7 @@ not a dot, will pass from the law until 
     SVN_ERR(svn_test__set_file_contents
             (txn_root, "iota", iota_contents_7, subpool));
     SVN_ERR(svn_fs_commit_txn(NULL, &rev, txn, subpool));
+    SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(rev));
     svn_pool_clear(subpool);
 
     /** Now check the full Greek Tree in all of those revisions,
@@ -3269,6 +3293,7 @@ check_all_revisions(const svn_test_opts_
   SVN_ERR(svn_fs_txn_root(&txn_root, txn, subpool));
   SVN_ERR(svn_test__create_greek_tree(txn_root, subpool));
   SVN_ERR(svn_fs_commit_txn(NULL, &youngest_rev, txn, subpool));
+  SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(youngest_rev));
 
   /***********************************************************************/
   /* REVISION 1 */
@@ -3326,6 +3351,7 @@ check_all_revisions(const svn_test_opts_
                                       subpool));
   }
   SVN_ERR(svn_fs_commit_txn(NULL, &youngest_rev, txn, subpool));
+  SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(youngest_rev));
 
   /***********************************************************************/
   /* REVISION 2 */
@@ -3377,6 +3403,7 @@ check_all_revisions(const svn_test_opts_
                                       subpool));
   }
   SVN_ERR(svn_fs_commit_txn(NULL, &youngest_rev, txn, subpool));
+  SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(youngest_rev));
 
   /***********************************************************************/
   /* REVISION 3 */
@@ -3426,6 +3453,7 @@ check_all_revisions(const svn_test_opts_
     SVN_ERR(svn_test__txn_script_exec(txn_root, script_entries, 2, subpool));
   }
   SVN_ERR(svn_fs_commit_txn(NULL, &youngest_rev, txn, subpool));
+  SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(youngest_rev));
 
   /***********************************************************************/
   /* REVISION 4 */
@@ -3602,6 +3630,7 @@ file_integrity_helper(apr_size_t filesiz
           (&wh_func, &wh_baton, txn_root, "bigfile", NULL, NULL, subpool));
   SVN_ERR(svn_txdelta_send_string(&contents, wh_func, wh_baton, subpool));
   SVN_ERR(svn_fs_commit_txn(NULL, &youngest_rev, txn, subpool));
+  SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(youngest_rev));
   SVN_ERR(svn_fs_deltify_revision(fs, youngest_rev, subpool));
   checksum_list[youngest_rev] = checksum;
   svn_pool_clear(subpool);
@@ -3617,6 +3646,7 @@ file_integrity_helper(apr_size_t filesiz
           (&wh_func, &wh_baton, txn_root, "bigfile", NULL, NULL, subpool));
   SVN_ERR(svn_txdelta_send_string(&contents, wh_func, wh_baton, subpool));
   SVN_ERR(svn_fs_commit_txn(NULL, &youngest_rev, txn, subpool));
+  SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(youngest_rev));
   SVN_ERR(svn_fs_deltify_revision(fs, youngest_rev, subpool));
   checksum_list[youngest_rev] = checksum;
   svn_pool_clear(subpool);
@@ -3631,6 +3661,7 @@ file_integrity_helper(apr_size_t filesiz
           (&wh_func, &wh_baton, txn_root, "bigfile", NULL, NULL, subpool));
   SVN_ERR(svn_txdelta_send_string(&contents, wh_func, wh_baton, subpool));
   SVN_ERR(svn_fs_commit_txn(NULL, &youngest_rev, txn, subpool));
+  SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(youngest_rev));
   SVN_ERR(svn_fs_deltify_revision(fs, youngest_rev, subpool));
   checksum_list[youngest_rev] = checksum;
   svn_pool_clear(subpool);
@@ -3647,6 +3678,7 @@ file_integrity_helper(apr_size_t filesiz
           (&wh_func, &wh_baton, txn_root, "bigfile", NULL, NULL, subpool));
   SVN_ERR(svn_txdelta_send_string(&contents, wh_func, wh_baton, subpool));
   SVN_ERR(svn_fs_commit_txn(NULL, &youngest_rev, txn, subpool));
+  SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(youngest_rev));
   SVN_ERR(svn_fs_deltify_revision(fs, youngest_rev, subpool));
   checksum_list[youngest_rev] = checksum;
   svn_pool_clear(subpool);
@@ -3666,6 +3698,7 @@ file_integrity_helper(apr_size_t filesiz
       SVN_ERR(svn_txdelta_send_string
               (&contents, wh_func, wh_baton, subpool));
       SVN_ERR(svn_fs_commit_txn(NULL, &youngest_rev, txn, subpool));
+      SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(youngest_rev));
       SVN_ERR(svn_fs_deltify_revision(fs, youngest_rev, subpool));
       checksum_list[youngest_rev] = checksum;
       svn_pool_clear(subpool);
@@ -3755,6 +3788,7 @@ check_root_revision(const svn_test_opts_
   SVN_ERR(svn_fs_txn_root(&txn_root, txn, subpool));
   SVN_ERR(svn_test__create_greek_tree(txn_root, subpool));
   SVN_ERR(svn_fs_commit_txn(NULL, &youngest_rev, txn, subpool));
+  SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(youngest_rev));
 
   /* Root node's revision should be the same as YOUNGEST_REV. */
   SVN_ERR(svn_fs_revision_root(&rev_root, fs, youngest_rev, subpool));
@@ -3776,6 +3810,7 @@ check_root_revision(const svn_test_opts_
                apr_psprintf(subpool, "iota version %d", i + 2), subpool));
 
       SVN_ERR(svn_fs_commit_txn(NULL, &youngest_rev, txn, subpool));
+      SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(youngest_rev));
 
       /* Root node's revision should be the same as YOUNGEST_REV. */
       SVN_ERR(svn_fs_revision_root(&rev_root, fs, youngest_rev, subpool));
@@ -3883,6 +3918,7 @@ test_node_created_rev(const svn_test_opt
 
   /* Now commit the transaction. */
   SVN_ERR(svn_fs_commit_txn(NULL, &youngest_rev, txn, subpool));
+  SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(youngest_rev));
 
   /* Now, we have a new revision, and all paths in it should have a
      created rev of 1.  Verify this. */
@@ -3922,6 +3958,7 @@ test_node_created_rev(const svn_test_opt
   SVN_ERR(verify_path_revs(txn_root, path_revs, 20, subpool));
   /* commit transaction */
   SVN_ERR(svn_fs_commit_txn(NULL, &youngest_rev, txn, subpool));
+  SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(youngest_rev));
   /* get a revision root for the new revision */
   SVN_ERR(svn_fs_revision_root(&rev_root, fs, youngest_rev, subpool));
   /* verify created revs */
@@ -3946,6 +3983,7 @@ test_node_created_rev(const svn_test_opt
   SVN_ERR(verify_path_revs(txn_root, path_revs, 20, subpool));
   /* commit transaction */
   SVN_ERR(svn_fs_commit_txn(NULL, &youngest_rev, txn, subpool));
+  SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(youngest_rev));
   /* get a revision root for the new revision */
   SVN_ERR(svn_fs_revision_root(&rev_root, fs, youngest_rev, subpool));
   /* verify created revs */
@@ -4005,18 +4043,21 @@ check_related(const svn_test_opts_t *opt
   SVN_ERR(svn_fs_make_file(txn_root, "A", subpool));
   SVN_ERR(svn_test__set_file_contents(txn_root, "A", "1", subpool));
   SVN_ERR(svn_fs_commit_txn(NULL, &youngest_rev, txn, subpool));
+  SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(youngest_rev));
   svn_pool_clear(subpool);
   /* Revision 2 */
   SVN_ERR(svn_fs_begin_txn(&txn, fs, youngest_rev, subpool));
   SVN_ERR(svn_fs_txn_root(&txn_root, txn, subpool));
   SVN_ERR(svn_test__set_file_contents(txn_root, "A", "2", subpool));
   SVN_ERR(svn_fs_commit_txn(NULL, &youngest_rev, txn, subpool));
+  SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(youngest_rev));
   svn_pool_clear(subpool);
   /* Revision 3 */
   SVN_ERR(svn_fs_begin_txn(&txn, fs, youngest_rev, subpool));
   SVN_ERR(svn_fs_txn_root(&txn_root, txn, subpool));
   SVN_ERR(svn_test__set_file_contents(txn_root, "A", "3", subpool));
   SVN_ERR(svn_fs_commit_txn(NULL, &youngest_rev, txn, subpool));
+  SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(youngest_rev));
   svn_pool_clear(subpool);
   /* Revision 4 */
   SVN_ERR(svn_fs_begin_txn(&txn, fs, youngest_rev, subpool));
@@ -4029,6 +4070,7 @@ check_related(const svn_test_opts_t *opt
   SVN_ERR(svn_fs_copy(rev_root, "A", txn_root, "C", subpool));
   SVN_ERR(svn_test__set_file_contents(txn_root, "C", "4", subpool));
   SVN_ERR(svn_fs_commit_txn(NULL, &youngest_rev, txn, subpool));
+  SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(youngest_rev));
   svn_pool_clear(subpool);
   /* Revision 5 */
   SVN_ERR(svn_fs_begin_txn(&txn, fs, youngest_rev, subpool));
@@ -4036,6 +4078,7 @@ check_related(const svn_test_opts_t *opt
   SVN_ERR(svn_test__set_file_contents(txn_root, "B", "5", subpool));
   SVN_ERR(svn_test__set_file_contents(txn_root, "C", "5", subpool));
   SVN_ERR(svn_fs_commit_txn(NULL, &youngest_rev, txn, subpool));
+  SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(youngest_rev));
   svn_pool_clear(subpool);
   /* Revision 6 */
   SVN_ERR(svn_fs_begin_txn(&txn, fs, youngest_rev, subpool));
@@ -4046,6 +4089,7 @@ check_related(const svn_test_opts_t *opt
   SVN_ERR(svn_fs_copy(rev_root, "B", txn_root, "D", subpool));
   SVN_ERR(svn_test__set_file_contents(txn_root, "D", "5", subpool));
   SVN_ERR(svn_fs_commit_txn(NULL, &youngest_rev, txn, subpool));
+  SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(youngest_rev));
   svn_pool_clear(subpool);
   /* Revision 7 */
   SVN_ERR(svn_fs_begin_txn(&txn, fs, youngest_rev, subpool));
@@ -4054,12 +4098,14 @@ check_related(const svn_test_opts_t *opt
   SVN_ERR(svn_fs_make_file(txn_root, "E", subpool));
   SVN_ERR(svn_test__set_file_contents(txn_root, "E", "7", subpool));
   SVN_ERR(svn_fs_commit_txn(NULL, &youngest_rev, txn, subpool));
+  SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(youngest_rev));
   svn_pool_clear(subpool);
   /* Revision 8 */
   SVN_ERR(svn_fs_begin_txn(&txn, fs, youngest_rev, subpool));
   SVN_ERR(svn_fs_txn_root(&txn_root, txn, subpool));
   SVN_ERR(svn_test__set_file_contents(txn_root, "E", "8", subpool));
   SVN_ERR(svn_fs_commit_txn(NULL, &youngest_rev, txn, subpool));
+  SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(youngest_rev));
   svn_pool_clear(subpool);
   /* Revision 9 */
   SVN_ERR(svn_fs_begin_txn(&txn, fs, youngest_rev, subpool));
@@ -4068,12 +4114,14 @@ check_related(const svn_test_opts_t *opt
   SVN_ERR(svn_fs_copy(rev_root, "E", txn_root, "F", subpool));
   SVN_ERR(svn_test__set_file_contents(txn_root, "F", "9", subpool));
   SVN_ERR(svn_fs_commit_txn(NULL, &youngest_rev, txn, subpool));
+  SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(youngest_rev));
   svn_pool_clear(subpool);
   /* Revision 10 */
   SVN_ERR(svn_fs_begin_txn(&txn, fs, youngest_rev, subpool));
   SVN_ERR(svn_fs_txn_root(&txn_root, txn, subpool));
   SVN_ERR(svn_test__set_file_contents(txn_root, "F", "10", subpool));
   SVN_ERR(svn_fs_commit_txn(NULL, &youngest_rev, txn, subpool));
+  SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(youngest_rev));
   svn_pool_clear(subpool);
 
   /*** Step II: Exhaustively verify relationship between all nodes in
@@ -4185,6 +4233,7 @@ branch_test(const svn_test_opts_t *opts,
   SVN_ERR(svn_fs_txn_root(&txn_root, txn, spool));
   SVN_ERR(svn_test__create_greek_tree(txn_root, spool));
   SVN_ERR(svn_fs_commit_txn(NULL, &youngest_rev, txn, spool));
+  SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(youngest_rev));
   svn_pool_clear(spool);
 
   /*** Revision 2:  Copy A/D/G/rho to A/D/G/rho2.  ***/
@@ -4193,6 +4242,7 @@ branch_test(const svn_test_opts_t *opts,
   SVN_ERR(svn_fs_revision_root(&rev_root, fs, youngest_rev, spool));
   SVN_ERR(svn_fs_copy(rev_root, "A/D/G/rho", txn_root, "A/D/G/rho2", spool));
   SVN_ERR(svn_fs_commit_txn(NULL, &youngest_rev, txn, spool));
+  SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(youngest_rev));
   svn_pool_clear(spool);
 
   /*** Revision 3:  Copy A/D/G to A/D/G2.  ***/
@@ -4201,6 +4251,7 @@ branch_test(const svn_test_opts_t *opts,
   SVN_ERR(svn_fs_revision_root(&rev_root, fs, youngest_rev, spool));
   SVN_ERR(svn_fs_copy(rev_root, "A/D/G", txn_root, "A/D/G2", spool));
   SVN_ERR(svn_fs_commit_txn(NULL, &youngest_rev, txn, spool));
+  SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(youngest_rev));
   svn_pool_clear(spool);
 
   /*** Revision 4:  Copy A/D to A/D2.  ***/
@@ -4209,6 +4260,7 @@ branch_test(const svn_test_opts_t *opts,
   SVN_ERR(svn_fs_revision_root(&rev_root, fs, youngest_rev, spool));
   SVN_ERR(svn_fs_copy(rev_root, "A/D", txn_root, "A/D2", spool));
   SVN_ERR(svn_fs_commit_txn(NULL, &youngest_rev, txn, spool));
+  SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(youngest_rev));
   svn_pool_clear(spool);
 
   /*** Revision 5:  Edit all the rho's! ***/
@@ -4232,6 +4284,7 @@ branch_test(const svn_test_opts_t *opts,
   SVN_ERR(svn_test__set_file_contents(txn_root, "A/D2/G2/rho2",
                                       "Edited text.", spool));
   SVN_ERR(svn_fs_commit_txn(NULL, &youngest_rev, txn, spool));
+  SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(youngest_rev));
 
   svn_pool_destroy(spool);
 
@@ -4253,7 +4306,8 @@ verify_checksum(const svn_test_opts_t *o
      against our idea of its checksum.  They should be the same. */
 
   str = svn_stringbuf_create("My text editor charges me rent.", pool);
-  svn_checksum(&expected_checksum, svn_checksum_md5, str->data, str->len, pool);
+  SVN_ERR(svn_checksum(&expected_checksum, svn_checksum_md5, str->data,
+                       str->len, pool));
 
   SVN_ERR(svn_test__create_fs(&fs, "test-repo-verify-checksum",
                               opts, pool));
@@ -4627,6 +4681,7 @@ node_origin_rev(const svn_test_opts_t *o
   SVN_ERR(svn_fs_txn_root(&txn_root, txn, subpool));
   SVN_ERR(svn_test__create_greek_tree(txn_root, subpool));
   SVN_ERR(svn_fs_commit_txn(NULL, &youngest_rev, txn, subpool));
+  SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(youngest_rev));
   svn_pool_clear(subpool);
 
   /* Revision 2: Modify A/D/H/chi and A/B/E/alpha.  */
@@ -4635,6 +4690,7 @@ node_origin_rev(const svn_test_opts_t *o
   SVN_ERR(svn_test__set_file_contents(txn_root, "A/D/H/chi", "2", subpool));
   SVN_ERR(svn_test__set_file_contents(txn_root, "A/B/E/alpha", "2", subpool));
   SVN_ERR(svn_fs_commit_txn(NULL, &youngest_rev, txn, subpool));
+  SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(youngest_rev));
   svn_pool_clear(subpool);
 
   /* Revision 3: Copy A/D to A/D2, and create A/D2/floop new.  */
@@ -4644,6 +4700,7 @@ node_origin_rev(const svn_test_opts_t *o
   SVN_ERR(svn_fs_copy(root, "A/D", txn_root, "A/D2", subpool));
   SVN_ERR(svn_fs_make_file(txn_root, "A/D2/floop", subpool));
   SVN_ERR(svn_fs_commit_txn(NULL, &youngest_rev, txn, subpool));
+  SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(youngest_rev));
   svn_pool_clear(subpool);
 
   /* Revision 4: Modify A/D/H/chi and A/D2/H/chi.  */
@@ -4652,6 +4709,7 @@ node_origin_rev(const svn_test_opts_t *o
   SVN_ERR(svn_test__set_file_contents(txn_root, "A/D/H/chi", "4", subpool));
   SVN_ERR(svn_test__set_file_contents(txn_root, "A/D2/H/chi", "4", subpool));
   SVN_ERR(svn_fs_commit_txn(NULL, &youngest_rev, txn, subpool));
+  SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(youngest_rev));
   svn_pool_clear(subpool);
 
   /* Revision 5: Delete A/D2/G, add A/B/E/alfalfa.  */
@@ -4660,6 +4718,7 @@ node_origin_rev(const svn_test_opts_t *o
   SVN_ERR(svn_fs_delete(txn_root, "A/D2/G", subpool));
   SVN_ERR(svn_fs_make_file(txn_root, "A/B/E/alfalfa", subpool));
   SVN_ERR(svn_fs_commit_txn(NULL, &youngest_rev, txn, subpool));
+  SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(youngest_rev));
   svn_pool_clear(subpool);
 
   /* Revision 6: Restore A/D2/G (from version 4).  */
@@ -4668,6 +4727,7 @@ node_origin_rev(const svn_test_opts_t *o
   SVN_ERR(svn_fs_revision_root(&root, fs, 4, subpool));
   SVN_ERR(svn_fs_copy(root, "A/D2/G", txn_root, "A/D2/G", subpool));
   SVN_ERR(svn_fs_commit_txn(NULL, &youngest_rev, txn, subpool));
+  SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(youngest_rev));
   svn_pool_clear(subpool);
 
   /* Revision 7: Move A/D2 to A/D (replacing it), Add a new file A/D2,
@@ -4681,6 +4741,7 @@ node_origin_rev(const svn_test_opts_t *o
   SVN_ERR(svn_fs_make_file(txn_root, "A/D2", subpool));
   SVN_ERR(svn_test__set_file_contents(txn_root, "A/D/floop", "7", subpool));
   SVN_ERR(svn_fs_commit_txn(NULL, &youngest_rev, txn, subpool));
+  SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(youngest_rev));
   svn_pool_clear(subpool);
 
   /* Now test some origin revisions. */
@@ -4757,6 +4818,7 @@ obliterate_1(const svn_test_opts_t *opts
   SVN_ERR(svn_fs_txn_root(&txn_root, txn, subpool));
   SVN_ERR(svn_test__create_greek_tree(txn_root, subpool));
   SVN_ERR(svn_fs_commit_txn(NULL, &youngest_rev, txn, subpool));
+  SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(youngest_rev));
   svn_pool_clear(subpool);
 
   /* Revision 2: Modify A/D/H/chi and A/B/E/alpha.  */
@@ -4765,6 +4827,7 @@ obliterate_1(const svn_test_opts_t *opts
   SVN_ERR(svn_test__set_file_contents(txn_root, "A/D/H/chi", "2", subpool));
   SVN_ERR(svn_test__set_file_contents(txn_root, "A/B/E/alpha", "2", subpool));
   SVN_ERR(svn_fs_commit_txn(NULL, &youngest_rev, txn, subpool));
+  SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(youngest_rev));
   svn_pool_clear(subpool);
 
   /* Revision 3: Copy A/D to A/D2, and create A/D2/floop new.  */
@@ -4774,6 +4837,7 @@ obliterate_1(const svn_test_opts_t *opts
   SVN_ERR(svn_fs_copy(root, "A/D", txn_root, "A/D2", subpool));
   SVN_ERR(svn_fs_make_file(txn_root, "A/D2/floop", subpool));
   SVN_ERR(svn_fs_commit_txn(NULL, &youngest_rev, txn, subpool));
+  SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(youngest_rev));
   svn_pool_clear(subpool);
 
   /* Test obliteration in that repository. */

Modified: subversion/branches/performance/subversion/tests/libsvn_fs/locks-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/tests/libsvn_fs/locks-test.c?rev=1053735&r1=1053734&r2=1053735&view=diff
==============================================================================
--- subversion/branches/performance/subversion/tests/libsvn_fs/locks-test.c (original)
+++ subversion/branches/performance/subversion/tests/libsvn_fs/locks-test.c Wed Dec 29 21:12:33 2010
@@ -119,6 +119,7 @@ lock_only(const svn_test_opts_t *opts,
   /* Create the greek tree and commit it. */
   SVN_ERR(svn_test__create_greek_tree(txn_root, pool));
   SVN_ERR(svn_fs_commit_txn(&conflict, &newrev, txn, pool));
+  SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(newrev));
 
   /* We are now 'bubba'. */
   SVN_ERR(svn_fs_create_access(&access, "bubba", pool));
@@ -158,6 +159,7 @@ lookup_lock_by_path(const svn_test_opts_
   /* Create the greek tree and commit it. */
   SVN_ERR(svn_test__create_greek_tree(txn_root, pool));
   SVN_ERR(svn_fs_commit_txn(&conflict, &newrev, txn, pool));
+  SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(newrev));
 
   /* We are now 'bubba'. */
   SVN_ERR(svn_fs_create_access(&access, "bubba", pool));
@@ -201,6 +203,7 @@ attach_lock(const svn_test_opts_t *opts,
   /* Create the greek tree and commit it. */
   SVN_ERR(svn_test__create_greek_tree(txn_root, pool));
   SVN_ERR(svn_fs_commit_txn(&conflict, &newrev, txn, pool));
+  SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(newrev));
 
   /* We are now 'bubba'. */
   SVN_ERR(svn_fs_create_access(&access, "bubba", pool));
@@ -253,6 +256,7 @@ get_locks(const svn_test_opts_t *opts,
   /* Create the greek tree and commit it. */
   SVN_ERR(svn_test__create_greek_tree(txn_root, pool));
   SVN_ERR(svn_fs_commit_txn(&conflict, &newrev, txn, pool));
+  SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(newrev));
 
   /* We are now 'bubba'. */
   SVN_ERR(svn_fs_create_access(&access, "bubba", pool));
@@ -381,6 +385,7 @@ basic_lock(const svn_test_opts_t *opts,
   /* Create the greek tree and commit it. */
   SVN_ERR(svn_test__create_greek_tree(txn_root, pool));
   SVN_ERR(svn_fs_commit_txn(&conflict, &newrev, txn, pool));
+  SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(newrev));
 
   /* We are now 'bubba'. */
   SVN_ERR(svn_fs_create_access(&access, "bubba", pool));
@@ -432,6 +437,7 @@ lock_credentials(const svn_test_opts_t *
   /* Create the greek tree and commit it. */
   SVN_ERR(svn_test__create_greek_tree(txn_root, pool));
   SVN_ERR(svn_fs_commit_txn(&conflict, &newrev, txn, pool));
+  SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(newrev));
 
   /* We are now 'bubba'. */
   SVN_ERR(svn_fs_create_access(&access, "bubba", pool));
@@ -455,6 +461,7 @@ lock_credentials(const svn_test_opts_t *
 
   /* Try to commit the file change.  Should fail, because we're nobody. */
   err = svn_fs_commit_txn(&conflict, &newrev, txn, pool);
+  SVN_TEST_ASSERT(! SVN_IS_VALID_REVNUM(newrev));
   if (! err)
     return svn_error_create
       (SVN_ERR_TEST_FAILED, NULL,
@@ -467,6 +474,7 @@ lock_credentials(const svn_test_opts_t *
 
   /* Try to commit the file change.  Should fail, because we're 'hortense'. */
   err = svn_fs_commit_txn(&conflict, &newrev, txn, pool);
+  SVN_TEST_ASSERT(! SVN_IS_VALID_REVNUM(newrev));
   if (! err)
     return svn_error_create
       (SVN_ERR_TEST_FAILED, NULL,
@@ -479,6 +487,7 @@ lock_credentials(const svn_test_opts_t *
 
   /* Try to commit the file change.  Should fail, because there's no token. */
   err = svn_fs_commit_txn(&conflict, &newrev, txn, pool);
+  SVN_TEST_ASSERT(! SVN_IS_VALID_REVNUM(newrev));
   if (! err)
     return svn_error_create
       (SVN_ERR_TEST_FAILED, NULL,
@@ -490,6 +499,7 @@ lock_credentials(const svn_test_opts_t *
 
   /* Commit should now succeed. */
   SVN_ERR(svn_fs_commit_txn(&conflict, &newrev, txn, pool));
+  SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(newrev));
 
   return SVN_NO_ERROR;
 }
@@ -522,6 +532,7 @@ final_lock_check(const svn_test_opts_t *
   /* Create the greek tree and commit it. */
   SVN_ERR(svn_test__create_greek_tree(txn_root, pool));
   SVN_ERR(svn_fs_commit_txn(&conflict, &newrev, txn, pool));
+  SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(newrev));
 
   /* Make a new transaction and delete "/A" */
   SVN_ERR(svn_fs_begin_txn2(&txn, fs, newrev, SVN_FS_TXN_CHECK_LOCKS, pool));
@@ -540,6 +551,7 @@ final_lock_check(const svn_test_opts_t *
   /* Try to commit the transaction.  Should fail, because a child of
      the deleted directory is locked by someone else. */
   err = svn_fs_commit_txn(&conflict, &newrev, txn, pool);
+  SVN_TEST_ASSERT(! SVN_IS_VALID_REVNUM(newrev));
   if (! err)
     return svn_error_create
       (SVN_ERR_TEST_FAILED, NULL,
@@ -550,6 +562,7 @@ final_lock_check(const svn_test_opts_t *
   SVN_ERR(svn_fs_set_access(fs, access));
   SVN_ERR(svn_fs_access_add_lock_token(access, mylock->token));
   SVN_ERR(svn_fs_commit_txn(&conflict, &newrev, txn, pool));
+  SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(newrev));
 
   return SVN_NO_ERROR;
 }
@@ -579,6 +592,7 @@ lock_dir_propchange(const svn_test_opts_
   /* Create the greek tree and commit it. */
   SVN_ERR(svn_test__create_greek_tree(txn_root, pool));
   SVN_ERR(svn_fs_commit_txn(&conflict, &newrev, txn, pool));
+  SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(newrev));
 
   /* Become 'bubba' and lock "/A/D/G/rho". */
   SVN_ERR(svn_fs_create_access(&access, "bubba", pool));
@@ -599,6 +613,7 @@ lock_dir_propchange(const svn_test_opts_
   /* Commit should succeed;  this means we're doing a non-recursive
      lock-check on directory, rather than a recursive one.  */
   SVN_ERR(svn_fs_commit_txn(&conflict, &newrev, txn, pool));
+  SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(newrev));
 
   return SVN_NO_ERROR;
 }
@@ -629,6 +644,7 @@ lock_name_reservation(const svn_test_opt
   /* Create the greek tree and commit it. */
   SVN_ERR(svn_test__create_greek_tree(txn_root, pool));
   SVN_ERR(svn_fs_commit_txn(&conflict, &newrev, txn, pool));
+  SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(newrev));
 
   /* Become 'bubba' and lock imaginary path  "/A/D/G2/blooga". */
   SVN_ERR(svn_fs_create_access(&access, "bubba", pool));
@@ -752,6 +768,7 @@ lock_expiration(const svn_test_opts_t *o
   /* Create the greek tree and commit it. */
   SVN_ERR(svn_test__create_greek_tree(txn_root, pool));
   SVN_ERR(svn_fs_commit_txn(&conflict, &newrev, txn, pool));
+  SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(newrev));
 
   /* Make a new transaction and change rho. */
   SVN_ERR(svn_fs_begin_txn2(&txn, fs, newrev, SVN_FS_TXN_CHECK_LOCKS, pool));
@@ -774,6 +791,7 @@ lock_expiration(const svn_test_opts_t *o
   /* Try to commit.  Should fail because we're 'nobody', and the lock
      hasn't expired yet. */
   err = svn_fs_commit_txn(&conflict, &newrev, txn, pool);
+  SVN_TEST_ASSERT(! SVN_IS_VALID_REVNUM(newrev));
   if (! err)
     return svn_error_create
       (SVN_ERR_TEST_FAILED, NULL,
@@ -810,6 +828,7 @@ lock_expiration(const svn_test_opts_t *o
   }
 
   SVN_ERR(svn_fs_commit_txn(&conflict, &newrev, txn, pool));
+  SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(newrev));
 
   return SVN_NO_ERROR;
 }
@@ -836,6 +855,7 @@ lock_break_steal_refresh(const svn_test_
   /* Create the greek tree and commit it. */
   SVN_ERR(svn_test__create_greek_tree(txn_root, pool));
   SVN_ERR(svn_fs_commit_txn(&conflict, &newrev, txn, pool));
+  SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(newrev));
 
   /* Become 'bubba' and lock "/A/D/G/rho". */
   SVN_ERR(svn_fs_create_access(&access, "bubba", pool));
@@ -916,6 +936,7 @@ lock_out_of_date(const svn_test_opts_t *
   /* Create the greek tree and commit it. */
   SVN_ERR(svn_test__create_greek_tree(txn_root, pool));
   SVN_ERR(svn_fs_commit_txn(&conflict, &newrev, txn, pool));
+  SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(newrev));
 
   /* Commit a small change to /A/D/G/rho, creating revision 2. */
   SVN_ERR(svn_fs_begin_txn2(&txn, fs, newrev, SVN_FS_TXN_CHECK_LOCKS, pool));
@@ -923,6 +944,7 @@ lock_out_of_date(const svn_test_opts_t *
   SVN_ERR(svn_test__set_file_contents(txn_root, "/A/D/G/rho",
                                       "new contents", pool));
   SVN_ERR(svn_fs_commit_txn(&conflict, &newrev, txn, pool));
+  SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(newrev));
 
   /* We are now 'bubba'. */
   SVN_ERR(svn_fs_create_access(&access, "bubba", pool));

Modified: subversion/branches/performance/subversion/tests/libsvn_fs_base/changes-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/tests/libsvn_fs_base/changes-test.c?rev=1053735&r1=1053734&r2=1053735&view=diff
==============================================================================
--- subversion/branches/performance/subversion/tests/libsvn_fs_base/changes-test.c (original)
+++ subversion/branches/performance/subversion/tests/libsvn_fs_base/changes-test.c Wed Dec 29 21:12:33 2010
@@ -566,6 +566,7 @@ changes_fetch_ordering(const svn_test_op
     SVN_ERR(svn_test__txn_script_exec(txn_root, script_entries, 5, subpool));
   }
   SVN_ERR(svn_fs_commit_txn(NULL, &youngest_rev, txn, subpool));
+  SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(youngest_rev));
   svn_pool_clear(subpool);
 
   /*** REVISION 2: Delete and add some stuff, non-depth-first. ***/
@@ -586,6 +587,7 @@ changes_fetch_ordering(const svn_test_op
     SVN_ERR(svn_test__txn_script_exec(txn_root, script_entries, 7, subpool));
   }
   SVN_ERR(svn_fs_commit_txn(NULL, &youngest_rev, txn, subpool));
+  SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(youngest_rev));
   svn_pool_clear(subpool);
 
   /*** TEST:  We should have only three changes, the deletion of 'file1'
@@ -634,6 +636,7 @@ changes_fetch_ordering(const svn_test_op
     SVN_ERR(svn_test__txn_script_exec(txn_root, script_entries, 5, subpool));
   }
   SVN_ERR(svn_fs_commit_txn(NULL, &youngest_rev, txn, subpool));
+  SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(youngest_rev));
   svn_pool_clear(subpool);
 
   /*** REVISION 4: Do the same stuff as in revision 2, but use a copy
@@ -658,6 +661,7 @@ changes_fetch_ordering(const svn_test_op
     SVN_ERR(svn_fs_make_dir(txn_root, "dir4", subpool));
   }
   SVN_ERR(svn_fs_commit_txn(NULL, &youngest_rev, txn, subpool));
+  SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(youngest_rev));
   svn_pool_clear(subpool);
 
   /*** TEST:  We should have only three changes, the deletion of 'file1'

Modified: subversion/branches/performance/subversion/tests/libsvn_fs_base/fs-base-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/tests/libsvn_fs_base/fs-base-test.c?rev=1053735&r1=1053734&r2=1053735&view=diff
==============================================================================
--- subversion/branches/performance/subversion/tests/libsvn_fs_base/fs-base-test.c (original)
+++ subversion/branches/performance/subversion/tests/libsvn_fs_base/fs-base-test.c Wed Dec 29 21:12:33 2010
@@ -460,6 +460,7 @@ abort_txn(const svn_test_opts_t *opts,
     SVN_ERR(svn_fs_begin_txn(&txn4, fs, 0, pool));
     SVN_ERR(svn_fs_txn_name(&txn4_name, txn4, pool));
     SVN_ERR(svn_fs_commit_txn(&conflict, &new_rev, txn4, pool));
+    SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(new_rev));
     err = svn_fs_abort_txn(txn4, pool);
     if (! err)
       return svn_error_create
@@ -844,6 +845,7 @@ delete(const svn_test_opts_t *opts,
 
   /* Commit the greek tree. */
   SVN_ERR(svn_fs_commit_txn(NULL, &new_rev, txn, pool));
+  SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(new_rev));
 
   /* Create new transaction. */
   SVN_ERR(svn_fs_begin_txn(&txn, fs, new_rev, pool));
@@ -1164,6 +1166,7 @@ create_within_copy(const svn_test_opts_t
   SVN_ERR(svn_fs_txn_root(&txn_root, txn, spool));
   SVN_ERR(svn_test__create_greek_tree(txn_root, spool));
   SVN_ERR(svn_fs_commit_txn(NULL, &youngest_rev, txn, spool));
+  SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(youngest_rev));
   svn_pool_clear(spool);
 
   /*** Revision 2:  Copy A/D to A/D3 ***/
@@ -1172,6 +1175,7 @@ create_within_copy(const svn_test_opts_t
   SVN_ERR(svn_fs_revision_root(&rev_root, fs, youngest_rev, spool));
   SVN_ERR(svn_fs_copy(rev_root, "A/D", txn_root, "A/D3", spool));
   SVN_ERR(svn_fs_commit_txn(NULL, &youngest_rev, txn, spool));
+  SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(youngest_rev));
   svn_pool_clear(spool);
 
   /*** Revision 3:  Copy A/D/G to A/D/G2 ***/
@@ -1180,6 +1184,7 @@ create_within_copy(const svn_test_opts_t
   SVN_ERR(svn_fs_revision_root(&rev_root, fs, youngest_rev, spool));
   SVN_ERR(svn_fs_copy(rev_root, "A/D/G", txn_root, "A/D/G2", spool));
   SVN_ERR(svn_fs_commit_txn(NULL, &youngest_rev, txn, spool));
+  SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(youngest_rev));
   svn_pool_clear(spool);
 
   /*** Revision 4: Copy A/D to A/D2 and create up and I in the existing
@@ -1195,6 +1200,7 @@ create_within_copy(const svn_test_opts_t
   SVN_ERR(svn_fs_make_dir(txn_root, "A/D2/G2/I", spool));
   SVN_ERR(svn_fs_make_file(txn_root, "A/D2/G2/up", spool));
   SVN_ERR(svn_fs_commit_txn(NULL, &youngest_rev, txn, spool));
+  SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(youngest_rev));
   svn_pool_clear(spool);
 
   /*** Revision 5:  Create A/D3/down and A/D3/J ***/
@@ -1203,6 +1209,7 @@ create_within_copy(const svn_test_opts_t
   SVN_ERR(svn_fs_make_file(txn_root, "A/D3/down", spool));
   SVN_ERR(svn_fs_make_dir(txn_root, "A/D3/J", spool));
   SVN_ERR(svn_fs_commit_txn(NULL, &youngest_rev, txn, spool));
+  SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(youngest_rev));
   svn_pool_clear(spool);
 
   {
@@ -1287,6 +1294,7 @@ skip_deltas(const svn_test_opts_t *opts,
   SVN_ERR(svn_fs_make_file(txn_root, "f", subpool));
   SVN_ERR(svn_test__set_file_contents(txn_root, "f", f->data, subpool));
   SVN_ERR(svn_fs_commit_txn(NULL, &youngest_rev, txn, subpool));
+  SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(youngest_rev));
   SVN_ERR(svn_fs_deltify_revision(fs, youngest_rev, subpool));
   svn_pool_clear(subpool);
 
@@ -1301,6 +1309,7 @@ skip_deltas(const svn_test_opts_t *opts,
       SVN_ERR(svn_fs_txn_root(&txn_root, txn, subpool));
       SVN_ERR(svn_test__set_file_contents(txn_root, "f", f->data, subpool));
       SVN_ERR(svn_fs_commit_txn(NULL, &youngest_rev, txn, subpool));
+      SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(youngest_rev));
       SVN_ERR(svn_fs_deltify_revision(fs, youngest_rev, subpool));
       svn_pool_clear(subpool);
     }
@@ -1358,6 +1367,7 @@ redundant_copy(const svn_test_opts_t *op
   SVN_ERR(svn_fs_txn_root(&txn_root, txn, pool));
   SVN_ERR(svn_test__create_greek_tree(txn_root, pool));
   SVN_ERR(svn_fs_commit_txn(NULL, &youngest_rev, txn, pool));
+  SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(youngest_rev));
 
   /* In a transaction, copy A to Z. */
   SVN_ERR(svn_fs_begin_txn(&txn, fs, youngest_rev, pool));
@@ -1427,6 +1437,7 @@ orphaned_textmod_change(const svn_test_o
   SVN_ERR(svn_fs_txn_root(&txn_root, txn, subpool));
   SVN_ERR(svn_test__create_greek_tree(txn_root, subpool));
   SVN_ERR(svn_fs_commit_txn(NULL, &youngest_rev, txn, subpool));
+  SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(youngest_rev));
   svn_pool_clear(subpool);
 
   /* Revision 2:  Start to change "iota", but don't complete the work. */
@@ -1443,6 +1454,7 @@ orphaned_textmod_change(const svn_test_o
      testing that misbehaving callers don't introduce more damage to
      the repository than they have to. */
   SVN_ERR(svn_fs_commit_txn(NULL, &youngest_rev, txn, subpool));
+  SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(youngest_rev));
   svn_pool_clear(subpool);
 
   /* Fetch changed paths for the youngest revision.  We should find none. */

Modified: subversion/branches/performance/subversion/tests/libsvn_fs_fs/fs-pack-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/tests/libsvn_fs_fs/fs-pack-test.c?rev=1053735&r1=1053734&r2=1053735&view=diff
==============================================================================
--- subversion/branches/performance/subversion/tests/libsvn_fs_fs/fs-pack-test.c (original)
+++ subversion/branches/performance/subversion/tests/libsvn_fs_fs/fs-pack-test.c Wed Dec 29 21:12:33 2010
@@ -133,6 +133,7 @@ create_packed_filesystem(const char *dir
   SVN_ERR(svn_fs_txn_root(&txn_root, txn, subpool));
   SVN_ERR(svn_test__create_greek_tree(txn_root, subpool));
   SVN_ERR(svn_fs_commit_txn(&conflict, &after_rev, txn, subpool));
+  SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(after_rev));
 
   /* Revisions 2 thru NUM_REVS-1: content tweaks to "iota". */
   iterpool = svn_pool_create(subpool);
@@ -146,6 +147,7 @@ create_packed_filesystem(const char *dir
                                                            iterpool),
                                           iterpool));
       SVN_ERR(svn_fs_commit_txn(&conflict, &after_rev, txn, iterpool));
+      SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(after_rev));
     }
   svn_pool_destroy(iterpool);
   svn_pool_destroy(subpool);
@@ -348,6 +350,7 @@ commit_packed_fs(const svn_test_opts_t *
           "How much better is it to get wisdom than gold! and to get "
           "understanding rather to be chosen than silver!", pool));
   SVN_ERR(svn_fs_commit_txn(&conflict, &after_rev, txn, pool));
+  SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(after_rev));
 
   return SVN_NO_ERROR;
 }
@@ -386,6 +389,7 @@ get_set_revprop_packed_fs(const svn_test
   SVN_ERR(svn_fs_txn_root(&txn_root, txn, subpool));
   SVN_ERR(svn_test__set_file_contents(txn_root, "iota", "new-iota",  subpool));
   SVN_ERR(svn_fs_commit_txn(&conflict, &after_rev, txn, subpool));
+  SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(after_rev));
   svn_pool_clear(subpool);
 
   /* Pack the repository. */
@@ -441,6 +445,7 @@ recover_fully_packed(const svn_test_opts
   SVN_ERR(svn_fs_txn_root(&txn_root, txn, subpool));
   SVN_ERR(svn_test__set_file_contents(txn_root, "A/mu", "new-mu", subpool));
   SVN_ERR(svn_fs_commit_txn(&conflict, &after_rev, txn, subpool));
+  SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(after_rev));
   svn_pool_destroy(subpool);
   SVN_ERR(svn_fs_pack(REPO_NAME, NULL, NULL, NULL, NULL, pool));
   SVN_ERR(svn_fs_recover(REPO_NAME, NULL, NULL, pool));