subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hwri...@apache.org
Subject svn commit: r1339349 [33/37] - in /subversion/branches/fix-rdump-editor: ./ build/ build/ac-macros/ build/generator/ build/generator/templates/ build/win32/ contrib/client-side/emacs/ contrib/client-side/vim/ contrib/server-side/ notes/ notes/api-errat...
Date Wed, 16 May 2012 20:32:54 GMT
Modified: subversion/branches/fix-rdump-editor/subversion/tests/cmdline/patch_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/fix-rdump-editor/subversion/tests/cmdline/patch_tests.py?rev=1339349&r1=1339348&r2=1339349&view=diff
==============================================================================
--- subversion/branches/fix-rdump-editor/subversion/tests/cmdline/patch_tests.py (original)
+++ subversion/branches/fix-rdump-editor/subversion/tests/cmdline/patch_tests.py Wed May 16 20:32:43 2012
@@ -64,7 +64,7 @@ def patch(sbox):
   wc_dir = sbox.wc_dir
 
   patch_file_path = make_patch_path(sbox)
-  mu_path = os.path.join(wc_dir, 'A', 'mu')
+  mu_path = sbox.ospath('A/mu')
 
   mu_contents = [
     "Dear internet user,\n",
@@ -194,11 +194,11 @@ def patch(sbox):
   ]
 
   expected_output = [
-    'U         %s\n' % os.path.join(wc_dir, 'A', 'D', 'gamma'),
-    'U         %s\n' % os.path.join(wc_dir, 'iota'),
-    'A         %s\n' % os.path.join(wc_dir, 'new'),
-    'U         %s\n' % os.path.join(wc_dir, 'A', 'mu'),
-    'D         %s\n' % os.path.join(wc_dir, 'A', 'B', 'E', 'beta'),
+    'U         %s\n' % sbox.ospath('A/D/gamma'),
+    'U         %s\n' % sbox.ospath('iota'),
+    'A         %s\n' % sbox.ospath('new'),
+    'U         %s\n' % sbox.ospath('A/mu'),
+    'D         %s\n' % sbox.ospath('A/B/E/beta'),
   ]
 
   expected_disk = svntest.main.greek_state.copy()
@@ -297,8 +297,8 @@ def patch_offset(sbox):
   wc_dir = sbox.wc_dir
 
   patch_file_path = make_patch_path(sbox)
-  mu_path = os.path.join(wc_dir, 'A', 'mu')
-  iota_path = os.path.join(wc_dir, 'iota')
+  mu_path = sbox.ospath('A/mu')
+  iota_path = sbox.ospath('iota')
 
   mu_contents = [
     "Dear internet user,\n",
@@ -510,7 +510,7 @@ def patch_chopped_leading_spaces(sbox):
   wc_dir = sbox.wc_dir
 
   patch_file_path = make_patch_path(sbox)
-  mu_path = os.path.join(wc_dir, 'A', 'mu')
+  mu_path = sbox.ospath('A/mu')
 
   mu_contents = [
     "Dear internet user,\n",
@@ -640,11 +640,11 @@ def patch_chopped_leading_spaces(sbox):
   ]
 
   expected_output = [
-    'U         %s\n' % os.path.join(wc_dir, 'A', 'D', 'gamma'),
-    'U         %s\n' % os.path.join(wc_dir, 'iota'),
-    'A         %s\n' % os.path.join(wc_dir, 'new'),
-    'U         %s\n' % os.path.join(wc_dir, 'A', 'mu'),
-    'D         %s\n' % os.path.join(wc_dir, 'A', 'B', 'E', 'beta'),
+    'U         %s\n' % sbox.ospath('A/D/gamma'),
+    'U         %s\n' % sbox.ospath('iota'),
+    'A         %s\n' % sbox.ospath('new'),
+    'U         %s\n' % sbox.ospath('A/mu'),
+    'D         %s\n' % sbox.ospath('A/B/E/beta'),
   ]
 
   expected_disk = svntest.main.greek_state.copy()
@@ -680,7 +680,7 @@ def patch_strip1(sbox):
   wc_dir = sbox.wc_dir
 
   patch_file_path = make_patch_path(sbox)
-  mu_path = os.path.join(wc_dir, 'A', 'mu')
+  mu_path = sbox.ospath('A/mu')
 
   mu_contents = [
     "Dear internet user,\n",
@@ -810,11 +810,11 @@ def patch_strip1(sbox):
   ]
 
   expected_output = [
-    'U         %s\n' % os.path.join(wc_dir, 'A', 'D', 'gamma'),
-    'U         %s\n' % os.path.join(wc_dir, 'iota'),
-    'A         %s\n' % os.path.join(wc_dir, 'new'),
-    'U         %s\n' % os.path.join(wc_dir, 'A', 'mu'),
-    'D         %s\n' % os.path.join(wc_dir, 'A', 'B', 'E', 'beta'),
+    'U         %s\n' % sbox.ospath('A/D/gamma'),
+    'U         %s\n' % sbox.ospath('iota'),
+    'A         %s\n' % sbox.ospath('new'),
+    'U         %s\n' % sbox.ospath('A/mu'),
+    'D         %s\n' % sbox.ospath('A/B/E/beta'),
   ]
 
   expected_disk = svntest.main.greek_state.copy()
@@ -850,8 +850,8 @@ def patch_no_index_line(sbox):
   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_path = sbox.ospath('A/D/gamma')
+  iota_path = sbox.ospath('iota')
 
   gamma_contents = [
     "\n",
@@ -906,8 +906,8 @@ def patch_no_index_line(sbox):
     "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'),
+    'U         %s\n' % sbox.ospath('A/D/gamma'),
+    'U         %s\n' % sbox.ospath('iota'),
   ]
 
   expected_disk = svntest.main.greek_state.copy()
@@ -969,21 +969,21 @@ def patch_add_new_dir(sbox):
     "+new\n",
   ]
 
-  C_path = os.path.join(wc_dir, 'A', 'C')
-  E_path = os.path.join(wc_dir, 'A', 'B', 'E')
+  C_path = sbox.ospath('A/C')
+  E_path = sbox.ospath('A/B/E')
   svntest.actions.run_and_verify_svn("Deleting C failed", None, [],
                                      'rm', C_path)
   svntest.actions.run_and_verify_svn("Deleting E failed", None, [],
                                      'rm', E_path)
   svntest.main.file_write(patch_file_path, ''.join(unidiff_patch))
 
-  A_B_E_Y_new_path = os.path.join(wc_dir, 'A', 'B', 'E', 'Y', 'new')
-  A_C_new_path = os.path.join(wc_dir, 'A', 'C', 'new')
-  A_Z_new_path = os.path.join(wc_dir, 'A', 'Z', 'new')
-  expected_output = [
-    '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'),
+  A_B_E_Y_new_path = sbox.ospath('A/B/E/Y/new')
+  A_C_new_path = sbox.ospath('A/C/new')
+  A_Z_new_path = sbox.ospath('A/Z/new')
+  expected_output = [
+    'A         %s\n' % sbox.ospath('X'),
+    'A         %s\n' % sbox.ospath('X/Y'),
+    'A         %s\n' % sbox.ospath('X/Y/new'),
     'Skipped missing target: \'%s\'\n' % A_B_E_Y_new_path,
     'Skipped missing target: \'%s\'\n' % A_C_new_path,
     'Skipped missing target: \'%s\'\n' % A_Z_new_path,
@@ -1084,22 +1084,22 @@ def patch_remove_empty_dirs(sbox):
 
   svntest.main.file_write(patch_file_path, ''.join(unidiff_patch))
 
-  F_path = os.path.join(wc_dir, 'A', 'B', 'F')
+  F_path = sbox.ospath('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'))
+  os.remove(sbox.ospath('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'),
+    'D         %s\n' % sbox.ospath('A/D/H/psi'),
+    'D         %s\n' % sbox.ospath('A/D/H/omega'),
+    'D         %s\n' % sbox.ospath('A/B/lambda'),
+    'D         %s\n' % sbox.ospath('A/B/E/alpha'),
+    'D         %s\n' % sbox.ospath('A/B/E/beta'),
+    'D         %s\n' % sbox.ospath('A/B'),
   ]
 
   expected_disk = svntest.main.greek_state.copy()
@@ -1146,7 +1146,7 @@ def patch_reject(sbox):
 
   # Set gamma contents
   gamma_contents = "Hello there! I'm the file 'gamma'.\n"
-  gamma_path = os.path.join(wc_dir, 'A', 'D', 'gamma')
+  gamma_path = sbox.ospath('A/D/gamma')
   svntest.main.file_write(gamma_path, gamma_contents)
   expected_output = svntest.wc.State(wc_dir, {
     'A/D/gamma'       : Item(verb='Sending'),
@@ -1173,7 +1173,7 @@ def patch_reject(sbox):
   svntest.main.file_write(patch_file_path, ''.join(unidiff_patch))
 
   expected_output = [
-    'C         %s\n' % os.path.join(wc_dir, 'A', 'D', 'gamma'),
+    'C         %s\n' % sbox.ospath('A/D/gamma'),
     '>         rejected hunk @@ -1,1 +1,1 @@\n',
     'Summary of conflicts:\n',
     '  Text conflicts: 1\n',
@@ -1216,11 +1216,11 @@ def patch_keywords(sbox):
 
   # Set gamma contents
   gamma_contents = "$Rev$\nHello there! I'm the file 'gamma'.\n"
-  gamma_path = os.path.join(wc_dir, 'A', 'D', 'gamma')
+  gamma_path = sbox.ospath('A/D/gamma')
   svntest.main.file_write(gamma_path, gamma_contents)
   # Expand the keyword
   svntest.main.run_svn(None, 'propset', 'svn:keywords', 'Rev',
-                       os.path.join(wc_dir, 'A', 'D', 'gamma'))
+                       sbox.ospath('A/D/gamma'))
   expected_output = svntest.wc.State(wc_dir, {
     'A/D/gamma'       : Item(verb='Sending'),
     })
@@ -1247,7 +1247,7 @@ def patch_keywords(sbox):
   svntest.main.file_write(patch_file_path, ''.join(unidiff_patch))
 
   expected_output = [
-    'U         %s\n' % os.path.join(wc_dir, 'A', 'D', 'gamma'),
+    'U         %s\n' % sbox.ospath('A/D/gamma'),
   ]
 
   expected_disk = svntest.main.greek_state.copy()
@@ -1276,7 +1276,7 @@ def patch_with_fuzz(sbox):
   wc_dir = sbox.wc_dir
   patch_file_path = make_patch_path(sbox)
 
-  mu_path = os.path.join(wc_dir, 'A', 'mu')
+  mu_path = sbox.ospath('A/mu')
 
   # We have replaced a couple of lines to cause fuzz. Those lines contains
   # the word fuzz
@@ -1386,7 +1386,7 @@ def patch_with_fuzz(sbox):
   ]
 
   expected_output = [
-    'U         %s\n' % os.path.join(wc_dir, 'A', 'mu'),
+    'U         %s\n' % sbox.ospath('A/mu'),
     '>         applied hunk @@ -1,6 +1,7 @@ with fuzz 1\n',
     '>         applied hunk @@ -7,7 +8,9 @@ with fuzz 2\n',
     '>         applied hunk @@ -19,6 +20,7 @@ with offset 1 and fuzz 2\n',
@@ -1415,7 +1415,7 @@ def patch_reverse(sbox):
   wc_dir = sbox.wc_dir
 
   patch_file_path = make_patch_path(sbox)
-  mu_path = os.path.join(wc_dir, 'A', 'mu')
+  mu_path = sbox.ospath('A/mu')
 
   mu_contents = [
     "Dear internet user,\n",
@@ -1545,11 +1545,11 @@ def patch_reverse(sbox):
   ]
 
   expected_output = [
-    'U         %s\n' % os.path.join(wc_dir, 'A', 'D', 'gamma'),
-    'U         %s\n' % os.path.join(wc_dir, 'iota'),
-    'A         %s\n' % os.path.join(wc_dir, 'new'),
-    'U         %s\n' % os.path.join(wc_dir, 'A', 'mu'),
-    'D         %s\n' % os.path.join(wc_dir, 'A', 'B', 'E', 'beta'),
+    'U         %s\n' % sbox.ospath('A/D/gamma'),
+    'U         %s\n' % sbox.ospath('iota'),
+    'A         %s\n' % sbox.ospath('new'),
+    'U         %s\n' % sbox.ospath('A/mu'),
+    'D         %s\n' % sbox.ospath('A/B/E/beta'),
   ]
 
   expected_disk = svntest.main.greek_state.copy()
@@ -1585,7 +1585,7 @@ def patch_no_svn_eol_style(sbox):
   wc_dir = sbox.wc_dir
 
   patch_file_path = make_patch_path(sbox)
-  mu_path = os.path.join(wc_dir, 'A', 'mu')
+  mu_path = sbox.ospath('A/mu')
 
   if os.name == 'nt':
     crlf = '\n'
@@ -1658,7 +1658,7 @@ def patch_no_svn_eol_style(sbox):
       svntest.main.file_write(patch_file_path, ''.join(unidiff_patch))
 
       expected_output = [
-        'G         %s\n' % os.path.join(wc_dir, 'A', 'mu'),
+        'G         %s\n' % sbox.ospath('A/mu'),
       ]
       expected_disk = svntest.main.greek_state.copy()
       expected_disk.tweak('A/mu', contents=''.join(mu_contents))
@@ -1688,7 +1688,7 @@ def patch_with_svn_eol_style(sbox):
   wc_dir = sbox.wc_dir
 
   patch_file_path = make_patch_path(sbox)
-  mu_path = os.path.join(wc_dir, 'A', 'mu')
+  mu_path = sbox.ospath('A/mu')
 
 
   if os.name == 'nt':
@@ -1770,7 +1770,7 @@ def patch_with_svn_eol_style(sbox):
       svntest.main.file_write(patch_file_path, ''.join(unidiff_patch))
 
       expected_output = [
-        'U         %s\n' % os.path.join(wc_dir, 'A', 'mu'),
+        'U         %s\n' % sbox.ospath('A/mu'),
       ]
       expected_disk = svntest.main.greek_state.copy()
       expected_disk.tweak('A/mu', contents=''.join(mu_contents),
@@ -1802,7 +1802,7 @@ def patch_with_svn_eol_style_uncommitted
   wc_dir = sbox.wc_dir
 
   patch_file_path = make_patch_path(sbox)
-  mu_path = os.path.join(wc_dir, 'A', 'mu')
+  mu_path = sbox.ospath('A/mu')
 
 
   if os.name == 'nt':
@@ -1879,7 +1879,7 @@ def patch_with_svn_eol_style_uncommitted
       svntest.main.file_write(patch_file_path, ''.join(unidiff_patch))
 
       expected_output = [
-        'G         %s\n' % os.path.join(wc_dir, 'A', 'mu'),
+        'G         %s\n' % sbox.ospath('A/mu'),
       ]
       expected_disk = svntest.main.greek_state.copy()
       expected_disk.tweak('A/mu', contents=''.join(mu_contents),
@@ -1910,7 +1910,7 @@ def patch_with_ignore_whitespace(sbox):
   wc_dir = sbox.wc_dir
 
   patch_file_path = make_patch_path(sbox)
-  mu_path = os.path.join(wc_dir, 'A', 'mu')
+  mu_path = sbox.ospath('A/mu')
 
   mu_contents = [
     "Dear internet user,\n",
@@ -2016,7 +2016,7 @@ def patch_with_ignore_whitespace(sbox):
   ]
 
   expected_output = [
-    'U         %s\n' % os.path.join(wc_dir, 'A', 'mu'),
+    'U         %s\n' % sbox.ospath('A/mu'),
   ]
 
   expected_disk = svntest.main.greek_state.copy()
@@ -2044,7 +2044,7 @@ def patch_replace_locally_deleted_file(s
   wc_dir = sbox.wc_dir
 
   patch_file_path = make_patch_path(sbox)
-  mu_path = os.path.join(wc_dir, 'A', 'mu')
+  mu_path = sbox.ospath('A/mu')
 
   mu_contents = [
     "Dear internet user,\n",
@@ -2128,7 +2128,7 @@ def patch_no_eol_at_eof(sbox):
   wc_dir = sbox.wc_dir
 
   patch_file_path = make_patch_path(sbox)
-  iota_path = os.path.join(wc_dir, 'iota')
+  iota_path = sbox.ospath('iota')
 
   iota_contents = [
     "One line\n",
@@ -2174,7 +2174,7 @@ def patch_no_eol_at_eof(sbox):
     "The last line with missing eol\n",
   ]
   expected_output = [
-    'U         %s\n' % os.path.join(wc_dir, 'iota'),
+    'U         %s\n' % sbox.ospath('iota'),
   ]
 
   expected_disk = svntest.main.greek_state.copy()
@@ -2201,7 +2201,7 @@ def patch_with_properties(sbox):
   wc_dir = sbox.wc_dir
 
   patch_file_path = make_patch_path(sbox)
-  iota_path = os.path.join(wc_dir, 'iota')
+  iota_path = sbox.ospath('iota')
 
   modified_prop_contents = "This is the property 'modified'.\n"
   deleted_prop_contents = "This is the property 'deleted'.\n"
@@ -2245,7 +2245,7 @@ def patch_with_properties(sbox):
   added_prop_contents = "This is the property 'added'.\n"
 
   expected_output = [
-    ' U        %s\n' % os.path.join(wc_dir, 'iota'),
+    ' U        %s\n' % sbox.ospath('iota'),
   ]
 
   expected_disk = svntest.main.greek_state.copy()
@@ -2272,8 +2272,8 @@ def patch_same_twice(sbox):
   wc_dir = sbox.wc_dir
 
   patch_file_path = make_patch_path(sbox)
-  mu_path = os.path.join(wc_dir, 'A', 'mu')
-  beta_path = os.path.join(wc_dir, 'A', 'B', 'E', 'beta')
+  mu_path = sbox.ospath('A/mu')
+  beta_path = sbox.ospath('A/B/E/beta')
 
   mu_contents = [
     "Dear internet user,\n",
@@ -2403,10 +2403,10 @@ def patch_same_twice(sbox):
   ]
 
   expected_output = [
-    'U         %s\n' % os.path.join(wc_dir, 'A', 'D', 'gamma'),
-    'U         %s\n' % os.path.join(wc_dir, 'iota'),
-    'A         %s\n' % os.path.join(wc_dir, 'new'),
-    'U         %s\n' % os.path.join(wc_dir, 'A', 'mu'),
+    'U         %s\n' % sbox.ospath('A/D/gamma'),
+    'U         %s\n' % sbox.ospath('iota'),
+    'A         %s\n' % sbox.ospath('new'),
+    'U         %s\n' % sbox.ospath('A/mu'),
     'D         %s\n' % beta_path,
   ]
 
@@ -2436,9 +2436,9 @@ def patch_same_twice(sbox):
                                        1) # dry-run
   # apply the patch again
   expected_output = [
-    'G         %s\n' % os.path.join(wc_dir, 'A', 'D', 'gamma'),
+    'G         %s\n' % sbox.ospath('A/D/gamma'),
     '>         hunk @@ -1,1 +1,1 @@ already applied\n',
-    'G         %s\n' % os.path.join(wc_dir, 'iota'),
+    'G         %s\n' % sbox.ospath('iota'),
     # The iota patch inserts a line after the first line in the file,
     # with no trailing context. Currently, Subversion applies this patch
     # multiple times, which matches the behaviour of Larry Wall's patch
@@ -2447,9 +2447,9 @@ def patch_same_twice(sbox):
     # the duplicate application. Should Subversion be taught to detect it,
     # we need this line here:
     # '>         hunk @@ -1,1 +1,2 @@ already applied\n',
-    'G         %s\n' % os.path.join(wc_dir, 'new'),
+    'G         %s\n' % sbox.ospath('new'),
     '>         hunk @@ -0,0 +1,1 @@ already applied\n',
-    'G         %s\n' % os.path.join(wc_dir, 'A', 'mu'),
+    'G         %s\n' % sbox.ospath('A/mu'),
     '>         hunk @@ -6,6 +6,9 @@ already applied\n',
     '>         hunk @@ -14,11 +17,8 @@ already applied\n',
     'Skipped \'%s\'\n' % beta_path,
@@ -2479,7 +2479,7 @@ def patch_dir_properties(sbox):
   wc_dir = sbox.wc_dir
 
   patch_file_path = make_patch_path(sbox)
-  B_path = os.path.join(wc_dir, 'A', 'B')
+  B_path = sbox.ospath('A/B')
 
   modified_prop_contents = "This is the property 'modified'.\n"
   deleted_prop_contents = "This is the property 'deleted'.\n"
@@ -2539,7 +2539,7 @@ def patch_dir_properties(sbox):
 
   expected_output = [
     ' U        %s\n' % wc_dir,
-    ' C        %s\n' % os.path.join(wc_dir, 'A', 'B'),
+    ' C        %s\n' % sbox.ospath('A/B'),
     'Summary of conflicts:\n',
     '  Property conflicts: 1\n',
   ]
@@ -2575,7 +2575,7 @@ def patch_add_path_with_props(sbox):
   wc_dir = sbox.wc_dir
 
   patch_file_path = make_patch_path(sbox)
-  iota_path = os.path.join(wc_dir, 'iota')
+  iota_path = sbox.ospath('iota')
 
   # Apply patch that adds two files, one of which is empty.
   # Both files have properties.
@@ -2610,8 +2610,8 @@ def patch_add_path_with_props(sbox):
   added_prop_contents = "This is the property 'added'.\n"
 
   expected_output = [
-    'A         %s\n' % os.path.join(wc_dir, 'new'),
-    'A         %s\n' % os.path.join(wc_dir, 'X'),
+    'A         %s\n' % sbox.ospath('new'),
+    'A         %s\n' % sbox.ospath('X'),
   ]
 
   expected_disk = svntest.main.greek_state.copy()
@@ -2641,7 +2641,7 @@ def patch_prop_offset(sbox):
   wc_dir = sbox.wc_dir
 
   patch_file_path = make_patch_path(sbox)
-  iota_path = os.path.join(wc_dir, 'iota')
+  iota_path = sbox.ospath('iota')
 
   prop1_content = ''.join([
     "Dear internet user,\n",
@@ -2855,7 +2855,7 @@ def patch_prop_with_fuzz(sbox):
   wc_dir = sbox.wc_dir
   patch_file_path = make_patch_path(sbox)
 
-  mu_path = os.path.join(wc_dir, 'A', 'mu')
+  mu_path = sbox.ospath('A/mu')
 
   # We have replaced a couple of lines to cause fuzz. Those lines contains
   # the word fuzz
@@ -2969,7 +2969,7 @@ def patch_prop_with_fuzz(sbox):
   ])
 
   expected_output = [
-    ' U        %s\n' % os.path.join(wc_dir, 'A', 'mu'),
+    ' U        %s\n' % sbox.ospath('A/mu'),
     '>         applied hunk ## -1,6 +1,7 ## with fuzz 1 (prop)\n',
     '>         applied hunk ## -7,7 +8,9 ## with fuzz 2 (prop)\n',
     '>         applied hunk ## -19,6 +20,7 ## with offset 1 and fuzz 2 (prop)\n',
@@ -2998,7 +2998,7 @@ def patch_git_empty_files(sbox):
   wc_dir = sbox.wc_dir
   patch_file_path = make_patch_path(sbox)
 
-  new_path = os.path.join(wc_dir, 'new')
+  new_path = sbox.ospath('new')
 
   unidiff_patch = [
     "Index: new\n",
@@ -3014,8 +3014,8 @@ def patch_git_empty_files(sbox):
   svntest.main.file_write(patch_file_path, ''.join(unidiff_patch))
 
   expected_output = [
-    'A         %s\n' % os.path.join(wc_dir, 'new'),
-    'D         %s\n' % os.path.join(wc_dir, 'iota'),
+    'A         %s\n' % sbox.ospath('new'),
+    'D         %s\n' % sbox.ospath('iota'),
   ]
   expected_disk = svntest.main.greek_state.copy()
   expected_disk.add({'new' : Item(contents="")})
@@ -3043,7 +3043,7 @@ def patch_old_target_names(sbox):
   wc_dir = sbox.wc_dir
 
   patch_file_path = make_patch_path(sbox)
-  mu_path = os.path.join(wc_dir, 'A', 'mu')
+  mu_path = sbox.ospath('A/mu')
 
   mu_contents = [
     "Dear internet user,\n",
@@ -3142,7 +3142,7 @@ def patch_old_target_names(sbox):
   ]
 
   expected_output = [
-    'U         %s\n' % os.path.join(wc_dir, 'A', 'mu'),
+    'U         %s\n' % sbox.ospath('A/mu'),
   ]
 
   expected_disk = svntest.main.greek_state.copy()
@@ -3169,7 +3169,7 @@ def patch_reverse_revert(sbox):
   wc_dir = sbox.wc_dir
 
   patch_file_path = make_patch_path(sbox)
-  mu_path = os.path.join(wc_dir, 'A', 'mu')
+  mu_path = sbox.ospath('A/mu')
 
   mu_contents_pre_patch = [
     "Dear internet user,\n",
@@ -3299,11 +3299,11 @@ def patch_reverse_revert(sbox):
   ]
 
   expected_output = [
-    'U         %s\n' % os.path.join(wc_dir, 'A', 'D', 'gamma'),
-    'U         %s\n' % os.path.join(wc_dir, 'iota'),
-    'A         %s\n' % os.path.join(wc_dir, 'new'),
-    'U         %s\n' % os.path.join(wc_dir, 'A', 'mu'),
-    'D         %s\n' % os.path.join(wc_dir, 'A', 'B', 'E', 'beta'),
+    'U         %s\n' % sbox.ospath('A/D/gamma'),
+    'U         %s\n' % sbox.ospath('iota'),
+    'A         %s\n' % sbox.ospath('new'),
+    'U         %s\n' % sbox.ospath('A/mu'),
+    'D         %s\n' % sbox.ospath('A/B/E/beta'),
   ]
 
   expected_disk = svntest.main.greek_state.copy()
@@ -3333,11 +3333,11 @@ def patch_reverse_revert(sbox):
 
   # Applying the same patch in reverse should undo local mods
   expected_output = [
-    'G         %s\n' % os.path.join(wc_dir, 'A', 'D', 'gamma'),
-    'G         %s\n' % os.path.join(wc_dir, 'iota'),
-    'D         %s\n' % os.path.join(wc_dir, 'new'),
-    'G         %s\n' % os.path.join(wc_dir, 'A', 'mu'),
-    'A         %s\n' % os.path.join(wc_dir, 'A', 'B', 'E', 'beta'),
+    'G         %s\n' % sbox.ospath('A/D/gamma'),
+    'G         %s\n' % sbox.ospath('iota'),
+    'D         %s\n' % sbox.ospath('new'),
+    'G         %s\n' % sbox.ospath('A/mu'),
+    'A         %s\n' % sbox.ospath('A/B/E/beta'),
   ]
   expected_disk = svntest.main.greek_state.copy()
   expected_disk.tweak('A/mu', contents=''.join(mu_contents_pre_patch))
@@ -3368,7 +3368,7 @@ def patch_one_property(sbox, trailing_eo
   wc_dir = sbox.wc_dir
 
   patch_file_path = make_patch_path(sbox)
-  mu_path = os.path.join(wc_dir, 'A', 'mu')
+  mu_path = sbox.ospath('A/mu')
 
   # Apply patch
 
@@ -3464,7 +3464,7 @@ def patch_add_symlink(sbox):
   svntest.main.file_write(patch_file_path, ''.join(unidiff_patch))
 
   expected_output = [
-    'A         %s\n' % os.path.join(wc_dir, 'iota_symlink'),
+    'A         %s\n' % sbox.ospath('iota_symlink'),
   ]
 
   expected_disk = svntest.main.greek_state.copy()
@@ -3491,7 +3491,7 @@ def patch_moved_away(sbox):
   wc_dir = sbox.wc_dir
 
   patch_file_path = make_patch_path(sbox)
-  mu_path = os.path.join(wc_dir, 'A', 'mu')
+  mu_path = sbox.ospath('A/mu')
 
   mu_contents = [
     "Dear internet user,\n",
@@ -3592,7 +3592,7 @@ def patch_moved_away(sbox):
   ]
 
   expected_output = [
-    'U         %s\n' % os.path.join(wc_dir, 'A', 'mu2'),
+    'U         %s\n' % sbox.ospath('A/mu2'),
   ]
 
   expected_disk = svntest.main.greek_state.copy()
@@ -3623,8 +3623,8 @@ def patch_lacking_trailing_eol(sbox):
   wc_dir = sbox.wc_dir
 
   patch_file_path = make_patch_path(sbox)
-  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')
 
   # Prepare
   expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
@@ -3648,7 +3648,7 @@ def patch_lacking_trailing_eol(sbox):
   new_contents = "new\n"
 
   expected_output = [
-    'U         %s\n' % os.path.join(wc_dir, 'iota'),
+    'U         %s\n' % sbox.ospath('iota'),
   ]
 
   # Expect a newline to be appended
@@ -3677,7 +3677,7 @@ def patch_deletes_prop(sbox):
   wc_dir = sbox.wc_dir
 
   patch_file_path = make_patch_path(sbox)
-  iota_path = os.path.join(wc_dir, 'iota')
+  iota_path = sbox.ospath('iota')
 
   svntest.main.run_svn(None, 'propset', 'propname', 'propvalue',
                        iota_path)
@@ -3712,7 +3712,7 @@ def patch_deletes_prop(sbox):
   expected_status.tweak('iota', wc_rev=2)
   expected_skip = wc.State('', { })
   expected_output = [
-    ' U        %s\n' % os.path.join(wc_dir, 'iota'),
+    ' U        %s\n' % sbox.ospath('iota'),
   ]
   svntest.actions.run_and_verify_patch(wc_dir, os.path.abspath(patch_file_path),
                                        expected_output,
@@ -3761,7 +3761,7 @@ def patch_reversed_add_with_props(sbox):
   patch_file_path = make_patch_path(sbox)
 
   # Add a new file which also has props set on it.
-  newfile_path = os.path.join(wc_dir, 'newfile')
+  newfile_path = sbox.ospath('newfile')
   newfile_contents = ["This is the file 'newfile'.\n"]
   svntest.main.file_write(newfile_path, ''.join(newfile_contents))
   svntest.main.run_svn(None, 'add', newfile_path)
@@ -3810,7 +3810,7 @@ def patch_reversed_add_with_props2(sbox)
   patch_file_path = make_patch_path(sbox)
 
   # Add a new file which also has props set on it.
-  newfile_path = os.path.join(wc_dir, 'newfile')
+  newfile_path = sbox.ospath('newfile')
   newfile_contents = ["This is the file 'newfile'.\n"]
   svntest.main.file_write(newfile_path, ''.join(newfile_contents))
   svntest.main.run_svn(None, 'add', newfile_path)
@@ -3888,8 +3888,8 @@ def patch_dev_null(sbox):
 
   new_contents = "new\n"
   expected_output = [
-    'A         %s\n' % os.path.join(wc_dir, 'new'),
-    'D         %s\n' % os.path.join(wc_dir, 'A', 'B', 'E', 'beta'),
+    'A         %s\n' % sbox.ospath('new'),
+    'D         %s\n' % sbox.ospath('A/B/E/beta'),
   ]
 
   expected_disk = svntest.main.greek_state.copy()
@@ -3996,7 +3996,7 @@ def patch_target_no_eol_at_eof(sbox):
   wc_dir = sbox.wc_dir
 
   patch_file_path = make_patch_path(sbox)
-  iota_path = os.path.join(wc_dir, 'iota')
+  iota_path = sbox.ospath('iota')
 
   iota_contents = [
     "This is the file iota."
@@ -4026,7 +4026,7 @@ def patch_target_no_eol_at_eof(sbox):
     "It is really the file 'iota'."
   ]
   expected_output = [
-    'U         %s\n' % os.path.join(wc_dir, 'iota'),
+    'U         %s\n' % sbox.ospath('iota'),
   ]
 
   expected_disk = svntest.main.greek_state.copy()
@@ -4071,10 +4071,10 @@ def patch_add_and_delete(sbox):
   svntest.main.file_write(patch_file_path, ''.join(unidiff_patch))
 
   expected_output = [
-    'A         %s\n' % os.path.join(wc_dir, 'P'),
-    'A         %s\n' % os.path.join(wc_dir, 'P', 'Q'),
-    'A         %s\n' % os.path.join(wc_dir, 'P', 'Q', 'foo'),
-    'D         %s\n' % os.path.join(wc_dir, 'iota'),
+    'A         %s\n' % sbox.ospath('P'),
+    'A         %s\n' % sbox.ospath('P/Q'),
+    'A         %s\n' % sbox.ospath('P/Q/foo'),
+    'D         %s\n' % sbox.ospath('iota'),
   ]
   expected_disk = svntest.main.greek_state.copy()
   expected_disk.remove('iota')

Modified: subversion/branches/fix-rdump-editor/subversion/tests/cmdline/prop_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/fix-rdump-editor/subversion/tests/cmdline/prop_tests.py?rev=1339349&r1=1339348&r2=1339349&view=diff
==============================================================================
--- subversion/branches/fix-rdump-editor/subversion/tests/cmdline/prop_tests.py (original)
+++ subversion/branches/fix-rdump-editor/subversion/tests/cmdline/prop_tests.py Wed May 16 20:32:43 2012
@@ -25,7 +25,9 @@
 ######################################################################
 
 # General modules
-import sys, re, os, stat, subprocess
+import sys, re, os, stat, subprocess, logging
+
+logger = logging.getLogger()
 
 # Our testing module
 import svntest
@@ -365,7 +367,7 @@ def update_conflict_props(sbox):
                                         None, None, 1)
 
   if len(extra_files) != 0:
-    print("didn't get expected conflict files")
+    logger.warn("didn't get expected conflict files")
     raise svntest.verify.SVNUnexpectedOutput
 
   # Resolve the conflicts
@@ -776,9 +778,9 @@ def copy_inherits_special_props(sbox):
 
   expected_stdout = [orig_mime_type + '\n']
   if actual_stdout != expected_stdout:
-    print("svn pg svn:mime-type output does not match expected.")
-    print("Expected standard output:  %s\n" % expected_stdout)
-    print("Actual standard output:  %s\n" % actual_stdout)
+    logger.warn("svn pg svn:mime-type output does not match expected.")
+    logger.warn("Expected standard output:  %s\n", expected_stdout)
+    logger.warn("Actual standard output:  %s\n", actual_stdout)
     raise svntest.verify.SVNUnexpectedOutput
 
   # Check the svn:executable value.
@@ -789,9 +791,9 @@ def copy_inherits_special_props(sbox):
 
     expected_stdout = ['*\n']
     if actual_stdout != expected_stdout:
-      print("svn pg svn:executable output does not match expected.")
-      print("Expected standard output:  %s\n" % expected_stdout)
-      print("Actual standard output:  %s\n" % actual_stdout)
+      logger.warn("svn pg svn:executable output does not match expected.")
+      logger.warn("Expected standard output:  %s\n", expected_stdout)
+      logger.warn("Actual standard output:  %s\n", actual_stdout)
       raise svntest.verify.SVNUnexpectedOutput
 
 #----------------------------------------------------------------------
@@ -1038,8 +1040,8 @@ def binary_props(sbox):
 # expected_out, and that errput is empty.
 def verify_output(expected_out, output, errput):
   if errput != []:
-    print('Error: stderr:')
-    print(errput)
+    logger.warn('Error: stderr:')
+    logger.warn(errput)
     raise svntest.Failure
   output.sort()
   ln = 0
@@ -1048,8 +1050,8 @@ def verify_output(expected_out, output, 
       continue
     if ((line.find(expected_out[ln]) == -1) or
         (line != '' and expected_out[ln] == '')):
-      print('Error: expected keywords:  %s' % expected_out)
-      print('       actual full output: %s' % output)
+      logger.warn('Error: expected keywords:  %s', expected_out)
+      logger.warn('       actual full output: %s', output)
       raise svntest.Failure
     ln = ln + 1
   if ln != len(expected_out):
@@ -1738,11 +1740,9 @@ def post_revprop_change_hook(sbox):
   svntest.actions.create_failing_hook(repo_dir, 'post-revprop-change',
                                       error_msg)
 
-  # serf/neon/mod_dav_svn splits the "svn: hook failed" line
-  expected_error = svntest.verify.RegexOutput([
-    '(svn: E165001: |)post-revprop-change hook failed',
-    error_msg + "\n",
-  ], match_all = False)
+  # serf/neon/mod_dav_svn give SVN_ERR_RA_DAV_REQUEST_FAILED
+  # file/svn give SVN_ERR_REPOS_HOOK_FAILURE
+  expected_error = 'svn: (E175002|E165001).*post-revprop-change hook failed'
 
   svntest.actions.run_and_verify_svn(None, [], expected_error,
                                      'ps', '--revprop', '-r0', 'p', 'v',
@@ -1984,7 +1984,7 @@ def prop_reject_grind(sbox):
       if match:
         # The last line in the list is always an empty string.
         if msg_lines[i + 1] == "":
-          #print("found message %i in file at line %i" % (n, j))
+          #logger.info("found message %i in file at line %i" % (n, j))
           break
         i += 1
       else:
@@ -2466,7 +2466,7 @@ def file_matching_dir_prop_reject(sbox):
                                         extra_files,
                                         None, None, True, '-r', '2', wc_dir)
   if len(extra_files) != 0:
-    print("didn't get expected conflict files")
+    logger.warn("didn't get expected conflict files")
     raise svntest.verify.SVNUnexpectedOutput
 
   # Revert and update to check that conflict files are removed

Modified: subversion/branches/fix-rdump-editor/subversion/tests/cmdline/revert_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/fix-rdump-editor/subversion/tests/cmdline/revert_tests.py?rev=1339349&r1=1339348&r2=1339349&view=diff
==============================================================================
--- subversion/branches/fix-rdump-editor/subversion/tests/cmdline/revert_tests.py (original)
+++ subversion/branches/fix-rdump-editor/subversion/tests/cmdline/revert_tests.py Wed May 16 20:32:43 2012
@@ -1600,6 +1600,12 @@ def revert_with_unversioned_targets(sbox
   actual_disk = svntest.tree.build_tree_from_wc(wc_dir, 1)
   svntest.tree.compare_trees("disk", actual_disk, expected_disk.old_tree())
 
+def revert_nonexistent(sbox):
+  'svn revert -R nonexistent'
+  sbox.build(read_only=True)
+  svntest.actions.run_and_verify_svn(None, 'Skipped.*nonexistent', [],
+                                     'revert', '-R', sbox.ospath('nonexistent'))
+
 ########################################################################
 # Run the tests
 
@@ -1638,6 +1644,7 @@ test_list = [ None,
               revert_no_text_change_conflict,
               revert_no_text_change_conflict_recursive,
               revert_with_unversioned_targets,
+              revert_nonexistent,
              ]
 
 if __name__ == '__main__':

Modified: subversion/branches/fix-rdump-editor/subversion/tests/cmdline/schedule_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/fix-rdump-editor/subversion/tests/cmdline/schedule_tests.py?rev=1339349&r1=1339348&r2=1339349&view=diff
==============================================================================
--- subversion/branches/fix-rdump-editor/subversion/tests/cmdline/schedule_tests.py (original)
+++ subversion/branches/fix-rdump-editor/subversion/tests/cmdline/schedule_tests.py Wed May 16 20:32:43 2012
@@ -26,7 +26,9 @@
 ######################################################################
 
 # General modules
-import os
+import os, logging
+
+logger = logging.getLogger()
 
 # Our testing module
 import svntest
@@ -256,8 +258,8 @@ def check_reversion(files, output):
   output.sort()
   expected_output.sort()
   if output != expected_output:
-    print("Expected output: %s" % expected_output)
-    print("Actual output:   %s" % output)
+    logger.warn("Expected output: %s", expected_output)
+    logger.warn("Actual output:   %s", output)
     raise svntest.Failure
 
 #----------------------------------------------------------------------

Modified: subversion/branches/fix-rdump-editor/subversion/tests/cmdline/special_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/fix-rdump-editor/subversion/tests/cmdline/special_tests.py?rev=1339349&r1=1339348&r2=1339349&view=diff
==============================================================================
--- subversion/branches/fix-rdump-editor/subversion/tests/cmdline/special_tests.py (original)
+++ subversion/branches/fix-rdump-editor/subversion/tests/cmdline/special_tests.py Wed May 16 20:32:43 2012
@@ -608,10 +608,8 @@ def replace_symlink_with_dir(sbox):
   expected_output = svntest.wc.State(wc_dir, {
   })
 
-  if svntest.main.is_posix_os():
-    error_re_string = '.*E145001: Entry.*has unexpectedly changed special.*'
-  else:
-    error_re_string = None
+  error_re_string = 'E145001: (Entry|Node).*has.*changed (special|kind)'
+
   svntest.actions.run_and_verify_commit(wc_dir, expected_output,
                                         None, error_re_string, wc_dir)
 

Modified: subversion/branches/fix-rdump-editor/subversion/tests/cmdline/stat_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/fix-rdump-editor/subversion/tests/cmdline/stat_tests.py?rev=1339349&r1=1339348&r2=1339349&view=diff
==============================================================================
--- subversion/branches/fix-rdump-editor/subversion/tests/cmdline/stat_tests.py (original)
+++ subversion/branches/fix-rdump-editor/subversion/tests/cmdline/stat_tests.py Wed May 16 20:32:43 2012
@@ -29,6 +29,9 @@ import os
 import re
 import time
 import datetime
+import logging
+
+logger = logging.getLogger()
 
 # Our testing module
 import svntest
@@ -80,8 +83,8 @@ def status_update_with_nested_adds(sbox)
   svntest.actions.duplicate_dir(wc_dir, wc_backup)
 
   # Create newdir and newfile
-  newdir_path = os.path.join(wc_dir, 'newdir')
-  newfile_path = os.path.join(wc_dir, 'newdir', 'newfile')
+  newdir_path = sbox.ospath('newdir')
+  newfile_path = sbox.ospath('newdir/newfile')
   os.makedirs(newdir_path)
   svntest.main.file_append(newfile_path, 'new text')
 
@@ -644,7 +647,7 @@ def get_last_changed_date(path):
   for line in out:
     if re.match("^Last Changed Date", line):
       return line
-  print("Didn't find Last Changed Date for " + path)
+  logger.warn("Didn't find Last Changed Date for %s", path)
   raise svntest.Failure
 
 # Helper for timestamp_behaviour test
@@ -655,7 +658,7 @@ def get_text_timestamp(path):
   for line in out:
     if re.match("^Text Last Updated", line):
       return line
-  print("Didn't find text-time for " + path)
+  logger.warn("Didn't find text-time for %s", path)
   raise svntest.Failure
 
 # Helper for timestamp_behaviour test
@@ -704,8 +707,8 @@ def timestamp_behaviour(sbox):
   sbox.build()
   wc_dir = sbox.wc_dir
 
-  A_path = os.path.join(wc_dir, 'A')
-  iota_path = os.path.join(wc_dir, 'iota')
+  A_path = sbox.ospath('A')
+  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)
@@ -789,9 +792,9 @@ use-commit-times = yes
       or fmt[23:25] != iota_ts[23:25]):
     # NOTE: the two strings below won't *exactly* match (see just above),
     #   but the *numeric* portions of them should.
-    print("File timestamp on 'iota' does not match.")
-    print("  EXPECTED: %s" % iota_ts)
-    print("    ACTUAL: %s" % fmt)
+    logger.warn("File timestamp on 'iota' does not match.")
+    logger.warn("  EXPECTED: %s", iota_ts)
+    logger.warn("    ACTUAL: %s", fmt)
     raise svntest.Failure
 
 #----------------------------------------------------------------------
@@ -860,7 +863,7 @@ def status_on_partially_nonrecursive_wc(
   D_url = top_url + '/A/D'
   G_url = top_url + '/A/D/G'
   H_url = top_url + '/A/D/H'
-  rho = os.path.join(wc_dir, 'A', 'D', 'G', 'rho')
+  rho = sbox.ospath('A/D/G/rho')
 
   # Commit a change to A/D/G/rho.  This will be our equivalent of
   # whatever change it was that happened between r213 and HEAD in the
@@ -887,7 +890,7 @@ def missing_dir_in_anchor(sbox):
   sbox.build(read_only = True)
   wc_dir = sbox.wc_dir
 
-  foo_path = os.path.join(wc_dir, 'foo')
+  foo_path = sbox.ospath('foo')
   svntest.actions.run_and_verify_svn(None, None, [], 'mkdir', foo_path)
   expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
   expected_status.add({
@@ -946,13 +949,29 @@ def status_in_xml(sbox):
 
   svntest.actions.run_and_verify_status_xml(expected_entries, file_path, '-u')
 
+  svntest.actions.run_and_verify_svn(None, None, [],
+                                     'rm', '-m', 'repo delete',
+                                     sbox.repo_url + '/A/B/E/alpha')
+
+  expected_entries = {sbox.ospath('A/B/E/alpha')
+                      : {'wcprops' : 'none',
+                         'wcitem' : 'normal',
+                         'wcrev' : '1',
+                         'crev' : '1',
+                         'author' : svntest.main.wc_author,
+                         'rprops' : 'none',
+                         'ritem' : 'deleted'}}
+
+  svntest.actions.run_and_verify_status_xml(expected_entries,
+                                            sbox.ospath('A/B/E/alpha'), '-u')
+
 #----------------------------------------------------------------------
 
 def status_ignored_dir(sbox):
   "status on ignored directory"
   sbox.build()
   wc_dir = sbox.wc_dir
-  new_dir = os.path.join(wc_dir, "dir.o")
+  new_dir = sbox.ospath('dir.o')
   new_dir_url = sbox.repo_url + "/dir.o"
 
   svntest.actions.run_and_verify_svn("Create dir", "\n|Committed revision 2.", [],
@@ -973,8 +992,10 @@ def status_ignored_dir(sbox):
 @Issue(2030)
 def status_unversioned_dir(sbox):
   "status on unversioned dir"
-  sbox.build(read_only = True)
-  dir = sbox.repo_dir
+  sbox.build(read_only = True, create_wc = False)
+  dir = sbox.wc_dir
+  svntest.main.safe_rmtree(sbox.wc_dir)
+  os.mkdir(dir)
   expected_err = "svn: warning: W155007: '.*(/|\\\\)" + os.path.basename(dir) + \
                  "' is not a working copy"
   svntest.actions.run_and_verify_svn2(None, [], expected_err, 0,
@@ -986,7 +1007,7 @@ def status_missing_dir(sbox):
   "status with a versioned directory missing"
   sbox.build(read_only = True)
   wc_dir = sbox.wc_dir
-  a_d_g = os.path.join(wc_dir, "A", "D", "G")
+  a_d_g = sbox.ospath('A/D/G')
 
   # ok, blow away the A/D/G directory
   svntest.main.safe_rmtree(a_d_g)
@@ -1019,7 +1040,7 @@ def status_missing_dir(sbox):
           "        *            " + os.path.join(a_d_g, "rho") + "\n",
           "        *            " + os.path.join(a_d_g, "tau") + "\n",
           "!       *       ?    " + a_d_g + "\n",
-          "        *        1   " + os.path.join(wc_dir, "A", "D") + "\n",
+          "        *        1   " + sbox.ospath('A/D') + "\n",
           "Status against revision:      1\n" ]
 
   # now run status -u, we should be able to do this without crashing
@@ -1058,7 +1079,7 @@ def status_add_plus_conflict(sbox):
   svntest.actions.run_and_verify_svn(None, None, [],
                                      'update', wc_dir)
 
-  branch_file = os.path.join(wc_dir, 'branch', 'file')
+  branch_file = sbox.ospath('branch/file')
 
   svntest.main.file_write(branch_file, "line 1\nline2\nline3\n", 'wb+')
 
@@ -1080,7 +1101,7 @@ def status_add_plus_conflict(sbox):
                                      'commit',
                                      branch_file, '-m', 'rev 5')
 
-  trunk_dir = os.path.join(wc_dir, 'trunk')
+  trunk_dir = sbox.ospath('trunk')
 
   svntest.actions.run_and_verify_svn(None, None, [],
                                      'merge',
@@ -1091,15 +1112,15 @@ def status_add_plus_conflict(sbox):
                                      branch_url, '-r', '4:5', trunk_dir)
 
   lines = [
-    "?       " + os.path.join(wc_dir, "trunk", "file.merge-left.r4") + "\n",
-    "?       " + os.path.join(wc_dir, "trunk", "file.merge-right.r5") + "\n",
-    "?       " + os.path.join(wc_dir, "trunk", "file.working") + "\n",
-    "C  +    " + os.path.join(wc_dir, "trunk", "file") + "\n",
+    "?       " + sbox.ospath('trunk/file.merge-left.r4') + "\n",
+    "?       " + sbox.ospath('trunk/file.merge-right.r5') + "\n",
+    "?       " + sbox.ospath('trunk/file.working') + "\n",
+    "C  +    " + sbox.ospath('trunk/file') + "\n",
     "Summary of conflicts:\n",
     "  Text conflicts: 1\n",
   ]
   if svntest.main.server_has_mergeinfo():
-    lines.append(" M      " + os.path.join(wc_dir, "trunk") + "\n")
+    lines.append(" M      " + sbox.ospath('trunk') + "\n")
 
   expected_output = svntest.verify.UnorderedOutput(lines)
 
@@ -1113,7 +1134,7 @@ def inconsistent_eol(sbox):
 
   sbox.build()
   wc_dir = sbox.wc_dir
-  iota_path = os.path.join(wc_dir, "iota")
+  iota_path = sbox.ospath('iota')
 
   svntest.main.file_write(iota_path, "line 1\nline 2\n", "wb")
 
@@ -1121,7 +1142,7 @@ def inconsistent_eol(sbox):
                                      "property 'svn:eol-style' set on.*iota",
                                      [],
                                      'propset', 'svn:eol-style', 'native',
-                                     os.path.join(wc_dir, 'iota'))
+                                     sbox.ospath('iota'))
 
   expected_output = svntest.wc.State(wc_dir, {
     'iota' : Item(verb='Sending'),
@@ -1145,7 +1166,7 @@ def status_update_with_incoming_props(sb
 
   sbox.build()
   wc_dir = sbox.wc_dir
-  A_path = os.path.join(wc_dir, 'A')
+  A_path = sbox.ospath('A')
 
   # Add a property to the root folder and a subdir
   svntest.main.run_svn(None, 'propset', 'red', 'rojo', wc_dir)
@@ -1198,7 +1219,7 @@ def status_update_with_incoming_props(sb
 
   expected = svntest.verify.UnorderedOutput(
          ["                 1        1 jrandom      " +
-          os.path.join(wc_dir, "iota") + "\n",
+          sbox.ospath('iota') + "\n",
           "        *        1        1 jrandom      " + A_path + "\n",
           "        *        1        1 jrandom      " + wc_dir + "\n",
           "Status against revision:      2\n" ])
@@ -1244,7 +1265,7 @@ def status_update_verbose_with_incoming_
 
   sbox.build()
   wc_dir = sbox.wc_dir
-  A_path = os.path.join(wc_dir, 'A')
+  A_path = sbox.ospath('A')
   D_path = os.path.join(A_path, 'D')
   B_path = os.path.join(A_path, 'B')
   E_path = os.path.join(A_path, 'B', 'E')
@@ -1312,7 +1333,7 @@ def status_update_verbose_with_incoming_
           "         " + common + os.path.join(A_path, 'mu') + "\n",
           "         " + common + os.path.join(A_path, 'C') + "\n",
           "         " + common + A_path + "\n",
-          "         " + common + os.path.join(wc_dir, 'iota') + "\n",
+          "         " + common + sbox.ospath('iota') + "\n",
           "        *" + common + wc_dir  + "\n",
           "Status against revision:      2\n" ])
 
@@ -1329,7 +1350,7 @@ def status_nonrecursive_update(sbox):
 
   sbox.build()
   wc_dir = sbox.wc_dir
-  A_path = os.path.join(wc_dir, 'A')
+  A_path = sbox.ospath('A')
   D_path = os.path.join(A_path, 'D')
   mu_path = os.path.join(A_path, 'mu')
   gamma_path = os.path.join(D_path, 'gamma')
@@ -1368,7 +1389,7 @@ def status_nonrecursive_update(sbox):
                                         '-r', '1', wc_dir)
 
   # Check the remote status of folder A (non-recursively)
-  xout = ["        *        1   " + os.path.join(wc_dir, "A", "mu") + "\n",
+  xout = ["        *        1   " + sbox.ospath('A/mu') + "\n",
           "Status against revision:      2\n" ]
 
   svntest.actions.run_and_verify_svn(None,
@@ -1413,7 +1434,7 @@ def status_depth_local(sbox):
 
   sbox.build(read_only = True)
   wc_dir = sbox.wc_dir
-  A_path = os.path.join(wc_dir, 'A')
+  A_path = sbox.ospath('A')
   D_path = os.path.join(A_path, 'D')
 
   mu_path = os.path.join(A_path, 'mu')
@@ -1472,7 +1493,7 @@ def status_depth_update(sbox):
 
   sbox.build()
   wc_dir = sbox.wc_dir
-  A_path = os.path.join(wc_dir, 'A')
+  A_path = sbox.ospath('A')
   D_path = os.path.join(A_path, 'D')
 
   mu_path = os.path.join(A_path, 'mu')
@@ -1548,7 +1569,7 @@ def status_dash_u_deleted_directories(sb
 
   sbox.build()
   wc_dir = sbox.wc_dir
-  A_path = os.path.join(wc_dir, 'A')
+  A_path = sbox.ospath('A')
   B_path = os.path.join(A_path, 'B')
 
   # delete the B directory
@@ -1684,7 +1705,7 @@ def status_with_tree_conflicts(sbox):
 
   svntest.actions.build_greek_tree_conflicts(sbox)
   wc_dir = sbox.wc_dir
-  G = os.path.join(wc_dir, 'A', 'D', 'G')
+  G = sbox.ospath('A/D/G')
   pi = os.path.join(G, 'pi')
   rho = os.path.join(G, 'rho')
   tau = os.path.join(G, 'tau')
@@ -1750,18 +1771,19 @@ def status_with_tree_conflicts(sbox):
       # check if the path should be a victim
       m = re.search('tree-conflicted="true"', entry)
       if (m is None) and should_be_victim[path]:
-        print("ERROR: expected '%s' to be a tree conflict victim." % path)
-        print("ACTUAL STATUS OUTPUT:")
-        print(output_str)
+        logger.warn("ERROR: expected '%s' to be a tree conflict victim.", path)
+        logger.warn("ACTUAL STATUS OUTPUT:")
+        logger.warn(output_str)
         raise svntest.Failure
       if m and not should_be_victim[path]:
-        print("ERROR: did NOT expect '%s' to be a tree conflict victim." % path)
-        print("ACTUAL STATUS OUTPUT:")
-        print(output_str)
+        logger.warn("ERROR: did NOT expect '%s' to be a tree conflict victim.",
+                    path)
+        logger.warn("ACTUAL STATUS OUTPUT:")
+        logger.warn(output_str)
         raise svntest.Failure
 
   if real_entry_count != len(should_be_victim):
-    print("ERROR: 'status --xml' output is incomplete.")
+    logger.warn("ERROR: 'status --xml' output is incomplete.")
     raise svntest.Failure
 
 
@@ -1773,9 +1795,9 @@ def status_nested_wc_old_format(sbox):
 
   sbox.build(read_only = True)
   wc_dir = sbox.wc_dir
-  os.mkdir(os.path.join(wc_dir, 'subdir'))
-  os.mkdir(os.path.join(wc_dir, 'subdir', '.svn'))
-  svntest.main.file_append(os.path.join(wc_dir, 'subdir', '.svn', 'format'),
+  os.mkdir(sbox.ospath('subdir'))
+  os.mkdir(sbox.ospath('subdir/.svn'))
+  svntest.main.file_append(sbox.ospath('subdir/.svn/format'),
                            '10\n') # format 10 was the Subversion 1.6 format
   os.chdir(wc_dir)
   svntest.actions.run_and_verify_svn(None, [ "?       subdir\n" ], [], 'st')
@@ -1796,7 +1818,7 @@ def status_locked_deleted(sbox):
   "status with locked deleted file"
 
   sbox.build()
-  iota_path = os.path.join(sbox.wc_dir, 'iota')
+  iota_path = sbox.ospath('iota')
 
   sbox.simple_rm('iota')
   simple_lock(sbox, 'iota')

Modified: subversion/branches/fix-rdump-editor/subversion/tests/cmdline/svnadmin_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/fix-rdump-editor/subversion/tests/cmdline/svnadmin_tests.py?rev=1339349&r1=1339348&r2=1339349&view=diff
==============================================================================
--- subversion/branches/fix-rdump-editor/subversion/tests/cmdline/svnadmin_tests.py (original)
+++ subversion/branches/fix-rdump-editor/subversion/tests/cmdline/svnadmin_tests.py Wed May 16 20:32:43 2012
@@ -29,6 +29,10 @@ import os
 import re
 import shutil
 import sys
+import threading
+import logging
+
+logger = logging.getLogger()
 
 # Our testing module
 import svntest
@@ -99,6 +103,16 @@ def check_hotcopy_fsfs(src, dst):
                                     % (row, rows1[i]))
           continue
 
+        # Special case for revprop-generation: It will always be zero in
+        # the hotcopy destination (i.e. a fresh cache generation)
+        if src_file == 'revprop-generation':
+          f2 = open(dst_path, 'r')
+          revprop_gen = int(f2.read().strip())
+          if revprop_gen != 0:
+              raise svntest.Failure("Hotcopy destination has non-zero " +
+                                    "revprop generation")
+          continue
+
         f1 = open(src_path, 'r')
         f2 = open(dst_path, 'r')
         while True:
@@ -457,7 +471,7 @@ def hotcopy_format(sbox):
                                                         sbox.repo_dir,
                                                         backup_dir)
   if errput:
-    print("Error: hotcopy failed")
+    logger.warn("Error: hotcopy failed")
     raise svntest.Failure
 
   # verify that the db/format files are the same
@@ -470,7 +484,7 @@ def hotcopy_format(sbox):
   fp2.close()
 
   if contents1 != contents2:
-    print("Error: db/format file contents do not match after hotcopy")
+    logger.warn("Error: db/format file contents do not match after hotcopy")
     raise svntest.Failure
 
 #----------------------------------------------------------------------
@@ -487,7 +501,7 @@ def setrevprop(sbox):
                                                         "--bypass-hooks",
                                                         iota_path)
   if errput:
-    print("Error: 'setlog' failed")
+    logger.warn("Error: 'setlog' failed")
     raise svntest.Failure
 
   # Verify that the revprop value matches what we set when retrieved
@@ -506,7 +520,7 @@ def setrevprop(sbox):
                                                         "-r0", "svn:author",
                                                         foo_path)
   if errput:
-    print("Error: 'setrevprop' failed")
+    logger.warn("Error: 'setrevprop' failed")
     raise svntest.Failure
 
   # Verify that the revprop value matches what we set when retrieved
@@ -693,7 +707,8 @@ _0.0.t1-1 add false false /A/B/E/bravo
   svntest.verify.verify_outputs(
     message=None, actual_stdout=output, actual_stderr=errput,
     expected_stdout=None,
-    expected_stderr=".*Found malformed header '[^']*' in revision file")
+    expected_stderr=".*Found malformed header '[^']*' in revision file"
+                    "|.*Missing id field in node-rev.*")
 
 #----------------------------------------------------------------------
 
@@ -858,7 +873,7 @@ def set_uuid(sbox):
     raise SVNUnexpectedStderr(errput)
   new_uuid = output[0].rstrip()
   if new_uuid == orig_uuid:
-    print("Error: new UUID matches the original one")
+    logger.warn("Error: new UUID matches the original one")
     raise svntest.Failure
 
   # Now, try setting the UUID back to the original value.
@@ -869,7 +884,7 @@ def set_uuid(sbox):
     raise SVNUnexpectedStderr(errput)
   new_uuid = output[0].rstrip()
   if new_uuid != orig_uuid:
-    print("Error: new UUID doesn't match the original one")
+    logger.warn("Error: new UUID doesn't match the original one")
     raise svntest.Failure
 
 #----------------------------------------------------------------------
@@ -1780,6 +1795,47 @@ def locking(sbox):
                                           iota_token)
 
 
+@SkipUnless(svntest.main.is_threaded_python)
+@Issue(4129)
+def mergeinfo_race(sbox):
+  "concurrent mergeinfo commits invalidate pred-count"
+  sbox.build()
+
+  wc_dir = sbox.wc_dir
+  wc2_dir = sbox.add_wc_path('2')
+
+  ## Create wc2.
+  svntest.main.run_svn(None, 'checkout', '-q', sbox.repo_url, wc2_dir)
+
+  ## Some random edits.
+  svntest.main.run_svn(None, 'mkdir', sbox.ospath('d1', wc_dir))
+  svntest.main.run_svn(None, 'mkdir', sbox.ospath('d2', wc2_dir))
+
+  ## Set random mergeinfo properties.
+  svntest.main.run_svn(None, 'ps', 'svn:mergeinfo', '/P:42', sbox.ospath('A', wc_dir))
+  svntest.main.run_svn(None, 'ps', 'svn:mergeinfo', '/Q:42', sbox.ospath('iota', wc2_dir))
+
+  def makethread(some_wc_dir):
+    def worker():
+      svntest.main.run_svn(None, 'commit', '-mm', some_wc_dir)
+    return worker
+
+  t1 = threading.Thread(None, makethread(wc_dir))
+  t2 = threading.Thread(None, makethread(wc2_dir))
+
+  # t2 will trigger the issue #4129 sanity check in fs_fs.c
+  t1.start(); t2.start();
+
+  t1.join(); t2.join();
+
+  # Crude attempt to make sure everything worked.
+  # TODO: better way to catch exceptions in the thread
+  if svntest.actions.run_and_parse_info(sbox.repo_url)[0]['Revision'] != '3':
+    raise svntest.Failure("one or both commits failed")
+
+
+
+
 ########################################################################
 # Run the tests
 
@@ -1814,6 +1870,7 @@ test_list = [ None,
               hotcopy_incremental,
               hotcopy_incremental_packed,
               locking,
+              mergeinfo_race,
              ]
 
 if __name__ == '__main__':

Modified: subversion/branches/fix-rdump-editor/subversion/tests/cmdline/svnlook_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/fix-rdump-editor/subversion/tests/cmdline/svnlook_tests.py?rev=1339349&r1=1339348&r2=1339349&view=diff
==============================================================================
--- subversion/branches/fix-rdump-editor/subversion/tests/cmdline/svnlook_tests.py (original)
+++ subversion/branches/fix-rdump-editor/subversion/tests/cmdline/svnlook_tests.py Wed May 16 20:32:43 2012
@@ -25,7 +25,9 @@
 ######################################################################
 
 # General modules
-import re, os
+import re, os, logging
+
+logger = logging.getLogger()
 
 # Our testing module
 import svntest
@@ -56,9 +58,9 @@ def run_svnlook(*varargs):
 
 def expect(tag, expected, got):
   if expected != got:
-    print("When testing: %s" % tag)
-    print("Expected: %s" % expected)
-    print("     Got: %s" % got)
+    logger.warn("When testing: %s", tag)
+    logger.warn("Expected: %s", expected)
+    logger.warn("     Got: %s", got)
     raise svntest.Failure
 
 
@@ -165,7 +167,7 @@ def test_misc(sbox):
   # We cannot rely on svn:author's presence. ra_svn doesn't set it.
   if not (proplist == [ 'svn:author', 'svn:date', 'svn:log' ]
       or proplist == [ 'svn:date', 'svn:log' ]):
-    print("Unexpected result from proplist: %s" % proplist)
+    logger.warn("Unexpected result from proplist: %s", proplist)
     raise svntest.Failure
 
   prop_name = 'foo:bar-baz-quux'
@@ -415,12 +417,12 @@ def tree_non_recursive(sbox):
   treelist = run_svnlook('tree', '--non-recursive', repo_dir)
   for entry in treelist:
     if not entry.rstrip() in expected_results_root:
-      print("Unexpected result from tree with --non-recursive:")
-      print("  entry            : %s" % entry.rstrip())
+      logger.warn("Unexpected result from tree with --non-recursive:")
+      logger.warn("  entry            : %s", entry.rstrip())
       raise svntest.Failure
   if len(treelist) != len(expected_results_root):
-    print("Expected %i output entries, found %i"
-          % (len(expected_results_root), len(treelist)))
+    logger.warn("Expected %i output entries, found %i",
+          len(expected_results_root), len(treelist))
     raise svntest.Failure
 
   # check the output of svnlook --non-recursive on a
@@ -428,12 +430,12 @@ def tree_non_recursive(sbox):
   treelist = run_svnlook('tree', '--non-recursive', repo_dir, '/A/B')
   for entry in treelist:
     if not entry.rstrip() in expected_results_deep:
-      print("Unexpected result from tree with --non-recursive:")
-      print("  entry            : %s" % entry.rstrip())
+      logger.warn("Unexpected result from tree with --non-recursive:")
+      logger.warn("  entry            : %s", entry.rstrip())
       raise svntest.Failure
   if len(treelist) != len(expected_results_deep):
-    print("Expected %i output entries, found %i"
-          % (len(expected_results_deep), len(treelist)))
+    logger.warn("Expected %i output entries, found %i",
+          len(expected_results_deep), len(treelist))
     raise svntest.Failure
 
 #----------------------------------------------------------------------
@@ -701,6 +703,23 @@ fp.close()"""
                     '  bogus_rev_prop\n', '  svn:date\n']
   verify_logfile(logfilepath, svntest.verify.UnorderedOutput(expected_data))
 
+def property_delete(sbox):
+  "property delete"
+
+  sbox.build()
+  repo_dir = sbox.repo_dir
+
+  sbox.simple_propset('foo', 'bar', 'A/mu')
+  sbox.simple_commit()
+  sbox.simple_propdel('foo', 'A/mu')
+  sbox.simple_commit()
+
+  # XFail since r1293375, changed and diff produce no output on a
+  # property delete
+  svntest.actions.run_and_verify_svnlook(None, ["_U  A/mu\n"], [],
+                                         'changed', repo_dir)
+
+
 ########################################################################
 # Run the tests
 
@@ -719,6 +738,7 @@ test_list = [ None,
               diff_binary,
               test_filesize,
               test_txn_flag,
+              property_delete,
              ]
 
 if __name__ == '__main__':

Modified: subversion/branches/fix-rdump-editor/subversion/tests/cmdline/svnmucc_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/fix-rdump-editor/subversion/tests/cmdline/svnmucc_tests.py?rev=1339349&r1=1339348&r2=1339349&view=diff
==============================================================================
--- subversion/branches/fix-rdump-editor/subversion/tests/cmdline/svnmucc_tests.py (original)
+++ subversion/branches/fix-rdump-editor/subversion/tests/cmdline/svnmucc_tests.py Wed May 16 20:32:43 2012
@@ -39,7 +39,7 @@ def reject_bogus_mergeinfo(sbox):
 
   sbox.build(create_wc=False)
 
-  expected_error = ".*(E200020.*Invalid revision|E175008.*property change)"
+  expected_error = ".*(E200020.*Invalid revision|E175002.*PROPPATCH)"
 
   # At present this tests the server, but if we ever make svnmucc
   # validate the mergeinfo up front then it will only test the client

Modified: subversion/branches/fix-rdump-editor/subversion/tests/cmdline/svntest/err.py
URL: http://svn.apache.org/viewvc/subversion/branches/fix-rdump-editor/subversion/tests/cmdline/svntest/err.py?rev=1339349&r1=1339348&r2=1339349&view=diff
==============================================================================
--- subversion/branches/fix-rdump-editor/subversion/tests/cmdline/svntest/err.py (original)
+++ subversion/branches/fix-rdump-editor/subversion/tests/cmdline/svntest/err.py Wed May 16 20:32:43 2012
@@ -22,6 +22,7 @@ AUTHZ_PARTIALLY_READABLE = 220002
 AUTHZ_ROOT_UNREADABLE = 220000
 AUTHZ_UNREADABLE = 220001
 AUTHZ_UNWRITABLE = 220004
+BAD_ATOMIC = 125015
 BAD_CHANGELIST_NAME = 125014
 BAD_CHECKSUM_KIND = 125011
 BAD_CHECKSUM_PARSE = 125012
@@ -40,21 +41,24 @@ BAD_UUID = 125008
 BAD_VERSION_FILE_FORMAT = 125006
 BASE = 200000
 CANCELLED = 200015
-CATEGORY_SIZE = 5000
 CEASE_INVOCATION = 200021
 CHECKSUM_MISMATCH = 200014
 CLIENT_BAD_REVISION = 195002
 CLIENT_CYCLE_DETECTED = 195019
 CLIENT_DUPLICATE_COMMIT_URL = 195003
 CLIENT_FILE_EXTERNAL_OVERWRITE_VERSIONED = 195017
+CLIENT_FORBIDDEN_BY_SERVER = 195023
 CLIENT_INVALID_EXTERNALS_DESCRIPTION = 195005
+CLIENT_INVALID_MERGEINFO_NO_MERGETRACKING = 195021
 CLIENT_INVALID_RELOCATION = 195009
 CLIENT_IS_BINARY_FILE = 195004
 CLIENT_IS_DIRECTORY = 195007
+CLIENT_MERGE_UPDATE_REQUIRED = 195020
 CLIENT_MISSING_LOCK_TOKEN = 195013
 CLIENT_MODIFIED = 195006
 CLIENT_MULTIPLE_SOURCES_DISALLOWED = 195014
 CLIENT_NOT_READY_TO_MERGE = 195016
+CLIENT_NO_LOCK_TOKEN = 195022
 CLIENT_NO_VERSIONED_PARENT = 195015
 CLIENT_PATCH_BAD_STRIP_COUNT = 195018
 CLIENT_PROPERTY_NAME = 195011
@@ -95,6 +99,7 @@ FS_CONFLICT = 160024
 FS_CORRUPT = 160004
 FS_GENERAL = 160000
 FS_ID_NOT_FOUND = 160014
+FS_INCORRECT_EDITOR_COMPLETION = 160050
 FS_LOCK_EXPIRED = 160041
 FS_LOCK_OWNER_MISMATCH = 160039
 FS_MALFORMED_SKEL = 160027
@@ -143,11 +148,11 @@ IO_CORRUPT_EOL = 135002
 IO_INCONSISTENT_EOL = 135000
 IO_PIPE_FRAME_ERROR = 135004
 IO_PIPE_READ_ERROR = 135005
+IO_PIPE_WRITE_ERROR = 135007
 IO_UNIQUE_NAMES_EXHAUSTED = 135003
 IO_UNKNOWN_EOL = 135001
 IO_WRITE_ERROR = 135006
 ITER_BREAK = 200023
-LAST = 235002
 MALFORMED_FILE = 200002
 MERGEINFO_PARSE_ERROR = 200020
 NODE_UNEXPECTED_KIND = 145001
@@ -211,6 +216,7 @@ REPOS_UNSUPPORTED_VERSION = 165005
 RESERVED_FILENAME_SPECIFIED = 200025
 REVNUM_PARSE_FAILURE = 200022
 SQLITE_BUSY = 200033
+SQLITE_CONSTRAINT = 200035
 SQLITE_ERROR = 200030
 SQLITE_READONLY = 200031
 SQLITE_RESETTING_FOR_ROLLBACK = 200034
@@ -263,6 +269,7 @@ WC_NOT_SYMLINK = 155034
 WC_NOT_UP_TO_DATE = 155011
 WC_NOT_WORKING_COPY = 155007
 WC_OBSTRUCTED_UPDATE = 155000
+WC_PATH_ACCESS_DENIED = 155039
 WC_PATH_FOUND = 155014
 WC_PATH_NOT_FOUND = 155010
 WC_PATH_UNEXPECTED_STATUS = 155035

Modified: subversion/branches/fix-rdump-editor/subversion/tests/cmdline/svntest/main.py
URL: http://svn.apache.org/viewvc/subversion/branches/fix-rdump-editor/subversion/tests/cmdline/svntest/main.py?rev=1339349&r1=1339348&r2=1339349&view=diff
==============================================================================
--- subversion/branches/fix-rdump-editor/subversion/tests/cmdline/svntest/main.py (original)
+++ subversion/branches/fix-rdump-editor/subversion/tests/cmdline/svntest/main.py Wed May 16 20:32:43 2012
@@ -78,13 +78,8 @@ SVN_VER_MINOR = 8
 
 default_num_threads = 5
 
-# Set up logging
-logger = logging.getLogger()
-handler = logging.StreamHandler(sys.stdout)
-formatter = logging.Formatter('%(asctime)s [%(levelname)s] %(message)s',
-                              '%Y-%m-%d %H:%M:%S')
-handler.setFormatter(formatter)
-logger.addHandler(handler)
+# Don't try to use this before calling execute_tests()
+logger = None
 
 
 class SVNProcessTerminatedBySignal(Failure):
@@ -153,13 +148,12 @@ svnsync_binary = os.path.abspath('../../
 svnversion_binary = os.path.abspath('../../svnversion/svnversion' + _exe)
 svndumpfilter_binary = os.path.abspath('../../svndumpfilter/svndumpfilter' + \
                                        _exe)
+svnmucc_binary=os.path.abspath('../../svnmucc/svnmucc' + _exe)
 entriesdump_binary = os.path.abspath('entries-dump' + _exe)
 atomic_ra_revprop_change_binary = os.path.abspath('atomic-ra-revprop-change' + \
                                                   _exe)
 wc_lock_tester_binary = os.path.abspath('../libsvn_wc/wc-lock-tester' + _exe)
 wc_incomplete_tester_binary = os.path.abspath('../libsvn_wc/wc-incomplete-tester' + _exe)
-svnmucc_binary=os.path.abspath('../../../tools/client-side/svnmucc/svnmucc' + \
-                               _exe)
 
 # Location to the pristine repository, will be calculated from test_area_url
 # when we know what the user specified for --url.
@@ -504,16 +498,34 @@ def run_command_stdin(command, error_exp
                                                         stdin_lines,
                                                         *varargs)
 
+  def _line_contains_repos_diskpath(line):
+    # ### Note: this assumes that either svn-test-work isn't a symlink, 
+    # ### or the diskpath isn't realpath()'d somewhere on the way from
+    # ### the server's configuration and the client's stderr.  We could
+    # ### check for both the symlinked path and the realpath.
+    return \
+         os.path.join('cmdline', 'svn-test-work', 'repositories') in line \
+      or os.path.join('cmdline', 'svn-test-work', 'local_tmp', 'repos') in line 
+
+  for lines, name in [[stdout_lines, "stdout"], [stderr_lines, "stderr"]]:
+    if is_ra_type_file() or 'svnadmin' in command or 'svnlook' in command:
+      break
+    # Does the server leak the repository on-disk path?
+    # (prop_tests-12 installs a hook script that does that intentionally)
+    if any(map(_line_contains_repos_diskpath, lines)) \
+       and not any(map(lambda arg: 'prop_tests-12' in arg, varargs)):
+      raise Failure("Repository diskpath in %s: %r" % (name, lines))
+
   stop = time.time()
   logger.info('<TIME = %.6f>' % (stop - start))
   for x in stdout_lines:
-    logger.info(x[:-1])
+    logger.info(x.rstrip())
   for x in stderr_lines:
-    logger.info(x)
+    logger.info(x.rstrip())
 
   if (not error_expected) and ((stderr_lines) or (exit_code != 0)):
     for x in stderr_lines:
-      logger.warning(x[:-1])
+      logger.warning(x.rstrip())
     raise Failure
 
   return exit_code, \
@@ -867,9 +879,6 @@ def copy_repos(src_path, dst_path, head_
     [svnadmin_binary] + load_args,
     stdin=dump_out) # Attached to dump_kid
 
-  stop = time.time()
-  logger.info('<TIME = %.6f>' % (stop - start))
-
   load_stdout, load_stderr, load_exit_code = wait_on_pipe(load_kid, True)
   dump_stdout, dump_stderr, dump_exit_code = wait_on_pipe(dump_kid, True)
 
@@ -880,6 +889,9 @@ def copy_repos(src_path, dst_path, head_
   load_out.close()
   load_err.close()
 
+  stop = time.time()
+  logger.info('<TIME = %.6f>' % (stop - start))
+
   if saved_quiet is None:
     del os.environ['SVN_DBG_QUIET']
   else:
@@ -1125,6 +1137,9 @@ def is_os_darwin():
 def is_fs_case_insensitive():
   return (is_os_darwin() or is_os_windows())
 
+def is_threaded_python():
+  return True
+
 def server_has_mergeinfo():
   return options.server_minor_version >= 5
 
@@ -1469,9 +1484,11 @@ def _create_parser():
   """Return a parser for our test suite."""
   def set_log_level(option, opt, value, parser, level=None):
     if level:
+      # called from --verbose
       logger.setLevel(level)
     else:
-      logger.setLevel(value)
+      # called from --set-log-level
+      logger.setLevel(getattr(logging, value, None) or int(value))
 
   # set up the parser
   _default_http_library = 'serf'
@@ -1522,8 +1539,13 @@ def _create_parser():
                     help='Default shard size (for fsfs)')
   parser.add_option('--config-file', action='store',
                     help="Configuration file for tests.")
-  parser.add_option('--set-log-level', action='callback', type='int',
-                    callback=set_log_level)
+  parser.add_option('--set-log-level', action='callback', type='str',
+                    callback=set_log_level,
+                    help="Set log level (numerically or symbolically). " +
+                         "Symbolic levels are: CRITICAL, ERROR, WARNING, " +
+                         "INFO, DEBUG")
+  parser.add_option('--log-with-timestamps', action='store_true',
+                    help="Show timestamps in test log.")
   parser.add_option('--keep-local-tmp', action='store_true',
                     help="Don't remove svn-test-work/local_tmp after test " +
                          "run is complete.  Useful for debugging failures.")
@@ -1624,6 +1646,28 @@ def get_target_milestones_for_issues(iss
 
   return issue_dict
 
+
+class AbbreviatedFormatter(logging.Formatter):
+  """A formatter with abbreviated loglevel indicators in the output.
+
+  Use %(levelshort)s in the format string to get a single character
+  representing the loglevel..
+  """
+
+  _level_short = {
+    logging.CRITICAL : 'C',
+    logging.ERROR : 'E',
+    logging.WARNING : 'W',
+    logging.INFO : 'I',
+    logging.DEBUG : 'D',
+    logging.NOTSET : '-',
+    }
+
+  def format(self, record):
+    record.levelshort = self._level_short[record.levelno]
+    return logging.Formatter.format(self, record)
+
+
 # Main func.  This is the "entry point" that all the test scripts call
 # to run their list of tests.
 #
@@ -1634,6 +1678,7 @@ def execute_tests(test_list, serial_only
   exiting the process.  This function can be used when a caller doesn't
   want the process to die."""
 
+  global logger
   global pristine_url
   global pristine_greek_repos_url
   global svn_binary
@@ -1650,6 +1695,19 @@ def execute_tests(test_list, serial_only
 
   testnums = []
 
+  # Initialize the LOGGER global variable so the option parsing can set
+  # its loglevel, as appropriate.
+  logger = logging.getLogger()
+
+  # Did some chucklehead log something before we configured it? If they
+  # did, then a default handler/formatter would get installed. We want
+  # to be the one to install the first (and only) handler.
+  for handler in logger.handlers:
+    if not isinstance(handler.formatter, AbbreviatedFormatter):
+      raise Exception('Logging occurred before configuration. Some code'
+                      ' path needs to be fixed. Examine the log output'
+                      ' to find what/where logged something.')
+
   if not options:
     # Override which tests to run from the commandline
     (parser, args) = _parse_options()
@@ -1657,6 +1715,22 @@ def execute_tests(test_list, serial_only
   else:
     parser = _create_parser()
 
+  # If there are no handlers registered yet, then install our own with
+  # our custom formatter. (anything currently installed *is* our handler
+  # as tested above)
+  if not logger.handlers:
+    # Now that we have some options, let's get the logger configured before
+    # doing anything more
+    if options.log_with_timestamps:
+      formatter = AbbreviatedFormatter('%(levelshort)s:'
+                                       ' [%(asctime)s] %(message)s',
+                                       datefmt='%Y-%m-%d %H:%M:%S')
+    else:
+      formatter = AbbreviatedFormatter('%(levelshort)s: %(message)s')
+    handler = logging.StreamHandler(sys.stdout)
+    handler.setFormatter(formatter)
+    logger.addHandler(handler)
+
   # parse the positional arguments (test nums, names)
   for arg in test_selection:
     appended = False
@@ -1719,7 +1793,7 @@ def execute_tests(test_list, serial_only
                                         'jsvndumpfilter' + _bat)
     svnversion_binary = os.path.join(options.svn_bin,
                                      'jsvnversion' + _bat)
-    svnversion_binary = os.path.join(options.svn_bin, 'jsvnmucc' + _bat)
+    svnmucc_binary = os.path.join(options.svn_bin, 'jsvnmucc' + _bat)
   else:
     if options.svn_bin:
       svn_binary = os.path.join(options.svn_bin, 'svn' + _exe)

Modified: subversion/branches/fix-rdump-editor/subversion/tests/cmdline/svntest/sandbox.py
URL: http://svn.apache.org/viewvc/subversion/branches/fix-rdump-editor/subversion/tests/cmdline/svntest/sandbox.py?rev=1339349&r1=1339348&r2=1339349&view=diff
==============================================================================
--- subversion/branches/fix-rdump-editor/subversion/tests/cmdline/svntest/sandbox.py (original)
+++ subversion/branches/fix-rdump-editor/subversion/tests/cmdline/svntest/sandbox.py Wed May 16 20:32:43 2012
@@ -39,10 +39,16 @@ class Sandbox:
   dependents = None
 
   def __init__(self, module, idx):
+    self.test_paths = []
+
     self._set_name("%s-%d" % (module, idx))
     # This flag is set to True by build() and returned by is_built()
     self._is_built = False
 
+    # Create an empty directory for temporary files
+    self.tmp_dir = self.add_wc_path('tmp', remove=True)
+    os.mkdir(self.tmp_dir)
+
   def _set_name(self, name, read_only=False):
     """A convenience method for renaming a sandbox, useful when
     working with multiple repositories in the same unit test."""
@@ -50,10 +56,12 @@ class Sandbox:
       self.name = name
     self.read_only = read_only
     self.wc_dir = os.path.join(svntest.main.general_wc_dir, self.name)
+    self.add_test_path(self.wc_dir)
     if not read_only:
       self.repo_dir = os.path.join(svntest.main.general_repo_dir, self.name)
       self.repo_url = (svntest.main.options.test_area_url + '/'
                        + urllib.pathname2url(self.repo_dir))
+      self.add_test_path(self.repo_dir)
     else:
       self.repo_dir = svntest.main.pristine_greek_repos_dir
       self.repo_url = svntest.main.pristine_greek_repos_url
@@ -77,8 +85,6 @@ class Sandbox:
     elif self.repo_url.startswith("svn"):
       self.authz_file = os.path.join(self.repo_dir, "conf", "authz")
 
-    self.test_paths = [self.wc_dir, self.repo_dir]
-
   def clone_dependent(self, copy_wc=False):
     """A convenience method for creating a near-duplicate of this
     sandbox, useful when working with multiple repositories in the
@@ -151,13 +157,9 @@ class Sandbox:
     """Get a stable name for a temporary file that will be removed after
        running the test"""
 
-    dir = self.add_wc_path('tmp')
-    if not os.path.exists(dir):
-      os.mkdir(dir)
-
     self.tempname_offs = self.tempname_offs + 1
 
-    return os.path.join(dir, '%s-%s' % (prefix, self.tempname_offs))
+    return os.path.join(self.tmp_dir, '%s-%s' % (prefix, self.tempname_offs))
 
   def cleanup_test_paths(self):
     "Clean up detritus from this sandbox, and any dependents."
@@ -200,14 +202,14 @@ class Sandbox:
                                   temporary and 'TEMP' or 'PERM',
                                   parts[1])
 
-  def simple_update(self, target=None):
+  def simple_update(self, target=None, revision='HEAD'):
     """Update the WC or TARGET.
        TARGET is a relpath relative to the WC."""
     if target is None:
       target = self.wc_dir
     else:
       target = self.ospath(target)
-    svntest.main.run_svn(False, 'update', target)
+    svntest.main.run_svn(False, 'update', target, '-r', revision)
 
   def simple_switch(self, url, target=None):
     """Switch the WC or TARGET to URL.
@@ -274,6 +276,37 @@ class Sandbox:
     targets = self.ospaths(targets)
     svntest.main.run_svn(False, 'propdel', name, *targets)
 
+  def simple_propget(self, name, target):
+    """Return the value of the property NAME on TARGET.
+       TARGET is a relpath relative to the WC."""
+    target = self.ospath(target)
+    exit, out, err = svntest.main.run_svn(False, 'propget',
+                                          '--strict', name, target)
+    return ''.join(out)
+
+  def simple_proplist(self, target):
+    """Return a dictionary mapping property name to property value, of the
+       properties on TARGET.
+       TARGET is a relpath relative to the WC."""
+    target = self.ospath(target)
+    exit, out, err = svntest.main.run_svn(False, 'proplist',
+                                          '--verbose', '--quiet', target)
+    props = {}
+    for line in out:
+      line = line.rstrip('\r\n')
+      if line[2] != ' ':  # property name
+        name = line[2:]
+        val = None
+      elif line.startswith('    '):  # property value
+        if val is None:
+          val = line[4:]
+        else:
+          val += '\n' + line[4:]
+        props[name] = val
+      else:
+        raise Exception("Unexpected line '" + line + "' in proplist output" + str(out))
+    return props
+
   def simple_copy(self, source, dest):
     """Copy SOURCE to DEST in the WC.
        SOURCE and DEST are relpaths relative to the WC."""

Modified: subversion/branches/fix-rdump-editor/subversion/tests/cmdline/svntest/wc.py
URL: http://svn.apache.org/viewvc/subversion/branches/fix-rdump-editor/subversion/tests/cmdline/svntest/wc.py?rev=1339349&r1=1339348&r2=1339349&view=diff
==============================================================================
--- subversion/branches/fix-rdump-editor/subversion/tests/cmdline/svntest/wc.py (original)
+++ subversion/branches/fix-rdump-editor/subversion/tests/cmdline/svntest/wc.py Wed May 16 20:32:43 2012
@@ -98,7 +98,7 @@ _re_parse_skipped = re.compile("^Skipped
 
 _re_parse_summarize = re.compile("^([MAD ][M ])      (.+)\n")
 
-_re_parse_checkout = re.compile('^([RMAGCUDE_ ][MAGCUDE_ ])'
+_re_parse_checkout = re.compile('^([RMAGCUDE_ B][MAGCUDE_ ])'
                                 '([B ])'
                                 '([CAUD ])\s+'
                                 '(.+)')



Mime
View raw message