subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From julianf...@apache.org
Subject svn commit: r1706963 [6/6] - in /subversion/branches/move-tracking-2: ./ build/ subversion/ subversion/bindings/javahl/native/ subversion/include/ subversion/include/private/ subversion/libsvn_client/ subversion/libsvn_diff/ subversion/libsvn_fs_base/ ...
Date Tue, 06 Oct 2015 08:46:44 GMT
Modified: subversion/branches/move-tracking-2/subversion/tests/cmdline/svnadmin_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/tests/cmdline/svnadmin_tests.py?rev=1706963&r1=1706962&r2=1706963&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/tests/cmdline/svnadmin_tests.py (original)
+++ subversion/branches/move-tracking-2/subversion/tests/cmdline/svnadmin_tests.py Tue Oct
 6 08:46:43 2015
@@ -3202,6 +3202,48 @@ def dump_revprops(sbox):
   svntest.actions.run_and_verify_svnlook(log_msg, [], 'log', '-r1',
                                          sbox.repo_dir)
 
+@XFail()
+@Issue(4598)
+def dump_no_op_change(sbox):
+  "svnadmin dump with no-op changes"
+
+  sbox.build(create_wc=False, empty=True)
+  empty_file = sbox.get_tempname()
+  svntest.main.file_write(empty_file, '')
+
+  svntest.actions.run_and_verify_svnmucc(None, [],
+                                         '-U', sbox.repo_url,
+                                         '-m', svntest.main.make_log_msg(),
+                                         'put', empty_file, 'bar')
+  # Commit a no-op change.
+  svntest.actions.run_and_verify_svnmucc(None, [],
+                                         '-U', sbox.repo_url,
+                                         '-m', svntest.main.make_log_msg(),
+                                         'put', empty_file, 'bar')
+  # Dump and load the repository.
+  _, dump, _ = svntest.actions.run_and_verify_svnadmin(None, [],
+                                                       'dump', '-q',
+                                                       sbox.repo_dir)
+  sbox2 = sbox.clone_dependent()
+  sbox2.build(create_wc=False, empty=True)
+  load_and_verify_dumpstream(sbox2, None, [], None, False, dump)
+
+  # We expect svn log -v to yield identical results for both original and
+  # reconstructed repositories.  This used to fail as described in the
+  # Issue 4598 (https://issues.apache.org/jira/browse/SVN-4598), at least
+  # around r1706415.
+  #
+  # Test svn log -v for r2:
+  _, expected, _ = svntest.actions.run_and_verify_svn(None, [], 'log', '-v',
+                                                      '-r2', sbox.repo_url)
+  svntest.actions.run_and_verify_svn(expected, [], 'log',  '-v',
+                                     '-r2', sbox2.repo_url)
+  # Test svn log -v for /bar:
+  _, expected, _ = svntest.actions.run_and_verify_svn(None, [], 'log', '-v',
+                                                      sbox.repo_url + '/bar')
+  svntest.actions.run_and_verify_svn(expected, [], 'log',  '-v',
+                                     sbox2.repo_url + '/bar')
+
 ########################################################################
 # Run the tests
 
@@ -3261,7 +3303,8 @@ test_list = [ None,
               hotcopy_read_only,
               fsfs_pack_non_sharded,
               load_revprops,
-              dump_revprops
+              dump_revprops,
+              dump_no_op_change
              ]
 
 if __name__ == '__main__':

Modified: subversion/branches/move-tracking-2/subversion/tests/cmdline/svnfsfs_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/tests/cmdline/svnfsfs_tests.py?rev=1706963&r1=1706962&r2=1706963&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/tests/cmdline/svnfsfs_tests.py (original)
+++ subversion/branches/move-tracking-2/subversion/tests/cmdline/svnfsfs_tests.py Tue Oct
 6 08:46:43 2015
@@ -182,6 +182,7 @@ def test_stats(sbox):
                            '.*\d+ bytes in .*\d+ representations of added file nodes',
                            '.*\d+ bytes in .*\d+ directory property representations',
                            '.*\d+ bytes in .*\d+ file property representations',
+                           '.*\d+ average delta chain length',
                            '.*\d+ bytes in header & footer overhead' ],
     '.* representation statistics:' : 
                           ['.*\d+ bytes in .*\d+ reps',
@@ -189,7 +190,8 @@ def test_stats(sbox):
                            '.*\d+ bytes expanded size',
                            '.*\d+ bytes expanded shared size',
                            '.*\d+ bytes with rep-sharing off',
-                           '.*\d+ shared references' ],
+                           '.*\d+ shared references',
+                           '.*\d+ average delta chain length'],
     'Largest.*:'        : ['.*\d+ r\d+ */\S*'],
     'Extensions by number .*:' :
                           ['.*\d+ \( ?\d+%\) representations'],
@@ -286,7 +288,13 @@ def load_index_sharded(sbox):
       columns.append("junk")
       items[i] = ' '.join(columns) + "\n"
 
-  # first entry is for rev 1, pack starts at rev 0, though
+  # first entry shall be for rev 1, pack starts at rev 0, though
+  for i in range(0, len(items)):
+    if items[i].split()[3] == "1":
+      if i != 1:
+        items[i],items[1] = items[1],items[i]
+      break
+
   assert(items[1].split()[3] == "1")
 
   # Reload the index

Modified: subversion/branches/move-tracking-2/subversion/tests/libsvn_client/client-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/tests/libsvn_client/client-test.c?rev=1706963&r1=1706962&r2=1706963&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/tests/libsvn_client/client-test.c (original)
+++ subversion/branches/move-tracking-2/subversion/tests/libsvn_client/client-test.c Tue Oct
 6 08:46:43 2015
@@ -34,6 +34,7 @@
 #include "private/svn_client_mtcc.h"
 #include "svn_repos.h"
 #include "svn_subst.h"
+#include "private/svn_sorts_private.h"
 #include "private/svn_wc_private.h"
 #include "svn_props.h"
 #include "svn_hash.h"
@@ -1014,8 +1015,7 @@ test_remote_only_status(const svn_test_o
   SVN_TEST_ASSERT(results->nelts == i);
 
   if (opts->verbose)
-    qsort(results->elts, results->nelts, results->elt_size,
-          compare_status_paths);
+    svn_sort__array(results, compare_status_paths);
 
   for (i = 0; i < results->nelts; ++i)
     {

Modified: subversion/branches/move-tracking-2/subversion/tests/libsvn_diff/parse-diff-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/tests/libsvn_diff/parse-diff-test.c?rev=1706963&r1=1706962&r2=1706963&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/tests/libsvn_diff/parse-diff-test.c (original)
+++ subversion/branches/move-tracking-2/subversion/tests/libsvn_diff/parse-diff-test.c Tue
Oct  6 08:46:43 2015
@@ -471,8 +471,10 @@ test_parse_git_diff(apr_pool_t *pool)
   SVN_TEST_STRING_ASSERT(patch->new_filename, "A/C/gamma");
   SVN_TEST_ASSERT(patch->operation == svn_diff_op_modified);
   SVN_TEST_ASSERT(patch->hunks->nelts == 1);
-  SVN_TEST_ASSERT(patch->old_executable_p = svn_tristate_false);
-  SVN_TEST_ASSERT(patch->new_executable_p = svn_tristate_true);
+  SVN_TEST_ASSERT(patch->old_executable_bit = svn_tristate_false);
+  SVN_TEST_ASSERT(patch->new_executable_bit = svn_tristate_true);
+  SVN_TEST_ASSERT(patch->old_symlink_bit = svn_tristate_false);
+  SVN_TEST_ASSERT(patch->new_symlink_bit = svn_tristate_false);
 
   hunk = APR_ARRAY_IDX(patch->hunks, 0, svn_diff_hunk_t *);
 
@@ -508,8 +510,10 @@ test_parse_git_diff(apr_pool_t *pool)
   SVN_TEST_STRING_ASSERT(patch->new_filename, "new");
   SVN_TEST_ASSERT(patch->operation == svn_diff_op_added);
   SVN_TEST_ASSERT(patch->hunks->nelts == 0);
-  SVN_TEST_ASSERT(patch->old_executable_p = svn_tristate_unknown);
-  SVN_TEST_ASSERT(patch->new_executable_p = svn_tristate_false);
+  SVN_TEST_ASSERT(patch->old_executable_bit = svn_tristate_unknown);
+  SVN_TEST_ASSERT(patch->new_executable_bit = svn_tristate_false);
+  SVN_TEST_ASSERT(patch->old_symlink_bit = svn_tristate_unknown);
+  SVN_TEST_ASSERT(patch->new_symlink_bit = svn_tristate_false);
 
   SVN_ERR(svn_diff_close_patch_file(patch_file, pool));
 
@@ -535,8 +539,10 @@ test_parse_git_tree_and_text_diff(apr_po
   SVN_TEST_ASSERT(patch);
   SVN_TEST_STRING_ASSERT(patch->old_filename, "iota");
   SVN_TEST_STRING_ASSERT(patch->new_filename, "iota.copied");
-  SVN_TEST_ASSERT(patch->old_executable_p = svn_tristate_false);
-  SVN_TEST_ASSERT(patch->new_executable_p = svn_tristate_true);
+  SVN_TEST_ASSERT(patch->old_executable_bit = svn_tristate_false);
+  SVN_TEST_ASSERT(patch->new_executable_bit = svn_tristate_true);
+  SVN_TEST_ASSERT(patch->old_symlink_bit = svn_tristate_false);
+  SVN_TEST_ASSERT(patch->new_symlink_bit = svn_tristate_false);
   SVN_TEST_ASSERT(patch->operation == svn_diff_op_copied);
   SVN_TEST_ASSERT(patch->hunks->nelts == 1);
 
@@ -559,8 +565,10 @@ test_parse_git_tree_and_text_diff(apr_po
   SVN_TEST_ASSERT(patch);
   SVN_TEST_STRING_ASSERT(patch->old_filename, "A/mu");
   SVN_TEST_STRING_ASSERT(patch->new_filename, "A/mu.moved");
-  SVN_TEST_ASSERT(patch->old_executable_p = svn_tristate_false);
-  SVN_TEST_ASSERT(patch->new_executable_p = svn_tristate_true);
+  SVN_TEST_ASSERT(patch->old_executable_bit = svn_tristate_false);
+  SVN_TEST_ASSERT(patch->new_executable_bit = svn_tristate_true);
+  SVN_TEST_ASSERT(patch->old_symlink_bit = svn_tristate_false);
+  SVN_TEST_ASSERT(patch->new_symlink_bit = svn_tristate_false);
   SVN_TEST_ASSERT(patch->operation == svn_diff_op_moved);
   SVN_TEST_ASSERT(patch->hunks->nelts == 1);
 
@@ -604,8 +612,10 @@ test_parse_git_tree_and_text_diff(apr_po
   SVN_TEST_STRING_ASSERT(patch->new_filename, "/dev/null");
   SVN_TEST_ASSERT(patch->operation == svn_diff_op_deleted);
   SVN_TEST_ASSERT(patch->hunks->nelts == 1);
-  SVN_TEST_ASSERT(patch->old_executable_p = svn_tristate_true);
-  SVN_TEST_ASSERT(patch->new_executable_p = svn_tristate_unknown);
+  SVN_TEST_ASSERT(patch->old_executable_bit = svn_tristate_true);
+  SVN_TEST_ASSERT(patch->new_executable_bit = svn_tristate_unknown);
+  SVN_TEST_ASSERT(patch->old_symlink_bit = svn_tristate_false);
+  SVN_TEST_ASSERT(patch->new_symlink_bit = svn_tristate_unknown);
 
   hunk = APR_ARRAY_IDX(patch->hunks, 0, svn_diff_hunk_t *);
 

Modified: subversion/branches/move-tracking-2/subversion/tests/libsvn_fs_fs/fs-fs-private-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/tests/libsvn_fs_fs/fs-fs-private-test.c?rev=1706963&r1=1706962&r2=1706963&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/tests/libsvn_fs_fs/fs-fs-private-test.c
(original)
+++ subversion/branches/move-tracking-2/subversion/tests/libsvn_fs_fs/fs-fs-private-test.c
Tue Oct  6 08:46:43 2015
@@ -105,6 +105,10 @@ verify_representation_stats(const svn_fs
   SVN_TEST_ASSERT(stats->references == stats->total.count);
   SVN_TEST_ASSERT(stats->expanded_size == stats->total.expanded_size);
 
+  /* Reasonable delta chain lengths */
+  SVN_TEST_ASSERT(   stats->chain_len >= stats->total.count
+                  && stats->chain_len <= 5 * stats->total.count);
+
   return SVN_NO_ERROR;
 }
 

Modified: subversion/branches/move-tracking-2/subversion/tests/libsvn_subr/bit-array-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/tests/libsvn_subr/bit-array-test.c?rev=1706963&r1=1706962&r2=1706963&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/tests/libsvn_subr/bit-array-test.c (original)
+++ subversion/branches/move-tracking-2/subversion/tests/libsvn_subr/bit-array-test.c Tue
Oct  6 08:46:43 2015
@@ -71,7 +71,12 @@ test_get_set(apr_pool_t *pool)
 
   /* Verify pattern */
   for (i = min; i < max; ++i)
-    SVN_TEST_ASSERT(svn_bit_array__get(array, i) == i % 2);
+    {
+      if (i % 2)
+        SVN_TEST_ASSERT(svn_bit_array__get(array, i) == TRUE);
+      else
+        SVN_TEST_ASSERT(svn_bit_array__get(array, i) == FALSE);
+    }
 
   /* Zero the zeros in the pattern -> should be no change. */
   for (i = min; i < max; ++i)
@@ -80,18 +85,36 @@ test_get_set(apr_pool_t *pool)
 
   /* Verify pattern */
   for (i = min; i < max; ++i)
-    SVN_TEST_ASSERT(svn_bit_array__get(array, i) == i % 2);
+    {
+      if (i % 2)
+        SVN_TEST_ASSERT(svn_bit_array__get(array, i) == TRUE);
+      else
+        SVN_TEST_ASSERT(svn_bit_array__get(array, i) == FALSE);
+    }
 
   /* Write an inverted pattern while verifying the old one. */
   for (i = min; i < max; ++i)
     {
-      SVN_TEST_ASSERT(svn_bit_array__get(array, i) == i % 2);
-      svn_bit_array__set(array, i, 1 - (i % 2));
+      if (i % 2)
+        {
+          SVN_TEST_ASSERT(svn_bit_array__get(array, i) == TRUE);
+          svn_bit_array__set(array, i, FALSE);
+        }
+      else
+        {
+          SVN_TEST_ASSERT(svn_bit_array__get(array, i) == FALSE);
+          svn_bit_array__set(array, i, TRUE);
+        }
     }
 
   /* Verify pattern */
   for (i = min; i < max; ++i)
-    SVN_TEST_ASSERT(svn_bit_array__get(array, i) == 1 - (i % 2));
+    {
+      if (i % 2)
+        SVN_TEST_ASSERT(svn_bit_array__get(array, i) == FALSE);
+      else
+        SVN_TEST_ASSERT(svn_bit_array__get(array, i) == TRUE);
+    }
 
   return SVN_NO_ERROR;
 }
@@ -116,7 +139,12 @@ test_sparse(apr_pool_t *pool)
   /* Verify pattern */
   for (i = 0; i < 15; ++i)
     for (k = i * SCALE + min; k < i * SCALE +  max; ++k)
-      SVN_TEST_ASSERT(svn_bit_array__get(array, k) == k % 2);
+      {
+        if (k % 2)
+          SVN_TEST_ASSERT(svn_bit_array__get(array, k) == TRUE);
+        else
+          SVN_TEST_ASSERT(svn_bit_array__get(array, k) == FALSE);
+      }
 
   return SVN_NO_ERROR;
 }

Modified: subversion/branches/move-tracking-2/win-tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/win-tests.py?rev=1706963&r1=1706962&r2=1706963&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/win-tests.py (original)
+++ subversion/branches/move-tracking-2/win-tests.py Tue Oct  6 08:46:43 2015
@@ -241,7 +241,7 @@ for opt, val in opts:
     enable_sasl = 1
     base_url = "svn://localhost/"
   elif opt == '--server-minor-version':
-    server_minor_version = val
+    server_minor_version = int(val)
   elif opt == '--bin':
     svn_bin = val
   elif opt in ('-p', '--parallel'):

Propchange: subversion/branches/move-tracking-2/win-tests.py
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Oct  6 08:46:43 2015
@@ -86,4 +86,4 @@
 /subversion/branches/verify-at-commit/win-tests.py:1462039-1462408
 /subversion/branches/verify-keep-going/win-tests.py:1439280-1546110
 /subversion/branches/wc-collate-path/win-tests.py:1402685-1480384
-/subversion/trunk/win-tests.py:1606692-1704317
+/subversion/trunk/win-tests.py:1606692-1706962



Mime
View raw message