Modified: 
subversion/branches/diff-optimizations-bytes/subversion/tests/libsvn_repos/repos-test.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/diff-optimizations-bytes/subversion/tests/libsvn_repos/repos-test.c?rev=1053489&r1=1053488&r2=1053489&view=diff
==============================================================================
--- 
subversion/branches/diff-optimizations-bytes/subversion/tests/libsvn_repos/repos-test.c
 (original)
+++ 
subversion/branches/diff-optimizations-bytes/subversion/tests/libsvn_repos/repos-test.c
 Wed Dec 29 00:10:25 2010
@@ -89,6 +89,7 @@ dir_deltas(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_repos_fs_commit_txn(NULL, repos, &youngest_rev, txn, subpool));
+  SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(youngest_rev));
 
   /***********************************************************************/
   /* REVISION 1 */
@@ -150,6 +151,7 @@ dir_deltas(const svn_test_opts_t *opts,
                                       subpool));
   }
   SVN_ERR(svn_repos_fs_commit_txn(NULL, repos, &youngest_rev, txn, subpool));
+  SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(youngest_rev));
 
   /***********************************************************************/
   /* REVISION 2 */
@@ -204,6 +206,7 @@ dir_deltas(const svn_test_opts_t *opts,
     SVN_ERR(svn_test__txn_script_exec(txn_root, script_entries, 4, subpool));
   }
   SVN_ERR(svn_repos_fs_commit_txn(NULL, repos, &youngest_rev, txn, subpool));
+  SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(youngest_rev));
 
   /***********************************************************************/
   /* REVISION 3 */
@@ -257,6 +260,7 @@ dir_deltas(const svn_test_opts_t *opts,
                       txn_root, "A/B/epsilon",
                       subpool));
   SVN_ERR(svn_repos_fs_commit_txn(NULL, repos, &youngest_rev, txn, subpool));
+  SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(youngest_rev));
 
   /***********************************************************************/
   /* REVISION 4 */
@@ -389,6 +393,7 @@ node_tree_delete_under_copy(const svn_te
   /* Create and commit the greek tree. */
   SVN_ERR(svn_test__create_greek_tree(txn_root, pool));
   SVN_ERR(svn_repos_fs_commit_txn(NULL, repos, &youngest_rev, txn, pool));
+  SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(youngest_rev));
 
   /* Now, commit again, this time after copying a directory, and then
      deleting some paths under that directory. */
@@ -399,6 +404,7 @@ node_tree_delete_under_copy(const svn_te
   SVN_ERR(svn_fs_delete(txn_root, "Z/D/G/rho", pool));
   SVN_ERR(svn_fs_delete(txn_root, "Z/D/H", pool));
   SVN_ERR(svn_repos_fs_commit_txn(NULL, repos, &youngest_rev, txn, pool));
+  SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(youngest_rev));
 
   /* Now, we run the node_tree editor code, and see that a) it doesn't
      bomb out, and b) that our nodes are all good. */
@@ -529,6 +535,7 @@ revisions_changed(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 - mu, alpha, omega */
@@ -538,6 +545,7 @@ revisions_changed(const svn_test_opts_t 
   SVN_ERR(svn_test__set_file_contents(txn_root, "A/B/E/alpha", "2", spool));
   SVN_ERR(svn_test__set_file_contents(txn_root, "A/D/H/omega", "2", 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 - iota, lambda, psi, omega */
@@ -548,6 +556,7 @@ revisions_changed(const svn_test_opts_t 
   SVN_ERR(svn_test__set_file_contents(txn_root, "A/D/H/psi", "3", spool));
   SVN_ERR(svn_test__set_file_contents(txn_root, "A/D/H/omega", "3", 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 - iota, beta, gamma, pi, rho */
@@ -559,6 +568,7 @@ revisions_changed(const svn_test_opts_t 
   SVN_ERR(svn_test__set_file_contents(txn_root, "A/D/G/pi", "4", spool));
   SVN_ERR(svn_test__set_file_contents(txn_root, "A/D/G/rho", "4", 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 - mu, alpha, tau, chi */
@@ -569,6 +579,7 @@ revisions_changed(const svn_test_opts_t 
   SVN_ERR(svn_test__set_file_contents(txn_root, "A/D/G/tau", "5", spool));
   SVN_ERR(svn_test__set_file_contents(txn_root, "A/D/H/chi", "5", 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 6 - move A/D to A/Z */
@@ -578,6 +589,7 @@ revisions_changed(const svn_test_opts_t 
   SVN_ERR(svn_fs_copy(rev_root, "A/D", txn_root, "A/Z", spool));
   SVN_ERR(svn_fs_delete(txn_root, "A/D", 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 7 - edit A/Z/G/pi */
@@ -585,6 +597,7 @@ revisions_changed(const svn_test_opts_t 
   SVN_ERR(svn_fs_txn_root(&txn_root, txn, spool));
   SVN_ERR(svn_test__set_file_contents(txn_root, "A/Z/G/pi", "7", 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 8 - move A/Z back to A/D, edit iota */
@@ -595,6 +608,7 @@ revisions_changed(const svn_test_opts_t 
   SVN_ERR(svn_fs_delete(txn_root, "A/Z", spool));
   SVN_ERR(svn_test__set_file_contents(txn_root, "iota", "8", 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 9 - copy A/D/G to A/D/Q */
@@ -603,6 +617,7 @@ revisions_changed(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/Q", 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 10 - edit A/D/Q/pi and A/D/Q/rho */
@@ -611,6 +626,7 @@ revisions_changed(const svn_test_opts_t 
   SVN_ERR(svn_test__set_file_contents(txn_root, "A/D/Q/pi", "10", spool));
   SVN_ERR(svn_test__set_file_contents(txn_root, "A/D/Q/rho", "10", 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);
 
   /* Now, it's time to verify our results. */
@@ -771,6 +787,7 @@ node_locations(const svn_test_opts_t *op
   SVN_ERR(svn_fs_txn_root(&txn_root, txn, subpool));
   SVN_ERR(svn_test__create_greek_tree(txn_root, subpool));
   SVN_ERR(svn_repos_fs_commit_txn(NULL, repos, &youngest_rev, txn, subpool));
+  SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(youngest_rev));
   svn_pool_clear(subpool);
 
   /* Move a file. Rev 2. */
@@ -779,6 +796,7 @@ node_locations(const svn_test_opts_t *op
   SVN_ERR(svn_fs_txn_root(&txn_root, txn, subpool));
   SVN_ERR(svn_fs_copy(root, "/A/mu", txn_root, "/mu.new", subpool));
   SVN_ERR(svn_repos_fs_commit_txn(NULL, repos, &youngest_rev, txn, subpool));
+  SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(youngest_rev));
   {
     struct locations_info info[] =
       {
@@ -820,6 +838,7 @@ node_locations2(const svn_test_opts_t *o
   SVN_ERR(svn_fs_txn_root(&txn_root, txn, subpool));
   SVN_ERR(svn_fs_make_dir(txn_root, "/foo", subpool));
   SVN_ERR(svn_repos_fs_commit_txn(NULL, repos, &youngest_rev, txn, subpool));
+  SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(youngest_rev));
   svn_pool_clear(subpool);
 
   /* Revision 2: Copy /foo to /bar, and add /bar/baz  */
@@ -829,6 +848,7 @@ node_locations2(const svn_test_opts_t *o
   SVN_ERR(svn_fs_copy(root, "/foo", txn_root, "/bar", subpool));
   SVN_ERR(svn_fs_make_file(txn_root, "/bar/baz", subpool));
   SVN_ERR(svn_repos_fs_commit_txn(NULL, repos, &youngest_rev, txn, subpool));
+  SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(youngest_rev));
   svn_pool_clear(subpool);
 
   /* Revision 3: Modify /bar/baz  */
@@ -836,6 +856,7 @@ node_locations2(const svn_test_opts_t *o
   SVN_ERR(svn_fs_txn_root(&txn_root, txn, subpool));
   SVN_ERR(svn_test__set_file_contents(txn_root, "/bar/baz", "brrt", subpool));
   SVN_ERR(svn_repos_fs_commit_txn(NULL, repos, &youngest_rev, txn, subpool));
+  SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(youngest_rev));
   svn_pool_clear(subpool);
 
   /* Revision 4: Modify /bar/baz again  */
@@ -843,6 +864,7 @@ node_locations2(const svn_test_opts_t *o
   SVN_ERR(svn_fs_txn_root(&txn_root, txn, subpool));
   SVN_ERR(svn_test__set_file_contents(txn_root, "/bar/baz", "bzzz", subpool));
   SVN_ERR(svn_repos_fs_commit_txn(NULL, repos, &youngest_rev, txn, subpool));
+  SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(youngest_rev));
   svn_pool_clear(subpool);
 
   /* Now, check locations. */
@@ -1026,6 +1048,7 @@ rmlocks(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_repos_fs_commit_txn(NULL, repos, &youngest_rev, txn, subpool));
+  SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(youngest_rev));
   svn_pool_clear(subpool);
 
   SVN_ERR(svn_fs_create_access(&fs_access, "user1", pool));
@@ -1363,6 +1386,7 @@ commit_editor_authz(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_repos_fs_commit_txn(NULL, repos, &youngest_rev, txn, subpool));
+  SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(youngest_rev));
 
   /* Load the authz rules for the greek tree. */
   authz_contents =
@@ -1574,6 +1598,7 @@ commit_continue_txn(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_repos_fs_commit_txn(NULL, repos, &youngest_rev, txn, subpool));
+  SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(youngest_rev));
 
   SVN_ERR(svn_fs_begin_txn(&txn, fs, youngest_rev, subpool));
   SVN_ERR(svn_fs_txn_name(&txn_name, txn, subpool));
@@ -1754,6 +1779,7 @@ node_location_segments(const svn_test_op
   SVN_ERR(svn_fs_txn_root(&txn_root, txn, subpool));
   SVN_ERR(svn_test__create_greek_tree(txn_root, subpool));
   SVN_ERR(svn_repos_fs_commit_txn(NULL, repos, &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.  */
@@ -1762,6 +1788,7 @@ node_location_segments(const svn_test_op
   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_repos_fs_commit_txn(NULL, repos, &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.  */
@@ -1770,6 +1797,7 @@ node_location_segments(const svn_test_op
   SVN_ERR(svn_fs_revision_root(&root, fs, youngest_rev, subpool));
   SVN_ERR(svn_fs_copy(root, "A/D", txn_root, "A/D2", subpool));
   SVN_ERR(svn_repos_fs_commit_txn(NULL, repos, &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.  */
@@ -1778,6 +1806,7 @@ node_location_segments(const svn_test_op
   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_repos_fs_commit_txn(NULL, repos, &youngest_rev, txn, subpool));
+  SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(youngest_rev));
   svn_pool_clear(subpool);
 
   /* Revision 5: Delete A/D2/G.  */
@@ -1785,6 +1814,7 @@ node_location_segments(const svn_test_op
   SVN_ERR(svn_fs_txn_root(&txn_root, txn, subpool));
   SVN_ERR(svn_fs_delete(txn_root, "A/D2/G", subpool));
   SVN_ERR(svn_repos_fs_commit_txn(NULL, repos, &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).  */
@@ -1793,6 +1823,7 @@ node_location_segments(const svn_test_op
   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_repos_fs_commit_txn(NULL, repos, &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).  */
@@ -1803,6 +1834,7 @@ node_location_segments(const svn_test_op
   SVN_ERR(svn_fs_copy(root, "A/D2", txn_root, "A/D", subpool));
   SVN_ERR(svn_fs_delete(txn_root, "A/D2", subpool));
   SVN_ERR(svn_repos_fs_commit_txn(NULL, repos, &youngest_rev, txn, subpool));
+  SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(youngest_rev));
   svn_pool_clear(subpool);
 
   /* Check locations for /@HEAD. */
@@ -1940,6 +1972,7 @@ reporter_depth_exclude(const svn_test_op
   SVN_ERR(svn_fs_txn_root(&txn_root, txn, subpool));
   SVN_ERR(svn_test__create_greek_tree(txn_root, subpool));
   SVN_ERR(svn_repos_fs_commit_txn(NULL, repos, &youngest_rev, txn, subpool));
+  SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(youngest_rev));
   svn_pool_clear(subpool);
 
   /* Revision 2: make a bunch of changes */
@@ -1962,6 +1995,7 @@ reporter_depth_exclude(const svn_test_op
                                       subpool));
   }
   SVN_ERR(svn_repos_fs_commit_txn(NULL, repos, &youngest_rev, txn, subpool));
+  SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(youngest_rev));
   svn_pool_clear(subpool);
 
   /* Confirm the contents of r2. */
@@ -2282,6 +2316,7 @@ get_logs(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_repos_fs_commit_txn(NULL, repos, &youngest_rev, txn, subpool));
+  SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(youngest_rev));
 
   /* Revision 2:  Tweak A/mu and A/B/E/alpha. */
   SVN_ERR(svn_fs_begin_txn(&txn, fs, youngest_rev, subpool));
@@ -2291,6 +2326,7 @@ get_logs(const svn_test_opts_t *opts,
   SVN_ERR(svn_test__set_file_contents(txn_root, "A/B/E/alpha",
                                       "Revision 2", subpool));
   SVN_ERR(svn_repos_fs_commit_txn(NULL, repos, &youngest_rev, txn, subpool));
+  SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(youngest_rev));
 
   /* Revision 3:  Tweak A/B/E/alpha and A/B/E/beta. */
   SVN_ERR(svn_fs_begin_txn(&txn, fs, youngest_rev, subpool));
@@ -2300,6 +2336,7 @@ get_logs(const svn_test_opts_t *opts,
   SVN_ERR(svn_test__set_file_contents(txn_root, "A/B/E/beta",
                                       "Revision 3", subpool));
   SVN_ERR(svn_repos_fs_commit_txn(NULL, repos, &youngest_rev, txn, subpool));
+  SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(youngest_rev));
 
 
   for (start = 0; start <= youngest_rev; start++)

Propchange: 
subversion/branches/diff-optimizations-bytes/subversion/tests/libsvn_subr/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Wed Dec 29 00:10:25 2010
@@ -33,3 +33,4 @@ cache-test
 dirent_uri-test
 auth-test
 eol-test
+subst_translate-test

Modified: 
subversion/branches/diff-optimizations-bytes/subversion/tests/libsvn_subr/eol-test.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/diff-optimizations-bytes/subversion/tests/libsvn_subr/eol-test.c?rev=1053489&r1=1053488&r2=1053489&view=diff
==============================================================================
--- 
subversion/branches/diff-optimizations-bytes/subversion/tests/libsvn_subr/eol-test.c
 (original)
+++ 
subversion/branches/diff-optimizations-bytes/subversion/tests/libsvn_subr/eol-test.c
 Wed Dec 29 00:10:25 2010
@@ -59,7 +59,7 @@ test_detect_file_eol(apr_pool_t *pool)
       SVN_ERR(svn_io_file_seek(file, APR_SET, &pos, pool));
       len = data_len;
       SVN_ERR(svn_io_file_write(file, file_data[i], &len, pool));
-      SVN_ERR_ASSERT(len == data_len);
+      SVN_TEST_ASSERT(len == data_len);
       SVN_ERR(svn_io_file_seek(file, APR_CUR, &pos, pool));
       SVN_ERR(svn_io_file_trunc(file, pos, pool));
 
@@ -68,9 +68,9 @@ test_detect_file_eol(apr_pool_t *pool)
 
       SVN_ERR(svn_eol__detect_file_eol(&eol, file, pool));
       if (eol && expected_eol[i])
-        SVN_ERR_ASSERT(strcmp(eol, expected_eol[i]) == 0);
+        SVN_TEST_ASSERT(strcmp(eol, expected_eol[i]) == 0);
       else
-        SVN_ERR_ASSERT(eol == expected_eol[i]);
+        SVN_TEST_ASSERT(eol == expected_eol[i]);
     }
 
   SVN_ERR(svn_io_file_close(file, pool));

Modified: 
subversion/branches/diff-optimizations-bytes/subversion/tests/libsvn_subr/error-test.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/diff-optimizations-bytes/subversion/tests/libsvn_subr/error-test.c?rev=1053489&r1=1053488&r2=1053489&view=diff
==============================================================================
--- 
subversion/branches/diff-optimizations-bytes/subversion/tests/libsvn_subr/error-test.c
 (original)
+++ 
subversion/branches/diff-optimizations-bytes/subversion/tests/libsvn_subr/error-test.c
 Wed Dec 29 00:10:25 2010
@@ -27,6 +27,7 @@
 
 #include "svn_error_codes.h"
 #include "svn_error.h"
+#include "private/svn_error_private.h"
 
 #include "../svn_test.h"
 
@@ -78,6 +79,109 @@ test_error_root_cause(apr_pool_t *pool)
   return SVN_NO_ERROR;
 }
 
+static svn_error_t *
+test_error_purge_tracing(apr_pool_t *pool)
+{
+  svn_error_t *err, *err2, *child;
+
+  if (SVN_NO_ERROR != svn_error_purge_tracing(SVN_NO_ERROR))
+    return svn_error_create(SVN_ERR_TEST_FAILED, NULL,
+                            "svn_error_purge_tracing() didn't return "
+                            "SVN_NO_ERROR after being passed a "
+                            "SVN_NO_ERROR.");
+
+  err = svn_error_return(svn_error_create(SVN_ERR_BASE, NULL, "root error"));
+#ifdef SVN_ERR__TRACING
+  if (! svn_error__is_tracing_link(err))
+    {
+      return svn_error_create(SVN_ERR_TEST_FAILED, err,
+                              "The top error is not a tracing link:");
+    }
+#endif
+  err = svn_error_return(svn_error_create(SVN_ERR_BASE, err, "other error"));
+#ifdef SVN_ERR__TRACING
+  if (! svn_error__is_tracing_link(err))
+    {
+      return svn_error_create(SVN_ERR_TEST_FAILED, err,
+                              "The top error is not a tracing link:");
+    }
+#endif
+
+  err2 = svn_error_purge_tracing(err);
+  for (child = err2; child; child = child->child)
+    if (svn_error__is_tracing_link(child))
+      {
+        return svn_error_create(SVN_ERR_TEST_FAILED, err,
+                                "Tracing link found after purging the "
+                                "following chain:");
+      }
+  svn_error_clear(err);
+
+#ifdef SVN_ERR__TRACING
+  /* Make an error chain containing only tracing errors and check that
+     svn_error_purge_tracing() asserts on it. */
+  {
+    svn_error_t err_copy;
+    svn_error_malfunction_handler_t orig_handler;
+
+    /* For this test, use a random error status. */
+    err = svn_error_create(SVN_ERR_BAD_UUID, NULL, SVN_ERR__TRACED);
+    err = svn_error_return(err);
+
+    /* Register a malfunction handler that doesn't call abort() to
+       check that a new error chain with a SVN_ERR_ASSERTION_FAIL is
+       returned. */
+    orig_handler =
+      svn_error_set_malfunction_handler(svn_error_raise_on_malfunction);
+    err2 = svn_error_purge_tracing(err);
+    svn_error_set_malfunction_handler(orig_handler);
+
+    err_copy = *err;
+
+    if (err2)
+      {
+        /* If err2 does share the same pool as err, then make a copy
+           of err2 and err3 before err is cleared. */
+        svn_error_t err2_copy = *err2;
+        svn_error_t *err3 = err2;
+        svn_error_t err3_copy;
+
+        while (err3 && svn_error__is_tracing_link(err3))
+          err3 = err3->child;
+        if (err3)
+          err3_copy = *err3;
+
+        svn_error_clear(err);
+
+        /* The returned error is only safe to clear if this assertion
+           holds, otherwise it has the same pool as the original
+           error. */
+        SVN_TEST_ASSERT(err_copy.pool != err2_copy.pool);
+
+        svn_error_clear(err2);
+
+        SVN_TEST_ASSERT(err3);
+        SVN_TEST_ASSERT(SVN_ERR_ASSERTION_FAIL == err2_copy.apr_err);
+        SVN_TEST_ASSERT(SVN_ERR_ASSERTION_FAIL == err3_copy.apr_err);
+
+        /* This is the line number in error.c where
+           SVN_ERR_ASSERT(err) is called.  This check is done to
+           assert that the error is being thrown from the expected
+           line and not from another assertion that could be
+           introduced in the future. */
+        SVN_TEST_ASSERT(376 == err3_copy.line);
+      }
+    else
+      {
+        svn_error_clear(err);
+        SVN_TEST_ASSERT(err2);
+      }
+  }
+#endif
+
+  return SVN_NO_ERROR;
+}
+
 
 /* The test table.  */
 
@@ -86,5 +190,7 @@ struct svn_test_descriptor_t test_funcs[
     SVN_TEST_NULL,
     SVN_TEST_PASS2(test_error_root_cause,
                    "test svn_error_root_cause"),
+    SVN_TEST_PASS2(test_error_purge_tracing,
+                   "test svn_error_purge_tracing"),
     SVN_TEST_NULL
   };

Modified: 
subversion/branches/diff-optimizations-bytes/subversion/tests/libsvn_wc/db-test.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/diff-optimizations-bytes/subversion/tests/libsvn_wc/db-test.c?rev=1053489&r1=1053488&r2=1053489&view=diff
==============================================================================
--- 
subversion/branches/diff-optimizations-bytes/subversion/tests/libsvn_wc/db-test.c
 (original)
+++ 
subversion/branches/diff-optimizations-bytes/subversion/tests/libsvn_wc/db-test.c
 Wed Dec 29 00:10:25 2010
@@ -71,8 +71,8 @@
 #define AUTHOR_1 "johndoe"
 #define AUTHOR_2 "janedoe"
 
+/* Some arbitrary checksum values */
 #define MD5_1 "2d18c5e57e84c5b8a5e9a6e13fa394dc"
-#define MD5_2 "5d41402abc4b2a76b9719d911017c592"
 #define SHA1_1 "aaf4c61ddcc5e8a2dabede0f3b482cd9aea9434d"
 
 #define F_TC_DATA "(conflict F file update edited deleted (version 22 " 
ROOT_ONE " 1 2 branch1/ft/F none) (version 22 " ROOT_ONE " 1 3 branch1/ft/F 
file))"
@@ -88,6 +88,8 @@ static const char * const TESTING_DATA =
    "insert into repository values (2, '" ROOT_TWO "', '" UUID_TWO "'); "
    "insert into wcroot values (1, null); "
 
+   "insert into pristine values ('$sha1$" SHA1_1 "', NULL, 15, 1, '$md5 $" 
MD5_1 "'); "
+
    /* ### The file_externals column in NODES is temporary, and will be
       ### removed.  However, to keep the tests passing, we need to add it
       ### to the following insert statements.  *Be sure to remove it*. */
@@ -99,7 +101,7 @@ static const char * const TESTING_DATA =
   "  null, null, null, null);"
   "insert into nodes values ("
   "  1, 'A', 0, '', 1, 'A', 1, 'normal',"
-  "  null, null, 'file', '()', null, '$md5 $" MD5_1 "', null, 1, " TIME_1s ", 
'" AUTHOR_1 "',"
+  "  null, null, 'file', '()', null, '$sha1$" SHA1_1 "', null, 1, " TIME_1s ", 
'" AUTHOR_1 "',"
   "  10, null, null, null);"
   "insert into nodes values ("
   "  1, 'B', 0, '', 1, 'B', null, 'excluded',"
@@ -206,16 +208,6 @@ static const char * const TESTING_DATA =
   "  1, 'J/J-b/J-b-b', 2, 'J/J-b', null, null, 2, 'normal',"
   "  0, null, 'file', '()', null, null, null, null, null, null,"
   "  null, null, null, null);"
-#ifndef SVN_WC__OP_DEPTH
-  "insert into nodes values ("
-  "  1, 'J/J-c', 1, 'J', null, null, null, 'not-present',"
-  "  0, null, 'dir', '()', null, null, null, null, null, null,"
-  "  null, null, null, null);"
-  "insert into nodes values ("
-  "  1, 'J/J-c/J-c-a', 1, 'J/J-c', null, null, null, 'not-present',"
-  "  0, null, 'dir', '()', null, null, null, null, null, null,"
-  "  null, null, null, null);"
-#else
   "insert into nodes values ("
   "  1, 'J/J-c', 1, 'J', null, null, null, 'normal',"
   "  0, null, 'dir', '()', null, null, null, null, null, null,"
@@ -232,25 +224,10 @@ static const char * const TESTING_DATA =
   "  1, 'J/J-c/J-c-a', 2, 'J/J-c', null, null, null, 'base-deleted',"
   "  0, null, 'dir', '()', null, null, null, null, null, null,"
   "  null, null, null, null);"
-#endif
   "insert into nodes values ("
   "  1, 'J/J-d', 2, 'J', 2, 'moved/file', 2, 'normal',"
-  "  1, null, 'file', '()', null, '$md5 $" MD5_1 "', null, 2, " TIME_2s ", '" 
AUTHOR_2 "',"
+  "  1, null, 'file', '()', null, '$sha1$" SHA1_1 "', null, 2, " TIME_2s ", '" 
AUTHOR_2 "',"
   "  10, null, null, null);"
-#ifndef SVN_WC__OP_DEPTH
-  "insert into nodes values ("
-  "  1, 'J/J-e', 1, 'J', null, null, null, 'not-present',"
-  "  0, 'other/place', 'dir', '()', null, null, null, null, null, null,"
-  "  null, null, null, null);"
-  "insert into nodes values ("
-  "  1, 'J/J-e/J-e-a', 1, 'J/J-e', null, null, null, 'not-present',"
-  "  0, null, 'file', '()', null, null, null, null, null, null,"
-  "  null, null, null, null);"
-  "insert into nodes values ("
-  "  1, 'J/J-e/J-e-b', 1, 'J/J-e', null, null, null, 'not-present',"
-  "  0, null, 'dir', '()', null, null, null, null, null, null,"
-  "  null, null, null, null);"
-#else
   "insert into nodes values ("
   "  1, 'J/J-e', 1, 'J', null, null, null, 'normal',"
   "  0, 'other/place', 'dir', '()', null, null, null, null, null, null,"
@@ -275,7 +252,6 @@ static const char * const TESTING_DATA =
   "  1, 'J/J-e/J-e-b', 2, 'J/J-e', null, null, null, 'base-deleted',"
   "  0, null, 'dir', '()', null, null, null, null, null, null,"
   "  null, null, null, null);"
-#endif
   "insert into nodes values ("
   "  1, 'J/J-e/J-e-b/Jeba', 1, 'J/J-e/J-e-b', null, null, null, 
'base-deleted',"
   "  0, null, 'file', '()', null, null, null, null, null, null,"
@@ -304,16 +280,6 @@ static const char * const TESTING_DATA =
   "  1, 'L', 1, '', null, null, null, 'normal',"
   "  0, null, 'dir', '()', 'immediates', null, null, null, null, null,"
   "  null, null, null, null);"
-#ifndef SVN_WC__OP_DEPTH
-  "insert into nodes values ("
-  "  1, 'L/L-a', 1, 'L', null, null, null, 'not-present',"
-  "  0, null, 'dir', '()', 'immediates', null, null, null, null, null,"
-  "  null, null, null, null);"
-  "insert into nodes values ("
-  "  1, 'L/L-a/L-a-a', 1, 'L', null, null, null, 'not-present',"
-  "  0, null, 'dir', '()', 'immediates', null, null, null, null, null,"
-  "  null, null, null, null);"
-#else
   "insert into nodes values ("
   "  1, 'L/L-a', 1, 'L', null, null, null, 'normal',"
   "  0, null, 'dir', '()', 'immediates', null, null, null, null, null,"
@@ -330,7 +296,6 @@ static const char * const TESTING_DATA =
   "  1, 'L/L-a/L-a-a', 2, 'L', null, null, null, 'base-deleted',"
   "  0, null, 'dir', '()', 'immediates', null, null, null, null, null,"
   "  null, null, null, null);"
-#endif
    "insert into actual_node values ("
    "  1, 'I', '', null, null, null, null, null, 'changelist', null, "
    "  null, null, null, null, null);"
@@ -488,7 +453,7 @@ test_getting_info(apr_pool_t *pool)
             db, svn_dirent_join(local_abspath, "A", pool),
             pool, pool));
   SVN_TEST_ASSERT(kind == svn_wc__db_kind_file);
-  SVN_TEST_STRING_ASSERT(MD5_1, svn_checksum_to_cstring(checksum, pool));
+  SVN_TEST_STRING_ASSERT(SHA1_1, svn_checksum_to_cstring(checksum, pool));
   SVN_TEST_ASSERT(translated_size == 10);
   SVN_TEST_STRING_ASSERT(repos_relpath, "A");
   SVN_TEST_STRING_ASSERT(repos_root_url, ROOT_ONE);
@@ -706,7 +671,7 @@ test_inserting_nodes(apr_pool_t *pool)
 
   children = svn_cstring_split("N-a N-b N-c", " ", FALSE, pool);
 
-  SVN_ERR(svn_checksum_parse_hex(&checksum, svn_checksum_md5, MD5_1, pool));
+  SVN_ERR(svn_checksum_parse_hex(&checksum, svn_checksum_sha1, SHA1_1, pool));
 
   /* Create a new directory and several child nodes. */
   set_prop(props, "for-file", "N", pool);
@@ -1179,15 +1144,7 @@ test_scan_deletion(apr_pool_t *pool)
                                    base_del_abspath, pool));
   SVN_TEST_ASSERT(validate_abspath(local_abspath, "other/place",
                                    moved_to_abspath, pool));
-#ifndef SVN_WC__OP_DEPTH
-  /* ### I don't understand this.  "J/J-e/J-e-b/Jeba" is a deleted
-     base node that is not overlayed by the replacement rooted at "J".
-     Why is work_del_abspath not NULL?  */
-  SVN_TEST_ASSERT(validate_abspath(local_abspath, "J/J-e",
-                                   work_del_abspath, pool));
-#else
   SVN_TEST_ASSERT(work_del_abspath == NULL);
-#endif
 
   /* Base-deleted tree extending past added WORKING tree.  */
   SVN_ERR(svn_wc__db_scan_deletion(

Modified: 
subversion/branches/diff-optimizations-bytes/subversion/tests/libsvn_wc/entries-compat.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/diff-optimizations-bytes/subversion/tests/libsvn_wc/entries-compat.c?rev=1053489&r1=1053488&r2=1053489&view=diff
==============================================================================
--- 
subversion/branches/diff-optimizations-bytes/subversion/tests/libsvn_wc/entries-compat.c
 (original)
+++ 
subversion/branches/diff-optimizations-bytes/subversion/tests/libsvn_wc/entries-compat.c
 Wed Dec 29 00:10:25 2010
@@ -71,9 +71,9 @@
 #define AUTHOR_1 "johndoe"
 #define AUTHOR_2 "janedoe"
 
-/* Stick to MD5 values. We don't want to trigger SHA1->MD5 lookups.  */
+/* Some arbitrary checksum values */
 #define MD5_1 "2d18c5e57e84c5b8a5e9a6e13fa394dc"
-#define MD5_2 "5d41402abc4b2a76b9719d911017c592"
+#define SHA1_1 "aaf4c61ddcc5e8a2dabede0f3b482cd9aea9434d"
 
 #define F_TC_DATA "(conflict F file update edited deleted (version 22 " 
ROOT_ONE " 1 2 branch1/ft/F none) (version 22 " ROOT_ONE " 1 3 branch1/ft/F 
file))"
 #define G_TC_DATA "(conflict G file update edited deleted (version 22 " 
ROOT_ONE " 1 2 branch1/ft/F none) (version 22 " ROOT_ONE " 1 3 branch1/ft/F 
file))"
@@ -88,6 +88,8 @@ static const char * const TESTING_DATA =
    "insert into repository values (2, '" ROOT_TWO "', '" UUID_TWO "'); "
    "insert into wcroot values (1, null); "
 
+   "insert into pristine values ('$sha1$" SHA1_1 "', NULL, 15, 1, '$md5 $" 
MD5_1 "'); "
+
    /* ### The file_externals column in NODES is temporary, and will be
       ### removed.  However, to keep the tests passing, we need to add it
       ### to the following insert statements.  *Be sure to remove it*. */
@@ -99,7 +101,7 @@ static const char * const TESTING_DATA =
   "  null, null, null, null);"
   "insert into nodes values ("
   "  1, 'A', 0, '', 1, 'A', 1, 'normal',"
-  "  null, null, 'file', '()', null, '$md5 $" MD5_1 "', null, 1, " TIME_1s ", 
'" AUTHOR_1 "',"
+  "  null, null, 'file', '()', null, '$sha1$" SHA1_1 "', null, 1, " TIME_1s ", 
'" AUTHOR_1 "',"
   "  10, null, null, null);"
   "insert into nodes values ("
   "  1, 'B', 0, '', 1, 'B', null, 'excluded',"
@@ -119,11 +121,11 @@ static const char * const TESTING_DATA =
   "  null, null, null, null);"
   "insert into nodes values ("
   "  1, 'F', 0, '', 1, 'F', 1, 'normal',"
-  "  null, null, 'file', '()', null, '$md5 $" MD5_1 "', null, 1, " TIME_1s ", 
'" AUTHOR_1 "',"
+  "  null, null, 'file', '()', null, '$sha1$" SHA1_1 "', null, 1, " TIME_1s ", 
'" AUTHOR_1 "',"
   "  15, null, null, null);"
   "insert into nodes values ("
   "  1, 'G', 0, '', 2, 'G-alt', 1, 'normal',"
-  "  null, null, 'file', '()', null, '$md5 $" MD5_1 "', null, 2, " TIME_2s ", 
'" AUTHOR_2 "',"
+  "  null, null, 'file', '()', null, '$sha1$" SHA1_1 "', null, 2, " TIME_2s ", 
'" AUTHOR_2 "',"
   "  15, null, null, null);"
   "insert into nodes values ("
   "  1, 'H', 0, '', 1, 'H', 1, 'normal',"
@@ -143,7 +145,7 @@ static const char * const TESTING_DATA =
   "  null, null, null, null);"
   "insert into nodes values ("
   "  1, 'J/J-e/J-e-a', 0, 'J/J-e', 1, 'J/J-e/J-e-a', 1, 'normal',"
-  "  null, null, 'file', '()', null, '$md5 $" MD5_1 "', null, 1, " TIME_1s ", 
'" AUTHOR_1 "',"
+  "  null, null, 'file', '()', null, '$sha1$" SHA1_1 "', null, 1, " TIME_1s ", 
'" AUTHOR_1 "',"
   "  15, null, null, null);"
   "insert into nodes values ("
   "  1, 'J/J-e/J-e-b', 0, 'J/J-e', 1, 'J/J-e/J-e-b', 1, 'normal',"
@@ -151,7 +153,7 @@ static const char * const TESTING_DATA =
   "  null, null, null, null);"
   "insert into nodes values ("
   "  1, 'J/J-e/J-e-b/Jeba', 0, 'J/J-e/J-e-b', 1, 'J/J-e/J-e-b/Jeba', 1, 
'normal',"
-  "  null, null, 'file', '()', null, '$md5 $" MD5_1 "', null, 1, " TIME_1s ", 
'" AUTHOR_1 "',"
+  "  null, null, 'file', '()', null, '$sha1$" SHA1_1 "', null, 1, " TIME_1s ", 
'" AUTHOR_1 "',"
   "  15, null, null, null);"
   "insert into nodes values ("
   "  1, 'J/J-f', 0, 'J', 1, 'J/J-f', 1, 'normal',"
@@ -167,11 +169,11 @@ static const char * const TESTING_DATA =
   "  null, null, null, null);"
   "insert into nodes values ("
   "  1, 'K/K-a', 0, 'K', 1, 'K/K-a', 1, 'normal',"
-  "  null, null, 'file', '()', null, '$md5 $" MD5_1 "', null, 1, " TIME_1s ", 
'" AUTHOR_1 "',"
+  "  null, null, 'file', '()', null, '$sha1$" SHA1_1 "', null, 1, " TIME_1s ", 
'" AUTHOR_1 "',"
   "  15, null, null, null);"
   "insert into nodes values ("
   "  1, 'K/K-b', 0, 'K', 1, 'K/K-b', 1, 'normal',"
-  "  null, null, 'file', '()', null, '$md5 $" MD5_1 "', null, 1, " TIME_1s ", 
'" AUTHOR_1 "',"
+  "  null, null, 'file', '()', null, '$sha1$" SHA1_1 "', null, 1, " TIME_1s ", 
'" AUTHOR_1 "',"
   "  15, null, null, null);"
   ""
    /* Load data into NODES table;
@@ -211,7 +213,7 @@ static const char * const TESTING_DATA =
   "  null, null, null, null);"
   "insert into nodes values ("
   "  1, 'J/J-d', 1, 'J', 2, 'moved/file', 2, 'normal',"
-  "  1, null, 'file', '()', null, '$md5 $" MD5_1 "', null, 2, " TIME_2s ", '" 
AUTHOR_2 "',"
+  "  1, null, 'file', '()', null, '$sha1$" SHA1_1 "', null, 2, " TIME_2s ", '" 
AUTHOR_2 "',"
   "  10, null, null, null);"
   "insert into nodes values ("
   "  1, 'J/J-e', 1, 'J', null, null, null, 'not-present',"

Modified: 
subversion/branches/diff-optimizations-bytes/subversion/tests/libsvn_wc/pristine-store-test.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/diff-optimizations-bytes/subversion/tests/libsvn_wc/pristine-store-test.c?rev=1053489&r1=1053488&r2=1053489&view=diff
==============================================================================
--- 
subversion/branches/diff-optimizations-bytes/subversion/tests/libsvn_wc/pristine-store-test.c
 (original)
+++ 
subversion/branches/diff-optimizations-bytes/subversion/tests/libsvn_wc/pristine-store-test.c
 Wed Dec 29 00:10:25 2010
@@ -123,7 +123,7 @@ pristine_write_read(const svn_test_opts_
 
     SVN_ERR(svn_wc__db_pristine_check(&present, db, wc_abspath, data_sha1,
                                       pool));
-    SVN_ERR_ASSERT(! present);
+    SVN_TEST_ASSERT(! present);
   }
 
   /* Install the new pristine file, referenced by its checksum. */
@@ -136,7 +136,7 @@ pristine_write_read(const svn_test_opts_
 
     SVN_ERR(svn_wc__db_pristine_check(&present, db, wc_abspath, data_sha1,
                                       pool));
-    SVN_ERR_ASSERT(present);
+    SVN_TEST_ASSERT(present);
   }
 
   /* Look up its MD-5 from its SHA-1, and check it's the same MD-5. */
@@ -181,7 +181,7 @@ pristine_write_read(const svn_test_opts_
 
     SVN_ERR(svn_wc__db_pristine_check(&present, db, wc_abspath, data_sha1,
                                       pool));
-    SVN_ERR_ASSERT(! present);
+    SVN_TEST_ASSERT(! present);
   }
 
   return SVN_NO_ERROR;

Modified: 
subversion/branches/diff-optimizations-bytes/subversion/tests/svn_test_fs.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/diff-optimizations-bytes/subversion/tests/svn_test_fs.c?rev=1053489&r1=1053488&r2=1053489&view=diff
==============================================================================
--- subversion/branches/diff-optimizations-bytes/subversion/tests/svn_test_fs.c 
(original)
+++ subversion/branches/diff-optimizations-bytes/subversion/tests/svn_test_fs.c 
Wed Dec 29 00:10:25 2010
@@ -723,6 +723,7 @@ svn_test__create_blame_repository(svn_re
   SVN_ERR(svn_fs_make_dir(txn_root, "tags", pool));
   SVN_ERR(svn_fs_make_dir(txn_root, "branches", pool));
   SVN_ERR(svn_repos_fs_commit_txn(NULL, repos, &youngest_rev, txn, pool));
+  SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(youngest_rev));
 
   /* Revision 2:  Add the Greek tree on the trunk. */
   SVN_ERR(svn_repos_fs_begin_txn_for_commit(&txn, repos, youngest_rev,
@@ -730,6 +731,7 @@ svn_test__create_blame_repository(svn_re
   SVN_ERR(svn_fs_txn_root(&txn_root, txn, pool));
   SVN_ERR(svn_test__create_greek_tree_at(txn_root, "trunk", pool));
   SVN_ERR(svn_repos_fs_commit_txn(NULL, repos, &youngest_rev, txn, pool));
+  SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(youngest_rev));
 
   /* Revision 3:  Tweak trunk/A/mu. */
   SVN_ERR(svn_repos_fs_begin_txn_for_commit(&txn, repos, youngest_rev,
@@ -738,6 +740,7 @@ svn_test__create_blame_repository(svn_re
   SVN_ERR(svn_test__set_file_contents(txn_root, "trunk/A/mu",
                                       "A\nB\nC\nD\nE\nF\nG\nH\nI", pool));
   SVN_ERR(svn_repos_fs_commit_txn(NULL, repos, &youngest_rev, txn, pool));
+  SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(youngest_rev));
 
   /* Revision 4:  Copy trunk to branches/1.0.x. */
   SVN_ERR(svn_repos_fs_begin_txn_for_commit(&txn, repos, youngest_rev,
@@ -748,6 +751,7 @@ svn_test__create_blame_repository(svn_re
                       txn_root, "branches/1.0.x",
                       pool));
   SVN_ERR(svn_repos_fs_commit_txn(NULL, repos, &youngest_rev, txn, pool));
+  SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(youngest_rev));
 
   /* Revision 5:  Tweak trunk/A/mu. */
   SVN_ERR(svn_repos_fs_begin_txn_for_commit(&txn, repos, youngest_rev,
@@ -757,6 +761,7 @@ svn_test__create_blame_repository(svn_re
                                       "A\nB\nC -- trunk 
edit\nD\nE\nF\nG\nH\nI",
                                       pool));
   SVN_ERR(svn_repos_fs_commit_txn(NULL, repos, &youngest_rev, txn, pool));
+  SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(youngest_rev));
 
   /* Revision 6:  Tweak branches/1.0.x/A/mu. */
   SVN_ERR(svn_repos_fs_begin_txn_for_commit(&txn, repos, youngest_rev,
@@ -766,6 +771,7 @@ svn_test__create_blame_repository(svn_re
                                       "A\nB\nC\nD -- branch 
edit\nE\nF\nG\nH\nI",
                                       pool));
   SVN_ERR(svn_repos_fs_commit_txn(NULL, repos, &youngest_rev, txn, pool));
+  SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(youngest_rev));
 
   /* Revision 7:  Merge trunk to branch. */
   SVN_ERR(svn_repos_fs_begin_txn_for_commit(&txn, repos, youngest_rev,
@@ -778,6 +784,7 @@ svn_test__create_blame_repository(svn_re
                                   svn_string_create("/trunk:4-6", pool),
                                   pool));
   SVN_ERR(svn_repos_fs_commit_txn(NULL, repos, &youngest_rev, txn, pool));
+  SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(youngest_rev));
 
   /* Revision 8:  Merge branch to trunk. */
   SVN_ERR(svn_repos_fs_begin_txn_for_commit(&txn, repos, youngest_rev,
@@ -790,6 +797,7 @@ svn_test__create_blame_repository(svn_re
                                   svn_string_create("/branches/1.0.x:4-7", 
pool),
                                   pool));
   SVN_ERR(svn_repos_fs_commit_txn(NULL, repos, &youngest_rev, txn, pool));
+  SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(youngest_rev));
 
   return SVN_NO_ERROR;
 }

Modified: 
subversion/branches/diff-optimizations-bytes/subversion/tests/svn_test_main.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/diff-optimizations-bytes/subversion/tests/svn_test_main.c?rev=1053489&r1=1053488&r2=1053489&view=diff
==============================================================================
--- 
subversion/branches/diff-optimizations-bytes/subversion/tests/svn_test_main.c 
(original)
+++ 
subversion/branches/diff-optimizations-bytes/subversion/tests/svn_test_main.c 
Wed Dec 29 00:10:25 2010
@@ -26,9 +26,11 @@
 #include <string.h>
 #include <stdio.h>
 #include <stdlib.h>
+#include <setjmp.h>
 
 #include <apr_pools.h>
 #include <apr_general.h>
+#include <apr_signal.h>
 
 #include "svn_cmdline.h"
 #include "svn_opt.h"
@@ -63,6 +65,9 @@ static svn_boolean_t quiet_mode = FALSE;
 /* Test option: Remove test directories after success */
 static svn_boolean_t cleanup_mode = FALSE;
 
+/* Test option: Allow segfaults */
+static svn_boolean_t allow_segfaults = FALSE;
+
 /* Option parsing enums and structures */
 enum {
   cleanup_opt = SVN_OPT_FIRST_LONGOPT_ID,
@@ -72,7 +77,8 @@ enum {
   trap_assert_opt,
   quiet_opt,
   config_opt,
-  server_minor_version_opt
+  server_minor_version_opt,
+  allow_segfault_opt
 };
 
 static const apr_getopt_option_t cl_options[] =
@@ -94,6 +100,8 @@ static const apr_getopt_option_t cl_opti
                     N_("catch and report SVN_ERR_ASSERT failures")},
   {"quiet",         quiet_opt, 0,
                     N_("print only unexpected results")},
+  {"allow-segfaults", allow_segfault_opt, 0,
+                    N_("don't trap seg faults (useful for debugging)")},
   {0,               0, 0, 0}
 };
 
@@ -175,6 +183,16 @@ get_array_size(void)
   return (i - 1);
 }
 
+/* Buffer used for setjmp/longjmp. */
+static jmp_buf jump_buffer;
+
+/* Our SIGSEGV handler, which jumps back into do_test_num(), which see for
+   more information. */
+static void
+crash_handler(int signum)
+{
+  longjmp(jump_buffer, 1);
+}
 
 
 /* Execute a test number TEST_NUM.  Pretty-print test name and dots
@@ -207,21 +225,46 @@ do_test_num(const char *progname,
   skip = desc->mode == svn_test_skip;
   xfail = desc->mode == svn_test_xfail;
   wimp = xfail && desc->wip;
-
-  /* Do test */
   msg = desc->msg;
-  if (msg_only || skip)
-    ; /* pass */
-  else if (desc->func2)
-    err = (*desc->func2)(pool);
+
+  if (!allow_segfaults)
+    {
+      /* Catch a crashing test, so we don't interrupt the rest of 'em. */
+      apr_signal(SIGSEGV, crash_handler);
+    }
+
+  /* We use setjmp/longjmp to recover from the crash.  setjmp() essentially
+     establishes a rollback point, and longjmp() goes back to that point.
+     When we invoke longjmp(), it instructs setjmp() to return non-zero,
+     so we don't end up in an infinite loop.
+
+     If we've got non-zero from setjmp(), we know we've crashed. */
+  if (setjmp(jump_buffer) == 0)
+    {
+      /* Do test */
+      if (msg_only || skip)
+        ; /* pass */
+      else if (desc->func2)
+        err = (*desc->func2)(pool);
+      else
+        err = (*desc->func_opts)(opts, pool);
+
+      if (err && err->apr_err == SVN_ERR_TEST_SKIPPED)
+        {
+          svn_error_clear(err);
+          err = SVN_NO_ERROR;
+          skip = TRUE;
+        }
+    }
   else
-    err = (*desc->func_opts)(opts, pool);
+    err = svn_error_create(SVN_ERR_TEST_FAILED, NULL,
+                           "Test crashed "
+                           "(run in debugger with '--allow-segfaults')");
 
-  if (err && err->apr_err == SVN_ERR_TEST_SKIPPED)
+  if (!allow_segfaults)
     {
-      svn_error_clear(err);
-      err = SVN_NO_ERROR;
-      skip = TRUE;
+      /* Now back to your regularly scheduled program... */
+      apr_signal(SIGSEGV, SIG_DFL);
     }
 
   /* Failure means unexpected results -- FAIL or XPASS. */
@@ -260,7 +303,7 @@ do_test_num(const char *progname,
 
   if (msg)
     {
-      int len = strlen(msg);
+      size_t len = strlen(msg);
       if (len > 50)
         printf("WARNING: Test docstring exceeds 50 characters\n");
       if (msg[len - 1] == '.')
@@ -370,6 +413,9 @@ main(int argc, const char *argv[])
         case quiet_opt:
           quiet_mode = TRUE;
           break;
+        case allow_segfault_opt:
+          allow_segfaults = TRUE;
+          break;
         case server_minor_version_opt:
           {
             char *end;

Modified: subversion/branches/diff-optimizations-bytes/tools/dev/svn-dev.el
URL: 
http://svn.apache.org/viewvc/subversion/branches/diff-optimizations-bytes/tools/dev/svn-dev.el?rev=1053489&r1=1053488&r2=1053489&view=diff
==============================================================================
--- subversion/branches/diff-optimizations-bytes/tools/dev/svn-dev.el (original)
+++ subversion/branches/diff-optimizations-bytes/tools/dev/svn-dev.el Wed Dec 
29 00:10:25 2010
@@ -152,15 +152,18 @@ Inhibit backup files unless `vc-make-bac
 ;;; Net if you don't have a local copy, but it requires a very recent
 ;;; version of Emacs, so I didn't bother with it here.  -kfogel)
 
-(defvar svn-source-tree-top (expand-file-name "~/projects/svn/")
-  "*Top directory of your Subversion source tree.  You almost
-certainly want to set this in your .emacs, to override the default;
-use `(setq svn-source-tree-top \"/path/to/the/tree\")'.")
+(defvar svn-site-source-tree-top (expand-file-name "~/projects/svn/site/")
+  "*Top directory of your Subversion site source tree of
+repository \"http://svn.apache.org/repos/asf/subversion/site\";.
+You almost certainly want to set this in your .emacs, to override
+the default; use `(setq svn-site-source-tree-top
+\"/path/to/the/site/tree\")'.")
 
-(defvar svn-faq-file (concat svn-source-tree-top "/www/faq.html")
+(defvar svn-faq-file (concat svn-site-source-tree-top "/publish/faq.html")
   "*A local copy of the Subversion FAQ.")
 
-(defvar svn-hacking-file (concat svn-source-tree-top "/www/hacking.html")
+(defvar svn-hacking-file (concat svn-site-source-tree-top 
+                                 "/docs/community-guide/community-guide.html")
   "*A local copy of the Subversion hacking.html file.")
 
 ;; Helper for referring to issue numbers in a user-friendly way.
@@ -188,11 +191,13 @@ the resulting URL."
              (start (car bounds))
              (end   (cdr bounds)))
         (delete-region start end)))
-  (insert (format "http://svn.collab.net/viewcvs/svn?rev=%s&view=rev"; rev)))
+  (insert (format "http://svn.apache.org/viewcvs?view=revision&revision=%s"; 
+                  rev)))
 
-(defconst svn-url-base "http://subversion.tigris.org/";)
+(defconst svn-url-base "http://subversion.apache.org/";)
 (defconst svn-faq-url (concat svn-url-base "faq.html"))
-(defconst svn-hacking-url (concat svn-url-base "hacking.html"))
+(defconst svn-hacking-url (concat svn-url-base 
+                                  "docs/community-guide/community-guide.html"))
 
 (defun svn-html-get-targets (file)
   "Build a list of targets for the Subversion web file FILE."

Modified: 
subversion/branches/diff-optimizations-bytes/tools/dev/unix-build/Makefile.svn
URL: 
http://svn.apache.org/viewvc/subversion/branches/diff-optimizations-bytes/tools/dev/unix-build/Makefile.svn?rev=1053489&r1=1053488&r2=1053489&view=diff
==============================================================================
--- 
subversion/branches/diff-optimizations-bytes/tools/dev/unix-build/Makefile.svn 
(original)
+++ 
subversion/branches/diff-optimizations-bytes/tools/dev/unix-build/Makefile.svn 
Wed Dec 29 00:10:25 2010
@@ -1044,7 +1044,7 @@ HTTPD_CMD = env LD_LIBRARY_PATH=$(LD_LIB
                        $(PREFIX)/httpd/bin/apachectl \
                        -f conf/httpd-svn-check-$(WC).conf
 HTTPD_START_CMD = $(HTTPD_CMD) -k start
-HTTPD_STOP_CMD = $(HTTPD_CMD) -k stop
+HTTPD_STOP_CMD = $(HTTPD_CMD) -k stop; sleep 3
 
 SVNSERVE_START_CMD = $(SVN_PREFIX)/bin/svnserve \
                        --listen-host 127.0.0.1 \
@@ -1061,7 +1061,6 @@ start-httpd: httpd-conf
 
 stop-httpd:
        $(HTTPD_STOP_CMD)
-       sleep 3
 
 start-svnserve: $(SVN_OBJDIR)/.compiled
        $(SVNSERVE_START_CMD)

Modified: subversion/branches/diff-optimizations-bytes/tools/po/l10n-report.py
URL: 
http://svn.apache.org/viewvc/subversion/branches/diff-optimizations-bytes/tools/po/l10n-report.py?rev=1053489&r1=1053488&r2=1053489&view=diff
==============================================================================
--- subversion/branches/diff-optimizations-bytes/tools/po/l10n-report.py 
(original)
+++ subversion/branches/diff-optimizations-bytes/tools/po/l10n-report.py Wed 
Dec 29 00:10:25 2010
@@ -59,9 +59,9 @@ def usage_and_exit(errmsg=None):
 
 
 class l10nReport:
-    def __init__(self, to_email_id="[email protected]"):
+    def __init__(self, to_email_id=""):
         self.to_email_id = to_email_id
-        self.from_email_id = "<[email protected]>"
+        self.from_email_id = "<[email protected]>"
 
     def safe_command(self, cmd_and_args, cmd_in=""):
         [stdout, stderr] = subprocess.Popen(cmd_and_args, \
@@ -148,7 +148,7 @@ def main():
         sys.exit(0)
 
     po_dir = 'subversion/po'
-    branch_name = l10n.match('URL:.*/svn/(\S+)', info_out)
+    branch_name = l10n.match('URL:.*/asf/subversion/(\S+)', info_out)
     [info_out, info_err] = l10n.safe_command(['svnversion', po_dir])
     if info_err:
         sys.stderr.write("\nError: %s\n" % info_err)
@@ -156,7 +156,7 @@ def main():
         sys.exit(0)
 
     wc_version = re.sub('[MS]', '', info_out)
-    title = "Translation status report for %s r%s" % \
+    title = "Translation status report for %...@r%s" % \
                (branch_name, wc_version)
 
     os.chdir(po_dir)
@@ -178,7 +178,7 @@ def main():
         print(po_format)
 
     if to_email_id:
-        email_from = "From: SVN DEV <[email protected]>"
+        email_from = "From: SVN DEV <[email protected]>"
         email_to = "To: %s" % to_email_id
         email_sub = "Subject: [l10n] Translation status report for %s r%s" \
                      % (branch_name, wc_version)

Modified: 
subversion/branches/diff-optimizations-bytes/tools/server-side/svn-populate-node-origins-index.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/diff-optimizations-bytes/tools/server-side/svn-populate-node-origins-index.c?rev=1053489&r1=1053488&r2=1053489&view=diff
==============================================================================
--- 
subversion/branches/diff-optimizations-bytes/tools/server-side/svn-populate-node-origins-index.c
 (original)
+++ 
subversion/branches/diff-optimizations-bytes/tools/server-side/svn-populate-node-origins-index.c
 Wed Dec 29 00:10:25 2010
@@ -120,8 +120,8 @@ build_index(const char *repos_path, apr_
 {
   svn_repos_t *repos;
   svn_fs_t *fs;
-  svn_revnum_t youngest_rev;
-  int i, slotsize;
+  svn_revnum_t youngest_rev, i;
+  size_t slotsize;
   const char *progress_fmt;
   apr_pool_t *subpool;
 
@@ -134,9 +134,12 @@ build_index(const char *repos_path, apr_
   /* Fetch the youngest revision of the repository. */
   SVN_ERR(svn_fs_youngest_rev(&youngest_rev, fs, pool));
   slotsize = strlen(apr_ltoa(pool, youngest_rev));
-  progress_fmt = apr_psprintf(pool,
-                              "[%%%dd/%%%dd]  Found %%d new lines of history."
-                              "\n", slotsize, slotsize);
+  progress_fmt = apr_psprintf
+                   (pool,
+                    "[%%%" APR_SIZE_T_FMT "ld"
+                    "/%%%" APR_SIZE_T_FMT "ld]  "
+                    "Found %%d new lines of history."
+                    "\n", slotsize, slotsize);
 
   /* Now, iterate over all the revisions, calling index_revision_adds(). */
   subpool = svn_pool_create(pool);


Reply via email to