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

svn commit: r930648 [3/3] - in /subversion/branches/svn-patch-improvements: ./ build/generator/ build/generator/templates/ notes/wc-ng/ subversion/bindings/javahl/native/ subversion/include/ subversion/include/private/ subversion/libsvn_client/ subvers...

Modified: subversion/branches/svn-patch-improvements/subversion/tests/cmdline/svnadmin_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/subversion/tests/cmdline/svnadmin_tests.py?rev=930648&r1=930647&r2=930648&view=diff
==============================================================================
--- subversion/branches/svn-patch-improvements/subversion/tests/cmdline/svnadmin_tests.py (original)
+++ subversion/branches/svn-patch-improvements/subversion/tests/cmdline/svnadmin_tests.py Sun Apr  4 09:09:34 2010
@@ -1106,6 +1106,95 @@ def drop_mergeinfo_outside_of_dump_strea
                                      'propget', 'svn:mergeinfo', '-R',
                                      sbox.repo_url)
 
+#----------------------------------------------------------------------
+# Even *more* testing for issue #3020 'Reflect dropped/renumbered
+# revisions in svn:mergeinfo data during svnadmin load'
+#
+# Filtering revsions from mergeinfo in a load stream that refers to
+# history outside of the stream is all well and good if the load
+# is a partial dump loaded in one shot...but if a repository's full
+# history is dumped incrementally and each incremental dump is loaded,
+# well then, *any* filtering done then is removing valid mergeinfo...
+#
+# ...and currently we do exactly that, as this test demonstrates.
+#
+# Note: If a repository is *partially* dumped in a sequence of incremental
+# dumps then possibly some mergeinfo should be filtered on the load, but
+# not *all* mergeinfo, which is what we are doing in that case too.
+def dont_drop_valid_mergeinfo_during_incremental_loads(sbox):
+  "don't filter mergeinfo revs from incremental dump"
+
+  # Create an empty repos.
+  test_create(sbox)
+
+  # Load the test repository to the first repos in a single load.
+  #
+  # Note: The test repository 'mergeinfo_included_full.dump' is the full
+  # repos diagramed in the test drop_mergeinfo_outside_of_dump_stream.
+  dumpfile1 = svntest.main.file_read(
+    os.path.join(os.path.dirname(sys.argv[0]),
+                 'svnadmin_tests_data',
+                 'mergeinfo_included_full.dump'))
+  load_and_verify_dumpstream(sbox, [], [], None, dumpfile1, '--ignore-uuid')
+
+  # Check that the mergeinfo is as expected.
+  url = sbox.repo_url + '/branches/'
+  expected_output = svntest.verify.UnorderedOutput([
+    url + "B1 - /branches/B2:11-12\n",
+    "/trunk:6,9\n",
+    url + "B2 - /trunk:9\n",
+    url + "B1/B/E - /branches/B2/B/E:11-12\n",
+    "/trunk/B/E:5-6,8-9\n"])
+  svntest.actions.run_and_verify_svn(None, expected_output, [],
+                                     'propget', 'svn:mergeinfo', '-R',
+                                     sbox.repo_url)  
+
+  # Now incrementally dump that repository into three dump files:
+  dump_file_r1_10 = svntest.main.temp_dir + "-r1-10.dump"
+  exit_code, output, errput = svntest.main.run_svnadmin(
+    'dump', sbox.repo_dir, '-r1:10')
+  dump_fp = open(dump_file_r1_10, 'wb')
+  dump_fp.writelines(output)
+  dump_fp.close()
+
+  dump_file_r11_13 = svntest.main.temp_dir + "-r11-13.dump"
+  exit_code, output, errput = svntest.main.run_svnadmin(
+    'dump', sbox.repo_dir, '--incremental', '-r11:13')
+  dump_fp = open(dump_file_r11_13, 'wb')
+  dump_fp.writelines(output)
+  dump_fp.close()
+
+  dump_file_r14_15 = svntest.main.temp_dir + "-r14-15.dump"
+  exit_code, output, errput = svntest.main.run_svnadmin(
+    'dump', sbox.repo_dir, '--incremental', '-r14:15')
+  dump_fp = open(dump_file_r14_15, 'wb')
+  dump_fp.writelines(output)
+  dump_fp.close()
+
+  # Blow away the current repos and create an empty one in its place.
+  test_create(sbox)
+
+  # Load the three incremental dump files in sequence.
+  load_and_verify_dumpstream(sbox, [], [], None,
+                             svntest.main.file_read(dump_file_r1_10),
+                             '--ignore-uuid')
+  load_and_verify_dumpstream(sbox, [], [], None,
+                             svntest.main.file_read(dump_file_r11_13),
+                             '--ignore-uuid')
+  load_and_verify_dumpstream(sbox, [], [], None,
+                             svntest.main.file_read(dump_file_r14_15),
+                             '--ignore-uuid')
+
+  # Check the mergeinfo, we use the same expected output as before,
+  # as it (duh!) should be exactly the same as when we loaded the
+  # repos in one shot.
+  #
+  # Currently this test is set as XFail, because the mergeinfo filtering
+  # logic in load is removing valid mergeinfo.
+  svntest.actions.run_and_verify_svn(None, expected_output, [],
+                                     'propget', 'svn:mergeinfo', '-R',
+                                     sbox.repo_url)
+
 ########################################################################
 # Run the tests
 
@@ -1134,6 +1223,7 @@ test_list = [ None,
               SkipUnless(verify_with_invalid_revprops,
                          svntest.main.is_fs_type_fsfs),
               drop_mergeinfo_outside_of_dump_stream,
+              XFail(dont_drop_valid_mergeinfo_during_incremental_loads),
              ]
 
 if __name__ == '__main__':

Modified: subversion/branches/svn-patch-improvements/subversion/tests/cmdline/trans_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/subversion/tests/cmdline/trans_tests.py?rev=930648&r1=930647&r2=930648&view=diff
==============================================================================
--- subversion/branches/svn-patch-improvements/subversion/tests/cmdline/trans_tests.py (original)
+++ subversion/branches/svn-patch-improvements/subversion/tests/cmdline/trans_tests.py Sun Apr  4 09:09:34 2010
@@ -790,6 +790,92 @@ def propset_revert_noerror(sbox):
   svntest.actions.run_and_verify_status(wc_dir, expected_status)
 
 
+def props_only_file_update(sbox):
+  "retranslation occurs on a props-only update"
+
+  sbox.build()
+  wc_dir = sbox.wc_dir
+
+  iota_path = os.path.join(wc_dir, 'iota')
+  content = ["This is the file 'iota'.\n",
+             "$Author$\n",
+             ]
+  content_expanded = ["This is the file 'iota'.\n",
+                      "$Author: jrandom $\n",
+                      ]
+
+  # Create r2 with iota's contents and svn:keywords modified
+  open(iota_path, 'w').writelines(content)
+  svntest.main.run_svn(None, 'propset', 'svn:keywords', 'Author', iota_path)
+
+  expected_output = wc.State(wc_dir, {
+    'iota' : Item(verb='Sending'),
+    })
+
+  expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
+  expected_status.tweak('iota', wc_rev=2)
+
+  svntest.actions.run_and_verify_commit(wc_dir,
+                                        expected_output,
+                                        expected_status,
+                                        None,
+                                        wc_dir)
+
+  # Create r3 that drops svn:keywords
+
+  # put the content back to its untranslated form
+  open(iota_path, 'w').writelines(content)
+
+  svntest.main.run_svn(None, 'propset', 'svn:keywords', 'Id', iota_path)
+
+#  expected_output = wc.State(wc_dir, {
+#    'iota' : Item(verb='Sending'),
+#    })
+
+  expected_status.tweak('iota', wc_rev=3)
+
+  svntest.actions.run_and_verify_commit(wc_dir,
+                                        expected_output,
+                                        expected_status,
+                                        None,
+                                        wc_dir)
+
+  # Now, go back to r2. iota should have the Author keyword expanded.
+  expected_disk = svntest.main.greek_state.copy()
+  expected_disk.tweak('iota', contents=''.join(content_expanded))
+
+  expected_status = svntest.actions.get_virginal_state(wc_dir, 2)
+
+  svntest.actions.run_and_verify_update(wc_dir,
+                                        None, None, expected_status,
+                                        None,
+                                        None, None, None, None,
+                                        False,
+                                        wc_dir, '-r', '2')
+
+  # Update to r3. this should retranslate iota, dropping the keyword expansion
+  expected_disk = svntest.main.greek_state.copy()
+  expected_disk.tweak('iota', contents=''.join(content))
+
+  expected_status = svntest.actions.get_virginal_state(wc_dir, 3)
+
+  svntest.actions.run_and_verify_update(wc_dir,
+                                        None, expected_disk, expected_status,
+                                        None,
+                                        None, None, None, None,
+                                        False,
+                                        wc_dir)
+
+  # We used to leave some temporary files around. Make sure that we don't.
+  temps = os.listdir(os.path.join(wc_dir, '.svn', 'tmp'))
+  temps.remove('prop-base')
+  temps.remove('props')
+  temps.remove('text-base')
+  if temps:
+    print('Temporary files leftover: %s' % (', '.join(temps),))
+    raise svntest.Failure
+
+
 ########################################################################
 # Run the tests
 
@@ -807,6 +893,7 @@ test_list = [ None,
               copy_propset_commit,
               propset_commit_checkout_nocrash,
               propset_revert_noerror,
+              props_only_file_update,
              ]
 
 if __name__ == '__main__':

Modified: subversion/branches/svn-patch-improvements/tools/dev/wc-ng/count-progress.py
URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/tools/dev/wc-ng/count-progress.py?rev=930648&r1=930647&r2=930648&view=diff
==============================================================================
--- subversion/branches/svn-patch-improvements/tools/dev/wc-ng/count-progress.py (original)
+++ subversion/branches/svn-patch-improvements/tools/dev/wc-ng/count-progress.py Sun Apr  4 09:09:34 2010
@@ -33,6 +33,7 @@ TERMS = ['svn_wc_adm_access_t',
          'log_accum',
          'svn_wc__wq_add_loggy',
          'svn_wc__db_temp_',
+         'svn_wc__db_node_hidden',
          ]