You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by br...@apache.org on 2014/04/30 01:10:27 UTC

svn commit: r1591140 [3/3] - in /subversion/branches/1.8.x-issue4437: ./ build/ac-macros/ build/generator/ subversion/bindings/javahl/native/ subversion/bindings/swig/ subversion/bindings/swig/ruby/libsvn_swig_ruby/ subversion/bindings/swig/ruby/test/ ...

Modified: subversion/branches/1.8.x-issue4437/subversion/tests/cmdline/merge_automatic_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x-issue4437/subversion/tests/cmdline/merge_automatic_tests.py?rev=1591140&r1=1591139&r2=1591140&view=diff
==============================================================================
--- subversion/branches/1.8.x-issue4437/subversion/tests/cmdline/merge_automatic_tests.py (original)
+++ subversion/branches/1.8.x-issue4437/subversion/tests/cmdline/merge_automatic_tests.py Tue Apr 29 23:10:25 2014
@@ -1202,6 +1202,132 @@ def effective_sync_results_in_reintegrat
   svntest.actions.run_and_verify_svn(None, expected_output, [], 'merge',
                                      sbox.repo_url + '/branch', A_path)
 
+@Issue(4481)
+def reintegrate_subtree_not_updated(sbox):
+  "reintegrate subtree not updated"
+
+  sbox.build()
+
+  # Create change on branch 'D_1'
+  sbox.simple_copy('A/D', 'D_1')
+  sbox.simple_commit()
+  sbox.simple_append('D_1/G/pi', "D_1/G pi edit\n")
+  sbox.simple_append('D_1/H/chi', "D_1/H chi edit\n")
+  sbox.simple_commit()
+
+  # Merge back to 'D' with two subtree merges
+  expected_output = [
+    "--- Merging r2 through r3 into '"
+    + sbox.ospath('A/D/G') + "':\n",
+    "U    "
+    + sbox.ospath('A/D/G/pi') + "\n",
+    "--- Recording mergeinfo for merge of r2 through r3 into '"
+    + sbox.ospath('A/D/G') + "':\n",
+    " U   "
+    + sbox.ospath('A/D/G') + "\n"]
+  svntest.actions.run_and_verify_svn(None, expected_output, [],
+                                     'merge',
+                                     sbox.repo_url + '/D_1/G',
+                                     sbox.ospath('A/D/G'))
+  expected_output = [
+    "--- Merging r2 through r3 into '"
+    + sbox.ospath('A/D/H') + "':\n",
+    "U    "
+    + sbox.ospath('A/D/H/chi') + "\n",
+    "--- Recording mergeinfo for merge of r2 through r3 into '"
+    + sbox.ospath('A/D/H') + "':\n",
+    " U   "
+    + sbox.ospath('A/D/H') + "\n"]
+  svntest.actions.run_and_verify_svn(None, expected_output, [],
+                                     'merge',
+                                     sbox.repo_url + '/D_1/H',
+                                     sbox.ospath('A/D/H'))
+  sbox.simple_commit()
+  sbox.simple_update()
+
+  # Create branch 'D_2'
+  sbox.simple_copy('A/D', 'D_2')
+  sbox.simple_commit()
+  sbox.simple_update()
+
+  # Create change on 'D_2'
+  sbox.simple_append('D_2/G/pi', "D_2/G pi edit\n")
+  sbox.simple_commit()
+  sbox.simple_update()
+
+  # Create change on 'D'
+  sbox.simple_append('A/D/G/rho', "D/G rho edit\n")
+  sbox.simple_commit()
+  sbox.simple_update()
+
+  # Sync merge to 'D_2' (doesn't record mergeinfo on 'D_2/H' subtree)
+  expected_output = [
+    "--- Merging r5 through r7 into '"
+    + sbox.ospath('D_2') + "':\n",
+    "U    "
+    + sbox.ospath('D_2/G/rho') + "\n",
+    "--- Recording mergeinfo for merge of r5 through r7 into '"
+    + sbox.ospath('D_2') + "':\n",
+    " U   "
+    + sbox.ospath('D_2') + "\n",
+    "--- Recording mergeinfo for merge of r5 through r7 into '"
+    + sbox.ospath('D_2/G') + "':\n",
+    " U   "
+    + sbox.ospath('D_2/G') + "\n"]
+  svntest.actions.run_and_verify_svn(None, expected_output, [],
+                                     'merge',
+                                     sbox.repo_url + '/A/D',
+                                     sbox.ospath('D_2'))
+  sbox.simple_commit()
+  sbox.simple_update()
+
+  # Reintegrate 'D_2' to 'D'
+  expected_output = [
+    "--- Merging differences between repository URLs into '"
+    + sbox.ospath('A/D') + "':\n",
+    "U    "
+    + sbox.ospath('A/D/G/pi') + "\n",
+    " U   "
+    + sbox.ospath('A/D/G') + "\n",
+    "--- Recording mergeinfo for merge between repository URLs into '"
+    + sbox.ospath('A/D') + "':\n",
+    " U   "
+    + sbox.ospath('A/D') + "\n",
+    " U   "
+    + sbox.ospath('A/D/G') + "\n"]
+  svntest.actions.run_and_verify_svn(None, expected_output, [],
+                                     'merge',
+                                     sbox.repo_url + '/D_2',
+                                     sbox.ospath('A/D'))
+  sbox.simple_commit()
+  sbox.simple_update()
+
+  # merge to 'D_2'. This merge previously failed with this error:
+  #
+  # svn: E195016: Reintegrate can only be used if revisions 5 through 9 were
+  # previously merged from [URL]/D_2 to the reintegrate source, but this is
+  # not the case:
+  #   A/D/G
+  #       Missing ranges: /A/D/G:7
+  #
+  expected_output = [
+    "--- Merging differences between repository URLs into '"
+    + sbox.ospath('D_2') + "':\n",
+    " U   "
+    + sbox.ospath('D_2/G') + "\n",
+    "--- Recording mergeinfo for merge between repository URLs into '"
+    + sbox.ospath('D_2') + "':\n",
+    " U   "
+    + sbox.ospath('D_2') + "\n",
+    " G   "
+    + sbox.ospath('D_2/G') + "\n"]
+  svntest.actions.run_and_verify_svn(None, expected_output, [],
+                                     'merge',
+                                     sbox.repo_url + '/A/D',
+                                     sbox.ospath('D_2'))
+  sbox.simple_commit()
+  sbox.simple_update()
+
 ########################################################################
 # Run the tests
 
@@ -1230,6 +1356,7 @@ test_list = [ None,
               merge_replacement,
               auto_merge_handles_replacements_in_merge_source,
               effective_sync_results_in_reintegrate,
+              reintegrate_subtree_not_updated,
              ]
 
 if __name__ == '__main__':

Modified: subversion/branches/1.8.x-issue4437/subversion/tests/cmdline/merge_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x-issue4437/subversion/tests/cmdline/merge_tests.py?rev=1591140&r1=1591139&r2=1591140&view=diff
==============================================================================
--- subversion/branches/1.8.x-issue4437/subversion/tests/cmdline/merge_tests.py (original)
+++ subversion/branches/1.8.x-issue4437/subversion/tests/cmdline/merge_tests.py Tue Apr 29 23:10:25 2014
@@ -19143,6 +19143,159 @@ def merge_to_empty_target_merge_to_infin
   # Commit the merge.
   #sbox.simple_commit()
 
+def merge_dir_delete_force(sbox):
+  "merge a directory delete with --force"
+
+  sbox.build()
+
+  sbox.simple_rm('A/D/G')
+  sbox.simple_commit() # r2
+
+  sbox.simple_update(revision=1)
+
+  # Just merging r2 on r1 succeeds
+  svntest.actions.run_and_verify_svn(sbox.wc_dir, None, [],
+                                     'merge', '-c2', '^/', sbox.wc_dir,
+                                     '--ignore-ancestry')
+
+  # Bring working copy to r1 again
+  svntest.actions.run_and_verify_svn(sbox.wc_dir, None, [],
+                                     'revert', '-R', sbox.wc_dir)
+
+  # But when using --force this same merge caused a segfault in 1.8.0-1.8.8
+  svntest.actions.run_and_verify_svn(sbox.wc_dir, None, [],
+                                     'merge', '-c2', '^/', sbox.wc_dir,
+                                     '--ignore-ancestry', '--force')
+
+def conflict_naming(sbox):
+  "verify conflict file naming"
+
+  sbox.build()
+  wc_dir = sbox.wc_dir
+  sbox.simple_append('file.txt', 'This is the initial content\n')
+  sbox.simple_add('file.txt')
+  sbox.simple_commit()
+
+  sbox.simple_append('file.txt', 'This is the new content\n', truncate=True)
+  sbox.simple_commit()
+
+  sbox.simple_append('file.txt', 'This is conflicting content\n', truncate=True)
+
+  # Update - no preserve ext
+  expected_status = svntest.actions.get_virginal_state(wc_dir, 2)
+  expected_disk = svntest.main.greek_state.copy()
+  expected_output = svntest.wc.State(wc_dir, {
+    'file.txt' : Item(status='C ')
+  })
+  expected_status.add({
+    'file.txt' : Item(status='C ', wc_rev='2')
+  })
+
+  expected_disk.add({
+    'file.txt.r3'       : Item(contents="This is the new content\n"),
+    'file.txt.r2'       : Item(contents="This is the initial content\n"),
+    'file.txt'          : Item(contents="<<<<<<< .mine\n" \
+                               "This is conflicting content\n" \
+                               "=======\n" \
+                               "This is the initial content\n" \
+                               ">>>>>>> .r2\n"),
+    'file.txt.mine'     : Item(contents="This is conflicting content\n"),
+  })
+  svntest.actions.run_and_verify_update(wc_dir,
+                                        expected_output, expected_disk,
+                                        expected_status,
+                                        None, None, None,
+                                        None, None, None,
+                                        wc_dir, '-r', '2')
+
+  sbox.simple_revert('file.txt')
+  sbox.simple_update('', revision=3)
+  sbox.simple_append('file.txt', 'This is conflicting content\n', truncate=True)
+
+  # Update - preserve ext
+  expected_status = svntest.actions.get_virginal_state(wc_dir, 2)
+  expected_disk = svntest.main.greek_state.copy()
+  expected_output = svntest.wc.State(wc_dir, {
+    'file.txt' : Item(status='C ')
+  })
+  expected_status.add({
+    'file.txt' : Item(status='C ', wc_rev='2')
+  })
+
+  expected_disk.add({
+    'file.txt.r3.txt'   : Item(contents="This is the new content\n"),
+    'file.txt.r2.txt'   : Item(contents="This is the initial content\n"),
+    'file.txt'          : Item(contents="<<<<<<< .mine.txt\n" \
+                               "This is conflicting content\n" \
+                               "=======\n" \
+                               "This is the initial content\n" \
+                               ">>>>>>> .r2.txt\n"),
+    'file.txt.mine.txt' : Item(contents="This is conflicting content\n"),
+  })
+  svntest.actions.run_and_verify_update(
+                      wc_dir,
+                      expected_output, expected_disk, expected_status,
+                      None, None, None, None, None, None,
+                      wc_dir, '-r', '2',
+                      '--config-option',
+                      'config:miscellany:preserved-conflict-file-exts=' +
+                      'c txt h')
+
+  sbox.simple_revert('file.txt')
+  sbox.simple_update('', revision=3)
+  sbox.simple_append('file.txt', 'This is conflicting content\n', truncate=True)
+
+  # Merge - no preserve ext
+  expected_status = svntest.actions.get_virginal_state(wc_dir, 3)
+  expected_disk = svntest.main.greek_state.copy()
+  expected_status.add({
+    'file.txt' : Item(status='C ', wc_rev='3')
+  })
+  expected_disk.add({
+    'file.txt.merge-left.r3' : Item(contents="This is the new content\n"),
+    'file.txt.merge-right.r2': Item(contents="This is the initial content\n"),
+    'file.txt'               : Item(contents="<<<<<<< .working\n" \
+                                    "This is conflicting content\n" \
+                                    "=======\n" \
+                                    "This is the initial content\n" \
+                                    ">>>>>>> .merge-right.r2\n"),
+    'file.txt.working'       : Item(contents="This is conflicting content\n"),
+  })
+
+  svntest.actions.run_and_verify_svn(wc_dir, None, [],
+                                     'merge', '-c-3', '^/', sbox.ospath(''))
+  svntest.actions.run_and_verify_status(wc_dir, expected_status)
+  svntest.actions.verify_disk(wc_dir, expected_disk)
+
+  sbox.simple_revert('file.txt')
+  sbox.simple_append('file.txt', 'This is conflicting content\n', truncate=True)
+
+  # Merge - preserve ext
+  expected_status = svntest.actions.get_virginal_state(wc_dir, 3)
+  expected_disk = svntest.main.greek_state.copy()
+  expected_status.add({
+    'file.txt' : Item(status='C ', wc_rev='3')
+  })
+  expected_disk.add({
+    'file.txt.merge-left.r3.txt' : Item(contents="This is the new content\n"),
+    'file.txt.merge-right.r2.txt': Item(contents="This is the initial content\n"),
+    'file.txt'                   : Item(contents="<<<<<<< .working.txt\n" \
+                                        "This is conflicting content\n" \
+                                        "=======\n" \
+                                        "This is the initial content\n" \
+                                        ">>>>>>> .merge-right.r2.txt\n"),
+    'file.txt.working.txt'       : Item(contents="This is conflicting content\n"),
+  })
+
+  svntest.actions.run_and_verify_svn(
+                           wc_dir, None, [],
+                           'merge', '-c-3', '^/', sbox.ospath(''),
+                           '--config-option',
+                           'config:miscellany:preserved-conflict-file-exts=' +
+                           'c txt h')
+  svntest.actions.run_and_verify_status(wc_dir, expected_status)
+  svntest.actions.verify_disk(wc_dir, expected_disk)
+
 ########################################################################
 # Run the tests
 
@@ -19288,6 +19441,8 @@ test_list = [ None,
               single_editor_drive_merge_notifications,
               conflicted_split_merge_with_resolve,
               merge_to_empty_target_merge_to_infinite_target,
+              merge_dir_delete_force,
+              conflict_naming,
              ]
 
 if __name__ == '__main__':

Modified: subversion/branches/1.8.x-issue4437/subversion/tests/cmdline/prop_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x-issue4437/subversion/tests/cmdline/prop_tests.py?rev=1591140&r1=1591139&r2=1591140&view=diff
==============================================================================
--- subversion/branches/1.8.x-issue4437/subversion/tests/cmdline/prop_tests.py (original)
+++ subversion/branches/1.8.x-issue4437/subversion/tests/cmdline/prop_tests.py Tue Apr 29 23:10:25 2014
@@ -2612,6 +2612,62 @@ def peg_rev_base_working(sbox):
                                      'propget', '--strict', 'ordinal',
                                      sbox.ospath('iota') + '@BASE')
 
+def iprops_list_abspath(sbox):
+  "test listing iprops via abspath"
+
+  sbox.build()
+
+  sbox.simple_propset('im', 'root', '')
+  sbox.simple_commit()
+
+  svntest.actions.run_and_verify_svn(None, None, [],
+                                     'switch', '^/A/D', sbox.ospath(''),
+                                     '--ignore-ancestry')
+
+  sbox.simple_propset('im', 'GammA', 'gamma')
+
+  expected_output = [
+    'Inherited properties on \'%s\',\n' % sbox.ospath('')[:-1],
+    'from \'%s\':\n' % sbox.repo_url,
+    '  im\n',
+    '    root\n',
+    'Properties on \'%s\':\n' % sbox.ospath('gamma'),
+    '  im\n',
+    '    GammA\n'
+  ]
+  svntest.actions.run_and_verify_svn(None, expected_output, [],
+                                     'pl', '-R',
+                                     '--show-inherited-props', '-v',
+                                     sbox.ospath(''))
+
+  expected_output = [
+    'Inherited properties on \'%s\',\n' % os.path.abspath(sbox.ospath('')),
+    'from \'%s\':\n' % sbox.repo_url,
+    '  im\n',
+    '    root\n',
+    'Properties on \'%s\':\n' % os.path.abspath(sbox.ospath('gamma')),
+    '  im\n',
+    '    GammA\n'
+  ]
+  svntest.actions.run_and_verify_svn(None, expected_output, [],
+                                     'pl', '-R',
+                                     '--show-inherited-props', '-v',
+                                     os.path.abspath(sbox.ospath('')))
+
+def wc_propop_on_url(sbox):
+  "perform wc specific operations on url"
+
+  sbox.build(create_wc = False)
+
+  svntest.actions.run_and_verify_svn(None, None, '.*E195000:.*path',
+                                     'pl', '-r', 'PREV',
+                                     sbox.repo_url)
+
+  svntest.actions.run_and_verify_svn(None, None, '.*E195000:.*path',
+                                     'pg', 'my:Q', '-r', 'PREV',
+                                     sbox.repo_url)
+
+
 ########################################################################
 # Run the tests
 
@@ -2657,6 +2713,8 @@ test_list = [ None,
               inheritable_ignores,
               almost_known_prop_names,
               peg_rev_base_working,
+              iprops_list_abspath,
+              wc_propop_on_url,
              ]
 
 if __name__ == '__main__':

Modified: subversion/branches/1.8.x-issue4437/subversion/tests/cmdline/svndumpfilter_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x-issue4437/subversion/tests/cmdline/svndumpfilter_tests.py?rev=1591140&r1=1591139&r2=1591140&view=diff
==============================================================================
--- subversion/branches/1.8.x-issue4437/subversion/tests/cmdline/svndumpfilter_tests.py (original)
+++ subversion/branches/1.8.x-issue4437/subversion/tests/cmdline/svndumpfilter_tests.py Tue Apr 29 23:10:25 2014
@@ -559,7 +559,7 @@ def dropped_but_not_renumbered_empty_rev
   full_dump_contents = open(full_dump).read()
   filtered_dumpfile, filtered_out = filter_and_return_output(
       full_dump_contents,
-      8192, # Set a sufficiently large bufsize to avoid a deadlock
+      16384, # Set a sufficiently large bufsize to avoid a deadlock
       "exclude", "branches/B2",
       "--skip-missing-merge-sources", "--drop-empty-revs")
 

Modified: subversion/branches/1.8.x-issue4437/subversion/tests/cmdline/upgrade_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x-issue4437/subversion/tests/cmdline/upgrade_tests.py?rev=1591140&r1=1591139&r2=1591140&view=diff
==============================================================================
--- subversion/branches/1.8.x-issue4437/subversion/tests/cmdline/upgrade_tests.py (original)
+++ subversion/branches/1.8.x-issue4437/subversion/tests/cmdline/upgrade_tests.py Tue Apr 29 23:10:25 2014
@@ -1428,6 +1428,17 @@ def changelist_upgrade_1_6(sbox):
   if paths != expected_paths:
     raise svntest.Failure("changelist not matched")
 
+
+def upgrade_1_7_dir_external(sbox):
+  "upgrade from 1.7 with dir external"
+
+  sbox.build(create_wc = False)
+  replace_sbox_with_tarfile(sbox, 'upgrade_1_7_dir_external.tar.bz2')
+
+  # This fails for 'make check EXCLUSIVE_WC_LOCKS=1' giving an error:
+  # svn: warning: W200033: sqlite[S5]: database is locked
+  svntest.actions.run_and_verify_svn(None, None, [], 'upgrade', sbox.wc_dir)
+
 ########################################################################
 # Run the tests
 
@@ -1483,6 +1494,7 @@ test_list = [ None,
               iprops_upgrade,
               iprops_upgrade1_6,
               changelist_upgrade_1_6,
+              upgrade_1_7_dir_external,
              ]
 
 

Modified: subversion/branches/1.8.x-issue4437/subversion/tests/cmdline/wc_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x-issue4437/subversion/tests/cmdline/wc_tests.py?rev=1591140&r1=1591139&r2=1591140&view=diff
==============================================================================
--- subversion/branches/1.8.x-issue4437/subversion/tests/cmdline/wc_tests.py (original)
+++ subversion/branches/1.8.x-issue4437/subversion/tests/cmdline/wc_tests.py Tue Apr 29 23:10:25 2014
@@ -118,8 +118,13 @@ def add_with_symlink_in_path(sbox):
   sbox.simple_append('A/B/kappa', 'xyz', True)
   sbox.simple_add('Z/B/kappa')
 
+def is_posix_os_and_not_root():
+  if not svntest.main.is_posix_os():
+    return False
+  return os.getuid() != 0
+
 @Issue(4118)
-@SkipUnless(svntest.main.is_posix_os)
+@SkipUnless(is_posix_os_and_not_root)
 def status_with_inaccessible_wc_db(sbox):
   """inaccessible .svn/wc.db"""
 

Modified: subversion/branches/1.8.x-issue4437/subversion/tests/libsvn_repos/repos-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x-issue4437/subversion/tests/libsvn_repos/repos-test.c?rev=1591140&r1=1591139&r2=1591140&view=diff
==============================================================================
--- subversion/branches/1.8.x-issue4437/subversion/tests/libsvn_repos/repos-test.c (original)
+++ subversion/branches/1.8.x-issue4437/subversion/tests/libsvn_repos/repos-test.c Tue Apr 29 23:10:25 2014
@@ -3261,6 +3261,65 @@ filename_with_control_chars(const svn_te
 }
 
 
+/* Notification receiver for test_dump_bad_mergeinfo(). This does not
+   need to do anything, it just needs to exist.
+ */
+static void
+dump_r0_mergeinfo_notifier(void *baton,
+                           const svn_repos_notify_t *notify,
+                           apr_pool_t *scratch_pool)
+{
+}
+
+/* Regression test for part the 'dump' part of issue #4476 "Mergeinfo
+   containing r0 makes svnsync and svnadmin dump fail". */
+static svn_error_t *
+test_dump_r0_mergeinfo(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;
+  svn_revnum_t youngest_rev = 0;
+  const svn_string_t *bad_mergeinfo = svn_string_create("/foo:0", pool);
+
+  SVN_ERR(svn_test__create_repos(&repos, "test-repo-dump-r0-mergeinfo",
+                                 opts, pool));
+  fs = svn_repos_fs(repos);
+
+  /* Revision 1:  Any commit will do, here  */
+  SVN_ERR(svn_fs_begin_txn(&txn, fs, youngest_rev, pool));
+  SVN_ERR(svn_fs_txn_root(&txn_root, txn, pool));
+  SVN_ERR(svn_fs_make_dir(txn_root, "/bar", 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 bad mergeinfo */
+  SVN_ERR(svn_fs_begin_txn(&txn, fs, youngest_rev, pool));
+  SVN_ERR(svn_fs_txn_root(&txn_root, txn, pool));
+  SVN_ERR(svn_fs_change_node_prop(txn_root, "/bar", "svn:mergeinfo", bad_mergeinfo, pool));
+  SVN_ERR(svn_repos_fs_commit_txn(NULL, repos, &youngest_rev, txn, pool));
+  SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(youngest_rev));
+
+  /* Test that a dump completes without error. In order to exercise the
+     functionality under test -- that is, in order for the dump to try to
+     parse the mergeinfo it is dumping -- the dump must start from a
+     revision greater than 1 and must take a notification callback. */
+  {
+    svn_stringbuf_t *stringbuf = svn_stringbuf_create_empty(pool);
+    svn_stream_t *stream = svn_stream_from_stringbuf(stringbuf, pool);
+
+    SVN_ERR(svn_repos_dump_fs3(repos, stream, 2, SVN_INVALID_REVNUM,
+                               FALSE, FALSE,
+                               dump_r0_mergeinfo_notifier, NULL,
+                               NULL, NULL,
+                               pool));
+  }
+
+  return SVN_NO_ERROR;
+}
+
 /* The test table.  */
 
 struct svn_test_descriptor_t test_funcs[] =
@@ -3306,5 +3365,7 @@ struct svn_test_descriptor_t test_funcs[
                        "test svn_repos_delete"),
     SVN_TEST_OPTS_PASS(filename_with_control_chars,
                        "test filenames with control characters"),
+    SVN_TEST_OPTS_PASS(test_dump_r0_mergeinfo,
+                       "test dumping with r0 mergeinfo"),
     SVN_TEST_NULL
   };

Modified: subversion/branches/1.8.x-issue4437/subversion/tests/libsvn_wc/conflict-data-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x-issue4437/subversion/tests/libsvn_wc/conflict-data-test.c?rev=1591140&r1=1591139&r2=1591140&view=diff
==============================================================================
--- subversion/branches/1.8.x-issue4437/subversion/tests/libsvn_wc/conflict-data-test.c (original)
+++ subversion/branches/1.8.x-issue4437/subversion/tests/libsvn_wc/conflict-data-test.c Tue Apr 29 23:10:25 2014
@@ -740,7 +740,7 @@ test_prop_conflicts(const svn_test_opts_
   svn_error_t *err;
   const char *lock_abspath;
   test_prop_conflict_baton_t *b = apr_pcalloc(pool, sizeof(*b));
-  svn_wc_conflict_description2_t *desc = apr_pcalloc(pool, sizeof(*b));
+  svn_wc_conflict_description2_t *desc = apr_pcalloc(pool, sizeof(*desc));
 
   SVN_ERR(svn_test__sandbox_create(&sbox, "test_prop_conflicts", opts, pool));
 

Modified: subversion/branches/1.8.x-issue4437/subversion/tests/libsvn_wc/op-depth-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x-issue4437/subversion/tests/libsvn_wc/op-depth-test.c?rev=1591140&r1=1591139&r2=1591140&view=diff
==============================================================================
--- subversion/branches/1.8.x-issue4437/subversion/tests/libsvn_wc/op-depth-test.c (original)
+++ subversion/branches/1.8.x-issue4437/subversion/tests/libsvn_wc/op-depth-test.c Tue Apr 29 23:10:25 2014
@@ -55,6 +55,14 @@
 #pragma warning(disable: 4221) /* nonstandard extension used */
 #endif
 
+/* This macro is not available in 1.8.x, but let's just use it here */
+#ifndef SVN_VA_NULL
+struct svn_null_pointer_constant_stdarg_sentinel_t;
+
+/** Null pointer constant used as a sentinel in variable argument lists. */
+#define SVN_VA_NULL ((struct svn_null_pointer_constant_stdarg_sentinel_t*)0)
+#endif
+
 /* Compare strings, like strcmp but either or both may be NULL which
  * compares equal to NULL and not equal to any non-NULL string. */
 static int
@@ -8640,6 +8648,78 @@ move_twice_within_delete(const svn_test_
     return SVN_NO_ERROR;
 }
 
+static svn_error_t *
+repo_wc_copy(const svn_test_opts_t *opts, apr_pool_t *pool)
+{
+  svn_test__sandbox_t b;
+  const char *repos_dir;
+  const char *new_repos_dir;
+  const char *new_repos_url;
+
+  SVN_ERR(svn_test__sandbox_create(&b, "repo_wc_copy",
+                                   opts, pool));
+  SVN_ERR(sbox_add_and_commit_greek_tree(&b));
+
+  SVN_ERR(sbox_wc_copy_url(&b,
+                           svn_path_url_add_component2(b.repos_url, "A/B",
+                                                       pool),
+                           -1, "AA"));
+
+  {
+    nodes_row_t nodes[] = {
+
+      {1, "AA/lambda",   "normal", 1, "A/B/lambda"},
+      {1, "AA",          "normal", 1, "A/B"},
+      {1, "AA/E/beta",   "normal", 1, "A/B/E/beta"},
+      {1, "AA/E/alpha",  "normal", 1, "A/B/E/alpha"},
+      {1, "AA/F",        "normal", 1, "A/B/F"},
+      {1, "AA/E",        "normal", 1, "A/B/E"},
+
+      { 0 },
+    };
+    SVN_ERR(check_db_rows(&b, "AA", nodes));
+  }
+
+  SVN_ERR(svn_uri_get_dirent_from_file_url(&repos_dir, b.repos_url,
+                                           pool));
+  new_repos_dir = apr_pstrcat(pool, repos_dir, "-2", SVN_VA_NULL);
+  new_repos_url = apr_pstrcat(pool, b.repos_url, "-2", SVN_VA_NULL);
+
+  svn_test_add_dir_cleanup(new_repos_dir);
+
+  SVN_ERR(svn_io_remove_dir2(new_repos_dir, TRUE, NULL, NULL, pool));
+  SVN_ERR(svn_io_copy_dir_recursively(repos_dir,
+                                      svn_dirent_dirname(new_repos_dir, pool),
+                                      svn_dirent_basename(new_repos_dir, pool),
+                                      FALSE, NULL, NULL, pool));
+
+  SVN_ERR(sbox_wc_relocate(&b, new_repos_url));
+
+  /* This produced an invalid copy in Subversion <= 1.8.8.
+     Status would show all descendants as incomplete */
+  SVN_ERR(sbox_wc_copy_url(&b,
+                           svn_path_url_add_component2(b.repos_url, "A/B",
+                                                       pool),
+                           -1, "BB"));
+
+  {
+    nodes_row_t nodes[] = {
+
+      {1, "BB/lambda",   "normal", 1, "A/B/lambda"},
+      {1, "BB",          "normal", 1, "A/B"},
+      {1, "BB/E/beta",   "normal", 1, "A/B/E/beta"},
+      {1, "BB/E/alpha",  "normal", 1, "A/B/E/alpha"},
+      {1, "BB/F",        "normal", 1, "A/B/F"},
+      {1, "BB/E",        "normal", 1, "A/B/E"},
+
+      { 0 },
+    };
+    SVN_ERR(check_db_rows(&b, "BB", nodes));
+  }
+
+  return SVN_NO_ERROR;
+}
+
 /* ---------------------------------------------------------------------- */
 /* The list of test functions */
 
@@ -8803,5 +8883,7 @@ struct svn_test_descriptor_t test_funcs[
                        "move replace ancestor with child"),
     SVN_TEST_OPTS_PASS(move_twice_within_delete,
                        "move twice and then delete"),
+    SVN_TEST_OPTS_PASS(repo_wc_copy,
+                       "repo_wc_copy"),
     SVN_TEST_NULL
   };

Modified: subversion/branches/1.8.x-issue4437/subversion/tests/libsvn_wc/utils.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x-issue4437/subversion/tests/libsvn_wc/utils.c?rev=1591140&r1=1591139&r2=1591140&view=diff
==============================================================================
--- subversion/branches/1.8.x-issue4437/subversion/tests/libsvn_wc/utils.c (original)
+++ subversion/branches/1.8.x-issue4437/subversion/tests/libsvn_wc/utils.c Tue Apr 29 23:10:25 2014
@@ -23,6 +23,7 @@
 #include "svn_error.h"
 #include "svn_client.h"
 #include "svn_pools.h"
+#include "private/svn_dep_compat.h"
 
 #include "utils.h"
 
@@ -229,6 +230,45 @@ sbox_wc_copy(svn_test__sandbox_t *b, con
 }
 
 svn_error_t *
+sbox_wc_copy_url(svn_test__sandbox_t *b, const char *from_url,
+                 svn_revnum_t revision, const char *to_path)
+{
+  apr_pool_t *scratch_pool = b->pool;
+  svn_client_ctx_t *ctx;
+  svn_opt_revision_t rev = { svn_opt_revision_unspecified, {0} };
+  svn_client_copy_source_t* src;
+  apr_array_header_t *sources = apr_array_make(
+                                        scratch_pool, 1,
+                                        sizeof(svn_client_copy_source_t *));
+
+  SVN_ERR(svn_client_create_context2(&ctx, NULL, scratch_pool));
+  ctx->wc_ctx = b->wc_ctx;
+
+  if (SVN_IS_VALID_REVNUM(revision))
+    {
+      rev.kind = svn_opt_revision_number;
+      rev.value.number = revision;
+    }
+
+  src = apr_pcalloc(scratch_pool, sizeof(*src));
+
+  src->path = from_url;
+  src->revision = &rev;
+  src->peg_revision = &rev;
+
+  APR_ARRAY_PUSH(sources, svn_client_copy_source_t *) = src;
+
+  SVN_ERR(svn_client_copy6(sources, sbox_wc_path(b, to_path),
+                           FALSE, FALSE, FALSE, NULL, NULL, NULL,
+                           ctx, scratch_pool));
+
+  ctx->wc_ctx = NULL;
+
+  return SVN_NO_ERROR;
+}
+
+
+svn_error_t *
 sbox_wc_revert(svn_test__sandbox_t *b, const char *path, svn_depth_t depth)
 {
   const char *abspath = sbox_wc_path(b, path);
@@ -292,15 +332,26 @@ sbox_wc_commit_ex(svn_test__sandbox_t *b
                   svn_depth_t depth)
 {
   svn_client_ctx_t *ctx;
-  SVN_ERR(svn_client_create_context2(&ctx, NULL, b->pool));
+  apr_pool_t *scratch_pool = svn_pool_create(b->pool);
+  svn_error_t *err;
+
+  SVN_ERR(svn_client_create_context2(&ctx, NULL, scratch_pool));
   ctx->wc_ctx = b->wc_ctx;
-  return svn_client_commit6(targets, depth,
-                            FALSE /* keep_locks */,
-                            FALSE /* keep_changelist */,
-                            TRUE  /* commit_as_operations */,
-                            TRUE  /* include_file_externals */,
-                            FALSE /* include_dir_externals */,
-                            NULL, NULL, NULL, NULL, ctx, b->pool);
+
+  /* A successfull commit doesn't close the ra session, but leaves that
+     to the caller. This leaves the BDB handle open, which might cause
+     problems in further test code. (op_depth_tests.c's repo_wc_copy) */
+  err = svn_client_commit6(targets, depth,
+                           FALSE /* keep_locks */,
+                           FALSE /* keep_changelist */,
+                           TRUE  /* commit_as_operations */,
+                           TRUE  /* include_file_externals */,
+                           FALSE /* include_dir_externals */,
+                           NULL, NULL, NULL, NULL, ctx, scratch_pool);
+
+  svn_pool_destroy(scratch_pool);
+
+  return svn_error_trace(err);
 }
 
 svn_error_t *
@@ -440,6 +491,24 @@ sbox_wc_propset(svn_test__sandbox_t *b,
 }
 
 svn_error_t *
+sbox_wc_relocate(svn_test__sandbox_t *b,
+                 const char *new_repos_url)
+{
+  apr_pool_t *scratch_pool = b->pool;
+  svn_client_ctx_t *ctx;
+
+  SVN_ERR(svn_client_create_context2(&ctx, NULL, scratch_pool));
+  ctx->wc_ctx = b->wc_ctx;
+
+  SVN_ERR(svn_client_relocate2(b->wc_abspath, b->repos_url,
+                               new_repos_url, FALSE, ctx,scratch_pool));
+
+  b->repos_url = apr_pstrdup(b->pool, new_repos_url);
+
+  return SVN_NO_ERROR;
+}
+
+svn_error_t *
 sbox_add_and_commit_greek_tree(svn_test__sandbox_t *b)
 {
   const struct svn_test__tree_entry_t *node;

Modified: subversion/branches/1.8.x-issue4437/subversion/tests/libsvn_wc/utils.h
URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x-issue4437/subversion/tests/libsvn_wc/utils.h?rev=1591140&r1=1591139&r2=1591140&view=diff
==============================================================================
--- subversion/branches/1.8.x-issue4437/subversion/tests/libsvn_wc/utils.h (original)
+++ subversion/branches/1.8.x-issue4437/subversion/tests/libsvn_wc/utils.h Tue Apr 29 23:10:25 2014
@@ -104,6 +104,14 @@ sbox_wc_mkdir(svn_test__sandbox_t *b, co
 svn_error_t *
 sbox_wc_copy(svn_test__sandbox_t *b, const char *from_path, const char *to_path);
 
+svn_error_t *
+sbox_wc_copy_url(svn_test__sandbox_t *b, const char *from_url,
+                 svn_revnum_t revision, const char *to_path);
+
+svn_error_t *
+sbox_wc_relocate(svn_test__sandbox_t *b,
+                 const char *new_repos_url);
+
 /* Revert a WC file or directory tree at PATH */
 svn_error_t *
 sbox_wc_revert(svn_test__sandbox_t *b, const char *path, svn_depth_t depth);