You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by hw...@apache.org on 2010/08/10 22:56:05 UTC

svn commit: r984206 [33/35] - in /subversion/branches/ignore-mergeinfo: ./ build/ build/generator/ build/generator/templates/ build/hudson/ build/hudson/jobs/subversion-1.6.x-solaris/ build/hudson/jobs/subversion-1.6.x-ubuntu/ build/hudson/jobs/subvers...

Modified: subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/mergeinfo_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/mergeinfo_tests.py?rev=984206&r1=984205&r2=984206&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/mergeinfo_tests.py (original)
+++ subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/mergeinfo_tests.py Tue Aug 10 20:55:56 2010
@@ -74,8 +74,8 @@ def mergeinfo(sbox):
   wc_dir = sbox.wc_dir
 
   # Dummy up some mergeinfo.
-  svntest.actions.run_and_verify_svn(None, None, [], "merge", "-c", "1",
-                                     "--record-only", sbox.repo_url, wc_dir)
+  svntest.actions.run_and_verify_svn(None, None, [], 'ps', SVN_PROP_MERGEINFO,
+                                     '/:1', wc_dir)
   svntest.actions.run_and_verify_mergeinfo(adjust_error_for_server_version(""),
                                            ['1'], sbox.repo_url, wc_dir)
 
@@ -221,6 +221,10 @@ def non_inheritable_mergeinfo(sbox):
                                            D_COPY_path,
                                            '--show-revs', 'eligible')
 
+# Test for -R option with svn mergeinfo subcommand.
+#
+# Test for issue #3242 'Subversion demands unnecessary access to parent
+# directories of operations'
 def recursive_mergeinfo(sbox):
   "test svn mergeinfo -R"
 
@@ -357,6 +361,21 @@ def recursive_mergeinfo(sbox):
                                            '--show-revs', 'merged',
                                            '--depth', 'infinity')
 
+  # A couple tests of problems found with initial issue #3242 fixes.
+  # We should be able to check for the merged revs from a URL to a URL
+  # when the latter has explicit mergeinfo...
+  svntest.actions.run_and_verify_mergeinfo(
+    adjust_error_for_server_version(''), ['6'],
+    sbox.repo_url + '/A2/D/H',
+    sbox.repo_url + '/A_COPY/D/H',
+    '--show-revs', 'merged')
+  # ...and when the latter has inherited mergeinfo.
+  svntest.actions.run_and_verify_mergeinfo(
+    adjust_error_for_server_version(''), ['6'],
+    sbox.repo_url + '/A2/D/H/omega',
+    sbox.repo_url + '/A_COPY/D/H/omega',
+    '--show-revs', 'merged')
+  
 # Test for issue #3180 'svn mergeinfo ignores peg rev for WC target'.
 def mergeinfo_on_pegged_wc_path(sbox):
   "svn mergeinfo on pegged working copy target"

Modified: subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/obliterate_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/obliterate_tests.py?rev=984206&r1=984205&r2=984206&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/obliterate_tests.py (original)
+++ subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/obliterate_tests.py Tue Aug 10 20:55:56 2010
@@ -201,7 +201,13 @@ def pre_obliterate_hook(sbox):
 # Run the tests
 
 def supports_obliterate():
-  return svntest.main.is_ra_type_file() and not svntest.main.is_fs_type_fsfs()
+  if svntest.main.is_ra_type_file() and not svntest.main.is_fs_type_fsfs():
+    code, output, error = svntest.main.run_svn(None, "help")
+    for line in output:
+      if line.find("obliterate") != -1:
+        return True
+  return False
+    
 
 # list all tests here, starting with None:
 test_list = [ None,

Modified: subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/patch_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/patch_tests.py?rev=984206&r1=984205&r2=984206&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/patch_tests.py (original)
+++ subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/patch_tests.py Tue Aug 10 20:55:56 2010
@@ -46,6 +46,11 @@ SkipUnless = svntest.testcase.SkipUnless
 Item = svntest.wc.StateItem
 XFail = svntest.testcase.XFail
 
+def make_patch_path(sbox, name='my.patch'):
+  dir = sbox.add_wc_path('patches')
+  os.mkdir(dir)
+  return os.path.abspath(os.path.join(dir, name))
+
 ########################################################################
 #Tests
 
@@ -55,7 +60,7 @@ def patch(sbox):
   sbox.build()
   wc_dir = sbox.wc_dir
 
-  patch_file_path = tempfile.mkstemp(dir=os.path.abspath(svntest.main.temp_dir))[1]
+  patch_file_path = make_patch_path(sbox)
   mu_path = os.path.join(wc_dir, 'A', 'mu')
 
   mu_contents = [
@@ -225,8 +230,7 @@ def patch_absolute_paths(sbox):
   sbox.build()
   wc_dir = sbox.wc_dir
 
-  dir = os.path.abspath(svntest.main.temp_dir)
-  patch_file_path = tempfile.mkstemp(dir=dir)[1]
+  patch_file_path = make_patch_path(sbox)
 
   os.chdir(wc_dir)
 
@@ -257,7 +261,7 @@ def patch_absolute_paths(sbox):
   lambda_path = os.path.join(os.path.sep, 'A', 'B', 'lambda')
   expected_output = [
     'U         %s\n' % os.path.join('A', 'B', 'E', 'alpha'),
-    'Skipped \'%s\'\n' % lambda_path,
+    'Skipped missing target: \'%s\'\n' % lambda_path,
     'Summary of conflicts:\n',
     '  Skipped paths: 1\n'
   ]
@@ -289,7 +293,7 @@ def patch_offset(sbox):
   sbox.build()
   wc_dir = sbox.wc_dir
 
-  patch_file_path = tempfile.mkstemp(dir=os.path.abspath(svntest.main.temp_dir))[1]
+  patch_file_path = make_patch_path(sbox)
   mu_path = os.path.join(wc_dir, 'A', 'mu')
   iota_path = os.path.join(wc_dir, 'iota')
 
@@ -502,7 +506,7 @@ def patch_chopped_leading_spaces(sbox):
   sbox.build()
   wc_dir = sbox.wc_dir
 
-  patch_file_path = tempfile.mkstemp(dir=os.path.abspath(svntest.main.temp_dir))[1]
+  patch_file_path = make_patch_path(sbox)
   mu_path = os.path.join(wc_dir, 'A', 'mu')
 
   mu_contents = [
@@ -667,12 +671,12 @@ def patch_chopped_leading_spaces(sbox):
 
 
 def patch_strip1(sbox):
-  "patch with -p1"
+  "patch with --strip-count 1"
 
   sbox.build()
   wc_dir = sbox.wc_dir
 
-  patch_file_path = tempfile.mkstemp(dir=os.path.abspath(svntest.main.temp_dir))[1]
+  patch_file_path = make_patch_path(sbox)
   mu_path = os.path.join(wc_dir, 'A', 'mu')
 
   mu_contents = [
@@ -834,7 +838,93 @@ def patch_strip1(sbox):
                                        None, # expected err
                                        1, # check-props
                                        1, # dry-run
-                                       '-p1')
+                                       '--strip-count', '1')
+
+def patch_no_index_line(sbox):
+  "patch with no index lines"
+
+  sbox.build()
+  wc_dir = sbox.wc_dir
+
+  patch_file_path = make_patch_path(sbox)
+  gamma_path = os.path.join(wc_dir, 'A', 'D', 'gamma')
+  iota_path = os.path.join(wc_dir, 'iota')
+
+  gamma_contents = [
+    "\n",
+    "Another line before\n",
+    "A third line before\n",
+    "This is the file 'gamma'.\n",
+    "A line after\n",
+    "Another line after\n",
+    "A third line after\n",
+  ]
+
+  svntest.main.file_write(gamma_path, ''.join(gamma_contents))
+  expected_output = svntest.wc.State(wc_dir, {
+    'A/D/gamma'  : Item(verb='Sending'),
+    })
+  expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
+  expected_status.tweak('A/D/gamma', wc_rev=2)
+  svntest.actions.run_and_verify_commit(wc_dir, expected_output,
+                                        expected_status, None, wc_dir)
+  unidiff_patch = [
+    "--- A/D/gamma\t(revision 1)\n",
+    "+++ A/D/gamma\t(working copy)\n",
+    "@@ -1,7 +1,7 @@\n",
+    " \n",
+    " Another line before\n",
+    " A third line before\n",
+    "-This is the file 'gamma'.\n",
+    "+It is the file 'gamma'.\n",
+    " A line after\n",
+    " Another line after\n",
+    " A third line after\n",
+    "--- iota\t(revision 1)\n",
+    "+++ iota\t(working copy)\n",
+    "@@ -1 +1,2 @@\n",
+    " This is the file 'iota'.\n",
+    "+Some more bytes\n",
+  ]
+
+  svntest.main.file_write(patch_file_path, ''.join(unidiff_patch))
+
+  gamma_contents = [
+    "\n",
+    "Another line before\n",
+    "A third line before\n",
+    "It is the file 'gamma'.\n",
+    "A line after\n",
+    "Another line after\n",
+    "A third line after\n",
+  ]
+  iota_contents = [
+    "This is the file 'iota'.\n",
+    "Some more bytes\n",
+  ]
+  expected_output = [
+    'U         %s\n' % os.path.join(wc_dir, 'A', 'D', 'gamma'),
+    'U         %s\n' % os.path.join(wc_dir, 'iota'),
+  ]
+
+  expected_disk = svntest.main.greek_state.copy()
+  expected_disk.tweak('A/D/gamma', contents=''.join(gamma_contents))
+  expected_disk.tweak('iota', contents=''.join(iota_contents))
+
+  expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
+  expected_status.tweak('A/D/gamma', status='M ', wc_rev=2)
+  expected_status.tweak('iota', status='M ', wc_rev=1)
+
+  expected_skip = wc.State('', { })
+
+  svntest.actions.run_and_verify_patch(wc_dir, os.path.abspath(patch_file_path),
+                                       expected_output,
+                                       expected_disk,
+                                       expected_status,
+                                       expected_skip,
+                                       None, # expected err
+                                       1, # check-props
+                                       1) # dry-run
 
 def patch_add_new_dir(sbox):
   "patch with missing dirs"
@@ -842,7 +932,7 @@ def patch_add_new_dir(sbox):
   sbox.build()
   wc_dir = sbox.wc_dir
 
-  patch_file_path = tempfile.mkstemp(dir=os.path.abspath(svntest.main.temp_dir))[1]
+  patch_file_path = make_patch_path(sbox)
 
   # The first diff is adding 'new' with two missing dirs. The second is
   # adding 'new' with one missing dir to a 'A' that is locally deleted
@@ -880,8 +970,8 @@ def patch_add_new_dir(sbox):
     'A         %s\n' % os.path.join(wc_dir, 'X'),
     'A         %s\n' % os.path.join(wc_dir, 'X', 'Y'),
     'A         %s\n' % os.path.join(wc_dir, 'X', 'Y', 'new'),
-    'Skipped \'%s\'\n' % A_C_Y_new_path,
-    'Skipped \'%s\'\n' % A_Z_new_path,
+    'Skipped missing target: \'%s\'\n' % A_C_Y_new_path,
+    'Skipped missing target: \'%s\'\n' % A_Z_new_path,
     'Summary of conflicts:\n',
     '  Skipped paths: 2\n',
   ]
@@ -911,6 +1001,110 @@ def patch_add_new_dir(sbox):
                                        None, # expected err
                                        1, # check-props
                                        1) # dry-run
+def patch_remove_empty_dirs(sbox):
+  "patch deleting all children of a directory"
+
+  sbox.build()
+  wc_dir = sbox.wc_dir
+  
+  patch_file_path = make_patch_path(sbox)
+
+  # Contents of B:
+  # A/B/lamba
+  # A/B/F
+  # A/B/E/{alpha,beta}
+  # Before patching we've deleted F, which means that B is empty after patching and 
+  # should be removed.
+  #
+  # Contents of H:
+  # A/D/H/{chi,psi,omega}
+  # Before patching, chi has been removed by a non-svn operation which means it has
+  # status missing. The patch deletes the other two files but should not delete H.
+
+  unidiff_patch = [
+    "Index: psi\n",
+    "===================================================================\n",
+    "--- A/D/H/psi\t(revision 0)\n",
+    "+++ A/D/H/psi\t(revision 0)\n",
+    "@@ -1 +0,0 @@\n",
+    "-This is the file 'psi'.\n",
+    "Index: omega\n",
+    "===================================================================\n",
+    "--- A/D/H/omega\t(revision 0)\n",
+    "+++ A/D/H/omega\t(revision 0)\n",
+    "@@ -1 +0,0 @@\n",
+    "-This is the file 'omega'.\n",
+    "Index: lambda\n",
+    "===================================================================\n",
+    "--- A/B/lambda\t(revision 0)\n",
+    "+++ A/B/lambda\t(revision 0)\n",
+    "@@ -1 +0,0 @@\n",
+    "-This is the file 'lambda'.\n",
+    "Index: alpha\n",
+    "===================================================================\n",
+    "--- A/B/E/alpha\t(revision 0)\n",
+    "+++ A/B/E/alpha\t(revision 0)\n",
+    "@@ -1 +0,0 @@\n",
+    "-This is the file 'alpha'.\n",
+    "Index: beta\n",
+    "===================================================================\n",
+    "--- A/B/E/beta\t(revision 0)\n",
+    "+++ A/B/E/beta\t(revision 0)\n",
+    "@@ -1 +0,0 @@\n",
+    "-This is the file 'beta'.\n",
+  ]
+
+  svntest.main.file_write(patch_file_path, ''.join(unidiff_patch))
+
+  F_path = os.path.join(wc_dir, 'A', 'B', 'F')
+  svntest.actions.run_and_verify_svn("Deleting F failed", None, [],
+                                     'rm', F_path)
+  svntest.actions.run_and_verify_svn("Update failed", None, [],
+                                     'up', wc_dir)
+
+  # We should be able to handle one path beeing missing.
+  os.remove(os.path.join(wc_dir, 'A', 'D', 'H', 'chi'))
+
+  expected_output = [
+    'D         %s\n' % os.path.join(wc_dir, 'A', 'D', 'H', 'psi'),
+    'D         %s\n' % os.path.join(wc_dir, 'A', 'D', 'H', 'omega'),
+    'D         %s\n' % os.path.join(wc_dir, 'A', 'B', 'lambda'),
+    'D         %s\n' % os.path.join(wc_dir, 'A', 'B', 'E', 'alpha'),
+    'D         %s\n' % os.path.join(wc_dir, 'A', 'B', 'E', 'beta'),
+    'D         %s\n' % os.path.join(wc_dir, 'A', 'B'),
+  ]
+
+  expected_disk = svntest.main.greek_state.copy()
+  expected_disk.remove('A/D/H/chi')
+  expected_disk.remove('A/D/H/psi')
+  expected_disk.remove('A/D/H/omega')
+  expected_disk.remove('A/B/lambda')
+  expected_disk.remove('A/B/E/alpha')
+  expected_disk.remove('A/B/E/beta')
+
+  expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
+  expected_status.add({'A/D/H/chi' : Item(status='! ', wc_rev=1)})
+  expected_status.add({'A/D/H/omega' : Item(status='D ', wc_rev=1)})
+  expected_status.add({'A/D/H/psi' : Item(status='D ', wc_rev=1)})
+  expected_status.add({'A/B' : Item(status='D ', wc_rev=1)})
+  expected_status.add({'A/B/E' : Item(status='D ', wc_rev=1)})
+  expected_status.add({'A/B/E/beta' : Item(status='D ', wc_rev=1)})
+  expected_status.add({'A/B/E/alpha' : Item(status='D ', wc_rev=1)})
+  expected_status.add({'A/B/lambda' : Item(status='D ', wc_rev=1)})
+  expected_status.add({'A/B/F' : Item(status='D ', wc_rev=1)})
+
+  expected_skip = wc.State('', { })
+
+  svntest.actions.run_and_verify_patch(wc_dir, 
+                                       os.path.abspath(patch_file_path),
+                                       expected_output,
+                                       expected_disk,
+                                       expected_status,
+                                       expected_skip,
+                                       None, # expected err
+                                       1, # check-props
+                                       1) # dry-run
+
 
 def patch_reject(sbox):
   "patch which is rejected"
@@ -930,7 +1124,7 @@ def patch_reject(sbox):
   svntest.actions.run_and_verify_commit(wc_dir, expected_output,
                                         expected_status, None, wc_dir)
 
-  patch_file_path = tempfile.mkstemp(dir=os.path.abspath(svntest.main.temp_dir))[1]
+  patch_file_path = make_patch_path(sbox)
 
   # Apply patch
 
@@ -1003,7 +1197,7 @@ def patch_keywords(sbox):
   svntest.actions.run_and_verify_commit(wc_dir, expected_output,
                                         expected_status, None, wc_dir)
 
-  patch_file_path = tempfile.mkstemp(dir=os.path.abspath(svntest.main.temp_dir))[1]
+  patch_file_path = make_patch_path(sbox)
 
   # Apply patch
 
@@ -1048,7 +1242,7 @@ def patch_with_fuzz(sbox):
 
   sbox.build()
   wc_dir = sbox.wc_dir
-  patch_file_path = tempfile.mkstemp(dir=os.path.abspath(svntest.main.temp_dir))[1]
+  patch_file_path = make_patch_path(sbox)
 
   mu_path = os.path.join(wc_dir, 'A', 'mu')
 
@@ -1188,7 +1382,7 @@ def patch_reverse(sbox):
   sbox.build()
   wc_dir = sbox.wc_dir
 
-  patch_file_path = tempfile.mkstemp(dir=os.path.abspath(svntest.main.temp_dir))[1]
+  patch_file_path = make_patch_path(sbox)
   mu_path = os.path.join(wc_dir, 'A', 'mu')
 
   mu_contents = [
@@ -1358,7 +1552,7 @@ def patch_no_svn_eol_style(sbox):
   sbox.build()
   wc_dir = sbox.wc_dir
 
-  patch_file_path = tempfile.mkstemp(dir=os.path.abspath(svntest.main.temp_dir))[1]
+  patch_file_path = make_patch_path(sbox)
   mu_path = os.path.join(wc_dir, 'A', 'mu')
 
   if os.name == 'nt':
@@ -1461,7 +1655,7 @@ def patch_with_svn_eol_style(sbox):
   sbox.build()
   wc_dir = sbox.wc_dir
 
-  patch_file_path = tempfile.mkstemp(dir=os.path.abspath(svntest.main.temp_dir))[1]
+  patch_file_path = make_patch_path(sbox)
   mu_path = os.path.join(wc_dir, 'A', 'mu')
 
 
@@ -1575,7 +1769,7 @@ def patch_with_svn_eol_style_uncommitted
   sbox.build()
   wc_dir = sbox.wc_dir
 
-  patch_file_path = tempfile.mkstemp(dir=os.path.abspath(svntest.main.temp_dir))[1]
+  patch_file_path = make_patch_path(sbox)
   mu_path = os.path.join(wc_dir, 'A', 'mu')
 
 
@@ -1677,13 +1871,13 @@ def patch_with_svn_eol_style_uncommitted
       expected_output = ["Reverted '" + mu_path + "'\n"]
       svntest.actions.run_and_verify_svn(None, expected_output, [], 'revert', '-R', wc_dir)
 
-def patch_with_include_patterns(sbox):
-  "patch with include-patterns"
+def patch_with_ignore_whitespace(sbox):
+  "ignore whitespace when patching"
 
   sbox.build()
   wc_dir = sbox.wc_dir
 
-  patch_file_path = tempfile.mkstemp(dir=os.path.abspath(svntest.main.temp_dir))[1]
+  patch_file_path = make_patch_path(sbox)
   mu_path = os.path.join(wc_dir, 'A', 'mu')
 
   mu_contents = [
@@ -1692,9 +1886,9 @@ def patch_with_include_patterns(sbox):
     "We wish to congratulate you over your email success in our computer\n",
     "Balloting. This is a Millennium Scientific Electronic Computer Draw\n",
     "in which email addresses were used. All participants were selected\n",
-    "through a computer ballot system drawn from over 100,000 company\n",
-    "and 50,000,000 individual email addresses from all over the world.\n",
-    "\n",
+    "through a computer ballot system drawn from over 100,000 company \n",
+    "and 50,000,000\t\tindividual email addresses from all over the world. \n",
+    " \n",
     "Your email address drew and have won the sum of  750,000 Euros\n",
     "( Seven Hundred and Fifty Thousand Euros) in cash credited to\n",
     "file with\n",
@@ -1723,62 +1917,38 @@ def patch_with_include_patterns(sbox):
   svntest.actions.run_and_verify_commit(wc_dir, expected_output,
                                         expected_status, None, wc_dir)
 
-  # Apply patch
+  # Apply patch with leading and trailing spaces removed and tabs transformed 
+  # to spaces. The patch should match and the hunks should be written to the
+  # target as-is.
 
   unidiff_patch = [
-    "Index: A/D/gamma\n",
-    "===================================================================\n",
-    "--- A/D/gamma\t(revision 1)\n",
-    "+++ A/D/gamma\t(working copy)\n",
-    "@@ -1 +1 @@\n",
-    "-This is the file 'gamma'.\n",
-    "+It is the file 'gamma'.\n",
-    "Index: iota\n",
+    "Index: A/mu\n",
     "===================================================================\n",
-    "--- iota\t(revision 1)\n",
-    "+++ iota\t(working copy)\n",
-    "@@ -1 +1,2 @@\n",
-    " This is the file 'iota'.\n",
-    "+Some more bytes\n",
-    "\n",
-    "Index: new\n",
-    "===================================================================\n",
-    "--- new	(revision 0)\n",
-    "+++ new	(revision 0)\n",
-    "@@ -0,0 +1 @@\n",
-    "+new\n",
-    "\n",
     "--- A/mu.orig	2009-06-24 15:23:55.000000000 +0100\n",
     "+++ A/mu	2009-06-24 15:21:23.000000000 +0100\n",
     "@@ -6,6 +6,9 @@\n",
-    " through a computer ballot system drawn from over 100,000 company\n",
-    " and 50,000,000 individual email addresses from all over the world.\n",
-    " \n",
+    "through a computer ballot system drawn from over 100,000 company\n",
+    "and 50,000,000 individual email addresses from all over the world.\n",
+    "\n",
     "+It is a promotional program aimed at encouraging internet users;\n",
     "+therefore you do not need to buy ticket to enter for it.\n",
     "+\n",
-    " Your email address drew and have won the sum of  750,000 Euros\n",
-    " ( Seven Hundred and Fifty Thousand Euros) in cash credited to\n",
-    " file with\n",
+    "Your email address drew and have won the sum of  750,000 Euros\n",
+    "( Seven Hundred and Fifty Thousand Euros) in cash credited to\n",
+    "file with\n",
     "@@ -14,11 +17,8 @@\n",
-    "     BATCH NUMBERS :\n",
-    "     EULO/1007/444/606/08;\n",
-    "     SERIAL NUMBER: 45327\n",
+    "BATCH NUMBERS :\n",
+    "EULO/1007/444/606/08;\n",
+    "SERIAL NUMBER: 45327\n",
     "-and PROMOTION DATE: 13th June. 2009\n",
     "+and PROMOTION DATE: 14th June. 2009\n",
-    " \n",
-    " To claim your winning prize, you are to contact the appointed\n",
-    " agent below as soon as possible for the immediate release of your\n",
-    " winnings with the below details.\n",
+    "\n",
+    "To claim your winning prize, you are to contact the appointed\n",
+    "agent below as soon as possible for the immediate release of your\n",
+    "winnings with the below details.\n",
     "-\n",
     "-Again, we wish to congratulate you over your email success in our\n",
     "-computer Balloting.\n",
-    "Index: A/B/E/beta\n",
-    "===================================================================\n",
-    "--- A/B/E/beta	(revision 1)\n",
-    "+++ A/B/E/beta	(working copy)\n",
-    "@@ -1 +0,0 @@\n",
-    "-This is the file 'beta'.\n",
   ]
 
   svntest.main.file_write(patch_file_path, ''.join(unidiff_patch))
@@ -1803,9 +1973,9 @@ def patch_with_include_patterns(sbox):
     "file with\n",
     "    REFERENCE NUMBER: ESP/WIN/008/05/10/MA;\n",
     "    WINNING NUMBER : 14-17-24-34-37-45-16\n",
-    "    BATCH NUMBERS :\n",
-    "    EULO/1007/444/606/08;\n",
-    "    SERIAL NUMBER: 45327\n",
+    "BATCH NUMBERS :\n",
+    "EULO/1007/444/606/08;\n",
+    "SERIAL NUMBER: 45327\n",
     "and PROMOTION DATE: 14th June. 2009\n",
     "\n",
     "To claim your winning prize, you are to contact the appointed\n",
@@ -1833,15 +2003,15 @@ def patch_with_include_patterns(sbox):
                                        None, # expected err
                                        1, # check-props
                                        1, # dry-run
-                                       "--include-pattern", "A/mu")
+                                       "--ignore-whitespace",)
 
-def patch_with_exclude_patterns(sbox):
-  "patch with exclude-patterns"
+def patch_replace_locally_deleted_file(sbox):
+  "patch that replaces a locally deleted file"
 
   sbox.build()
   wc_dir = sbox.wc_dir
 
-  patch_file_path = tempfile.mkstemp(dir=os.path.abspath(svntest.main.temp_dir))[1]
+  patch_file_path = make_patch_path(sbox)
   mu_path = os.path.join(wc_dir, 'A', 'mu')
 
   mu_contents = [
@@ -1881,105 +2051,32 @@ def patch_with_exclude_patterns(sbox):
   svntest.actions.run_and_verify_commit(wc_dir, expected_output,
                                         expected_status, None, wc_dir)
 
-  # Apply patch
+  # Locally delete mu
+  svntest.main.run_svn(None, 'rm', mu_path)
+
+  # Apply patch that re-creates mu
 
   unidiff_patch = [
-    "Index: A/D/gamma\n",
     "===================================================================\n",
-    "--- A/D/gamma\t(revision 1)\n",
-    "+++ A/D/gamma\t(working copy)\n",
-    "@@ -1 +1 @@\n",
-    "-This is the file 'gamma'.\n",
-    "+It is the file 'gamma'.\n",
-    "Index: iota\n",
-    "===================================================================\n",
-    "--- iota\t(revision 1)\n",
-    "+++ iota\t(working copy)\n",
-    "@@ -1 +1,2 @@\n",
-    " This is the file 'iota'.\n",
-    "+Some more bytes\n",
-    "\n",
-    "Index: new\n",
-    "===================================================================\n",
-    "--- new	(revision 0)\n",
-    "+++ new	(revision 0)\n",
-    "@@ -0,0 +1 @@\n",
-    "+new\n",
-    "\n",
     "--- A/mu.orig	2009-06-24 15:23:55.000000000 +0100\n",
     "+++ A/mu	2009-06-24 15:21:23.000000000 +0100\n",
-    "@@ -6,6 +6,9 @@\n",
-    " through a computer ballot system drawn from over 100,000 company\n",
-    " and 50,000,000 individual email addresses from all over the world.\n",
-    " \n",
-    "+It is a promotional program aimed at encouraging internet users;\n",
-    "+therefore you do not need to buy ticket to enter for it.\n",
-    "+\n",
-    " Your email address drew and have won the sum of  750,000 Euros\n",
-    " ( Seven Hundred and Fifty Thousand Euros) in cash credited to\n",
-    " file with\n",
-    "@@ -14,11 +17,8 @@\n",
-    "     BATCH NUMBERS :\n",
-    "     EULO/1007/444/606/08;\n",
-    "     SERIAL NUMBER: 45327\n",
-    "-and PROMOTION DATE: 13th June. 2009\n",
-    "+and PROMOTION DATE: 14th June. 2009\n",
-    " \n",
-    " To claim your winning prize, you are to contact the appointed\n",
-    " agent below as soon as possible for the immediate release of your\n",
-    " winnings with the below details.\n",
-    "-\n",
-    "-Again, we wish to congratulate you over your email success in our\n",
-    "-computer Balloting.\n",
-    "Index: A/B/E/beta\n",
-    "===================================================================\n",
-    "--- A/B/E/beta	(revision 1)\n",
-    "+++ A/B/E/beta	(working copy)\n",
-    "@@ -1 +0,0 @@\n",
-    "-This is the file 'beta'.\n",
+    "@@ -0,0 +1 @@\n",
+    "+new\n",
   ]
 
   svntest.main.file_write(patch_file_path, ''.join(unidiff_patch))
 
-  gamma_contents = "It is the file 'gamma'.\n"
-  iota_contents = "This is the file 'iota'.\nSome more bytes\n"
-  new_contents = "new\n"
-  mu_contents = [
-    "Dear internet user,\n",
-    "\n",
-    "We wish to congratulate you over your email success in our computer\n",
-    "Balloting. This is a Millennium Scientific Electronic Computer Draw\n",
-    "in which email addresses were used. All participants were selected\n",
-    "through a computer ballot system drawn from over 100,000 company\n",
-    "and 50,000,000 individual email addresses from all over the world.\n",
-    "\n",
-    "It is a promotional program aimed at encouraging internet users;\n",
-    "therefore you do not need to buy ticket to enter for it.\n",
-    "\n",
-    "Your email address drew and have won the sum of  750,000 Euros\n",
-    "( Seven Hundred and Fifty Thousand Euros) in cash credited to\n",
-    "file with\n",
-    "    REFERENCE NUMBER: ESP/WIN/008/05/10/MA;\n",
-    "    WINNING NUMBER : 14-17-24-34-37-45-16\n",
-    "    BATCH NUMBERS :\n",
-    "    EULO/1007/444/606/08;\n",
-    "    SERIAL NUMBER: 45327\n",
-    "and PROMOTION DATE: 14th June. 2009\n",
-    "\n",
-    "To claim your winning prize, you are to contact the appointed\n",
-    "agent below as soon as possible for the immediate release of your\n",
-    "winnings with the below details.\n",
-  ]
+  mu_contents = "new\n"
 
   expected_output = [
-    'U         %s\n' % os.path.join(wc_dir, 'A', 'mu'),
+    'A         %s\n' % mu_path,
   ]
 
   expected_disk = svntest.main.greek_state.copy()
   expected_disk.tweak('A/mu', contents=''.join(mu_contents))
 
   expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
-  expected_status.tweak('A/mu', status='M ', wc_rev=2)
+  expected_status.tweak('A/mu', status='R ', wc_rev=2)
 
   expected_skip = wc.State('', { })
 
@@ -1990,162 +2087,69 @@ def patch_with_exclude_patterns(sbox):
                                        expected_skip,
                                        None, # expected err
                                        1, # check-props
-                                       1, # dry-run
-                                       "--exclude-pattern", "A/*/gamma",
-                                       "--exclude-pattern", "new",
-                                       "--exclude-pattern", "*a")
-
-def patch_with_include_exclude_patterns(sbox):
-  "patch with include-patterns and exclude-patterns"
+                                       1) # dry-run
+# Regression test for #3643
+def patch_no_eol_at_eof(sbox):
+  "patch with no eol at eof"
 
   sbox.build()
   wc_dir = sbox.wc_dir
 
-  patch_file_path = tempfile.mkstemp(dir=os.path.abspath(svntest.main.temp_dir))[1]
-  mu_path = os.path.join(wc_dir, 'A', 'mu')
+  patch_file_path = make_patch_path(sbox)
+  iota_path = os.path.join(wc_dir, 'iota')
 
-  mu_contents = [
-    "Dear internet user,\n",
-    "\n",
-    "We wish to congratulate you over your email success in our computer\n",
-    "Balloting. This is a Millennium Scientific Electronic Computer Draw\n",
-    "in which email addresses were used. All participants were selected\n",
-    "through a computer ballot system drawn from over 100,000 company\n",
-    "and 50,000,000 individual email addresses from all over the world.\n",
-    "\n",
-    "Your email address drew and have won the sum of  750,000 Euros\n",
-    "( Seven Hundred and Fifty Thousand Euros) in cash credited to\n",
-    "file with\n",
-    "    REFERENCE NUMBER: ESP/WIN/008/05/10/MA;\n",
-    "    WINNING NUMBER : 14-17-24-34-37-45-16\n",
-    "    BATCH NUMBERS :\n",
-    "    EULO/1007/444/606/08;\n",
-    "    SERIAL NUMBER: 45327\n",
-    "and PROMOTION DATE: 13th June. 2009\n",
-    "\n",
-    "To claim your winning prize, you are to contact the appointed\n",
-    "agent below as soon as possible for the immediate release of your\n",
-    "winnings with the below details.\n",
-    "\n",
-    "Again, we wish to congratulate you over your email success in our\n"
-    "computer Balloting.\n"
+  iota_contents = [
+    "One line\n",
+    "Another line\n",
+    "A third line \n",
+    "This is the file 'iota'.\n",
+    "A line after\n",
+    "Another line after\n",
+    "The last line with missing eol",
   ]
 
-  # Set mu contents
-  svntest.main.file_write(mu_path, ''.join(mu_contents))
+  svntest.main.file_write(iota_path, ''.join(iota_contents))
   expected_output = svntest.wc.State(wc_dir, {
-    'A/mu'       : Item(verb='Sending'),
+    'iota'  : Item(verb='Sending'),
     })
   expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
-  expected_status.tweak('A/mu', wc_rev=2)
+  expected_status.tweak('iota', wc_rev=2)
   svntest.actions.run_and_verify_commit(wc_dir, expected_output,
                                         expected_status, None, wc_dir)
-
-  # Apply patch
-
   unidiff_patch = [
-    "Index: A/D/gamma\n",
-    "===================================================================\n",
-    "--- A/D/gamma\t(revision 1)\n",
-    "+++ A/D/gamma\t(working copy)\n",
-    "@@ -1 +1 @@\n",
-    "-This is the file 'gamma'.\n",
-    "+It is the file 'gamma'.\n",
-    "Index: iota\n",
-    "===================================================================\n",
     "--- iota\t(revision 1)\n",
     "+++ iota\t(working copy)\n",
-    "@@ -1 +1,2 @@\n",
-    " This is the file 'iota'.\n",
-    "+Some more bytes\n",
-    "\n",
-    "Index: new\n",
-    "===================================================================\n",
-    "--- new	(revision 0)\n",
-    "+++ new	(revision 0)\n",
-    "@@ -0,0 +1 @@\n",
-    "+new\n",
-    "\n",
-    "--- A/mu.orig	2009-06-24 15:23:55.000000000 +0100\n",
-    "+++ A/mu	2009-06-24 15:21:23.000000000 +0100\n",
-    "@@ -6,6 +6,9 @@\n",
-    " through a computer ballot system drawn from over 100,000 company\n",
-    " and 50,000,000 individual email addresses from all over the world.\n",
-    " \n",
-    "+It is a promotional program aimed at encouraging internet users;\n",
-    "+therefore you do not need to buy ticket to enter for it.\n",
-    "+\n",
-    " Your email address drew and have won the sum of  750,000 Euros\n",
-    " ( Seven Hundred and Fifty Thousand Euros) in cash credited to\n",
-    " file with\n",
-    "@@ -14,11 +17,8 @@\n",
-    "     BATCH NUMBERS :\n",
-    "     EULO/1007/444/606/08;\n",
-    "     SERIAL NUMBER: 45327\n",
-    "-and PROMOTION DATE: 13th June. 2009\n",
-    "+and PROMOTION DATE: 14th June. 2009\n",
-    " \n",
-    " To claim your winning prize, you are to contact the appointed\n",
-    " agent below as soon as possible for the immediate release of your\n",
-    " winnings with the below details.\n",
-    "-\n",
-    "-Again, we wish to congratulate you over your email success in our\n",
-    "-computer Balloting.\n",
-    "Index: A/B/E/beta\n",
-    "===================================================================\n",
-    "--- A/B/E/beta	(revision 1)\n",
-    "+++ A/B/E/beta	(working copy)\n",
-    "@@ -1 +0,0 @@\n",
-    "-This is the file 'beta'.\n",
+    "@@ -1,7 +1,7 @@\n",
+    " One line\n",
+    " Another line\n",
+    " A third line \n",
+    "-This is the file 'iota'.\n",
+    "+It is the file 'iota'.\n",
+    " A line after\n",
+    " Another line after\n",
+    " The last line with missing eol\n",
   ]
 
   svntest.main.file_write(patch_file_path, ''.join(unidiff_patch))
 
-  gamma_contents = "It is the file 'gamma'.\n"
-  iota_contents = "This is the file 'iota'.\nSome more bytes\n"
-  new_contents = "new\n"
-  mu_contents = [
-    "Dear internet user,\n",
-    "\n",
-    "We wish to congratulate you over your email success in our computer\n",
-    "Balloting. This is a Millennium Scientific Electronic Computer Draw\n",
-    "in which email addresses were used. All participants were selected\n",
-    "through a computer ballot system drawn from over 100,000 company\n",
-    "and 50,000,000 individual email addresses from all over the world.\n",
-    "\n",
-    "It is a promotional program aimed at encouraging internet users;\n",
-    "therefore you do not need to buy ticket to enter for it.\n",
-    "\n",
-    "Your email address drew and have won the sum of  750,000 Euros\n",
-    "( Seven Hundred and Fifty Thousand Euros) in cash credited to\n",
-    "file with\n",
-    "    REFERENCE NUMBER: ESP/WIN/008/05/10/MA;\n",
-    "    WINNING NUMBER : 14-17-24-34-37-45-16\n",
-    "    BATCH NUMBERS :\n",
-    "    EULO/1007/444/606/08;\n",
-    "    SERIAL NUMBER: 45327\n",
-    "and PROMOTION DATE: 14th June. 2009\n",
-    "\n",
-    "To claim your winning prize, you are to contact the appointed\n",
-    "agent below as soon as possible for the immediate release of your\n",
-    "winnings with the below details.\n",
+  iota_contents = [
+    "One line\n",
+    "Another line\n",
+    "A third line \n",
+    "It is the file 'iota'.\n",
+    "A line after\n",
+    "Another line after\n",
+    "The last line with missing eol\n",
   ]
-
   expected_output = [
     'U         %s\n' % os.path.join(wc_dir, 'iota'),
-    'U         %s\n' % os.path.join(wc_dir, 'A', 'mu'),
-    'D         %s\n' % os.path.join(wc_dir, 'A', 'B', 'E', 'beta'),
   ]
 
   expected_disk = svntest.main.greek_state.copy()
-  expected_disk.tweak('A/mu', contents=''.join(mu_contents))
   expected_disk.tweak('iota', contents=''.join(iota_contents))
-  expected_disk.remove('A/B/E/beta')
 
   expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
-  expected_status.tweak('A/mu', status='M ', wc_rev=2)
-  expected_status.tweak('iota', status='M ')
-  expected_status.tweak('A/B/E/beta', status='D ')
+  expected_status.tweak('iota', status='M ', wc_rev=2)
 
   expected_skip = wc.State('', { })
 
@@ -2156,10 +2160,7 @@ def patch_with_include_exclude_patterns(
                                        expected_skip,
                                        None, # expected err
                                        1, # check-props
-                                       1, # dry-run
-                                       "--include-pattern", "A/mu",
-                                       "--include-pattern", "*a",
-                                       "--exclude-pattern", "A/*/gamma")
+                                       1) # dry-run
 
 ########################################################################
 #Run the tests
@@ -2171,7 +2172,9 @@ test_list = [ None,
               patch_offset,
               patch_chopped_leading_spaces,
               patch_strip1,
+              patch_no_index_line,
               patch_add_new_dir,
+              patch_remove_empty_dirs,
               patch_reject,
               patch_keywords,
               patch_with_fuzz,
@@ -2179,9 +2182,9 @@ test_list = [ None,
               patch_no_svn_eol_style,
               patch_with_svn_eol_style,
               patch_with_svn_eol_style_uncommitted,
-              patch_with_include_patterns,
-              patch_with_exclude_patterns,
-              patch_with_include_exclude_patterns,
+              patch_with_ignore_whitespace,
+              patch_replace_locally_deleted_file,
+              patch_no_eol_at_eof,
             ]
 
 if __name__ == '__main__':

Modified: subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/prop_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/prop_tests.py?rev=984206&r1=984205&r2=984206&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/prop_tests.py (original)
+++ subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/prop_tests.py Tue Aug 10 20:55:56 2010
@@ -55,16 +55,11 @@ def make_local_props(sbox):
   wc_dir = sbox.wc_dir
 
   # Add properties to one file and one directory
-  svntest.main.run_svn(None, 'propset', 'blue', 'azul',
-                       os.path.join(wc_dir, 'A', 'mu'))
-  svntest.main.run_svn(None, 'propset', 'green', 'verde',
-                       os.path.join(wc_dir, 'A', 'mu'))
-  svntest.main.run_svn(None, 'propset', 'editme', 'the foo fighters',
-                       os.path.join(wc_dir, 'A', 'mu'))
-  svntest.main.run_svn(None, 'propset', 'red', 'rojo',
-                       os.path.join(wc_dir, 'A', 'D', 'G'))
-  svntest.main.run_svn(None, 'propset', 'yellow', 'amarillo',
-                       os.path.join(wc_dir, 'A', 'D', 'G'))
+  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'))
 
   # Make sure they show up as local mods in status
   expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
@@ -74,8 +69,7 @@ def make_local_props(sbox):
   svntest.actions.run_and_verify_status(wc_dir, expected_status)
 
   # Remove one property
-  svntest.main.run_svn(None, 'propdel', 'yellow',
-                       os.path.join(wc_dir, 'A', 'D', 'G'))
+  sbox.simple_propdel('yellow', sbox.ospath('A/D/G'))
 
   svntest.main.use_editor('foo_to_bar')
   # Edit one property
@@ -117,10 +111,10 @@ def commit_props(sbox):
   wc_dir = sbox.wc_dir
 
   # Add a property to a file and a directory
-  mu_path = os.path.join(wc_dir, 'A', 'mu')
-  H_path = os.path.join(wc_dir, 'A', 'D', 'H')
-  svntest.main.run_svn(None, 'propset', 'blue', 'azul', mu_path)
-  svntest.main.run_svn(None, 'propset', 'red', 'rojo', H_path)
+  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)
 
   # Create expected output tree.
   expected_output = svntest.wc.State(wc_dir, {
@@ -155,10 +149,10 @@ def update_props(sbox):
   svntest.actions.duplicate_dir(wc_dir, wc_backup)
 
   # Add a property to a file and a directory
-  mu_path = os.path.join(wc_dir, 'A', 'mu')
-  H_path = os.path.join(wc_dir, 'A', 'D', 'H')
-  svntest.main.run_svn(None, 'propset', 'blue', 'azul', mu_path)
-  svntest.main.run_svn(None, 'propset', 'red', 'rojo', H_path)
+  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)
 
   # Create expected output tree.
   expected_output = svntest.wc.State(wc_dir, {
@@ -177,8 +171,8 @@ def update_props(sbox):
 
   # Overwrite mu_path and H_path to refer to the backup copies from
   # here on out.
-  mu_path = os.path.join(wc_backup, 'A', 'mu')
-  H_path = os.path.join(wc_backup, 'A', 'D', 'H')
+  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, {
@@ -211,11 +205,11 @@ def downdate_props(sbox):
   sbox.build()
   wc_dir = sbox.wc_dir
 
-  iota_path = os.path.join(wc_dir, 'iota')
-  mu_path = os.path.join(wc_dir, 'A', 'mu')
+  iota_path = sbox.ospath('iota')
+  mu_path = sbox.ospath('A/mu')
 
   # Add a property to a file
-  svntest.main.run_svn(None, 'propset', 'cash-sound', 'cha-ching!', iota_path)
+  sbox.simple_propset('cash-sound', 'cha-ching!', iota_path)
 
   # Create expected output tree.
   expected_output = svntest.wc.State(wc_dir, {
@@ -279,15 +273,14 @@ def remove_props(sbox):
   wc_dir = sbox.wc_dir
 
   # Add a property to a file
-  iota_path = os.path.join(wc_dir, 'iota')
-  svntest.main.run_svn(None, 'propset', 'cash-sound', 'cha-ching!', iota_path)
+  iota_path = sbox.ospath('iota')
+  sbox.simple_propset('cash-sound', 'cha-ching!', iota_path)
 
   # Commit the file
-  svntest.main.run_svn(None,
-                       'ci', '-m', 'logmsg', iota_path)
+  sbox.simple_commit(iota_path)
 
   # Now, remove the property
-  svntest.main.run_svn(None, 'propdel', 'cash-sound', iota_path)
+  sbox.simple_propdel('cash-sound', iota_path)
 
   # Create expected output tree.
   expected_output = svntest.wc.State(wc_dir, {
@@ -313,21 +306,20 @@ def update_conflict_props(sbox):
   wc_dir = sbox.wc_dir
 
   # Add a property to a file and a directory
-  mu_path = os.path.join(wc_dir, 'A', 'mu')
-  svntest.main.run_svn(None, 'propset', 'cash-sound', 'cha-ching!', mu_path)
-  A_path = os.path.join(wc_dir, 'A')
-  svntest.main.run_svn(None, 'propset', 'foo', 'bar', A_path)
+  mu_path = sbox.ospath('A/mu')
+  sbox.simple_propset('cash-sound', 'cha-ching!', mu_path)
+  A_path = sbox.ospath('A')
+  sbox.simple_propset('foo', 'bar', A_path)
 
   # Commit the file and directory
-  svntest.main.run_svn(None,
-                       'ci', '-m', 'logmsg', wc_dir)
+  sbox.simple_commit()
 
   # Update to rev 1
   svntest.main.run_svn(None, 'up', '-r', '1', wc_dir)
 
   # Add conflicting properties
-  svntest.main.run_svn(None, 'propset', 'cash-sound', 'beep!', mu_path)
-  svntest.main.run_svn(None, 'propset', 'foo', 'baz', A_path)
+  sbox.simple_propset('cash-sound', 'beep!', mu_path)
+  sbox.simple_propset('foo', 'baz', A_path)
 
   # Create expected output tree for an update of the wc_backup.
   expected_output = svntest.wc.State(wc_dir, {
@@ -378,18 +370,17 @@ def commit_conflict_dirprops(sbox):
   sbox.build()
   wc_dir = sbox.wc_dir
 
-  svntest.main.run_svn(None, 'propset', 'foo', 'bar', wc_dir)
+  sbox.simple_propset('foo', 'bar', wc_dir)
 
   # Commit the file and directory
-  svntest.main.run_svn(None,
-                       'ci', '-m', 'r2', wc_dir)
+  sbox.simple_commit()
 
   # Update to rev 1
   svntest.main.run_svn(None,
                        'up', '-r', '1', wc_dir)
 
   # Add conflicting properties
-  svntest.main.run_svn(None, 'propset', 'foo', 'eek', wc_dir)
+  sbox.simple_propset('foo', 'eek', wc_dir)
 
   svntest.actions.run_and_verify_commit(wc_dir, None, None,
                                         "[oO]ut[- ]of[- ]date",
@@ -411,24 +402,22 @@ def commit_replacement_props(sbox):
   wc_dir = sbox.wc_dir
 
   # Add a property to two files
-  iota_path = os.path.join(wc_dir, 'iota')
-  lambda_path = os.path.join(wc_dir, 'A', 'B', 'lambda')
-  svntest.main.run_svn(None, 'propset', 'cash-sound', 'cha-ching!', iota_path)
-  svntest.main.run_svn(None, 'propset', 'boson', 'W', lambda_path)
+  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)
 
   # Commit (### someday use run_and_verify_commit for better coverage)
-  svntest.actions.run_and_verify_svn("Error in property commit",
-                                     None, [],
-                                     'ci', '-m', 'logmsg', wc_dir)
+  sbox.simple_commit()
 
   # Schedule both files for deletion
-  svntest.main.run_svn(None, 'rm', iota_path, lambda_path)
+  sbox.simple_rm(iota_path, lambda_path)
 
   # 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')
-  svntest.main.run_svn(None, 'add', iota_path, lambda_path)
+  sbox.simple_add(iota_path, lambda_path)
 
   # Sanity check:  the two files should be scheduled for (R)eplacement.
   expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
@@ -438,7 +427,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.
-  svntest.main.run_svn(None, 'propset', 'capacitor', 'flux', lambda_path)
+  sbox.simple_propset('capacitor', 'flux', lambda_path)
 
   # Commit, with careful output checking.  We're actually going to
   # scan the working copy for props after the commit.
@@ -467,23 +456,22 @@ def revert_replacement_props(sbox):
   wc_dir = sbox.wc_dir
 
   # Add a property to two files
-  iota_path = os.path.join(wc_dir, 'iota')
-  lambda_path = os.path.join(wc_dir, 'A', 'B', 'lambda')
-  svntest.main.run_svn(None, 'propset', 'cash-sound', 'cha-ching!', iota_path)
-  svntest.main.run_svn(None, 'propset', 'boson', 'W', lambda_path)
+  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)
 
   # Commit rev 2. (### someday use run_and_verify_commit for better coverage)
-  svntest.actions.run_and_verify_svn("Error in property commit", None, [],
-                                     'ci', '-m', 'logmsg', wc_dir)
+  sbox.simple_commit()
 
   # Schedule both files for deletion
-  svntest.main.run_svn(None, 'rm', iota_path, lambda_path)
+  sbox.simple_rm(iota_path, lambda_path)
 
   # 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')
-  svntest.main.run_svn(None, 'add', iota_path, lambda_path)
+  sbox.simple_add(iota_path, lambda_path)
 
   # Sanity check:  the two files should be scheduled for (R)eplacement.
   expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
@@ -493,10 +481,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.
-  svntest.main.run_svn(None, 'propset', 'capacitor', 'flux', lambda_path)
+  sbox.simple_propset('capacitor', 'flux', lambda_path)
 
   # Now revert both files.
-  svntest.main.run_svn(None, 'revert', iota_path, lambda_path)
+  sbox.simple_revert(iota_path, lambda_path)
 
   # Do an update; even though the update is really a no-op,
   # run_and_verify_update has the nice feature of scanning disk as
@@ -532,9 +520,9 @@ def inappropriate_props(sbox):
   sbox.build()
   wc_dir = sbox.wc_dir
 
-  A_path = os.path.join(wc_dir, 'A')
-  E_path = os.path.join(wc_dir, 'A', 'B', 'E')
-  iota_path = os.path.join(wc_dir, 'iota')
+  A_path = sbox.ospath('A')
+  E_path = sbox.ospath('A/B/E')
+  iota_path = sbox.ospath('iota')
 
   expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
   svntest.actions.run_and_verify_status(wc_dir, expected_status)
@@ -602,39 +590,38 @@ def inappropriate_props(sbox):
   # Issue #920. Don't allow setting of svn:eol-style on binary files or files
   # with inconsistent eol types.
 
-  path = os.path.join(wc_dir, 'binary')
+  path = sbox.ospath('binary')
   svntest.main.file_append(path, "binary")
-  svntest.main.run_svn(None, 'add', path)
+  sbox.simple_add(path)
 
-  svntest.main.run_svn(None, 'propset', 'svn:mime-type',
-                       'application/octet-stream', path)
+  sbox.simple_propset('svn:mime-type', 'application/octet-stream', path)
 
   svntest.actions.run_and_verify_svn('Illegal target', None,
                                      svntest.verify.AnyOutput,
                                      'propset', 'svn:eol-style',
                                      'CRLF', path)
 
-  path = os.path.join(wc_dir, 'multi-eol')
+  path = sbox.ospath('multi-eol')
   svntest.main.file_append(path, "line1\rline2\n")
-  svntest.main.run_svn(None, 'add', path)
+  sbox.simple_add(path)
 
   svntest.actions.run_and_verify_svn('Illegal target', None,
                                      svntest.verify.AnyOutput,
                                      'propset', 'svn:eol-style',
                                      'LF', path)
 
-  path = os.path.join(wc_dir, 'backwards-eol')
+  path = sbox.ospath('backwards-eol')
   svntest.main.file_append(path, "line1\n\r")
-  svntest.main.run_svn(None, 'add', path)
+  sbox.simple_add(path)
 
   svntest.actions.run_and_verify_svn('Illegal target', None,
                                      svntest.verify.AnyOutput,
                                      'propset', 'svn:eol-style',
                                      'native', path)
 
-  path = os.path.join(wc_dir, 'incomplete-eol')
+  path = sbox.ospath('incomplete-eol')
   svntest.main.file_append(path, "line1\r\n\r")
-  svntest.main.run_svn(None, 'add', path)
+  sbox.simple_add(path)
 
   svntest.actions.run_and_verify_svn('Illegal target', None,
                                      svntest.verify.AnyOutput,
@@ -644,33 +631,33 @@ def inappropriate_props(sbox):
   # Issue #2065. Do allow setting of svn:eol-style on binary files or files
   # with inconsistent eol types if --force is passed.
 
-  path = os.path.join(wc_dir, 'binary')
+  path = sbox.ospath('binary')
   svntest.main.file_append(path, "binary")
   svntest.actions.run_and_verify_svn(None, None, [],
                                      'propset', '--force',
                                      'svn:eol-style', 'CRLF',
                                      path)
 
-  path = os.path.join(wc_dir, 'multi-eol')
+  path = sbox.ospath('multi-eol')
   svntest.actions.run_and_verify_svn(None, None, [],
                                      'propset', '--force',
                                      'svn:eol-style', 'LF',
                                      path)
 
-  path = os.path.join(wc_dir, 'backwards-eol')
+  path = sbox.ospath('backwards-eol')
   svntest.actions.run_and_verify_svn(None, None, [],
                                      'propset', '--force',
                                      'svn:eol-style', 'native',
                                      path)
 
-  path = os.path.join(wc_dir, 'incomplete-eol')
+  path = sbox.ospath('incomplete-eol')
   svntest.actions.run_and_verify_svn(None, None, [],
                                      'propset', '--force',
                                      'svn:eol-style', 'CR',
                                      path)
 
   # Prevent setting of svn:mergeinfo prop values that are...
-  path = os.path.join(wc_dir, 'A', 'D')
+  path = sbox.ospath('A/D')
 
   # ...grammatically incorrect
   svntest.actions.run_and_verify_svn('illegal grammar', None,
@@ -739,17 +726,16 @@ def copy_inherits_special_props(sbox):
   orig_mime_type = 'image/fake_image'
 
   # Create two paths
-  new_path1 = os.path.join(wc_dir, 'new_file1.bin')
-  new_path2 = os.path.join(wc_dir, 'new_file2.bin')
+  new_path1 = sbox.ospath('new_file1.bin')
+  new_path2 = sbox.ospath('new_file2.bin')
 
   # 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")
-  svntest.main.run_svn(None, 'add', new_path1)
+  sbox.simple_add(new_path1)
 
   # Add initial svn:mime-type to the file
-  svntest.main.run_svn(None, 'propset', 'svn:mime-type', orig_mime_type,
-                       new_path1)
+  sbox.simple_propset('svn:mime-type', orig_mime_type, new_path1)
 
   # 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
@@ -757,13 +743,11 @@ 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':
-    svntest.main.run_svn(None, 'propset', 'svn:executable', 'on', new_path1)
+    sbox.simple_propset('svn:executable', 'on', new_path1)
     os.chmod(new_path1, 0644)
 
   # Commit the file
-  svntest.main.run_svn(None,
-                       'ci', '-m', 'create file and set svn:mime-type',
-                       wc_dir)
+  sbox.simple_commit()
 
   # Copy the file
   svntest.main.run_svn(None, 'cp', new_path1, new_path2)
@@ -852,11 +836,11 @@ def prop_value_conversions(sbox):
   sbox.build()
   wc_dir = sbox.wc_dir
 
-  A_path = os.path.join(wc_dir, 'A')
-  B_path = os.path.join(wc_dir, 'A', 'B')
-  iota_path = os.path.join(wc_dir, 'iota')
-  lambda_path = os.path.join(wc_dir, 'A', 'B', 'lambda')
-  mu_path = os.path.join(wc_dir, 'A', 'mu')
+  A_path = sbox.ospath('A')
+  B_path = sbox.ospath('A/B')
+  iota_path = sbox.ospath('iota')
+  lambda_path = sbox.ospath('A/B/lambda')
+  mu_path = sbox.ospath('A/mu')
 
   # Leading and trailing whitespace should be stripped
   svntest.actions.set_prop('svn:mime-type', ' text/html\n\n', iota_path)
@@ -954,16 +938,17 @@ def binary_props(sbox):
   svntest.actions.duplicate_dir(wc_dir, wc_backup)
 
   # Some path convenience vars.
-  A_path = os.path.join(wc_dir, 'A')
-  B_path = os.path.join(wc_dir, 'A', 'B')
-  iota_path = os.path.join(wc_dir, 'iota')
-  lambda_path = os.path.join(wc_dir, 'A', 'B', 'lambda')
-  mu_path = os.path.join(wc_dir, 'A', 'mu')
-  A_path_bak = os.path.join(wc_backup, 'A')
-  B_path_bak = os.path.join(wc_backup, 'A', 'B')
-  iota_path_bak = os.path.join(wc_backup, 'iota')
-  lambda_path_bak = os.path.join(wc_backup, 'A', 'B', 'lambda')
-  mu_path_bak = os.path.join(wc_backup, 'A', 'mu')
+  A_path = sbox.ospath('A')
+  B_path = sbox.ospath('A/B')
+  iota_path = sbox.ospath('iota')
+  lambda_path = sbox.ospath('A/B/lambda')
+  mu_path = sbox.ospath('A/mu')
+
+  A_path_bak = sbox.ospath('A', wc_dir=wc_backup)
+  B_path_bak = sbox.ospath('A/B', wc_dir=wc_backup)
+  iota_path_bak = sbox.ospath('iota', wc_dir=wc_backup)
+  lambda_path_bak = sbox.ospath('A/B/lambda', wc_dir=wc_backup)
+  mu_path_bak = sbox.ospath('A/mu', wc_dir=wc_backup)
 
   # Property value convenience vars.
   prop_zb   = "This property has a zer\000 byte."
@@ -1052,23 +1037,20 @@ def recursive_base_wc_ops(sbox):
   wc_dir = sbox.wc_dir
 
   # Files with which to test, in alphabetical order
-  f_add = os.path.join('A', 'added')
-  f_del = os.path.join('A', 'mu')
-  f_keep= os.path.join('iota')
-  fp_add = os.path.join(wc_dir, f_add)
-  fp_del = os.path.join(wc_dir, f_del)
-  fp_keep= os.path.join(wc_dir, f_keep)
+  fp_add = sbox.ospath('A/added')
+  fp_del = sbox.ospath('A/mu')
+  fp_keep= sbox.ospath('iota')
 
   # Set up properties
-  svntest.main.run_svn(None, 'propset', 'p', 'old-del', fp_del)
-  svntest.main.run_svn(None, 'propset', 'p', 'old-keep',fp_keep)
-  svntest.main.run_svn(None,
-                       'commit', '-m', '', wc_dir)
+  sbox.simple_propset('p', 'old-del', fp_del)
+  sbox.simple_propset('p', 'old-keep', fp_keep)
+  sbox.simple_commit()
+
   svntest.main.file_append(fp_add, 'blah')
-  svntest.main.run_svn(None, 'add', fp_add)
-  svntest.main.run_svn(None, 'propset', 'p', 'new-add', fp_add)
-  svntest.main.run_svn(None, 'propset', 'p', 'new-del', fp_del)
-  svntest.main.run_svn(None, 'propset', 'p', 'new-keep',fp_keep)
+  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)
   svntest.main.run_svn(None, 'del', '--force', fp_del)
 
   # Test recursive proplist
@@ -1126,26 +1108,24 @@ def url_props_ops(sbox):
   prop2 = 'prop2'
   propval2 = 'propval2'
 
-  iota_path = os.path.join(sbox.wc_dir, 'iota')
+  iota_path = sbox.ospath('iota')
   iota_url = sbox.repo_url + '/iota'
-  A_path = os.path.join(sbox.wc_dir, 'A')
+  A_path = sbox.ospath('A')
   A_url = sbox.repo_url + '/A'
 
   # Add a couple of properties
-  svntest.main.run_svn(None, 'propset', prop1, propval1, iota_path)
-  svntest.main.run_svn(None, 'propset', prop1, propval1, A_path)
+  sbox.simple_propset(prop1, propval1, iota_path)
+  sbox.simple_propset(prop1, propval1, A_path)
 
   # Commit
-  svntest.main.run_svn(None,
-                       'ci', '-m', 'logmsg', sbox.wc_dir)
+  sbox.simple_commit()
 
   # Add a few more properties
-  svntest.main.run_svn(None, 'propset', prop2, propval2, iota_path)
-  svntest.main.run_svn(None, 'propset', prop2, propval2, A_path)
+  sbox.simple_propset(prop2, propval2, iota_path)
+  sbox.simple_propset(prop2, propval2, A_path)
 
   # Commit again
-  svntest.main.run_svn(None,
-                       'ci', '-m', 'logmsg', sbox.wc_dir)
+  sbox.simple_commit()
 
   # Test propget
   svntest.actions.run_and_verify_svn(None, [ propval1 + '\n' ], [],
@@ -1209,7 +1189,7 @@ def removal_schedule_added_props(sbox):
   sbox.build()
 
   wc_dir = sbox.wc_dir
-  newfile_path = os.path.join(wc_dir, 'newfile')
+  newfile_path = sbox.ospath('newfile')
   file_add_output = ["A         " + newfile_path + "\n"]
   propset_output = ["property 'newprop' set on '" + newfile_path + "'\n"]
   file_rm_output = ["D         " + newfile_path + "\n"]
@@ -1252,7 +1232,7 @@ def update_props_on_wc_root(sbox):
   svntest.actions.duplicate_dir(wc_dir, wc_backup)
 
   # Add a property to the root folder
-  svntest.main.run_svn(None, 'propset', 'red', 'rojo', wc_dir)
+  sbox.simple_propset('red', 'rojo', wc_dir)
 
   # Create expected output tree.
   expected_output = svntest.wc.State(wc_dir, {
@@ -1296,16 +1276,15 @@ def props_on_replaced_file(sbox):
   wc_dir = sbox.wc_dir
 
   # Add some properties to iota
-  iota_path = os.path.join(wc_dir, "iota")
-  svntest.main.run_svn(None, 'propset', 'red', 'rojo', iota_path)
-  svntest.main.run_svn(None, 'propset', 'blue', 'lagoon', iota_path)
-  svntest.main.run_svn(None,
-                       'ci', '-m', 'log message', wc_dir)
+  iota_path = sbox.ospath("iota")
+  sbox.simple_propset('red', 'rojo', iota_path)
+  sbox.simple_propset('blue', 'lagoon', iota_path)
+  sbox.simple_commit()
 
   # replace iota_path
-  svntest.main.run_svn(None, 'rm', iota_path)
+  sbox.simple_rm(iota_path)
   svntest.main.file_append(iota_path, "some mod")
-  svntest.main.run_svn(None, 'add', iota_path)
+  sbox.simple_add(iota_path)
 
   # check that the replaced file has no properties
   expected_disk = svntest.main.greek_state.copy()
@@ -1315,8 +1294,8 @@ def props_on_replaced_file(sbox):
                              expected_disk.old_tree())
 
   # now add a new property to iota
-  svntest.main.run_svn(None, 'propset', 'red', 'mojo', iota_path)
-  svntest.main.run_svn(None, 'propset', 'groovy', 'baby', iota_path)
+  sbox.simple_propset('red', 'mojo', iota_path)
+  sbox.simple_propset('groovy', 'baby', iota_path)
 
   # What we expect the disk tree to look like:
   expected_disk.tweak('iota', props={'red' : 'mojo', 'groovy' : 'baby'})
@@ -1332,19 +1311,18 @@ def depthy_wc_proplist(sbox):
   sbox.build()
   wc_dir = sbox.wc_dir
 
-  A_path = os.path.join(wc_dir, 'A')
-  iota_path = os.path.join(wc_dir, 'iota')
-  mu_path = os.path.join(A_path, 'mu')
+  A_path = sbox.ospath('A')
+  iota_path = sbox.ospath('iota')
+  mu_path = sbox.ospath('A/mu')
 
   # Set up properties.
-  svntest.main.run_svn(None, 'propset', 'p', 'prop1', wc_dir)
-  svntest.main.run_svn(None, 'propset', 'p', 'prop2', iota_path)
-  svntest.main.run_svn(None, 'propset', 'p', 'prop3', A_path)
-  svntest.main.run_svn(None, 'propset', 'p', 'prop4', mu_path)
+  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)
 
   # Commit.
-  svntest.main.run_svn(None,
-                       'ci', '-m', 'log message', wc_dir)
+  sbox.simple_commit()
 
   # Test depth-empty proplist.
   exit_code, output, errput = svntest.main.run_svn(None, 'proplist',
@@ -1388,15 +1366,15 @@ def depthy_url_proplist(sbox):
   repo_url = sbox.repo_url
   wc_dir = sbox.wc_dir
 
-  A_path = os.path.join(wc_dir, 'A')
-  iota_path = os.path.join(wc_dir, 'iota')
-  mu_path = os.path.join(A_path, 'mu')
+  A_path = sbox.ospath('A')
+  iota_path = sbox.ospath('iota')
+  mu_path = sbox.ospath('A/mu')
 
   # Set up properties.
-  svntest.main.run_svn(None, 'propset', 'p', 'prop1', wc_dir)
-  svntest.main.run_svn(None, 'propset', 'p', 'prop2', iota_path)
-  svntest.main.run_svn(None, 'propset', 'p', 'prop3', A_path)
-  svntest.main.run_svn(None, 'propset', 'p', 'prop4', mu_path)
+  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)
 
   # Test depth-empty proplist.
   exit_code, output, errput = svntest.main.run_svn(None, 'proplist',
@@ -1510,19 +1488,18 @@ def remove_custom_ns_props(sbox):
   wc_dir = sbox.wc_dir
 
   # Add a property to a file
-  iota_path = os.path.join(wc_dir, 'iota')
-  svntest.main.run_svn(None, 'propset', 'ns:cash-sound', 'cha-ching!', iota_path)
+  iota_path = sbox.ospath('iota')
+  sbox.simple_propset('ns:cash-sound', 'cha-ching!', iota_path)
 
   # Commit the file
-  svntest.main.run_svn(None,
-                       'ci', '-m', 'logmsg', iota_path)
+  sbox.simple_commit(iota_path)
 
   # 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
-  svntest.main.run_svn(None, 'propdel', 'ns:cash-sound', iota_path)
+  sbox.simple_propdel('ns:cash-sound', iota_path)
 
   # Create expected trees.
   expected_output = svntest.wc.State(wc_dir, {
@@ -1559,14 +1536,14 @@ def props_over_time(sbox):
   wc_dir = sbox.wc_dir
 
   # Convenience variables
-  iota_path = os.path.join(wc_dir, 'iota')
+  iota_path = sbox.ospath('iota')
   iota_url = sbox.repo_url + '/iota'
 
   # 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):
-    svntest.main.run_svn(None, 'propset', 'revision', str(rev), iota_path)
-    svntest.main.run_svn(None, 'ci', '-m', 'logmsg', iota_path)
+    sbox.simple_propset('revision', str(rev), iota_path)
+    sbox.simple_commit(iota_path)
 
   # Backdate to r2 so the defaults for URL- vs. WC-style queries are
   # different.
@@ -1648,18 +1625,23 @@ def same_replacement_props(sbox):
   "commit replacement props when same as old props"
   # issue #3282
   sbox.build()
-  foo_path = os.path.join(sbox.wc_dir, 'foo')
+
+  foo_path = sbox.ospath('foo')
+
   open(foo_path, 'w').close()
-  svntest.main.run_svn(None, 'add', foo_path)
-  svntest.main.run_svn(None, 'propset', 'someprop', 'someval', foo_path)
-  svntest.main.run_svn(None, 'ci', '-m', 'commit first foo', foo_path)
-  svntest.main.run_svn(None, 'rm', foo_path)
+  sbox.simple_add(foo_path)
+  sbox.simple_propset('someprop', 'someval', foo_path)
+  sbox.simple_commit(foo_path)
+  sbox.simple_rm(foo_path)
+
   # Now replace 'foo'.
   open(foo_path, 'w').close()
-  svntest.main.run_svn(None, 'add', foo_path)
+  sbox.simple_add(foo_path)
+
   # Set the same property again, with the same value.
-  svntest.main.run_svn(None, 'propset', 'someprop', 'someval', foo_path)
-  svntest.main.run_svn(None, 'ci', '-m', 'commit second foo', foo_path)
+  sbox.simple_propset('someprop', 'someval', foo_path)
+  sbox.simple_commit(foo_path)
+
   # Check if the property made it into the repository.
   foo_url = sbox.repo_url + '/foo'
   expected_out = [ "Properties on '" + foo_url + "':\n",
@@ -1675,14 +1657,15 @@ def added_moved_file(sbox):
   wc_dir = sbox.wc_dir
 
   # create it
-  foo_path = os.path.join(sbox.wc_dir, 'foo')
-  foo2_path = os.path.join(sbox.wc_dir, 'foo2')
+  foo_path = sbox.ospath('foo')
+  foo2_path = sbox.ospath('foo2')
   foo2_url = sbox.repo_url + '/foo2'
+
   open(foo_path, 'w').close()
 
   # add it
-  svntest.main.run_svn(None, 'add', foo_path)
-  svntest.main.run_svn(None, 'propset', 'someprop', 'someval', foo_path)
+  sbox.simple_add(foo_path)
+  sbox.simple_propset('someprop', 'someval', foo_path)
 
   # move it
   svntest.main.run_svn(None, 'mv', foo_path, foo2_path)
@@ -1691,8 +1674,7 @@ def added_moved_file(sbox):
   svntest.actions.check_prop('someprop', foo2_path, ['someval'])
 
   # the property should get committed, too
-  svntest.main.run_svn(None, 'commit', '-m', 'set prop on added moved file',
-                       wc_dir)
+  sbox.simple_commit()
   svntest.actions.check_prop('someprop', foo2_url, ['someval'])
 
 
@@ -1725,8 +1707,9 @@ def post_revprop_change_hook(sbox):
   svntest.actions.create_failing_hook(repo_dir, 'post-revprop-change',
                                       error_msg)
 
-  expected_error = svntest.verify.ExpectedOutput([
-    "svn: " + svntest.actions.hook_failure_message('post-revprop-change'),
+  # serf/neon/mod_dav_svn splits the "svn: hook failed" line
+  expected_error = svntest.verify.RegexOutput([
+    '(svn: |)post-revprop-change hook failed',
     error_msg + "\n",
   ], match_all = False)
 
@@ -1734,6 +1717,12 @@ def post_revprop_change_hook(sbox):
                                      'ps', '--revprop', '-r0', 'p', 'v',
                                      wc_dir)
 
+  # Verify change has stuck -- at one time mod_dav_svn would rollback
+  # revprop changes on post-revprop-change hook errors
+  svntest.actions.run_and_verify_svn(None, 'v', [],
+                                     'pg', '--revprop', '-r0', 'p',
+                                     wc_dir)
+
 def rm_of_replaced_file(sbox):
   """properties after a removal of a replaced file"""
 
@@ -1741,18 +1730,18 @@ def rm_of_replaced_file(sbox):
   wc_dir = sbox.wc_dir
 
   # Add some properties to iota and mu
-  iota_path = os.path.join(wc_dir, 'iota')
-  svntest.main.run_svn(None, 'propset', 'red', 'rojo', iota_path)
-  svntest.main.run_svn(None, 'propset', 'blue', 'lagoon', iota_path)
-
-  mu_path = os.path.join(wc_dir, 'A', 'mu')
-  svntest.main.run_svn(None, 'propset', 'yellow', 'submarine', mu_path)
-  svntest.main.run_svn(None, 'propset', 'orange', 'toothpick', mu_path)
+  iota_path = sbox.ospath('iota')
+  sbox.simple_propset('red', 'rojo', iota_path)
+  sbox.simple_propset('blue', 'lagoon', iota_path)
+
+  mu_path = sbox.ospath('A/mu')
+  sbox.simple_propset('yellow', 'submarine', mu_path)
+  sbox.simple_propset('orange', 'toothpick', mu_path)
 
-  svntest.main.run_svn(None, 'ci', '-m', 'log message', wc_dir)
+  sbox.simple_commit()
 
   # Copy iota over the top of mu
-  svntest.main.run_svn(None, 'rm', mu_path)
+  sbox.simple_rm(mu_path)
   svntest.main.run_svn(None, 'cp', iota_path, mu_path)
 
   expected_disk = svntest.main.greek_state.copy()
@@ -1763,11 +1752,21 @@ def rm_of_replaced_file(sbox):
   svntest.tree.compare_trees("disk", actual_disk_tree,
                              expected_disk.old_tree())
 
-  # Remove the copy. Properties should go back to mu's original props.
+  # Remove the copy. This should leave the original locally-deleted mu,
+  # which should have no properties.
   svntest.main.run_svn(None, 'rm', '--force', mu_path)
 
   exit_code, output, errput = svntest.main.run_svn(None,
                                                    'proplist', '-v', mu_path)
+  if output or errput:
+    raise svntest.Failure('no output/errors expected')
+  svntest.verify.verify_exit_code(None, exit_code, 0)
+
+  # Run it again, but ask for the pristine properties, which should
+  # be mu's original props.
+  exit_code, output, errput = svntest.main.run_svn(None,
+                                                   'proplist', '-v',
+                                                   mu_path + '@base')
   expected_output = svntest.verify.UnorderedRegexOutput([
       'Properties on',
       '  yellow',
@@ -1780,6 +1779,128 @@ def rm_of_replaced_file(sbox):
   svntest.verify.verify_exit_code(None, exit_code, 0)
 
 
+def prop_reject_grind(sbox):
+  """grind through all variants of prop rejects"""
+
+  sbox.build()
+  wc_dir = sbox.wc_dir
+
+  iota_path = sbox.ospath('iota')
+  mu_path = sbox.ospath('A/mu')
+
+  # Create r2 with all the properties we intend to use as incoming-change,
+  # 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_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)
+  ### don't delete this. causes a segfault :-)
+  #sbox.simple_propdel('del.del', iota_path)
+  sbox.simple_propdel('del.add', iota_path)
+  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)
+
+  # Now merge r2:3 into the victim to create all variants
+  svntest.main.run_svn(False, 'merge', '-r2:3', sbox.repo_url + '/iota',
+                       mu_path)
+
+  ### need to verify mu.prej
+  ### note that del.add has been erroneously deleted!
+
+
+def obstructed_subdirs(sbox):
+  """test properties of obstructed subdirectories"""
+
+  sbox.build()
+  wc_dir = sbox.wc_dir
+
+  # at one point during development, obstructed subdirectories threw
+  # errors trying to fetch property information during 'svn status'.
+  # this test ensures we won't run into that problem again.
+
+  C_path = sbox.ospath('A/C')
+  sbox.simple_propset('red', 'blue', C_path)
+
+  expected_disk = svntest.main.greek_state.copy()
+  expected_disk.tweak('A/C', props={'red': 'blue'})
+  actual_disk_tree = svntest.tree.build_tree_from_wc(wc_dir, load_props=True)
+  svntest.tree.compare_trees("disk", actual_disk_tree,
+                             expected_disk.old_tree())
+
+  # Remove the subdir from disk, and validate the status
+  svntest.main.safe_rmtree(C_path)
+
+  expected_disk.remove('A/C')
+  actual_disk_tree = svntest.tree.build_tree_from_wc(wc_dir, load_props=True)
+  svntest.tree.compare_trees("disk", actual_disk_tree,
+                             expected_disk.old_tree())
+
+  expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
+  expected_status.tweak('A/C', status='! ', wc_rev='?')
+  svntest.actions.run_and_verify_status(wc_dir, expected_status)
+
+  # Drop an empty file there to obstruct the now-deleted subdir
+  open(C_path, 'w')
+
+  expected_disk.add({'A/C': Item(contents='')})
+  actual_disk_tree = svntest.tree.build_tree_from_wc(wc_dir, load_props=True)
+  svntest.tree.compare_trees("disk", actual_disk_tree,
+                             expected_disk.old_tree())
+
+  # NOTE: r943346 fixes a problem with reporter processing, which
+  #   is necessary for this status to complete properly.
+  expected_status.tweak('A/C', status='~ ', wc_rev='?')
+  svntest.actions.run_and_verify_status(wc_dir, expected_status)
+
+
 ########################################################################
 # Run the tests
 
@@ -1819,8 +1940,10 @@ test_list = [ None,
               same_replacement_props,
               added_moved_file,
               delete_nonexistent_property,
-              XFail(post_revprop_change_hook, svntest.main.is_ra_type_dav),
+              post_revprop_change_hook,
               rm_of_replaced_file,
+              prop_reject_grind,
+              obstructed_subdirs,
              ]
 
 if __name__ == '__main__':

Modified: subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/schedule_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/schedule_tests.py?rev=984206&r1=984205&r2=984206&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/schedule_tests.py (original)
+++ subversion/branches/ignore-mergeinfo/subversion/tests/cmdline/schedule_tests.py Tue Aug 10 20:55:56 2010
@@ -62,15 +62,15 @@ def add_files(sbox):
   wc_dir = sbox.wc_dir
 
   # Create some files, then schedule them for addition
-  delta_path = os.path.join(wc_dir, 'delta')
-  zeta_path = os.path.join(wc_dir, 'A', 'B', 'zeta')
-  epsilon_path = os.path.join(wc_dir, 'A', 'D', 'G', 'epsilon')
+  delta_path = sbox.ospath('delta')
+  zeta_path = sbox.ospath('A/B/zeta')
+  epsilon_path = sbox.ospath('A/D/G/epsilon')
 
   svntest.main.file_append(delta_path, "This is the file 'delta'.")
   svntest.main.file_append(zeta_path, "This is the file 'zeta'.")
   svntest.main.file_append(epsilon_path, "This is the file 'epsilon'.")
 
-  svntest.main.run_svn(None, 'add', delta_path, zeta_path, epsilon_path)
+  sbox.simple_add(delta_path, zeta_path, epsilon_path)
 
   # Make sure the adds show up as such in status
   expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
@@ -91,15 +91,15 @@ def add_directories(sbox):
   wc_dir = sbox.wc_dir
 
   # Create some directories, then schedule them for addition
-  X_path = os.path.join(wc_dir, 'X')
-  Y_path = os.path.join(wc_dir, 'A', 'C', 'Y')
-  Z_path = os.path.join(wc_dir, 'A', 'D', 'H', 'Z')
+  X_path = sbox.ospath('X')
+  Y_path = sbox.ospath('A/C/Y')
+  Z_path = sbox.ospath('A/D/H/Z')
 
   os.mkdir(X_path)
   os.mkdir(Y_path)
   os.mkdir(Z_path)
 
-  svntest.main.run_svn(None, 'add', X_path, Y_path, Z_path)
+  sbox.simple_add(X_path, Y_path, Z_path)
 
   # Make sure the adds show up as such in status
   expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
@@ -120,9 +120,9 @@ def nested_adds(sbox):
   wc_dir = sbox.wc_dir
 
   # Create some directories then schedule them for addition
-  X_path = os.path.join(wc_dir, 'X')
-  Y_path = os.path.join(wc_dir, 'A', 'C', 'Y')
-  Z_path = os.path.join(wc_dir, 'A', 'D', 'H', 'Z')
+  X_path = sbox.ospath('X')
+  Y_path = sbox.ospath('A/C/Y')
+  Z_path = sbox.ospath('A/D/H/Z')
 
   os.mkdir(X_path)
   os.mkdir(Y_path)
@@ -130,18 +130,18 @@ def nested_adds(sbox):
 
   # Now, create some files and directories to put into our newly added
   # directories
-  P_path = os.path.join(X_path, 'P')
-  Q_path = os.path.join(Y_path, 'Q')
-  R_path = os.path.join(Z_path, 'R')
+  P_path = sbox.ospath('X/P')
+  Q_path = sbox.ospath('A/C/Y/Q')
+  R_path = sbox.ospath('A/D/H/Z/R')
 
   os.mkdir(P_path)
   os.mkdir(Q_path)
   os.mkdir(R_path)
 
-  delta_path = os.path.join(X_path, 'delta')
-  epsilon_path = os.path.join(Y_path, 'epsilon')
-  upsilon_path = os.path.join(Y_path, 'upsilon')
-  zeta_path = os.path.join(Z_path, 'zeta')
+  delta_path = sbox.ospath('X/delta')
+  epsilon_path = sbox.ospath('A/C/Y/epsilon')
+  upsilon_path = sbox.ospath('A/C/Y/upsilon')
+  zeta_path = sbox.ospath('A/D/H/Z/zeta')
 
   svntest.main.file_append(delta_path, "This is the file 'delta'.")
   svntest.main.file_append(epsilon_path, "This is the file 'epsilon'.")
@@ -149,7 +149,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
-  svntest.main.run_svn(None, 'add', X_path, Y_path, Z_path)
+  sbox.simple_add(X_path, Y_path, Z_path)
 
   # Make sure the adds show up as such in status
   expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
@@ -176,15 +176,17 @@ def add_executable(sbox):
   sbox.build(read_only = True)
 
   def runTest(wc_dir, fileName, perm, executable):
-    fileName = os.path.join(wc_dir, fileName)
+    fileName = sbox.ospath(fileName)
     if executable:
       expected_out = ["*\n"]
     else:
       expected_out = []
-    f = open(fileName,"w")
-    f.close()
-    os.chmod(fileName,perm)
-    svntest.main.run_svn(None, 'add', fileName)
+
+    # create an empty file
+    open(fileName, "w")
+
+    os.chmod(fileName, perm)
+    sbox.simple_add(fileName)
     svntest.actions.run_and_verify_svn(None, expected_out, [],
                                        'propget', "svn:executable", fileName)
 
@@ -207,12 +209,12 @@ def delete_files(sbox):
   wc_dir = sbox.wc_dir
 
   # Schedule some files for deletion
-  iota_path = os.path.join(wc_dir, 'iota')
-  mu_path = os.path.join(wc_dir, 'A', 'mu')
-  rho_path = os.path.join(wc_dir, 'A', 'D', 'G', 'rho')
-  omega_path = os.path.join(wc_dir, 'A', 'D', 'H', 'omega')
+  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')
 
-  svntest.main.run_svn(None, 'del', iota_path, mu_path, rho_path, omega_path)
+  sbox.simple_rm(iota_path, mu_path, rho_path, omega_path)
 
   # Make sure the deletes show up as such in status
   expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
@@ -230,17 +232,17 @@ def delete_dirs(sbox):
   wc_dir = sbox.wc_dir
 
   # Schedule some directories for deletion (this is recursive!)
-  E_path = os.path.join(wc_dir, 'A', 'B', 'E')
-  F_path = os.path.join(wc_dir, 'A', 'B', 'F')
-  H_path = os.path.join(wc_dir, 'A', 'D', 'H')
-  alpha_path = os.path.join(E_path, 'alpha')
-  beta_path  = os.path.join(E_path, 'beta')
-  chi_path   = os.path.join(H_path, 'chi')
-  omega_path = os.path.join(H_path, 'omega')
-  psi_path   = os.path.join(H_path, 'psi')
+  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.
-  svntest.main.run_svn(None, 'del', E_path, F_path, H_path)
+  sbox.simple_rm(E_path, F_path, H_path)
 
   # Make sure the deletes show up as such in status
   expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
@@ -279,9 +281,9 @@ def revert_add_files(sbox):
   wc_dir = sbox.wc_dir
 
   # Revert our changes recursively from wc_dir.
-  delta_path = os.path.join(wc_dir, 'delta')
-  zeta_path = os.path.join(wc_dir, 'A', 'B', 'zeta')
-  epsilon_path = os.path.join(wc_dir, 'A', 'D', 'G', 'epsilon')
+  delta_path = sbox.ospath('delta')
+  zeta_path = sbox.ospath('A/B/zeta')
+  epsilon_path = sbox.ospath('A/D/G/epsilon')
   files = [delta_path, zeta_path, epsilon_path]
 
   exit_code, output, err = svntest.actions.run_and_verify_svn(None, None, [],
@@ -299,9 +301,9 @@ def revert_add_directories(sbox):
   wc_dir = sbox.wc_dir
 
   # Revert our changes recursively from wc_dir.
-  X_path = os.path.join(wc_dir, 'X')
-  Y_path = os.path.join(wc_dir, 'A', 'C', 'Y')
-  Z_path = os.path.join(wc_dir, 'A', 'D', 'H', 'Z')
+  X_path = sbox.ospath('X')
+  Y_path = sbox.ospath('A/C/Y')
+  Z_path = sbox.ospath('A/D/H/Z')
   files = [X_path, Y_path, Z_path]
 
   exit_code, output, err = svntest.actions.run_and_verify_svn(None, None, [],
@@ -319,9 +321,9 @@ def revert_nested_adds(sbox):
   wc_dir = sbox.wc_dir
 
   # Revert our changes recursively from wc_dir.
-  X_path = os.path.join(wc_dir, 'X')
-  Y_path = os.path.join(wc_dir, 'A', 'C', 'Y')
-  Z_path = os.path.join(wc_dir, 'A', 'D', 'H', 'Z')
+  X_path = sbox.ospath('X')
+  Y_path = sbox.ospath('A/C/Y')
+  Z_path = sbox.ospath('A/D/H/Z')
   files = [X_path, Y_path, Z_path]
 
   exit_code, output, err = svntest.actions.run_and_verify_svn(None, None, [],
@@ -338,11 +340,11 @@ def revert_add_executable(sbox):
   add_executable(sbox)
   wc_dir = sbox.wc_dir
 
-  all_path = os.path.join(wc_dir, 'all_exe')
-  none_path = os.path.join(wc_dir, 'none_exe')
-  user_path = os.path.join(wc_dir, 'user_exe')
-  group_path = os.path.join(wc_dir, 'group_exe')
-  other_path = os.path.join(wc_dir, 'other_exe')
+  all_path = sbox.ospath('all_exe')
+  none_path = sbox.ospath('none_exe')
+  user_path = sbox.ospath('user_exe')
+  group_path = sbox.ospath('group_exe')
+  other_path = sbox.ospath('other_exe')
   files = [all_path, none_path, user_path, group_path, other_path]
 
   exit_code, output, err = svntest.actions.run_and_verify_svn(None, None, [],
@@ -360,10 +362,10 @@ def revert_delete_files(sbox):
   wc_dir = sbox.wc_dir
 
   # Revert our changes recursively from wc_dir.
-  iota_path = os.path.join(wc_dir, 'iota')
-  mu_path = os.path.join(wc_dir, 'A', 'mu')
-  rho_path = os.path.join(wc_dir, 'A', 'D', 'G', 'rho')
-  omega_path = os.path.join(wc_dir, 'A', 'D', 'H', 'omega')
+  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')
   files = [iota_path, mu_path, omega_path, rho_path]
 
   exit_code, output, err = svntest.actions.run_and_verify_svn(None, None, [],
@@ -381,14 +383,14 @@ def revert_delete_dirs(sbox):
   wc_dir = sbox.wc_dir
 
   # Revert our changes recursively from wc_dir.
-  E_path = os.path.join(wc_dir, 'A', 'B', 'E')
-  F_path = os.path.join(wc_dir, 'A', 'B', 'F')
-  H_path = os.path.join(wc_dir, 'A', 'D', 'H')
-  alpha_path = os.path.join(E_path, 'alpha')
-  beta_path  = os.path.join(E_path, 'beta')
-  chi_path   = os.path.join(H_path, 'chi')
-  omega_path = os.path.join(H_path, 'omega')
-  psi_path   = os.path.join(H_path, 'psi')
+  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')
   files = [E_path, F_path, H_path,
            alpha_path, beta_path, chi_path, omega_path, psi_path]
 
@@ -420,15 +422,15 @@ def unschedule_missing_added(sbox):
   wc_dir = sbox.wc_dir
 
   # Create some files and dirs, then schedule them for addition
-  file1_path = os.path.join(wc_dir, 'file1')
-  file2_path = os.path.join(wc_dir, 'file2')
-  dir1_path = os.path.join(wc_dir, 'dir1')
-  dir2_path = os.path.join(wc_dir, 'dir2')
+  file1_path = sbox.ospath('file1')
+  file2_path = sbox.ospath('file2')
+  dir1_path = sbox.ospath('dir1')
+  dir2_path = sbox.ospath('dir2')
 
   svntest.main.file_append(file1_path, "This is the file 'file1'.")
   svntest.main.file_append(file2_path, "This is the file 'file2'.")
-  svntest.main.run_svn(None, 'add', file1_path, file2_path)
-  svntest.main.run_svn(None, 'mkdir', dir1_path, dir2_path)
+  sbox.simple_add(file1_path, file2_path)
+  sbox.simple_mkdir(dir1_path, dir2_path)
 
   # Make sure the 4 adds show up as such in status
   expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
@@ -448,9 +450,13 @@ def unschedule_missing_added(sbox):
   svntest.main.safe_rmtree(dir2_path)
 
   # Unschedule the additions, using 'svn rm' and 'svn revert'.
+  # FILE1_PATH will throw an error. DIR1_PATH will not since the stub is
+  # still available in the parent directory.
   svntest.main.run_svn(svntest.verify.AnyOutput, 'rm', file1_path)
-  svntest.main.run_svn(svntest.verify.AnyOutput, 'rm', dir1_path)
-  svntest.main.run_svn(None, 'revert', file2_path, dir2_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)
 
   # 'svn st' should now show absolutely zero local mods.
   expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
@@ -468,15 +474,15 @@ def delete_missing(sbox):
   sbox.build()
   wc_dir = sbox.wc_dir
 
-  mu_path = os.path.join(wc_dir, 'A', 'mu')
-  H_path = os.path.join(wc_dir, 'A', 'D', 'H')
+  mu_path = sbox.ospath('A/mu')
+  H_path = sbox.ospath('A/D/H')
 
   # Manually remove a file and a directory.
   os.remove(mu_path)
   svntest.main.safe_rmtree(H_path)
 
   # Now schedule them for deletion anyway, and make sure no error is output.
-  svntest.actions.run_and_verify_svn(None, None, [], 'rm', mu_path, H_path)
+  sbox.simple_rm(mu_path, H_path)
 
   # Commit the deletions.
   expected_output = svntest.wc.State(wc_dir, {
@@ -510,13 +516,12 @@ def revert_inside_newly_added_dir(sbox):
 
   # Schedule a new directory for addition
   os.mkdir('foo')
-  svntest.main.run_svn(None, 'add', 'foo')
+  sbox.simple_add('foo')
 
   # Now change into the newly added directory, revert and make sure
   # no error is output.
   os.chdir('foo')
-  svntest.actions.run_and_verify_svn(None, None, [],
-                                     'revert', '.')
+  sbox.simple_revert('.')
 
 #----------------------------------------------------------------------
 # Regression test for issue #1609:
@@ -538,12 +543,13 @@ def status_add_deleted_directory(sbox):
   # svn ci wc -m r2
   # svn mkdir wc/foo
 
-  A_path = os.path.join(wc_dir, 'A')
-  svntest.actions.run_and_verify_svn(None, None, [], 'rm', A_path)
+  A_path = sbox.ospath('A')
+
+  sbox.simple_rm(A_path)
   svntest.main.safe_rmtree(A_path)
-  svntest.actions.run_and_verify_svn(None, None, [],
-                                     'ci', '-m', 'log msg', wc_dir)
-  svntest.actions.run_and_verify_svn(None, None, [], 'mkdir', A_path)
+  sbox.simple_commit()
+
+  sbox.simple_mkdir(A_path)
 
   expected_status = svntest.actions.get_virginal_state(wc_dir, 2)
   expected_status = svntest.wc.State(wc_dir,
@@ -573,9 +579,9 @@ def add_recursive_already_versioned(sbox
     return 1
 
   # Create some files, then schedule them for addition
-  delta_path = os.path.join(wc_dir, 'delta')
-  zeta_path = os.path.join(wc_dir, 'A', 'B', 'zeta')
-  epsilon_path = os.path.join(wc_dir, 'A', 'D', 'G', 'epsilon')
+  delta_path = sbox.ospath('delta')
+  zeta_path = sbox.ospath('A/B/zeta')
+  epsilon_path = sbox.ospath('A/D/G/epsilon')
 
   svntest.main.file_append(delta_path, "This is the file 'delta'.")
   svntest.main.file_append(zeta_path, "This is the file 'zeta'.")
@@ -652,7 +658,7 @@ test_list = [ None,
               SkipUnless(revert_add_executable, svntest.main.is_posix_os),
               revert_delete_files,
               revert_delete_dirs,
-              unschedule_missing_added,
+              XFail(unschedule_missing_added),
               delete_missing,
               revert_inside_newly_added_dir,
               status_add_deleted_directory,