You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2010/11/07 15:30:36 UTC

svn commit: r1032285 [4/4] - in /subversion/branches/performance: ./ build/ build/ac-macros/ subversion/bindings/javahl/native/ subversion/bindings/javahl/src/org/apache/subversion/javahl/ subversion/bindings/javahl/src/org/apache/subversion/javahl/cal...

Modified: subversion/branches/performance/subversion/tests/cmdline/merge_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/tests/cmdline/merge_tests.py?rev=1032285&r1=1032284&r2=1032285&view=diff
==============================================================================
--- subversion/branches/performance/subversion/tests/cmdline/merge_tests.py (original)
+++ subversion/branches/performance/subversion/tests/cmdline/merge_tests.py Sun Nov  7 14:30:34 2010
@@ -15921,7 +15921,7 @@ def merge_into_locally_added_file(sbox):
   svntest.main.file_append(pi_path, "foo\n")
   sbox.simple_commit(); # r2
 
-  sbox.simple_add(new_path)
+  sbox.simple_add('A/D/G/new')
 
   expected_output = wc.State(wc_dir, {
     'A/D/G/new' : Item(status='G '),
@@ -15973,7 +15973,7 @@ def merge_into_locally_added_directory(s
                                   "This is the file 'rho'.\n")
   svntest.main.file_append_binary(os.path.join(new_dir_path, 'tau'),
                                   "This is the file 'tau'.\n")
-  sbox.simple_add(new_dir_path)
+  sbox.simple_add('A/D/new_dir')
 
   expected_output = wc.State(wc_dir, {
     'A/D/new_dir/pi' : Item(status='G '),
@@ -16093,6 +16093,138 @@ def merge_with_os_deleted_subtrees(sbox)
     svntest.verify.AnyOutput, [], 'merge', sbox.repo_url + '/A',
     A_COPY_path, '--depth=empty')
 
+#----------------------------------------------------------------------
+# Test for issue #3668 'inheritance can result in self-referential
+# mergeinfo' and issue #3669 'inheritance can result in mergeinfo
+# describing nonexistent sources'
+def no_self_referential_or_nonexistent_inherited_mergeinfo(sbox):
+  "don't inherit bogus mergeinfo"
+
+  # r1: Create a greek tree.
+  sbox.build()
+  wc_dir = sbox.wc_dir
+
+  # r2 - r6: Copy A to A_COPY and then make some text changes under A.
+  set_up_branch(sbox, nbr_of_branches=1)
+
+  # Some paths we'll care about
+  nu_path      = os.path.join(wc_dir, "A", "C", "nu")
+  nu_COPY_path = os.path.join(wc_dir, "A_COPY", "C", "nu")
+  J_path       = os.path.join(wc_dir, "A", "D", "J")
+  J_COPY_path  = os.path.join(wc_dir, "A_COPY", "D", "J")
+  zeta_path    = os.path.join(wc_dir, "A", "D", "J", "zeta")
+  A_COPY_path  = os.path.join(wc_dir, "A_COPY")
+
+  # r7 - Add the file A/C/nu
+  svntest.main.file_write(nu_path, "This is the file 'nu'.\n")
+  svntest.actions.run_and_verify_svn(None, None, [], 'add', nu_path)
+  svntest.actions.run_and_verify_svn(None, None, [], 'commit',
+                                     '-m', 'Add file', wc_dir)
+
+  # r8 - Sync merge A to A_COPY
+  svntest.actions.run_and_verify_svn(
+    "Synch merge failed unexpectedly",
+    svntest.verify.AnyOutput, [], 'merge', sbox.repo_url + '/A',
+    A_COPY_path)
+  svntest.actions.run_and_verify_svn(None, None, [], 'commit',
+                                     '-m', 'Sync A_COPY with A', wc_dir)
+  
+  # r9 - Add the subtree A/D/J
+  #                      A/D/J/zeta
+  svntest.actions.run_and_verify_svn(None, None, [], 'mkdir', J_path)
+  svntest.main.file_write(zeta_path, "This is the file 'zeta'.\n")
+  svntest.actions.run_and_verify_svn(None, None, [], 'add', zeta_path)
+  svntest.actions.run_and_verify_svn(None, None, [], 'commit',
+                                     '-m', 'Add subtree', wc_dir)
+
+  # Update the WC in preparation for merges.
+  svntest.actions.run_and_verify_svn(None, None, [], 'up', wc_dir)
+
+  # r10 - Sync merge A to A_COPY
+  svntest.actions.run_and_verify_svn(
+    "Synch merge failed unexpectedly",
+    svntest.verify.AnyOutput, [], 'merge', sbox.repo_url + '/A',
+    A_COPY_path)
+  svntest.actions.run_and_verify_svn(None, None, [], 'commit',
+                                     '-m', 'Sync A_COPY with A', wc_dir)
+
+  # r11 - Text changes to A/C/nu and A/D/J/zeta.
+  svntest.main.file_write(nu_path, "This is the EDITED file 'nu'.\n")
+  svntest.main.file_write(zeta_path, "This is the EDITED file 'zeta'.\n")
+  svntest.actions.run_and_verify_svn(None, None, [], 'commit',
+                                     '-m', 'Edit added files', wc_dir)
+
+  # Update the WC in preparation for merges.
+  svntest.actions.run_and_verify_svn(None, None, [], 'up', wc_dir)
+
+  # This test is marked as XFail because the following two merges
+  # create mergeinfo with both non-existent path-revs and self-referential
+  # mergeinfo.c
+  #
+  # Merge all available revisions from A/C/nu to A_COPY/C/nu.
+  # The target has no explicit mergeinfo of its own but inherits mergeinfo
+  # from A_COPY.  A_COPY has the mergeinfo '/A:2-9' so the naive mergeinfo
+  # A_COPY/C/nu inherits is '/A/C/nu:2-9'.  However, '/A/C/nu:2-6' don't
+  # actually exist (issue #3669) and '/A/C/nu:7-8' is self-referential
+  # (issue #3668).  Neither of these should be present in the resulting
+  # mergeinfo for A_COPY/C/nu, only '/A/C/nu:8-11'
+  expected_output = wc.State(nu_COPY_path, {
+    '' : Item(status='U '),
+    })
+  expected_mergeinfo_output = wc.State(nu_COPY_path, {
+    '' : Item(status=' G'),
+    })
+  expected_elision_output = wc.State(nu_COPY_path, {
+    })
+  expected_status = wc.State(nu_COPY_path, {
+    '' : Item(status='MM', wc_rev=11),
+    })
+  expected_disk = wc.State('', {
+    '' : Item(props={SVN_PROP_MERGEINFO : '/A/C/nu:8-11'}),
+    })
+  expected_skip = wc.State(nu_COPY_path, { })
+  svntest.actions.run_and_verify_merge(nu_COPY_path, None, None,
+                                       sbox.repo_url + '/A/C/nu', None,
+                                       expected_output,
+                                       expected_mergeinfo_output,
+                                       expected_elision_output,
+                                       expected_disk,
+                                       expected_status,
+                                       expected_skip,
+                                       None, None, None, None,
+                                       None, 1)
+
+  # Merge all available revisions from A/D/J to A_COPY/D/J.  Like the
+  # previous merge, the target should not have any non-existent ('/A/D/J:2-8')
+  # or self-referential mergeinfo ('/A/D/J:9') recorded on it post-merge.
+  expected_output = wc.State(J_COPY_path, {
+    'zeta' : Item(status='U '),    
+    })
+  expected_mergeinfo_output = wc.State(J_COPY_path, {
+    '' : Item(status=' G'),
+    })
+  expected_elision_output = wc.State(J_COPY_path, {
+    })
+  expected_status = wc.State(J_COPY_path, {
+    ''     : Item(status=' M', wc_rev=11),
+    'zeta' : Item(status='M ', wc_rev=11),
+    })
+  expected_disk = wc.State('', {
+    ''     : Item(props={SVN_PROP_MERGEINFO : '/A/D/J:10-11'}),
+    'zeta' : Item("This is the EDITED file 'zeta'.\n")
+    })
+  expected_skip = wc.State(J_COPY_path, { })
+  svntest.actions.run_and_verify_merge(J_COPY_path, None, None,
+                                       sbox.repo_url + '/A/D/J', None,
+                                       expected_output,
+                                       expected_mergeinfo_output,
+                                       expected_elision_output,
+                                       expected_disk,
+                                       expected_status,
+                                       expected_skip,
+                                       None, None, None, None,
+                                       None, 1)
+
 ########################################################################
 # Run the tests
 
@@ -16282,6 +16414,7 @@ test_list = [ None,
               merge_into_locally_added_file,
               merge_into_locally_added_directory,
               merge_with_os_deleted_subtrees,
+              XFail(no_self_referential_or_nonexistent_inherited_mergeinfo),
              ]
 
 if __name__ == '__main__':

Modified: subversion/branches/performance/subversion/tests/cmdline/prop_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/tests/cmdline/prop_tests.py?rev=1032285&r1=1032284&r2=1032285&view=diff
==============================================================================
--- subversion/branches/performance/subversion/tests/cmdline/prop_tests.py (original)
+++ subversion/branches/performance/subversion/tests/cmdline/prop_tests.py Sun Nov  7 14:30:34 2010
@@ -55,11 +55,11 @@ def make_local_props(sbox):
   wc_dir = sbox.wc_dir
 
   # Add properties to one file and one directory
-  sbox.simple_propset('blue', 'azul', sbox.ospath('A/mu'))
-  sbox.simple_propset('green', 'verde', sbox.ospath('A/mu'))
-  sbox.simple_propset('editme', 'the foo fighters', sbox.ospath('A/mu'))
-  sbox.simple_propset('red', 'rojo', sbox.ospath('A/D/G'))
-  sbox.simple_propset('yellow', 'amarillo', sbox.ospath('A/D/G'))
+  sbox.simple_propset('blue', 'azul', 'A/mu')
+  sbox.simple_propset('green', 'verde', 'A/mu')
+  sbox.simple_propset('editme', 'the foo fighters', 'A/mu')
+  sbox.simple_propset('red', 'rojo', 'A/D/G')
+  sbox.simple_propset('yellow', 'amarillo', 'A/D/G')
 
   # Make sure they show up as local mods in status
   expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
@@ -69,7 +69,7 @@ def make_local_props(sbox):
   svntest.actions.run_and_verify_status(wc_dir, expected_status)
 
   # Remove one property
-  sbox.simple_propdel('yellow', sbox.ospath('A/D/G'))
+  sbox.simple_propdel('yellow', 'A/D/G')
 
   svntest.main.use_editor('foo_to_bar')
   # Edit one property
@@ -111,10 +111,8 @@ def commit_props(sbox):
   wc_dir = sbox.wc_dir
 
   # Add a property to a file and a directory
-  mu_path = sbox.ospath('A/mu')
-  H_path = sbox.ospath('A/D/H')
-  sbox.simple_propset('blue', 'azul', mu_path)
-  sbox.simple_propset('red', 'rojo', H_path)
+  sbox.simple_propset('blue', 'azul', 'A/mu')
+  sbox.simple_propset('red', 'rojo', 'A/D/H')
 
   # Create expected output tree.
   expected_output = svntest.wc.State(wc_dir, {
@@ -149,10 +147,8 @@ def update_props(sbox):
   svntest.actions.duplicate_dir(wc_dir, wc_backup)
 
   # Add a property to a file and a directory
-  mu_path = sbox.ospath('A/mu')
-  H_path = sbox.ospath('A/D/H')
-  sbox.simple_propset('blue', 'azul', mu_path)
-  sbox.simple_propset('red', 'rojo', H_path)
+  sbox.simple_propset('blue', 'azul', 'A/mu')
+  sbox.simple_propset('red', 'rojo', 'A/D/H')
 
   # Create expected output tree.
   expected_output = svntest.wc.State(wc_dir, {
@@ -170,18 +166,13 @@ def update_props(sbox):
                                         None, wc_dir)
 
   # Add more properties
-  sbox.simple_propset('blue2', 'azul2', mu_path)
-  sbox.simple_propset('red2', 'rojo2', H_path)
+  sbox.simple_propset('blue2', 'azul2', 'A/mu')
+  sbox.simple_propset('red2', 'rojo2', 'A/D/H')
   expected_status.tweak('A/mu', 'A/D/H', wc_rev=3, status='  ')
   svntest.actions.run_and_verify_commit(wc_dir, expected_output,
                                         expected_status,
                                         None, wc_dir)
 
-  # Overwrite mu_path and H_path to refer to the backup copies from
-  # here on out.
-  mu_path = sbox.ospath('A/mu', wc_dir=wc_backup)
-  H_path = sbox.ospath('A/D/H', wc_dir=wc_backup)
-
   # Create expected output tree for an update of the wc_backup.
   expected_output = svntest.wc.State(wc_backup, {
     'A/mu' : Item(status=' U'),
@@ -229,11 +220,10 @@ def downdate_props(sbox):
   sbox.build()
   wc_dir = sbox.wc_dir
 
-  iota_path = sbox.ospath('iota')
   mu_path = sbox.ospath('A/mu')
 
   # Add a property to a file
-  sbox.simple_propset('cash-sound', 'cha-ching!', iota_path)
+  sbox.simple_propset('cash-sound', 'cha-ching!', 'iota')
 
   # Create expected output tree.
   expected_output = svntest.wc.State(wc_dir, {
@@ -297,14 +287,13 @@ def remove_props(sbox):
   wc_dir = sbox.wc_dir
 
   # Add a property to a file
-  iota_path = sbox.ospath('iota')
-  sbox.simple_propset('cash-sound', 'cha-ching!', iota_path)
+  sbox.simple_propset('cash-sound', 'cha-ching!', 'iota')
 
   # Commit the file
-  sbox.simple_commit(iota_path)
+  sbox.simple_commit('iota')
 
   # Now, remove the property
-  sbox.simple_propdel('cash-sound', iota_path)
+  sbox.simple_propdel('cash-sound', 'iota')
 
   # Create expected output tree.
   expected_output = svntest.wc.State(wc_dir, {
@@ -331,9 +320,9 @@ def update_conflict_props(sbox):
 
   # Add a property to a file and a directory
   mu_path = sbox.ospath('A/mu')
-  sbox.simple_propset('cash-sound', 'cha-ching!', mu_path)
+  sbox.simple_propset('cash-sound', 'cha-ching!', 'A/mu')
   A_path = sbox.ospath('A')
-  sbox.simple_propset('foo', 'bar', A_path)
+  sbox.simple_propset('foo', 'bar', 'A')
 
   # Commit the file and directory
   sbox.simple_commit()
@@ -342,8 +331,8 @@ def update_conflict_props(sbox):
   svntest.main.run_svn(None, 'up', '-r', '1', wc_dir)
 
   # Add conflicting properties
-  sbox.simple_propset('cash-sound', 'beep!', mu_path)
-  sbox.simple_propset('foo', 'baz', A_path)
+  sbox.simple_propset('cash-sound', 'beep!', 'A/mu')
+  sbox.simple_propset('foo', 'baz', 'A')
 
   # Create expected output tree for an update of the wc_backup.
   expected_output = svntest.wc.State(wc_dir, {
@@ -394,7 +383,7 @@ def commit_conflict_dirprops(sbox):
   sbox.build()
   wc_dir = sbox.wc_dir
 
-  sbox.simple_propset('foo', 'bar', wc_dir)
+  sbox.simple_propset('foo', 'bar', '')
 
   # Commit the file and directory
   sbox.simple_commit()
@@ -404,7 +393,7 @@ def commit_conflict_dirprops(sbox):
                        'up', '-r', '1', wc_dir)
 
   # Add conflicting properties
-  sbox.simple_propset('foo', 'eek', wc_dir)
+  sbox.simple_propset('foo', 'eek', '')
 
   svntest.actions.run_and_verify_commit(wc_dir, None, None,
                                         "[oO]ut[- ]of[- ]date",
@@ -428,20 +417,20 @@ def commit_replacement_props(sbox):
   # Add a property to two files
   iota_path = sbox.ospath('iota')
   lambda_path = sbox.ospath('A/B/lambda')
-  sbox.simple_propset('cash-sound', 'cha-ching!', iota_path)
-  sbox.simple_propset('boson', 'W', lambda_path)
+  sbox.simple_propset('cash-sound', 'cha-ching!', 'iota')
+  sbox.simple_propset('boson', 'W', 'A/B/lambda')
 
   # Commit (### someday use run_and_verify_commit for better coverage)
   sbox.simple_commit()
 
   # Schedule both files for deletion
-  sbox.simple_rm(iota_path, lambda_path)
+  sbox.simple_rm('iota', 'A/B/lambda')
 
   # Now recreate the files, and schedule them for addition.
   # Poof, the 'new' files don't have any properties at birth.
   svntest.main.file_append(iota_path, 'iota TNG')
   svntest.main.file_append(lambda_path, 'lambda TNG')
-  sbox.simple_add(iota_path, lambda_path)
+  sbox.simple_add('iota', 'A/B/lambda')
 
   # Sanity check:  the two files should be scheduled for (R)eplacement.
   expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
@@ -451,7 +440,7 @@ def commit_replacement_props(sbox):
   svntest.actions.run_and_verify_status(wc_dir, expected_status)
 
   # Now add a property to lambda.  Iota still doesn't have any.
-  sbox.simple_propset('capacitor', 'flux', lambda_path)
+  sbox.simple_propset('capacitor', 'flux', 'A/B/lambda')
 
   # Commit, with careful output checking.  We're actually going to
   # scan the working copy for props after the commit.
@@ -482,20 +471,20 @@ def revert_replacement_props(sbox):
   # Add a property to two files
   iota_path = sbox.ospath('iota')
   lambda_path = sbox.ospath('A/B/lambda')
-  sbox.simple_propset('cash-sound', 'cha-ching!', iota_path)
-  sbox.simple_propset('boson', 'W', lambda_path)
+  sbox.simple_propset('cash-sound', 'cha-ching!', 'iota')
+  sbox.simple_propset('boson', 'W', 'A/B/lambda')
 
   # Commit rev 2. (### someday use run_and_verify_commit for better coverage)
   sbox.simple_commit()
 
   # Schedule both files for deletion
-  sbox.simple_rm(iota_path, lambda_path)
+  sbox.simple_rm('iota', 'A/B/lambda')
 
   # Now recreate the files, and schedule them for addition.
   # Poof, the 'new' files don't have any properties at birth.
   svntest.main.file_append(iota_path, 'iota TNG')
   svntest.main.file_append(lambda_path, 'lambda TNG')
-  sbox.simple_add(iota_path, lambda_path)
+  sbox.simple_add('iota', 'A/B/lambda')
 
   # Sanity check:  the two files should be scheduled for (R)eplacement.
   expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
@@ -505,10 +494,10 @@ def revert_replacement_props(sbox):
   svntest.actions.run_and_verify_status(wc_dir, expected_status)
 
   # Now add a property to lambda.  Iota still doesn't have any.
-  sbox.simple_propset('capacitor', 'flux', lambda_path)
+  sbox.simple_propset('capacitor', 'flux', 'A/B/lambda')
 
   # Now revert both files.
-  sbox.simple_revert(iota_path, lambda_path)
+  sbox.simple_revert('iota', 'A/B/lambda')
 
   # Do an update; even though the update is really a no-op,
   # run_and_verify_update has the nice feature of scanning disk as
@@ -616,9 +605,9 @@ def inappropriate_props(sbox):
 
   path = sbox.ospath('binary')
   svntest.main.file_append(path, "binary")
-  sbox.simple_add(path)
+  sbox.simple_add('binary')
 
-  sbox.simple_propset('svn:mime-type', 'application/octet-stream', path)
+  sbox.simple_propset('svn:mime-type', 'application/octet-stream', 'binary')
 
   svntest.actions.run_and_verify_svn('Illegal target', None,
                                      svntest.verify.AnyOutput,
@@ -627,7 +616,7 @@ def inappropriate_props(sbox):
 
   path = sbox.ospath('multi-eol')
   svntest.main.file_append(path, "line1\rline2\n")
-  sbox.simple_add(path)
+  sbox.simple_add('multi-eol')
 
   svntest.actions.run_and_verify_svn('Illegal target', None,
                                      svntest.verify.AnyOutput,
@@ -636,7 +625,7 @@ def inappropriate_props(sbox):
 
   path = sbox.ospath('backwards-eol')
   svntest.main.file_append(path, "line1\n\r")
-  sbox.simple_add(path)
+  sbox.simple_add('backwards-eol')
 
   svntest.actions.run_and_verify_svn('Illegal target', None,
                                      svntest.verify.AnyOutput,
@@ -645,7 +634,7 @@ def inappropriate_props(sbox):
 
   path = sbox.ospath('incomplete-eol')
   svntest.main.file_append(path, "line1\r\n\r")
-  sbox.simple_add(path)
+  sbox.simple_add('incomplete-eol')
 
   svntest.actions.run_and_verify_svn('Illegal target', None,
                                      svntest.verify.AnyOutput,
@@ -756,10 +745,10 @@ def copy_inherits_special_props(sbox):
   # Create the first path as a binary file.  To have svn treat the
   # file as binary, have a 0x00 in the file.
   svntest.main.file_append(new_path1, "binary file\000")
-  sbox.simple_add(new_path1)
+  sbox.simple_add('new_file1.bin')
 
   # Add initial svn:mime-type to the file
-  sbox.simple_propset('svn:mime-type', orig_mime_type, new_path1)
+  sbox.simple_propset('svn:mime-type', orig_mime_type, 'new_file1.bin')
 
   # Set the svn:executable property on the file if this is a system
   # that can handle chmod, in which case svn will turn on the
@@ -767,7 +756,7 @@ def copy_inherits_special_props(sbox):
   # manually on the file and see the value of svn:executable in the
   # copied file.
   if os.name == 'posix':
-    sbox.simple_propset('svn:executable', 'on', new_path1)
+    sbox.simple_propset('svn:executable', 'on', 'new_file1.bin')
     os.chmod(new_path1, 0644)
 
   # Commit the file
@@ -1063,18 +1052,18 @@ def recursive_base_wc_ops(sbox):
   # Files with which to test, in alphabetical order
   fp_add = sbox.ospath('A/added')
   fp_del = sbox.ospath('A/mu')
-  fp_keep= sbox.ospath('iota')
+  #fp_keep= sbox.ospath('iota')
 
   # Set up properties
-  sbox.simple_propset('p', 'old-del', fp_del)
-  sbox.simple_propset('p', 'old-keep', fp_keep)
+  sbox.simple_propset('p', 'old-del', 'A/mu')
+  sbox.simple_propset('p', 'old-keep', 'iota')
   sbox.simple_commit()
 
   svntest.main.file_append(fp_add, 'blah')
-  sbox.simple_add(fp_add)
-  sbox.simple_propset('p', 'new-add', fp_add)
-  sbox.simple_propset('p', 'new-del', fp_del)
-  sbox.simple_propset('p', 'new-keep', fp_keep)
+  sbox.simple_add('A/added')
+  sbox.simple_propset('p', 'new-add', 'A/added')
+  sbox.simple_propset('p', 'new-del', 'A/mu')
+  sbox.simple_propset('p', 'new-keep', 'iota')
   svntest.main.run_svn(None, 'del', '--force', fp_del)
 
   # Test recursive proplist
@@ -1132,21 +1121,19 @@ def url_props_ops(sbox):
   prop2 = 'prop2'
   propval2 = 'propval2'
 
-  iota_path = sbox.ospath('iota')
   iota_url = sbox.repo_url + '/iota'
-  A_path = sbox.ospath('A')
   A_url = sbox.repo_url + '/A'
 
   # Add a couple of properties
-  sbox.simple_propset(prop1, propval1, iota_path)
-  sbox.simple_propset(prop1, propval1, A_path)
+  sbox.simple_propset(prop1, propval1, 'iota')
+  sbox.simple_propset(prop1, propval1, 'A')
 
   # Commit
   sbox.simple_commit()
 
   # Add a few more properties
-  sbox.simple_propset(prop2, propval2, iota_path)
-  sbox.simple_propset(prop2, propval2, A_path)
+  sbox.simple_propset(prop2, propval2, 'iota')
+  sbox.simple_propset(prop2, propval2, 'A')
 
   # Commit again
   sbox.simple_commit()
@@ -1256,7 +1243,7 @@ def update_props_on_wc_root(sbox):
   svntest.actions.duplicate_dir(wc_dir, wc_backup)
 
   # Add a property to the root folder
-  sbox.simple_propset('red', 'rojo', wc_dir)
+  sbox.simple_propset('red', 'rojo', '')
 
   # Create expected output tree.
   expected_output = svntest.wc.State(wc_dir, {
@@ -1301,14 +1288,14 @@ def props_on_replaced_file(sbox):
 
   # Add some properties to iota
   iota_path = sbox.ospath("iota")
-  sbox.simple_propset('red', 'rojo', iota_path)
-  sbox.simple_propset('blue', 'lagoon', iota_path)
+  sbox.simple_propset('red', 'rojo', 'iota')
+  sbox.simple_propset('blue', 'lagoon', 'iota')
   sbox.simple_commit()
 
   # replace iota_path
-  sbox.simple_rm(iota_path)
+  sbox.simple_rm('iota')
   svntest.main.file_append(iota_path, "some mod")
-  sbox.simple_add(iota_path)
+  sbox.simple_add('iota')
 
   # check that the replaced file has no properties
   expected_disk = svntest.main.greek_state.copy()
@@ -1318,8 +1305,8 @@ def props_on_replaced_file(sbox):
                              expected_disk.old_tree())
 
   # now add a new property to iota
-  sbox.simple_propset('red', 'mojo', iota_path)
-  sbox.simple_propset('groovy', 'baby', iota_path)
+  sbox.simple_propset('red', 'mojo', 'iota')
+  sbox.simple_propset('groovy', 'baby', 'iota')
 
   # What we expect the disk tree to look like:
   expected_disk.tweak('iota', props={'red' : 'mojo', 'groovy' : 'baby'})
@@ -1335,15 +1322,11 @@ def depthy_wc_proplist(sbox):
   sbox.build()
   wc_dir = sbox.wc_dir
 
-  A_path = sbox.ospath('A')
-  iota_path = sbox.ospath('iota')
-  mu_path = sbox.ospath('A/mu')
-
   # Set up properties.
-  sbox.simple_propset('p', 'prop1', wc_dir)
-  sbox.simple_propset('p', 'prop2', iota_path)
-  sbox.simple_propset('p', 'prop3', A_path)
-  sbox.simple_propset('p', 'prop4', mu_path)
+  sbox.simple_propset('p', 'prop1', '')
+  sbox.simple_propset('p', 'prop2', 'iota')
+  sbox.simple_propset('p', 'prop3', 'A')
+  sbox.simple_propset('p', 'prop4', 'A/mu')
 
   # Commit.
   sbox.simple_commit()
@@ -1390,15 +1373,11 @@ def depthy_url_proplist(sbox):
   repo_url = sbox.repo_url
   wc_dir = sbox.wc_dir
 
-  A_path = sbox.ospath('A')
-  iota_path = sbox.ospath('iota')
-  mu_path = sbox.ospath('A/mu')
-
   # Set up properties.
-  sbox.simple_propset('p', 'prop1', wc_dir)
-  sbox.simple_propset('p', 'prop2', iota_path)
-  sbox.simple_propset('p', 'prop3', A_path)
-  sbox.simple_propset('p', 'prop4', mu_path)
+  sbox.simple_propset('p', 'prop1', '')
+  sbox.simple_propset('p', 'prop2', 'iota')
+  sbox.simple_propset('p', 'prop3', 'A')
+  sbox.simple_propset('p', 'prop4', 'A/mu')
 
   # Test depth-empty proplist.
   exit_code, output, errput = svntest.main.run_svn(None, 'proplist',
@@ -1512,18 +1491,17 @@ def remove_custom_ns_props(sbox):
   wc_dir = sbox.wc_dir
 
   # Add a property to a file
-  iota_path = sbox.ospath('iota')
-  sbox.simple_propset('ns:cash-sound', 'cha-ching!', iota_path)
+  sbox.simple_propset('ns:cash-sound', 'cha-ching!', 'iota')
 
   # Commit the file
-  sbox.simple_commit(iota_path)
+  sbox.simple_commit('iota')
 
   # Now, make a backup copy of the working copy
   wc_backup = sbox.add_wc_path('backup')
   svntest.actions.duplicate_dir(wc_dir, wc_backup)
 
   # Remove the property
-  sbox.simple_propdel('ns:cash-sound', iota_path)
+  sbox.simple_propdel('ns:cash-sound', 'iota')
 
   # Create expected trees.
   expected_output = svntest.wc.State(wc_dir, {
@@ -1566,8 +1544,8 @@ def props_over_time(sbox):
   # Add/tweak a property 'revision' with value revision-committed to a
   # file, commit, and then repeat this a few times.
   for rev in range(2, 4):
-    sbox.simple_propset('revision', str(rev), iota_path)
-    sbox.simple_commit(iota_path)
+    sbox.simple_propset('revision', str(rev), 'iota')
+    sbox.simple_commit('iota')
 
   # Backdate to r2 so the defaults for URL- vs. WC-style queries are
   # different.
@@ -1653,18 +1631,18 @@ def same_replacement_props(sbox):
   foo_path = sbox.ospath('foo')
 
   open(foo_path, 'w').close()
-  sbox.simple_add(foo_path)
-  sbox.simple_propset('someprop', 'someval', foo_path)
-  sbox.simple_commit(foo_path)
-  sbox.simple_rm(foo_path)
+  sbox.simple_add('foo')
+  sbox.simple_propset('someprop', 'someval', 'foo')
+  sbox.simple_commit('foo')
+  sbox.simple_rm('foo')
 
   # Now replace 'foo'.
   open(foo_path, 'w').close()
-  sbox.simple_add(foo_path)
+  sbox.simple_add('foo')
 
   # Set the same property again, with the same value.
-  sbox.simple_propset('someprop', 'someval', foo_path)
-  sbox.simple_commit(foo_path)
+  sbox.simple_propset('someprop', 'someval', 'foo')
+  sbox.simple_commit('foo')
 
   # Check if the property made it into the repository.
   foo_url = sbox.repo_url + '/foo'
@@ -1688,8 +1666,8 @@ def added_moved_file(sbox):
   open(foo_path, 'w').close()
 
   # add it
-  sbox.simple_add(foo_path)
-  sbox.simple_propset('someprop', 'someval', foo_path)
+  sbox.simple_add('foo')
+  sbox.simple_propset('someprop', 'someval', 'foo')
 
   # move it
   svntest.main.run_svn(None, 'mv', foo_path, foo2_path)
@@ -1755,17 +1733,17 @@ def rm_of_replaced_file(sbox):
 
   # Add some properties to iota and mu
   iota_path = sbox.ospath('iota')
-  sbox.simple_propset('red', 'rojo', iota_path)
-  sbox.simple_propset('blue', 'lagoon', iota_path)
+  sbox.simple_propset('red', 'rojo', 'iota')
+  sbox.simple_propset('blue', 'lagoon', 'iota')
 
   mu_path = sbox.ospath('A/mu')
-  sbox.simple_propset('yellow', 'submarine', mu_path)
-  sbox.simple_propset('orange', 'toothpick', mu_path)
+  sbox.simple_propset('yellow', 'submarine', 'A/mu')
+  sbox.simple_propset('orange', 'toothpick', 'A/mu')
 
   sbox.simple_commit()
 
   # Copy iota over the top of mu
-  sbox.simple_rm(mu_path)
+  sbox.simple_rm('A/mu')
   svntest.main.run_svn(None, 'cp', iota_path, mu_path)
 
   expected_disk = svntest.main.greek_state.copy()
@@ -1809,7 +1787,6 @@ def prop_reject_grind(sbox):
   sbox.build()
   wc_dir = sbox.wc_dir
 
-  iota_path = sbox.ospath('iota')
   mu_path = sbox.ospath('A/mu')
   mu_prej_path = sbox.ospath('A/mu.prej')
 
@@ -1817,60 +1794,60 @@ def prop_reject_grind(sbox):
   # and as incoming-delete. Also set up our local-edit and local-delete
   # properties. We also need some properties that are simply different
   # from the incoming properties
-  sbox.simple_propset('edit.diff', 'repos', iota_path)
-  sbox.simple_propset('edit.edit', 'repos', iota_path)
-  sbox.simple_propset('edit.del', 'repos', iota_path)
-  sbox.simple_propset('edit.add', 'repos', iota_path)
-  sbox.simple_propset('edit.none', 'repos', iota_path)
-  sbox.simple_propset('del.edit', 'repos', iota_path)
-  sbox.simple_propset('del.edit2', 'repos', iota_path)
-  sbox.simple_propset('del.diff', 'repos', iota_path)
-  sbox.simple_propset('del.del', 'repos', iota_path)
-  sbox.simple_propset('del.add', 'repos', iota_path)
-
-  sbox.simple_propset('edit.edit', 'local', mu_path)
-  sbox.simple_propset('add.edit', 'local', mu_path)
-  sbox.simple_propset('del.edit', 'local', mu_path)
-  sbox.simple_propset('del.edit2', 'repos', mu_path)
-  sbox.simple_propset('add.del', 'local', mu_path)
-  sbox.simple_propset('edit.del', 'local', mu_path)
-  sbox.simple_propset('del.del', 'local', mu_path)
-  sbox.simple_propset('edit.diff', 'local', mu_path)
-  sbox.simple_propset('add.diff', 'local', mu_path)
-  sbox.simple_propset('del.diff', 'local', mu_path)
+  sbox.simple_propset('edit.diff', 'repos', 'iota')
+  sbox.simple_propset('edit.edit', 'repos', 'iota')
+  sbox.simple_propset('edit.del', 'repos', 'iota')
+  sbox.simple_propset('edit.add', 'repos', 'iota')
+  sbox.simple_propset('edit.none', 'repos', 'iota')
+  sbox.simple_propset('del.edit', 'repos', 'iota')
+  sbox.simple_propset('del.edit2', 'repos', 'iota')
+  sbox.simple_propset('del.diff', 'repos', 'iota')
+  sbox.simple_propset('del.del', 'repos', 'iota')
+  sbox.simple_propset('del.add', 'repos', 'iota')
+
+  sbox.simple_propset('edit.edit', 'local', 'A/mu')
+  sbox.simple_propset('add.edit', 'local', 'A/mu')
+  sbox.simple_propset('del.edit', 'local', 'A/mu')
+  sbox.simple_propset('del.edit2', 'repos', 'A/mu')
+  sbox.simple_propset('add.del', 'local', 'A/mu')
+  sbox.simple_propset('edit.del', 'local', 'A/mu')
+  sbox.simple_propset('del.del', 'local', 'A/mu')
+  sbox.simple_propset('edit.diff', 'local', 'A/mu')
+  sbox.simple_propset('add.diff', 'local', 'A/mu')
+  sbox.simple_propset('del.diff', 'local', 'A/mu')
 
   sbox.simple_commit()
 
   # Create r3 with all the properties that we intend to use as incoming-add,
   # and then perform the incoming-edits and incoming-deletes.
-  sbox.simple_propset('add.add', 'repos', iota_path)
-  sbox.simple_propset('add.edit', 'repos', iota_path)
-  sbox.simple_propset('add.del', 'repos', iota_path)
-  sbox.simple_propset('add.diff', 'repos', iota_path)
-  sbox.simple_propset('edit.diff', 'repos.changed', iota_path)
-  sbox.simple_propset('edit.edit', 'repos.changed', iota_path)
-  sbox.simple_propset('edit.del', 'repos.changed', iota_path)
-  sbox.simple_propset('edit.add', 'repos.changed', iota_path)
-  sbox.simple_propset('edit.none', 'repos.changed', iota_path)
-  sbox.simple_propdel('del.edit', iota_path)
-  sbox.simple_propdel('del.edit2', iota_path)
-  sbox.simple_propdel('del.diff', iota_path)
-  sbox.simple_propdel('del.del', iota_path)
-  sbox.simple_propdel('del.add', iota_path)
+  sbox.simple_propset('add.add', 'repos', 'iota')
+  sbox.simple_propset('add.edit', 'repos', 'iota')
+  sbox.simple_propset('add.del', 'repos', 'iota')
+  sbox.simple_propset('add.diff', 'repos', 'iota')
+  sbox.simple_propset('edit.diff', 'repos.changed', 'iota')
+  sbox.simple_propset('edit.edit', 'repos.changed', 'iota')
+  sbox.simple_propset('edit.del', 'repos.changed', 'iota')
+  sbox.simple_propset('edit.add', 'repos.changed', 'iota')
+  sbox.simple_propset('edit.none', 'repos.changed', 'iota')
+  sbox.simple_propdel('del.edit', 'iota')
+  sbox.simple_propdel('del.edit2', 'iota')
+  sbox.simple_propdel('del.diff', 'iota')
+  sbox.simple_propdel('del.del', 'iota')
+  sbox.simple_propdel('del.add', 'iota')
   sbox.simple_commit()
 
   # Set up our victim for all the right rejects: local-adds, local-edits,
   # and local-deletes.
-  sbox.simple_propset('edit.add', 'local', mu_path)
-  sbox.simple_propset('add.add', 'local', mu_path)
-  sbox.simple_propset('del.add', 'local', mu_path)
-  sbox.simple_propset('edit.edit', 'local.changed', mu_path)
-  sbox.simple_propset('add.edit', 'local.changed', mu_path)
-  sbox.simple_propset('del.edit', 'local.changed', mu_path)
-  sbox.simple_propset('del.edit2', 'repos.changed', mu_path)
-  sbox.simple_propdel('add.del', mu_path)
-  sbox.simple_propdel('edit.del', mu_path)
-  sbox.simple_propdel('del.del', mu_path)
+  sbox.simple_propset('edit.add', 'local', 'A/mu')
+  sbox.simple_propset('add.add', 'local', 'A/mu')
+  sbox.simple_propset('del.add', 'local', 'A/mu')
+  sbox.simple_propset('edit.edit', 'local.changed', 'A/mu')
+  sbox.simple_propset('add.edit', 'local.changed', 'A/mu')
+  sbox.simple_propset('del.edit', 'local.changed', 'A/mu')
+  sbox.simple_propset('del.edit2', 'repos.changed', 'A/mu')
+  sbox.simple_propdel('add.del', 'A/mu')
+  sbox.simple_propdel('edit.del', 'A/mu')
+  sbox.simple_propdel('del.del', 'A/mu')
 
   # Now merge r2:3 into the victim to create all variants
   svntest.main.run_svn(False, 'merge', '-r2:3', sbox.repo_url + '/iota',
@@ -1951,7 +1928,7 @@ def obstructed_subdirs(sbox):
   # this test ensures we won't run into that problem again.
 
   C_path = sbox.ospath('A/C')
-  sbox.simple_propset('red', 'blue', C_path)
+  sbox.simple_propset('red', 'blue', 'A/C')
 
   expected_disk = svntest.main.greek_state.copy()
   expected_disk.tweak('A/C', props={'red': 'blue'})

Modified: subversion/branches/performance/subversion/tests/cmdline/schedule_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/tests/cmdline/schedule_tests.py?rev=1032285&r1=1032284&r2=1032285&view=diff
==============================================================================
--- subversion/branches/performance/subversion/tests/cmdline/schedule_tests.py (original)
+++ subversion/branches/performance/subversion/tests/cmdline/schedule_tests.py Sun Nov  7 14:30:34 2010
@@ -71,7 +71,7 @@ def add_files(sbox):
   svntest.main.file_append(zeta_path, "This is the file 'zeta'.")
   svntest.main.file_append(epsilon_path, "This is the file 'epsilon'.")
 
-  sbox.simple_add(delta_path, zeta_path, epsilon_path)
+  sbox.simple_add('delta', 'A/B/zeta', 'A/D/G/epsilon')
 
   # Make sure the adds show up as such in status
   expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
@@ -100,7 +100,7 @@ def add_directories(sbox):
   os.mkdir(Y_path)
   os.mkdir(Z_path)
 
-  sbox.simple_add(X_path, Y_path, Z_path)
+  sbox.simple_add('X', 'A/C/Y', 'A/D/H/Z')
 
   # Make sure the adds show up as such in status
   expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
@@ -150,7 +150,7 @@ def nested_adds(sbox):
   svntest.main.file_append(zeta_path, "This is the file 'zeta'.")
 
   # Finally, let's try adding our new files and directories
-  sbox.simple_add(X_path, Y_path, Z_path)
+  sbox.simple_add('X', 'A/C/Y', 'A/D/H/Z')
 
   # Make sure the adds show up as such in status
   expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
@@ -177,19 +177,19 @@ def add_executable(sbox):
   sbox.build(read_only = True)
 
   def runTest(wc_dir, fileName, perm, executable):
-    fileName = sbox.ospath(fileName)
+    file_ospath = sbox.ospath(fileName)
     if executable:
       expected_out = ["*\n"]
     else:
       expected_out = []
 
     # create an empty file
-    open(fileName, "w")
+    open(file_ospath, "w")
 
-    os.chmod(fileName, perm)
+    os.chmod(file_ospath, perm)
     sbox.simple_add(fileName)
     svntest.actions.run_and_verify_svn(None, expected_out, [],
-                                       'propget', "svn:executable", fileName)
+                                       'propget', "svn:executable", file_ospath)
 
   test_cases = [
     ("all_exe",   0777, 1),
@@ -210,12 +210,7 @@ def delete_files(sbox):
   wc_dir = sbox.wc_dir
 
   # Schedule some files for deletion
-  iota_path = sbox.ospath('iota')
-  mu_path = sbox.ospath('A/mu')
-  rho_path = sbox.ospath('A/D/G/rho')
-  omega_path = sbox.ospath('A/D/H/omega')
-
-  sbox.simple_rm(iota_path, mu_path, rho_path, omega_path)
+  sbox.simple_rm('iota', 'A/mu', 'A/D/G/rho', 'A/D/H/omega')
 
   # Make sure the deletes show up as such in status
   expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
@@ -233,17 +228,7 @@ def delete_dirs(sbox):
   wc_dir = sbox.wc_dir
 
   # Schedule some directories for deletion (this is recursive!)
-  E_path = sbox.ospath('A/B/E')
-  F_path = sbox.ospath('A/B/F')
-  H_path = sbox.ospath('A/D/H')
-  alpha_path = sbox.ospath('A/B/E/alpha')
-  beta_path  = sbox.ospath('A/B/E/beta')
-  chi_path   = sbox.ospath('A/D/H/chi')
-  omega_path = sbox.ospath('A/D/H/omega')
-  psi_path   = sbox.ospath('A/D/H/psi')
-
-  # Now, delete (recursively) the directories.
-  sbox.simple_rm(E_path, F_path, H_path)
+  sbox.simple_rm('A/B/E', 'A/B/F', 'A/D/H')
 
   # Make sure the deletes show up as such in status
   expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
@@ -430,8 +415,8 @@ def unschedule_missing_added(sbox):
 
   svntest.main.file_append(file1_path, "This is the file 'file1'.")
   svntest.main.file_append(file2_path, "This is the file 'file2'.")
-  sbox.simple_add(file1_path, file2_path)
-  sbox.simple_mkdir(dir1_path, dir2_path)
+  sbox.simple_add('file1', 'file2')
+  sbox.simple_mkdir('dir1', 'dir2')
 
   # Make sure the 4 adds show up as such in status
   expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
@@ -456,8 +441,8 @@ def unschedule_missing_added(sbox):
   svntest.main.run_svn(svntest.verify.AnyOutput, 'rm', file1_path)
   ### actually, the stub does not provide enough information to revert
   ### the addition, so this command will fail. marking as XFail
-  sbox.simple_rm(dir1_path)
-  sbox.simple_revert(file2_path, dir2_path)
+  sbox.simple_rm('dir1')
+  sbox.simple_revert('file2', 'dir2')
 
   # 'svn st' should now show absolutely zero local mods.
   expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
@@ -483,7 +468,7 @@ def delete_missing(sbox):
   svntest.main.safe_rmtree(H_path)
 
   # Now schedule them for deletion anyway, and make sure no error is output.
-  sbox.simple_rm(mu_path, H_path)
+  sbox.simple_rm('A/mu', 'A/D/H')
 
   # Commit the deletions.
   expected_output = svntest.wc.State(wc_dir, {
@@ -511,18 +496,14 @@ def revert_inside_newly_added_dir(sbox):
   "revert inside a newly added dir"
 
   sbox.build(read_only = True)
-  wc_dir = sbox.wc_dir
-
-  os.chdir(wc_dir)
 
   # Schedule a new directory for addition
-  os.mkdir('foo')
-  sbox.simple_add('foo')
+  sbox.simple_mkdir('foo')
 
   # Now change into the newly added directory, revert and make sure
   # no error is output.
-  os.chdir('foo')
-  sbox.simple_revert('.')
+  os.chdir(sbox.ospath('foo'))
+  svntest.main.run_svn(None, 'revert', '.')
 
 #----------------------------------------------------------------------
 # Regression test for issue #1609:
@@ -546,11 +527,11 @@ def status_add_deleted_directory(sbox):
 
   A_path = sbox.ospath('A')
 
-  sbox.simple_rm(A_path)
+  sbox.simple_rm('A')
   svntest.main.safe_rmtree(A_path)
   sbox.simple_commit()
 
-  sbox.simple_mkdir(A_path)
+  sbox.simple_mkdir('A')
 
   expected_status = svntest.actions.get_virginal_state(wc_dir, 2)
   expected_status = svntest.wc.State(wc_dir,

Modified: subversion/branches/performance/subversion/tests/cmdline/svntest/sandbox.py
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/tests/cmdline/svntest/sandbox.py?rev=1032285&r1=1032284&r2=1032285&view=diff
==============================================================================
--- subversion/branches/performance/subversion/tests/cmdline/svntest/sandbox.py (original)
+++ subversion/branches/performance/subversion/tests/cmdline/svntest/sandbox.py Sun Nov  7 14:30:34 2010
@@ -162,10 +162,18 @@ class Sandbox:
     return self._is_built
 
   def ospath(self, relpath, wc_dir=None):
+    """Return RELPATH converted to an OS-style path relative to the WC dir
+       of this sbox, or relative to OS-style path WC_DIR if supplied."""
     if wc_dir is None:
       wc_dir = self.wc_dir
     return os.path.join(wc_dir, svntest.wc.to_ospath(relpath))
 
+  def ospaths(self, relpaths, wc_dir=None):
+    """Return a list of RELPATHS but with each path converted to an OS-style
+       path relative to the WC dir of this sbox, or relative to OS-style
+       path WC_DIR if supplied."""
+    return [self.ospath(rp, wc_dir) for rp in relpaths]
+
   def redirected_root_url(self, temporary=False):
     """If TEMPORARY is set, return the URL which should be configured
        to temporarily redirect to the root of this repository;
@@ -180,47 +188,61 @@ class Sandbox:
                                   parts[1])
     
   def simple_update(self, target=None):
+    """Update the WC or TARGET.
+       TARGET is a relpath relative to the WC."""
     assert not self.read_only
     if target is None:
       target = self.wc_dir
+    else:
+      target = self.ospath(target)
     svntest.main.run_svn(False, 'update', target)
 
   def simple_commit(self, target=None):
+    """Commit the WC or TARGET with a default log message.
+       TARGET is a relpath relative to the WC."""
     assert not self.read_only
     if target is None:
       target = self.wc_dir
+    else:
+      target = self.ospath(target)
     svntest.main.run_svn(False, 'commit',
                          '-m', svntest.main.make_log_msg(),
                          target)
 
   def simple_rm(self, *targets):
+    """TARGET is a relpath relative to the WC."""
     assert len(targets) > 0
-    if len(targets) == 1 and is_url(targets[0]):
-      assert not self.read_only
-      targets = ('-m', svntests.main.make_log_msg(), targets[0])
+    targets = self.ospaths(targets)
     svntest.main.run_svn(False, 'rm', *targets)
 
   def simple_mkdir(self, *targets):
+    """TARGET is a relpath relative to the WC."""
     assert len(targets) > 0
-    if len(targets) == 1 and is_url(targets[0]):
-      assert not self.read_only
-      targets = ('-m', svntests.main.make_log_msg(), targets[0])
+    targets = self.ospaths(targets)
     svntest.main.run_svn(False, 'mkdir', *targets)
 
   def simple_add(self, *targets):
+    """TARGET is a relpath relative to the WC."""
     assert len(targets) > 0
+    targets = self.ospaths(targets)
     svntest.main.run_svn(False, 'add', *targets)
 
   def simple_revert(self, *targets):
+    """TARGET is a relpath relative to the WC."""
     assert len(targets) > 0
+    targets = self.ospaths(targets)
     svntest.main.run_svn(False, 'revert', *targets)
 
   def simple_propset(self, name, value, *targets):
+    """TARGET is a relpath relative to the WC."""
     assert len(targets) > 0
+    targets = self.ospaths(targets)
     svntest.main.run_svn(False, 'propset', name, value, *targets)
 
   def simple_propdel(self, name, *targets):
+    """TARGET is a relpath relative to the WC."""
     assert len(targets) > 0
+    targets = self.ospaths(targets)
     svntest.main.run_svn(False, 'propdel', name, *targets)
 
 

Modified: subversion/branches/performance/subversion/tests/libsvn_wc/op-depth-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/tests/libsvn_wc/op-depth-test.c?rev=1032285&r1=1032284&r2=1032285&view=diff
==============================================================================
--- subversion/branches/performance/subversion/tests/libsvn_wc/op-depth-test.c (original)
+++ subversion/branches/performance/subversion/tests/libsvn_wc/op-depth-test.c Sun Nov  7 14:30:34 2010
@@ -33,11 +33,12 @@
 #include "svn_client.h"
 #include "svn_hash.h"
 
+#include "utils.h"
+
 #include "private/svn_wc_private.h"
 #include "private/svn_sqlite.h"
 
 #include "../svn_test.h"
-#include "../svn_test_utils.h"
 
 
 /* Compare strings, like strcmp but either or both may be NULL which
@@ -115,8 +116,7 @@ wc_add(wc_baton_t *b, const char *path)
   parent_abspath = svn_dirent_dirname(path, b->pool);
   SVN_ERR(svn_wc__acquire_write_lock(NULL, b->wc_ctx, parent_abspath, FALSE,
                                      b->pool, b->pool));
-  SVN_ERR(svn_wc_add_from_disk(b->wc_ctx, path,
-                               NULL, NULL, NULL, NULL, b->pool));
+  SVN_ERR(svn_wc_add_from_disk(b->wc_ctx, path, NULL, NULL, b->pool));
   SVN_ERR(svn_wc__release_write_lock(b->wc_ctx, parent_abspath, b->pool));
   return SVN_NO_ERROR;
 }
@@ -186,6 +186,35 @@ wc_delete(wc_baton_t *b, const char *pat
                         b->pool);
 }
 
+static svn_error_t *
+wc_commit(wc_baton_t *b, const char *path)
+{
+  svn_client_ctx_t *ctx;
+  apr_array_header_t *targets = apr_array_make(b->pool, 1,
+                                               sizeof(const char *));
+
+  APR_ARRAY_PUSH(targets, const char *) = wc_path(b, path);
+  SVN_ERR(svn_client_create_context(&ctx, b->pool));
+  return svn_client_commit5(targets, svn_depth_infinity,
+                            FALSE, FALSE, /* keep locks/cl's */
+                            NULL, NULL, NULL, NULL, ctx, b->pool);
+}
+
+static svn_error_t *
+wc_update(wc_baton_t *b, const char *path, svn_revnum_t revnum)
+{
+  svn_client_ctx_t *ctx;
+  apr_array_header_t *result_revs;
+  apr_array_header_t *paths = apr_array_make(b->pool, 1,
+                                             sizeof(const char *));
+  svn_opt_revision_t revision = { svn_opt_revision_number, { revnum } };
+
+  APR_ARRAY_PUSH(paths, const char *) = wc_path(b, path);
+  SVN_ERR(svn_client_create_context(&ctx, b->pool));
+  return svn_client_update3(&result_revs, paths, &revision, svn_depth_infinity,
+                            TRUE, FALSE, FALSE, ctx, b->pool);
+}
+
 /* Create the Greek tree on disk in the WC, and commit it. */
 static svn_error_t *
 add_and_commit_greek_tree(wc_baton_t *b)
@@ -227,24 +256,14 @@ add_and_commit_greek_tree(wc_baton_t *b)
       SVN_ERR(wc_add(b, greek_tree_files[i][0]));
     }
 
-  {
-    svn_client_ctx_t *ctx;
-    apr_array_header_t *targets = apr_array_make(b->pool, 1,
-                                                 sizeof(const char *));
-
-    APR_ARRAY_PUSH(targets, const char *) = wc_path(b, "A");
-    SVN_ERR(svn_client_create_context(&ctx, b->pool));
-    SVN_ERR(svn_client_commit5(targets, svn_depth_infinity,
-                               FALSE, FALSE, /* keep locks/cl's */
-                               NULL, NULL, NULL, NULL, ctx, b->pool));
-  }
+  SVN_ERR(wc_commit(b, ""));
 
   return SVN_NO_ERROR;
 }
 
 
 /* ---------------------------------------------------------------------- */
-/* Functions for comparing expected and actual WC DB data. */
+/* Functions for comparing expected and found WC DB data. */
 
 /* Some of the fields from a NODES table row. */
 typedef struct nodes_row_t {
@@ -274,7 +293,7 @@ print_row(const nodes_row_t *row,
 /* A baton to pass through svn_hash_diff() to compare_nodes_rows(). */
 typedef struct {
     apr_hash_t *expected_hash;  /* Maps "OP_DEPTH PATH" to nodes_row_t. */
-    apr_hash_t *actual_hash;    /* Maps "OP_DEPTH PATH" to nodes_row_t. */
+    apr_hash_t *found_hash;     /* Maps "OP_DEPTH PATH" to nodes_row_t. */
     apr_pool_t *scratch_pool;
     svn_error_t *errors;        /* Chain of errors found in comparison. */
 } comparison_baton_t;
@@ -297,29 +316,30 @@ compare_nodes_rows(const void *key, apr_
 {
   comparison_baton_t *b = baton;
   nodes_row_t *expected = apr_hash_get(b->expected_hash, key, klen);
-  nodes_row_t *actual = apr_hash_get(b->actual_hash, key, klen);
+  nodes_row_t *found = apr_hash_get(b->found_hash, key, klen);
 
   /* If the ACTUAL row has field values that should have been elided
    * (because they match the parent row), then do so now. */
-  if (actual && actual->op_depth > 0 && actual->repo_relpath)
+  if (found && found->op_depth > 0 && found->repo_relpath)
     {
       const char *parent_relpath, *name, *parent_key;
-      nodes_row_t *parent_actual;
+      nodes_row_t *parent_found;
 
-      svn_relpath_split(&parent_relpath, &name, actual->local_relpath,
+      svn_relpath_split(&parent_relpath, &name, found->local_relpath,
                         b->scratch_pool);
       parent_key = apr_psprintf(b->scratch_pool, "%d %s",
-                                actual->op_depth, parent_relpath);
-      parent_actual = apr_hash_get(b->actual_hash, parent_key,
-                                   APR_HASH_KEY_STRING);
-      if (parent_actual && parent_actual > 0 && parent_actual->repo_relpath
-          && strcmp(actual->repo_relpath,
-                    svn_relpath_join(parent_actual->repo_relpath, name,
+                                found->op_depth, parent_relpath);
+      parent_found = apr_hash_get(b->found_hash, parent_key,
+                                  APR_HASH_KEY_STRING);
+      if (parent_found && parent_found->op_depth > 0
+          && parent_found->repo_relpath
+          && strcmp(found->repo_relpath,
+                    svn_relpath_join(parent_found->repo_relpath, name,
                                      b->scratch_pool)) == 0
-          && actual->repo_revnum == parent_actual->repo_revnum)
+          && found->repo_revnum == parent_found->repo_revnum)
         {
-          actual->repo_relpath = NULL;
-          actual->repo_revnum = SVN_INVALID_REVNUM;
+          found->repo_relpath = NULL;
+          found->repo_revnum = SVN_INVALID_REVNUM;
         }
     }
 
@@ -327,25 +347,25 @@ compare_nodes_rows(const void *key, apr_
     {
       b->errors = svn_error_createf(
                     SVN_ERR_TEST_FAILED, b->errors,
-                    "actual   {%s}",
-                    print_row(actual, b->scratch_pool));
+                    "found   {%s}",
+                    print_row(found, b->scratch_pool));
     }
-  else if (! actual)
+  else if (! found)
     {
       b->errors = svn_error_createf(
                     SVN_ERR_TEST_FAILED, b->errors,
                     "expected {%s}",
                     print_row(expected, b->scratch_pool));
     }
-  else if (expected->repo_revnum != actual->repo_revnum
-           || (strcmp_null(expected->repo_relpath, actual->repo_relpath) != 0)
-           || (strcmp_null(expected->presence, actual->presence) != 0))
+  else if (expected->repo_revnum != found->repo_revnum
+           || (strcmp_null(expected->repo_relpath, found->repo_relpath) != 0)
+           || (strcmp_null(expected->presence, found->presence) != 0))
     {
       b->errors = svn_error_createf(
                     SVN_ERR_TEST_FAILED, b->errors,
-                    "expected {%s}; actual {%s}",
+                    "expected {%s}; found {%s}",
                     print_row(expected, b->scratch_pool),
-                    print_row(actual, b->scratch_pool));
+                    print_row(found, b->scratch_pool));
     }
 
   /* Don't terminate the comparison: accumulate all differences. */
@@ -368,10 +388,10 @@ check_db_rows(wc_baton_t *b,
   int i;
   svn_sqlite__stmt_t *stmt;
   svn_boolean_t have_row;
-  apr_hash_t *actual_hash = apr_hash_make(b->pool);
+  apr_hash_t *found_hash = apr_hash_make(b->pool);
   apr_hash_t *expected_hash = apr_hash_make(b->pool);
   comparison_baton_t comparison_baton
-    = { expected_hash, actual_hash, b->pool, NULL };
+    = { expected_hash, found_hash, b->pool, NULL };
 
   /* Fill ACTUAL_HASH with data from the WC DB. */
   SVN_ERR(open_wc_db(&sdb, b->wc_abspath, b->pool, b->pool));
@@ -391,7 +411,7 @@ check_db_rows(wc_baton_t *b,
       row->repo_relpath = svn_sqlite__column_text(stmt, 4, b->pool);
 
       key = apr_psprintf(b->pool, "%d %s", row->op_depth, row->local_relpath);
-      apr_hash_set(actual_hash, key, APR_HASH_KEY_STRING, row);
+      apr_hash_set(found_hash, key, APR_HASH_KEY_STRING, row);
 
       SVN_ERR(svn_sqlite__step(&have_row, stmt));
     }
@@ -408,7 +428,7 @@ check_db_rows(wc_baton_t *b,
     }
 
   /* Compare EXPECTED_HASH with ACTUAL_HASH and return any errors. */
-  SVN_ERR(svn_hash_diff(expected_hash, actual_hash,
+  SVN_ERR(svn_hash_diff(expected_hash, found_hash,
                         compare_nodes_rows, &comparison_baton, b->pool));
   return comparison_baton.errors;
 }
@@ -446,6 +466,11 @@ wc_wc_copies(wc_baton_t *b)
   SVN_ERR(wc_copy(b, source_base_file, source_copied_file));
   SVN_ERR(wc_copy(b, source_base_dir, source_copied_dir));
 
+  /* Delete some nodes so that we can test copying onto these paths */
+
+  SVN_ERR(wc_delete(b, "A/D/gamma"));
+  SVN_ERR(wc_delete(b, "A/D/G"));
+
   /* Test copying various things */
 
   {
@@ -512,6 +537,26 @@ wc_wc_copies(wc_baton_t *b)
             { 4, "E-copied/beta",   "normal",   NO_COPY_FROM }
           } },
 
+        /* dir onto a schedule-delete file */
+        { source_base_dir, "A/D/gamma", {
+            { 0, "",                "normal",   1, "A/D/gamma" },
+            { 3, "",                "normal",   1, source_base_dir },
+            { 3, "alpha",           "normal",   NO_COPY_FROM },
+            { 3, "beta",            "normal",   NO_COPY_FROM }
+          } },
+
+        /* file onto a schedule-delete dir */
+        { source_base_file, "A/D/G", {
+            { 0, "",                "normal",   1, "A/D/G" },
+            { 0, "pi",              "normal",   1, "A/D/G/pi" },
+            { 0, "rho",             "normal",   1, "A/D/G/rho" },
+            { 0, "tau",             "normal",   1, "A/D/G/tau" },
+            { 3, "",                "normal",   1, source_base_file },
+            { 3, "pi",              "base-deleted",   NO_COPY_FROM },
+            { 3, "rho",             "base-deleted",   NO_COPY_FROM },
+            { 3, "tau",             "base-deleted",   NO_COPY_FROM }
+          } },
+
         { 0 }
       };
     struct subtest_t *subtest;
@@ -541,6 +586,107 @@ wc_wc_copies(wc_baton_t *b)
   return SVN_NO_ERROR;
 }
 
+/* Check that all kinds of repo-to-WC copies give correct op_depth results:
+ * create a Greek tree, make copies in it, and check the resulting DB rows. */
+static svn_error_t *
+repo_wc_copies(wc_baton_t *b)
+{
+  const char source_base_file[]   = "A/B/lambda";
+  const char source_base_dir[]    = "A/B/E";
+
+  SVN_ERR(add_and_commit_greek_tree(b));
+
+  /* Delete some nodes so that we can test copying onto these paths */
+
+  SVN_ERR(wc_delete(b, "A/D/gamma"));
+  SVN_ERR(wc_delete(b, "A/D/G"));
+
+  /* Test copying various things */
+
+  {
+#define NO_COPY_FROM SVN_INVALID_REVNUM, NULL
+    struct subtest_t
+      {
+        const char *from_path;
+        const char *to_path;
+        nodes_row_t expected[20];
+      }
+    subtests[] =
+      {
+        /* file */
+        { source_base_file, "A/C/copy1", {
+            { 3, "",                "normal",   1, source_base_file }
+          } },
+
+        /* dir */
+        { source_base_dir, "A/C/copy2", {
+            { 3, "",                "normal",   1, source_base_dir },
+            { 3, "alpha",           "normal",   NO_COPY_FROM },
+            { 3, "beta",            "normal",   NO_COPY_FROM }
+          } },
+
+        /* dir onto a schedule-delete file */
+        { source_base_dir, "A/D/gamma", {
+            { 0, "",                "normal",   1, "A/D/gamma" },
+            { 3, "",                "normal",   1, source_base_dir },
+            { 3, "alpha",           "normal",   NO_COPY_FROM },
+            { 3, "beta",            "normal",   NO_COPY_FROM }
+          } },
+
+        /* file onto a schedule-delete dir */
+        { source_base_file, "A/D/G", {
+            { 0, "",                "normal",   1, "A/D/G" },
+            { 0, "pi",              "normal",   1, "A/D/G/pi" },
+            { 0, "rho",             "normal",   1, "A/D/G/rho" },
+            { 0, "tau",             "normal",   1, "A/D/G/tau" },
+            { 3, "",                "normal",   1, source_base_file },
+            { 3, "pi",              "base-deleted",   NO_COPY_FROM },
+            { 3, "rho",             "base-deleted",   NO_COPY_FROM },
+            { 3, "tau",             "base-deleted",   NO_COPY_FROM }
+          } },
+
+        { 0 }
+      };
+    struct subtest_t *subtest;
+    svn_client_ctx_t *ctx;
+
+    /* Fix up the expected->local_relpath fields in the subtest data to be
+     * relative to the WC root rather than to the copy destination dir. */
+    for (subtest = subtests; subtest->from_path; subtest++)
+      {
+        nodes_row_t *row;
+        for (row = &subtest->expected[0]; row->local_relpath; row++)
+          row->local_relpath = svn_dirent_join(subtest->to_path,
+                                               row->local_relpath, b->pool);
+      }
+
+    /* Perform each copy. */
+    SVN_ERR(svn_client_create_context(&ctx, b->pool));
+    for (subtest = subtests; subtest->from_path; subtest++)
+      {
+        svn_opt_revision_t rev = { svn_opt_revision_number, { 1 } };
+        svn_client_copy_source_t source = { NULL, &rev, &rev };
+        apr_array_header_t *sources
+          = apr_array_make(b->pool, 0, sizeof(svn_client_copy_source_t *));
+
+        source.path = svn_uri_join(b->repos_url, subtest->from_path, b->pool);
+        APR_ARRAY_PUSH(sources, svn_client_copy_source_t *) = &source;
+        SVN_ERR(svn_client_copy6(sources,
+                                 wc_path(b, subtest->to_path),
+                                 FALSE, FALSE, FALSE,
+                                 NULL, NULL, NULL, ctx, b->pool));
+      }
+
+    /* Check each result. */
+    for (subtest = subtests; subtest->from_path; subtest++)
+      {
+        SVN_ERR(check_db_rows(b, subtest->to_path, subtest->expected));
+      }
+  }
+
+  return SVN_NO_ERROR;
+}
+
 
 static svn_error_t *
 test_wc_wc_copies(const svn_test_opts_t *opts, apr_pool_t *pool)
@@ -645,6 +791,20 @@ test_deletes(const svn_test_opts_t *opts
   return SVN_NO_ERROR;
 }
 
+static svn_error_t *
+test_adds(const svn_test_opts_t *opts, apr_pool_t *pool)
+{
+  wc_baton_t b;
+
+  b.pool = pool;
+  SVN_ERR(svn_test__create_repos_and_wc(&b.repos_url, &b.wc_abspath,
+                                        "adds", opts, pool));
+  SVN_ERR(svn_wc_context_create(&b.wc_ctx, NULL, pool, pool));
+
+
+  return SVN_NO_ERROR;
+}
+
 
 static svn_error_t *
 test_delete_of_copies(const svn_test_opts_t *opts, apr_pool_t *pool)
@@ -653,12 +813,66 @@ test_delete_of_copies(const svn_test_opt
 
   b.pool = pool;
   SVN_ERR(svn_test__create_repos_and_wc(&b.repos_url, &b.wc_abspath,
-                                        "deletes", opts, pool));
+                                        "deletes_of_copies", opts, pool));
   SVN_ERR(svn_wc_context_create(&b.wc_ctx, NULL, pool, pool));
   SVN_ERR(add_and_commit_greek_tree(&b));
-
   SVN_ERR(wc_copy(&b, "A/B", "A/B-copied"));
-  SVN_ERR(wc_delete(&b, "A/B-copied/E"));
+
+  SVN_ERR(svn_wc_delete4(b.wc_ctx, wc_path(&b, "A/B-copied/E"),
+                         FALSE, TRUE, NULL, NULL, NULL, NULL, pool));
+  {
+    nodes_row_t rows[] = {
+      { 2, "A/B-copied/E",       "not-present",       1, "A/B/E" },
+      { 2, "A/B-copied/E/alpha", "not-present",       NO_COPY_FROM},
+      { 2, "A/B-copied/E/beta",  "not-present",       NO_COPY_FROM},
+      { 0 }
+    };
+    SVN_ERR(check_db_rows(&b, "A/B-copied/E", rows));
+  }
+
+  SVN_ERR(wc_copy(&b, "A/D/G", "A/B-copied/E"));
+  {
+    nodes_row_t rows[] = {
+      { 2, "A/B-copied/E",       "not-present",       1, "A/B/E" },
+      { 2, "A/B-copied/E/alpha", "not-present",       NO_COPY_FROM},
+      { 2, "A/B-copied/E/beta",  "not-present",       NO_COPY_FROM},
+      { 3, "A/B-copied/E",       "normal",            1, "A/D/G" },
+      { 3, "A/B-copied/E/pi",    "normal",            NO_COPY_FROM},
+      { 3, "A/B-copied/E/rho",   "normal",            NO_COPY_FROM},
+      { 3, "A/B-copied/E/tau",   "normal",            NO_COPY_FROM},
+      { 0 }
+    };
+    SVN_ERR(check_db_rows(&b, "A/B-copied/E", rows));
+  }
+
+  SVN_ERR(svn_wc_delete4(b.wc_ctx, wc_path(&b, "A/B-copied/E/rho"),
+                         FALSE, TRUE, NULL, NULL, NULL, NULL, pool));
+  {
+    nodes_row_t rows[] = {
+      { 2, "A/B-copied/E",       "not-present",       1, "A/B/E" },
+      { 2, "A/B-copied/E/alpha", "not-present",       NO_COPY_FROM},
+      { 2, "A/B-copied/E/beta",  "not-present",       NO_COPY_FROM},
+      { 3, "A/B-copied/E",       "normal",            1, "A/D/G" },
+      { 3, "A/B-copied/E/pi",    "normal",            NO_COPY_FROM},
+      { 3, "A/B-copied/E/rho",   "not-present",       NO_COPY_FROM},
+      { 3, "A/B-copied/E/tau",   "normal",            NO_COPY_FROM},
+      { 0 }
+    };
+    SVN_ERR(check_db_rows(&b, "A/B-copied/E", rows));
+  }
+
+  SVN_ERR(svn_wc_delete4(b.wc_ctx, wc_path(&b, "A/B-copied/E"),
+                         FALSE, TRUE, NULL, NULL, NULL, NULL, pool));
+  {
+    nodes_row_t rows[] = {
+      { 2, "A/B-copied/E",       "not-present",       1, "A/B/E" },
+      { 2, "A/B-copied/E/alpha", "not-present",       NO_COPY_FROM},
+      { 2, "A/B-copied/E/beta",  "not-present",       NO_COPY_FROM},
+      { 0 }
+    };
+    SVN_ERR(check_db_rows(&b, "A/B-copied/E", rows));
+  }
+
   SVN_ERR(wc_copy(&b, "A/B", "A/B-copied/E"));
 
   SVN_ERR(svn_wc_delete4(b.wc_ctx, wc_path(&b, "A/B-copied/E/F"),
@@ -681,6 +895,128 @@ test_delete_of_copies(const svn_test_opt
   return SVN_NO_ERROR;
 }
 
+
+static svn_error_t *
+test_delete_with_base(const svn_test_opts_t *opts, apr_pool_t *pool)
+{
+  wc_baton_t b;
+
+  b.pool = pool;
+  SVN_ERR(svn_test__create_repos_and_wc(&b.repos_url, &b.wc_abspath,
+                                        "deletes_with_base", opts, pool));
+  SVN_ERR(svn_wc_context_create(&b.wc_ctx, NULL, pool, pool));
+  SVN_ERR(add_and_commit_greek_tree(&b));
+  SVN_ERR(wc_delete(&b, "A/B/E/beta"));
+  SVN_ERR(wc_commit(&b, ""));
+
+  SVN_ERR(svn_wc_delete4(b.wc_ctx, wc_path(&b, "A/B/E"),
+                         FALSE, TRUE, NULL, NULL, NULL, NULL, pool));
+  {
+    nodes_row_t rows[] = {
+      { 0, "A/B/E",       "normal",        1, "A/B/E"},
+      { 0, "A/B/E/alpha", "normal",        1, "A/B/E/alpha"},
+      { 0, "A/B/E/beta",  "not-present",   2, "A/B/E/beta"},
+      { 3, "A/B/E",       "base-deleted",  NO_COPY_FROM},
+      { 3, "A/B/E/alpha", "base-deleted",  NO_COPY_FROM},
+      { 0 }
+    };
+    SVN_ERR(check_db_rows(&b, "A/B/E", rows));
+  }
+
+  SVN_ERR(wc_copy(&b, "A/B/F", "A/B/E"));
+  SVN_ERR(wc_copy(&b, "A/mu",  "A/B/E/alpha"));
+  SVN_ERR(wc_copy(&b, "A/mu",  "A/B/E/beta"));
+  {
+    nodes_row_t rows[] = {
+      { 0, "A/B/E",       "normal",        1, "A/B/E"},
+      { 0, "A/B/E/alpha", "normal",        1, "A/B/E/alpha"},
+      { 0, "A/B/E/beta",  "not-present",   2, "A/B/E/beta"},
+      { 3, "A/B/E",       "base-deleted",  NO_COPY_FROM},
+      { 3, "A/B/E/alpha", "base-deleted",  NO_COPY_FROM},
+      { 3, "A/B/E",       "normal",        1, "A/B/F"},
+      { 4, "A/B/E/alpha", "normal",        1, "A/mu"},
+      { 4, "A/B/E/beta",  "normal",        1, "A/mu"},
+      { 0 }
+    };
+    SVN_ERR(check_db_rows(&b, "A/B/E", rows));
+  }
+
+  SVN_ERR(svn_wc_delete4(b.wc_ctx, wc_path(&b, "A/B/E"),
+                         FALSE, TRUE, NULL, NULL, NULL, NULL, pool));
+  {
+    nodes_row_t rows[] = {
+      { 0, "A/B/E",       "normal",        1, "A/B/E"},
+      { 0, "A/B/E/alpha", "normal",        1, "A/B/E/alpha"},
+      { 0, "A/B/E/beta",  "not-present",   2, "A/B/E/beta"},
+      { 3, "A/B/E",       "base-deleted",  NO_COPY_FROM},
+      { 3, "A/B/E/alpha", "base-deleted",  NO_COPY_FROM},
+      { 0 }
+    };
+    SVN_ERR(check_db_rows(&b, "A/B/E", rows));
+  }
+
+  return SVN_NO_ERROR;
+}
+
+static svn_error_t *
+test_repo_wc_copies(const svn_test_opts_t *opts, apr_pool_t *pool)
+{
+  wc_baton_t b;
+
+  b.pool = pool;
+  SVN_ERR(svn_test__create_repos_and_wc(&b.repos_url, &b.wc_abspath,
+                                        "wc_wc_copies", opts, pool));
+  SVN_ERR(svn_wc_context_create(&b.wc_ctx, NULL, pool, pool));
+
+  return repo_wc_copies(&b);
+}
+
+static svn_error_t *
+test_delete_with_update(const svn_test_opts_t *opts, apr_pool_t *pool)
+{
+  wc_baton_t b;
+
+  b.pool = pool;
+  SVN_ERR(svn_test__create_repos_and_wc(&b.repos_url, &b.wc_abspath,
+                                        "delete_with_update", opts, pool));
+  SVN_ERR(svn_wc_context_create(&b.wc_ctx, NULL, pool, pool));
+  SVN_ERR(wc_mkdir(&b, "A"));
+  SVN_ERR(wc_commit(&b, ""));
+  SVN_ERR(wc_mkdir(&b, "A/B"));
+  SVN_ERR(wc_mkdir(&b, "A/B/C"));
+  SVN_ERR(wc_commit(&b, ""));
+  SVN_ERR(wc_update(&b, "", 1));
+
+  SVN_ERR(wc_delete(&b, "A"));
+  SVN_ERR(wc_mkdir(&b, "A"));
+  SVN_ERR(wc_mkdir(&b, "A/B"));
+  {
+    nodes_row_t rows[] = {
+      { 0, "A",       "normal",        1, "A"},
+      { 1, "A",       "normal",        NO_COPY_FROM},
+      { 2, "A/B",     "normal",        NO_COPY_FROM},
+      { 0 }
+    };
+    SVN_ERR(check_db_rows(&b, "A", rows));
+  }
+  SVN_ERR(wc_update(&b, "", 2));
+  {
+    nodes_row_t rows[] = {
+      { 0, "A",       "normal",        2, "A"},
+      { 0, "A/B",     "normal",        2, "A/B"},
+      { 0, "A/B/C",   "normal",        2, "A/B/C"},
+      { 1, "A",       "normal",        NO_COPY_FROM},
+      { 1, "A/B",     "base-deleted",  NO_COPY_FROM},
+      { 1, "A/B/C",   "base-deleted",  NO_COPY_FROM},
+      { 2, "A/B",     "normal",        NO_COPY_FROM},
+      { 0 }
+    };
+    SVN_ERR(check_db_rows(&b, "A", rows));
+  }
+
+  return SVN_NO_ERROR;
+}
+
 /* ---------------------------------------------------------------------- */
 /* The list of test functions */
 
@@ -699,5 +1035,17 @@ struct svn_test_descriptor_t test_funcs[
     SVN_TEST_OPTS_WIMP(test_delete_of_copies,
                        "test_delete_of_copies",
                        "needs op_depth"),
+    SVN_TEST_OPTS_WIMP(test_delete_with_base,
+                       "test_delete_with_base",
+                       "needs op_depth"),
+    SVN_TEST_OPTS_WIMP(test_adds,
+                       "adds",
+                       "needs op_depth"),
+    SVN_TEST_OPTS_WIMP(test_repo_wc_copies,
+                       "test_repo_wc_copies",
+                       "needs op_depth"),
+    SVN_TEST_OPTS_WIMP(test_delete_with_update,
+                       "test_test_delete_with_update",
+                       "needs op_depth"),
     SVN_TEST_NULL
   };

Modified: subversion/branches/performance/subversion/tests/libsvn_wc/pristine-store-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/tests/libsvn_wc/pristine-store-test.c?rev=1032285&r1=1032284&r2=1032285&view=diff
==============================================================================
--- subversion/branches/performance/subversion/tests/libsvn_wc/pristine-store-test.c (original)
+++ subversion/branches/performance/subversion/tests/libsvn_wc/pristine-store-test.c Sun Nov  7 14:30:34 2010
@@ -40,6 +40,8 @@
 #include "svn_wc.h"
 #include "svn_client.h"
 
+#include "utils.h"
+
 #include "../../libsvn_wc/wc.h"
 #include "../../libsvn_wc/wc_db.h"
 #include "../../libsvn_wc/wc-queries.h"
@@ -48,7 +50,6 @@
 #include "private/svn_wc_private.h"
 
 #include "../svn_test.h"
-#include "../svn_test_utils.h"
 
 
 /* Create repos and WC, and also set *DB to a new DB context. */
@@ -215,8 +216,7 @@ pristine_get_translated(const svn_test_o
 
     SVN_ERR(svn_wc__db_wclock_obtain(wc_ctx->db, dirname, 0, FALSE, pool));
 
-    SVN_ERR(svn_wc_add_from_disk(wc_ctx, versioned_abspath,
-                                 NULL, NULL, NULL, NULL, pool));
+    SVN_ERR(svn_wc_add_from_disk(wc_ctx, versioned_abspath, NULL, NULL, pool));
     SVN_ERR(svn_wc_prop_set4(wc_ctx, versioned_abspath,
                              "svn:keywords", svn_string_create("Rev", pool),
                              FALSE, NULL, NULL, pool));

Modified: subversion/branches/performance/subversion/tests/svn_test_main.c
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/tests/svn_test_main.c?rev=1032285&r1=1032284&r2=1032285&view=diff
==============================================================================
--- subversion/branches/performance/subversion/tests/svn_test_main.c (original)
+++ subversion/branches/performance/subversion/tests/svn_test_main.c Sun Nov  7 14:30:34 2010
@@ -464,6 +464,5 @@ main(int argc, const char *argv[])
   svn_pool_destroy(pool);      /* takes test_pool with it */
   apr_terminate();
 
-  exit(got_error);
   return got_error;
 }