You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by br...@apache.org on 2012/08/16 12:18:03 UTC

svn commit: r1373783 [42/50] - in /subversion/branches/compressed-pristines: ./ build/ build/ac-macros/ build/generator/ build/generator/templates/ build/win32/ contrib/client-side/emacs/ contrib/client-side/svn-push/ contrib/client-side/svnmerge/ cont...

Modified: subversion/branches/compressed-pristines/subversion/tests/cmdline/diff_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/compressed-pristines/subversion/tests/cmdline/diff_tests.py?rev=1373783&r1=1373782&r2=1373783&view=diff
==============================================================================
--- subversion/branches/compressed-pristines/subversion/tests/cmdline/diff_tests.py (original)
+++ subversion/branches/compressed-pristines/subversion/tests/cmdline/diff_tests.py Thu Aug 16 10:17:48 2012
@@ -653,21 +653,21 @@ def diff_non_recursive(sbox):
 
   # full diff has three changes
   exit_code, diff_output, err_output = svntest.main.run_svn(
-    None, 'diff', '-r', '1', os.path.join(wc_dir, 'A', 'D'))
+    None, 'diff', '-r', '1', sbox.ospath('A/D'))
 
   if count_diff_output(diff_output) != 3:
     raise svntest.Failure
 
   # non-recursive has one change
   exit_code, diff_output, err_output = svntest.main.run_svn(
-    None, 'diff', '-r', '1', '-N', os.path.join(wc_dir, 'A', 'D'))
+    None, 'diff', '-r', '1', '-N', sbox.ospath('A/D'))
 
   if count_diff_output(diff_output) != 1:
     raise svntest.Failure
 
   # diffing a directory doesn't pick up other diffs in the anchor
   exit_code, diff_output, err_output = svntest.main.run_svn(
-    None, 'diff', '-r', '1', os.path.join(wc_dir, 'A', 'D', 'G'))
+    None, 'diff', '-r', '1', sbox.ospath('A/D/G'))
 
   if count_diff_output(diff_output) != 1:
     raise svntest.Failure
@@ -706,10 +706,10 @@ def diff_non_version_controlled_file(sbo
   sbox.build()
   wc_dir = sbox.wc_dir
 
-  svntest.main.file_append(os.path.join(wc_dir, 'A', 'D', 'foo'), "a new file")
+  svntest.main.file_append(sbox.ospath('A/D/foo'), "a new file")
 
   exit_code, diff_output, err_output = svntest.main.run_svn(
-    1, 'diff', os.path.join(wc_dir, 'A', 'D', 'foo'))
+    1, 'diff', sbox.ospath('A/D/foo'))
 
   if count_diff_output(diff_output) != 0: raise svntest.Failure
 
@@ -850,7 +850,7 @@ def dont_diff_binary_file(sbox):
   # Add a binary file to the project.
   theta_contents = open(os.path.join(sys.path[0], "theta.bin"), 'rb').read()
   # Write PNG file data into 'A/theta'.
-  theta_path = os.path.join(wc_dir, 'A', 'theta')
+  theta_path = sbox.ospath('A/theta')
   svntest.main.file_write(theta_path, theta_contents, 'wb')
 
   svntest.main.run_svn(None, 'add', theta_path)
@@ -975,7 +975,7 @@ def diff_head_of_moved_file(sbox):
   "diff against the head of a moved file"
 
   sbox.build()
-  mu_path = os.path.join(sbox.wc_dir, 'A', 'mu')
+  mu_path = sbox.ospath('A/mu')
   new_mu_path = mu_path + '.new'
 
   svntest.main.run_svn(None, 'mv', mu_path, new_mu_path)
@@ -999,9 +999,9 @@ def diff_base_to_repos(sbox):
   sbox.build()
   wc_dir = sbox.wc_dir
 
-  iota_path = os.path.join(sbox.wc_dir, 'iota')
-  newfile_path = os.path.join(sbox.wc_dir, 'A', 'D', 'newfile')
-  mu_path = os.path.join(sbox.wc_dir, 'A', 'mu')
+  iota_path = sbox.ospath('iota')
+  newfile_path = sbox.ospath('A/D/newfile')
+  mu_path = sbox.ospath('A/mu')
 
   # Make changes to iota, commit r2, update to HEAD (r2).
   svntest.main.file_append(iota_path, "some rev2 iota text.\n")
@@ -1199,8 +1199,8 @@ def diff_deleted_in_head(sbox):
   sbox.build()
   wc_dir = sbox.wc_dir
 
-  A_path = os.path.join(sbox.wc_dir, 'A')
-  mu_path = os.path.join(sbox.wc_dir, 'A', 'mu')
+  A_path = sbox.ospath('A')
+  mu_path = sbox.ospath('A/mu')
 
   # Make a change to mu, commit r2, update.
   svntest.main.file_append(mu_path, "some rev2 mu text.\n")
@@ -1331,8 +1331,8 @@ def diff_branches(sbox):
   svntest.actions.run_and_verify_svn(None, None, [],
                                      'up', sbox.wc_dir)
 
-  A_alpha = os.path.join(sbox.wc_dir, 'A', 'B', 'E', 'alpha')
-  A2_alpha = os.path.join(sbox.wc_dir, 'A2', 'B', 'E', 'alpha')
+  A_alpha = sbox.ospath('A/B/E/alpha')
+  A2_alpha = sbox.ospath('A2/B/E/alpha')
 
   svntest.main.file_append(A_alpha, "\nfoo\n")
   svntest.actions.run_and_verify_svn(None, None, [],
@@ -1397,8 +1397,8 @@ def diff_repos_and_wc(sbox):
   svntest.actions.run_and_verify_svn(None, None, [],
                                      'up', sbox.wc_dir)
 
-  A_alpha = os.path.join(sbox.wc_dir, 'A', 'B', 'E', 'alpha')
-  A2_alpha = os.path.join(sbox.wc_dir, 'A2', 'B', 'E', 'alpha')
+  A_alpha = sbox.ospath('A/B/E/alpha')
+  A2_alpha = sbox.ospath('A2/B/E/alpha')
 
   svntest.main.file_append(A_alpha, "\nfoo\n")
   svntest.actions.run_and_verify_svn(None, None, [],
@@ -1412,7 +1412,7 @@ def diff_repos_and_wc(sbox):
 
   # Compare working file on one branch against repository file on
   # another branch
-  A_path = os.path.join(sbox.wc_dir, 'A')
+  A_path = sbox.ospath('A')
   rel_path = os.path.join('B', 'E', 'alpha')
   exit_code, diff_output, err = svntest.actions.run_and_verify_svn(
     None, None, [],
@@ -1438,9 +1438,9 @@ def diff_file_urls(sbox):
 
   sbox.build()
 
-  iota_path = os.path.join(sbox.wc_dir, 'iota')
+  iota_path = sbox.ospath('iota')
   iota_url = sbox.repo_url + '/iota'
-  iota_copy_path = os.path.join(sbox.wc_dir, 'A', 'iota')
+  iota_copy_path = sbox.ospath('A/iota')
   iota_copy_url = sbox.repo_url + '/A/iota'
   iota_copy2_url = sbox.repo_url + '/A/iota2'
 
@@ -1497,7 +1497,7 @@ def diff_prop_change_local_edit(sbox):
 
   sbox.build()
 
-  iota_path = os.path.join(sbox.wc_dir, 'iota')
+  iota_path = sbox.ospath('iota')
   iota_url = sbox.repo_url + '/iota'
 
   # Change a property on iota, and commit.
@@ -1542,10 +1542,10 @@ def check_for_omitted_prefix_in_path_com
   sbox.build()
   svntest.actions.do_sleep_for_timestamps()
 
-  prefix_path = os.path.join(sbox.wc_dir, 'prefix_mydir')
+  prefix_path = sbox.ospath('prefix_mydir')
   svntest.actions.run_and_verify_svn(None, None, [],
                                      'mkdir', prefix_path)
-  other_prefix_path = os.path.join(sbox.wc_dir, 'prefix_other')
+  other_prefix_path = sbox.ospath('prefix_other')
   svntest.actions.run_and_verify_svn(None, None, [],
                                      'mkdir', other_prefix_path)
 
@@ -1589,7 +1589,6 @@ def check_for_omitted_prefix_in_path_com
     raise svntest.Failure
 
 #----------------------------------------------------------------------
-@XFail()
 def diff_renamed_file(sbox):
   "diff a file that has been renamed"
 
@@ -1797,7 +1796,7 @@ def diff_keywords(sbox):
 
   sbox.build()
 
-  iota_path = os.path.join(sbox.wc_dir, 'iota')
+  iota_path = sbox.ospath('iota')
 
   svntest.actions.run_and_verify_svn(None, None, [],
                                      'ps',
@@ -1878,7 +1877,7 @@ def diff_force(sbox):
   sbox.build()
   wc_dir = sbox.wc_dir
 
-  iota_path = os.path.join(wc_dir, 'iota')
+  iota_path = sbox.ospath('iota')
 
   # Append a line to iota and make it binary.
   svntest.main.file_append(iota_path, "new line")
@@ -1960,7 +1959,7 @@ def diff_renamed_dir(sbox):
   svntest.main.run_svn(None, 'mv', os.path.join('A', 'D', 'G'),
                                    os.path.join('A', 'D', 'I'))
 
-  # Check a repos->wc diff
+  # Check a wc->wc diff
   exit_code, diff_output, err_output = svntest.main.run_svn(
     None, 'diff', '--show-copies-as-adds', os.path.join('A', 'D'))
 
@@ -1973,6 +1972,23 @@ def diff_renamed_dir(sbox):
                        'A') :
     raise svntest.Failure
 
+  # Check a repos->wc diff of the moved-here node before commit
+  exit_code, diff_output, err_output = svntest.main.run_svn(
+    None, 'diff', '-r', '1', '--show-copies-as-adds',
+    os.path.join('A', 'D', 'I'))
+  if check_diff_output(diff_output,
+                       os.path.join('A', 'D', 'I', 'pi'),
+                       'A') :
+    raise svntest.Failure
+
+  # Check a repos->wc diff of the moved-away node before commit
+  exit_code, diff_output, err_output = svntest.main.run_svn(
+    None, 'diff', '-r', '1', os.path.join('A', 'D', 'G'))
+  if check_diff_output(diff_output,
+                       os.path.join('A', 'D', 'G', 'pi'),
+                       'D') :
+    raise svntest.Failure
+
   # Commit
   svntest.actions.run_and_verify_svn(None, None, [],
                                      'ci', '-m', 'log msg')
@@ -2584,6 +2600,52 @@ def basic_diff_summarize(sbox):
   wc_dir = sbox.wc_dir
   p = sbox.ospath
 
+  # Diff summarize of a newly added file
+  expected_diff = svntest.wc.State(wc_dir, {
+    'iota': Item(status='A '),
+    })
+  svntest.actions.run_and_verify_diff_summarize(expected_diff,
+                                                p('iota'), '-c1')
+
+  # Reverse summarize diff of a newly added file
+  expected_diff = svntest.wc.State(wc_dir, {
+    'iota': Item(status='D '),
+    })
+  svntest.actions.run_and_verify_diff_summarize(expected_diff,
+                                                p('iota'), '-c-1')
+
+  # Diff summarize of a newly added directory
+  expected_diff = svntest.wc.State(wc_dir, {
+    'A/D':          Item(status='A '),
+    'A/D/gamma':    Item(status='A '),
+    'A/D/H':        Item(status='A '),
+    'A/D/H/chi':    Item(status='A '),
+    'A/D/H/psi':    Item(status='A '),
+    'A/D/H/omega':  Item(status='A '),
+    'A/D/G':        Item(status='A '),
+    'A/D/G/pi':     Item(status='A '),
+    'A/D/G/rho':    Item(status='A '),
+    'A/D/G/tau':    Item(status='A '),
+    })
+  svntest.actions.run_and_verify_diff_summarize(expected_diff,
+                                                p('A/D'), '-c1')
+
+  # Reverse summarize diff of a newly added directory
+  expected_diff = svntest.wc.State(wc_dir, {
+    'A/D':          Item(status='D '),
+    'A/D/gamma':    Item(status='D '),
+    'A/D/H':        Item(status='D '),
+    'A/D/H/chi':    Item(status='D '),
+    'A/D/H/psi':    Item(status='D '),
+    'A/D/H/omega':  Item(status='D '),
+    'A/D/G':        Item(status='D '),
+    'A/D/G/pi':     Item(status='D '),
+    'A/D/G/rho':    Item(status='D '),
+    'A/D/G/tau':    Item(status='D '),
+    })
+  svntest.actions.run_and_verify_diff_summarize(expected_diff,
+                                                p('A/D'), '-c-1')
+
   # Add props to some items that will be deleted, and commit.
   sbox.simple_propset('prop', 'val',
                       'A/C',
@@ -2695,7 +2757,7 @@ def diff_weird_author(sbox):
 
   svntest.actions.enable_revprop_changes(sbox.repo_dir)
 
-  svntest.main.file_write(os.path.join(sbox.wc_dir, 'A', 'mu'),
+  svntest.main.file_write(sbox.ospath('A/mu'),
                           "new content\n")
 
   expected_output = svntest.wc.State(sbox.wc_dir, {
@@ -2821,8 +2883,8 @@ def diff_in_renamed_folder(sbox):
   sbox.build()
   wc_dir = sbox.wc_dir
 
-  C_path = os.path.join(wc_dir, "A", "C")
-  D_path = os.path.join(wc_dir, "A", "D")
+  C_path = sbox.ospath('A/C')
+  D_path = sbox.ospath('A/D')
   kappa_path = os.path.join(D_path, "C", "kappa")
 
   # add a new file to a renamed (moved in this case) folder.
@@ -3083,21 +3145,21 @@ def diff_summarize_xml(sbox):
   wc_dir = sbox.wc_dir
 
   # A content modification.
-  svntest.main.file_append(os.path.join(wc_dir, "A", "mu"), "New mu content")
+  svntest.main.file_append(sbox.ospath('A/mu'), "New mu content")
 
   # A prop modification.
   svntest.main.run_svn(None,
                        "propset", "prop", "val",
-                       os.path.join(wc_dir, 'iota'))
+                       sbox.ospath('iota'))
 
   # Both content and prop mods.
-  tau_path = os.path.join(wc_dir, "A", "D", "G", "tau")
+  tau_path = sbox.ospath('A/D/G/tau')
   svntest.main.file_append(tau_path, "tautau")
   svntest.main.run_svn(None,
                        "propset", "prop", "val", tau_path)
 
   # A file addition.
-  newfile_path = os.path.join(wc_dir, 'newfile')
+  newfile_path = sbox.ospath('newfile')
   svntest.main.file_append(newfile_path, 'newfile')
   svntest.main.run_svn(None, 'add', newfile_path)
 
@@ -3106,7 +3168,7 @@ def diff_summarize_xml(sbox):
                                                     'lambda'))
 
   # A directory addition
-  svntest.main.run_svn(None, "mkdir", os.path.join(wc_dir, 'newdir'))
+  svntest.main.run_svn(None, "mkdir", sbox.ospath('newdir'))
 
   expected_output = svntest.wc.State(wc_dir, {
     'A/mu': Item(verb='Sending'),
@@ -3156,7 +3218,7 @@ def diff_summarize_xml(sbox):
 
   svntest.actions.run_and_verify_diff_summarize_xml(
     [], wc_dir, paths_iota, items_iota, props_iota, kinds_iota, '-c2',
-    os.path.join(wc_dir, 'iota'))
+    sbox.ospath('iota'))
 
   # 5) Test --summarize --xml on -r1:2
   svntest.actions.run_and_verify_diff_summarize_xml(
@@ -3170,7 +3232,7 @@ def diff_file_depth_empty(sbox):
   "svn diff --depth=empty FILE_WITH_LOCAL_MODS"
   # The bug was that no diff output would be generated.  Check that some is.
   sbox.build()
-  iota_path = os.path.join(sbox.wc_dir, 'iota')
+  iota_path = sbox.ospath('iota')
   svntest.main.file_append(iota_path, "new text in iota")
   exit_code, out, err = svntest.main.run_svn(None, 'diff',
                                              '--depth', 'empty', iota_path)
@@ -3313,13 +3375,13 @@ def diff_git_format_wc_wc(sbox):
   "create a diff in git unidiff format for wc-wc"
   sbox.build()
   wc_dir = sbox.wc_dir
-  iota_path = os.path.join(wc_dir, 'iota')
-  mu_path = os.path.join(wc_dir, 'A', 'mu')
-  new_path = os.path.join(wc_dir, 'new')
-  lambda_path = os.path.join(wc_dir, 'A', 'B', 'lambda')
-  lambda_copied_path = os.path.join(wc_dir, 'A', 'B', 'lambda_copied')
-  alpha_path = os.path.join(wc_dir, 'A', 'B', 'E', 'alpha')
-  alpha_copied_path = os.path.join(wc_dir, 'A', 'B', 'E', 'alpha_copied')
+  iota_path = sbox.ospath('iota')
+  mu_path = sbox.ospath('A/mu')
+  new_path = sbox.ospath('new')
+  lambda_path = sbox.ospath('A/B/lambda')
+  lambda_copied_path = sbox.ospath('A/B/lambda_copied')
+  alpha_path = sbox.ospath('A/B/E/alpha')
+  alpha_copied_path = sbox.ospath('A/B/E/alpha_copied')
 
   svntest.main.file_append(iota_path, "Changed 'iota'.\n")
   svntest.main.file_append(new_path, "This is the file 'new'.\n")
@@ -3369,9 +3431,9 @@ def diff_git_format_url_wc(sbox):
   sbox.build()
   wc_dir = sbox.wc_dir
   repo_url = sbox.repo_url
-  iota_path = os.path.join(wc_dir, 'iota')
-  mu_path = os.path.join(wc_dir, 'A', 'mu')
-  new_path = os.path.join(wc_dir, 'new')
+  iota_path = sbox.ospath('iota')
+  mu_path = sbox.ospath('A/mu')
+  new_path = sbox.ospath('new')
   svntest.main.file_append(iota_path, "Changed 'iota'.\n")
   svntest.main.file_append(new_path, "This is the file 'new'.\n")
   svntest.main.run_svn(None, 'add', new_path)
@@ -3409,9 +3471,9 @@ def diff_git_format_url_url(sbox):
   sbox.build()
   wc_dir = sbox.wc_dir
   repo_url = sbox.repo_url
-  iota_path = os.path.join(wc_dir, 'iota')
-  mu_path = os.path.join(wc_dir, 'A', 'mu')
-  new_path = os.path.join(wc_dir, 'new')
+  iota_path = sbox.ospath('iota')
+  mu_path = sbox.ospath('A/mu')
+  new_path = sbox.ospath('new')
   svntest.main.file_append(iota_path, "Changed 'iota'.\n")
   svntest.main.file_append(new_path, "This is the file 'new'.\n")
   svntest.main.run_svn(None, 'add', new_path)
@@ -3453,7 +3515,7 @@ def diff_prop_missing_context(sbox):
   sbox.build()
   wc_dir = sbox.wc_dir
 
-  iota_path = os.path.join(wc_dir, 'iota')
+  iota_path = sbox.ospath('iota')
   prop_val = "".join([
        "line 1\n",
        "line 2\n",
@@ -3504,7 +3566,7 @@ def diff_prop_multiple_hunks(sbox):
   sbox.build()
   wc_dir = sbox.wc_dir
 
-  iota_path = os.path.join(wc_dir, 'iota')
+  iota_path = sbox.ospath('iota')
   prop_val = "".join([
        "line 1\n",
        "line 2\n",
@@ -3578,8 +3640,8 @@ def diff_git_empty_files(sbox):
   "create a diff in git format for empty files"
   sbox.build()
   wc_dir = sbox.wc_dir
-  iota_path = os.path.join(wc_dir, 'iota')
-  new_path = os.path.join(wc_dir, 'new')
+  iota_path = sbox.ospath('iota')
+  new_path = sbox.ospath('new')
   svntest.main.file_write(iota_path, "")
 
   # Now commit the local mod, creating rev 2.
@@ -3615,8 +3677,8 @@ def diff_git_with_props(sbox):
   "create a diff in git format showing prop changes"
   sbox.build()
   wc_dir = sbox.wc_dir
-  iota_path = os.path.join(wc_dir, 'iota')
-  new_path = os.path.join(wc_dir, 'new')
+  iota_path = sbox.ospath('iota')
+  new_path = sbox.ospath('new')
   svntest.main.file_write(iota_path, "")
 
   # Now commit the local mod, creating rev 2.
@@ -3661,7 +3723,7 @@ def diff_correct_wc_base_revnum(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, "")
 
   # Commit a local mod, creating rev 2.
@@ -3730,8 +3792,8 @@ def diff_abs_localpath_from_wc_folder(sb
   sbox.build(read_only = True)
   wc_dir = sbox.wc_dir
 
-  A_path = os.path.join(wc_dir, 'A')
-  B_abs_path = os.path.abspath(os.path.join(wc_dir, 'A', 'B'))
+  A_path = sbox.ospath('A')
+  B_abs_path = os.path.abspath(sbox.ospath('A/B'))
   os.chdir(os.path.abspath(A_path))
   svntest.actions.run_and_verify_svn(None, None, [], 'diff', B_abs_path)
 
@@ -3878,6 +3940,141 @@ def diff_two_working_copies(sbox):
                                      'diff', '--old', wc_dir_old,
                                      '--new', wc_dir)
 
+def diff_deleted_url(sbox):
+  "diff -cN of URL deleted in rN"
+  sbox.build()
+  wc_dir = sbox.wc_dir
+
+  # remove A/D/H in r2
+  sbox.simple_rm("A/D/H")
+  sbox.simple_commit()
+
+  # A diff of r2 with target A/D/H should show the removed children
+  expected_output = make_diff_header("chi", "revision 1", "revision 2") + [
+                      "@@ -1 +0,0 @@\n",
+                      "-This is the file 'chi'.\n",
+                    ] + make_diff_header("omega", "revision 1",
+                                         "revision 2") + [
+                      "@@ -1 +0,0 @@\n",
+                      "-This is the file 'omega'.\n",
+                    ] + make_diff_header("psi", "revision 1",
+                                         "revision 2") + [
+                      "@@ -1 +0,0 @@\n",
+                      "-This is the file 'psi'.\n",
+                    ]
+
+  # Files in diff may be in any order.
+  expected_output = svntest.verify.UnorderedOutput(expected_output)
+  svntest.actions.run_and_verify_svn(None, expected_output, [],
+                                     'diff', '-c2',
+                                     sbox.repo_url + '/A/D/H')
+
+def diff_arbitrary_files_and_dirs(sbox):
+  "diff arbitrary files and dirs"
+  sbox.build()
+  wc_dir = sbox.wc_dir
+
+  # diff iota with A/mu
+  expected_output = make_diff_header("mu", "working copy", "working copy",
+                                     "iota", "A/mu") + [
+                      "@@ -1 +1 @@\n",
+                      "-This is the file 'iota'.\n",
+                      "+This is the file 'mu'.\n"
+                    ]
+  svntest.actions.run_and_verify_svn(None, expected_output, [],
+                                     'diff', '--old', sbox.ospath('iota'),
+                                     '--new', sbox.ospath('A/mu'))
+
+  # diff A/B/E with A/D
+  expected_output = make_diff_header("G/pi", "working copy", "working copy",
+                                     "B/E", "D") + [
+                      "@@ -0,0 +1 @@\n",
+                      "+This is the file 'pi'.\n"
+                    ] + make_diff_header("G/rho", "working copy",
+                                         "working copy", "B/E", "D") + [
+                      "@@ -0,0 +1 @@\n",
+                      "+This is the file 'rho'.\n"
+                    ] + make_diff_header("G/tau", "working copy",
+                                         "working copy", "B/E", "D") + [
+                      "@@ -0,0 +1 @@\n",
+                      "+This is the file 'tau'.\n"
+                    ] + make_diff_header("H/chi", "working copy",
+                                         "working copy", "B/E", "D") + [
+                      "@@ -0,0 +1 @@\n",
+                      "+This is the file 'chi'.\n"
+                    ] + make_diff_header("H/omega", "working copy",
+                                         "working copy", "B/E", "D") + [
+                      "@@ -0,0 +1 @@\n",
+                      "+This is the file 'omega'.\n"
+                    ] + make_diff_header("H/psi", "working copy",
+                                         "working copy", "B/E", "D") + [
+                      "@@ -0,0 +1 @@\n",
+                      "+This is the file 'psi'.\n"
+                    ] + make_diff_header("alpha", "working copy",
+                                         "working copy", "B/E", "D") + [
+                      "@@ -1 +0,0 @@\n",
+                      "-This is the file 'alpha'.\n"
+                    ] + make_diff_header("beta", "working copy",
+                                         "working copy", "B/E", "D") + [
+                      "@@ -1 +0,0 @@\n",
+                      "-This is the file 'beta'.\n"
+                    ] + make_diff_header("gamma", "working copy",
+                                         "working copy", "B/E", "D") + [
+                      "@@ -0,0 +1 @@\n",
+                      "+This is the file 'gamma'.\n"
+                    ]
+
+  # Files in diff may be in any order.
+  expected_output = svntest.verify.UnorderedOutput(expected_output)
+  svntest.actions.run_and_verify_svn(None, expected_output, [],
+                                     'diff', '--old', sbox.ospath('A/B/E'),
+                                     '--new', sbox.ospath('A/D'))
+
+def diff_properties_only(sbox):
+  "diff --properties-only"
+
+  sbox.build()
+  wc_dir = sbox.wc_dir
+
+  expected_output = \
+    make_diff_header("iota", "revision 1", "revision 2") + \
+    make_diff_prop_header("iota") + \
+    make_diff_prop_added("svn:eol-style", "native")
+
+  expected_reverse_output = \
+    make_diff_header("iota", "revision 2", "revision 1") + \
+    make_diff_prop_header("iota") + \
+    make_diff_prop_deleted("svn:eol-style", "native")
+
+  expected_rev1_output = \
+    make_diff_header("iota", "revision 1", "working copy") + \
+    make_diff_prop_header("iota") + \
+    make_diff_prop_added("svn:eol-style", "native")
+
+  # Make a property change and a content change to 'iota'
+  # Only the property change should be displayed by diff --properties-only
+  sbox.simple_propset('svn:eol-style', 'native', 'iota')
+  svntest.main.file_append(sbox.ospath('iota'), 'new text')
+
+  sbox.simple_commit() # r2
+
+  svntest.actions.run_and_verify_svn(None, expected_output, [],
+                                     'diff', '--properties-only', '-r', '1:2',
+                                     sbox.repo_url + '/iota')
+
+  svntest.actions.run_and_verify_svn(None, expected_reverse_output, [],
+                                     'diff', '--properties-only', '-r', '2:1',
+                                     sbox.repo_url + '/iota')
+
+  os.chdir(wc_dir)
+  svntest.actions.run_and_verify_svn(None, expected_rev1_output, [],
+                                     'diff', '--properties-only', '-r', '1',
+                                     'iota')
+
+  svntest.actions.run_and_verify_svn(None, expected_rev1_output, [],
+                                     'diff', '--properties-only',
+                                     '-r', 'PREV', 'iota')
+
 ########################################################################
 #Run the tests
 
@@ -3946,6 +4143,9 @@ test_list = [ None,
               no_spurious_conflict,
               diff_correct_wc_base_revnum,
               diff_two_working_copies,
+              diff_deleted_url,
+              diff_arbitrary_files_and_dirs,
+              diff_properties_only,
               ]
 
 if __name__ == '__main__':

Modified: subversion/branches/compressed-pristines/subversion/tests/cmdline/entries-dump.c
URL: http://svn.apache.org/viewvc/subversion/branches/compressed-pristines/subversion/tests/cmdline/entries-dump.c?rev=1373783&r1=1373782&r2=1373783&view=diff
==============================================================================
--- subversion/branches/compressed-pristines/subversion/tests/cmdline/entries-dump.c (original)
+++ subversion/branches/compressed-pristines/subversion/tests/cmdline/entries-dump.c Thu Aug 16 10:17:48 2012
@@ -30,6 +30,7 @@
 #define SVN_DEPRECATED
 
 #include "svn_types.h"
+#include "svn_cmdline.h"
 #include "svn_pools.h"
 #include "svn_wc.h"
 #include "svn_dirent_uri.h"
@@ -266,14 +267,15 @@ main(int argc, const char *argv[])
       exit(1);
     }
 
-  if (apr_initialize() != APR_SUCCESS)
+  if (svn_cmdline_init("entries-dump", stderr) != EXIT_SUCCESS)
     {
-      fprintf(stderr, "apr_initialize() failed.\n");
-      exit(1);
+      return EXIT_FAILURE;
     }
 
-  /* set up the global pool */
-  pool = svn_pool_create(NULL);
+  /* Create our top-level pool.  Use a separate mutexless allocator,
+   * given this application is single threaded.
+   */
+  pool = apr_allocator_owner_get(svn_pool_create_allocator(FALSE));
 
   path = svn_dirent_internal_style(argv[argc-1], pool);
 

Modified: subversion/branches/compressed-pristines/subversion/tests/cmdline/entries_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/compressed-pristines/subversion/tests/cmdline/entries_tests.py?rev=1373783&r1=1373782&r2=1373783&view=diff
==============================================================================
--- subversion/branches/compressed-pristines/subversion/tests/cmdline/entries_tests.py (original)
+++ subversion/branches/compressed-pristines/subversion/tests/cmdline/entries_tests.py Thu Aug 16 10:17:48 2012
@@ -33,7 +33,9 @@
 # test tries to pick up the straggly little edge cases.
 #
 
-import os
+import os, logging
+
+logger = logging.getLogger()
 
 import svntest
 
@@ -49,22 +51,22 @@ SCHEDULE_REPLACE = 3
 def validate(entry, **kw):
   for key, value in kw.items():
     if getattr(entry, key) != value:
-      print("Entry '%s' has an incorrect value for .%s" % (entry.name, key))
-      print("  Expected: %s" % value)
-      print("    Actual: %s" % getattr(entry, key))
+      logger.warn("Entry '%s' has an incorrect value for .%s", entry.name, key)
+      logger.warn("  Expected: %s", value)
+      logger.warn("    Actual: %s", getattr(entry, key))
       raise svntest.Failure
 
 
 def check_names(entries, *names):
   if entries is None:
-    print('entries-dump probably exited with a failure.')
+    logger.warn('entries-dump probably exited with a failure.')
     raise svntest.Failure
   have = set(entries.keys())
   want = set(names)
   missing = want - have
   if missing:
-    print("Entry name(s) not found: %s"
-          % ', '.join("'%s'" % name for name in missing))
+    logger.warn("Entry name(s) not found: %s",
+          ', '.join("'%s'" % name for name in missing))
     raise svntest.Failure
 
 

Modified: subversion/branches/compressed-pristines/subversion/tests/cmdline/export_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/compressed-pristines/subversion/tests/cmdline/export_tests.py?rev=1373783&r1=1373782&r2=1373783&view=diff
==============================================================================
--- subversion/branches/compressed-pristines/subversion/tests/cmdline/export_tests.py (original)
+++ subversion/branches/compressed-pristines/subversion/tests/cmdline/export_tests.py Thu Aug 16 10:17:48 2012
@@ -166,7 +166,7 @@ def export_working_copy_with_mods(sbox):
     'A/D/G/tau'         : Item(status='A '),
     'A/mu'              : Item(status='A '),
     'A/B'               : Item(status='A '),
-    'A/B/E'             : Item(status='A '),
+    #'A/B/E'             : Item(status='A '), # Used to be reported as added
     'A/B/lambda'        : Item(status='A '),
     'A/B/F'             : Item(status='A '),
     'A/C'               : Item(status='A '),

Modified: subversion/branches/compressed-pristines/subversion/tests/cmdline/externals_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/compressed-pristines/subversion/tests/cmdline/externals_tests.py?rev=1373783&r1=1373782&r2=1373783&view=diff
==============================================================================
--- subversion/branches/compressed-pristines/subversion/tests/cmdline/externals_tests.py (original)
+++ subversion/branches/compressed-pristines/subversion/tests/cmdline/externals_tests.py Thu Aug 16 10:17:48 2012
@@ -275,24 +275,24 @@ def checkout_with_externals(sbox):
 
   # Probe the working copy a bit, see if it's as expected.
   expected_existing_paths = [
-    os.path.join(wc_dir, "A", "B", "gamma"),
-    os.path.join(wc_dir, "A", "C", "exdir_G"),
-    os.path.join(wc_dir, "A", "C", "exdir_G", "pi"),
-    os.path.join(wc_dir, "A", "C", "exdir_H"),
-    os.path.join(wc_dir, "A", "C", "exdir_H", "omega"),
-    os.path.join(wc_dir, "A", "D", "x"),
-    os.path.join(wc_dir, "A", "D", "x", "y"),
-    os.path.join(wc_dir, "A", "D", "x", "y", "z"),
-    os.path.join(wc_dir, "A", "D", "x", "y", "z", "blah"),
-    os.path.join(wc_dir, "A", "D", "x", "y", "z", "blah", "E", "alpha"),
-    os.path.join(wc_dir, "A", "D", "x", "y", "z", "blah", "E", "beta"),
+    sbox.ospath('A/B/gamma'),
+    sbox.ospath('A/C/exdir_G'),
+    sbox.ospath('A/C/exdir_G/pi'),
+    sbox.ospath('A/C/exdir_H'),
+    sbox.ospath('A/C/exdir_H/omega'),
+    sbox.ospath('A/D/x'),
+    sbox.ospath('A/D/x/y'),
+    sbox.ospath('A/D/x/y/z'),
+    sbox.ospath('A/D/x/y/z/blah'),
+    sbox.ospath('A/D/x/y/z/blah/E/alpha'),
+    sbox.ospath('A/D/x/y/z/blah/E/beta'),
     ]
   probe_paths_exist(expected_existing_paths)
 
   # Pick a file at random, make sure it has the expected contents.
-  for path, contents in ((os.path.join(wc_dir, "A", "C", "exdir_H", "omega"),
+  for path, contents in ((sbox.ospath('A/C/exdir_H/omega'),
                           "This is the file 'omega'.\n"),
-                         (os.path.join(wc_dir, "A", "B", "gamma"),
+                         (sbox.ospath('A/B/gamma'),
                           "This is the file 'gamma'.\n")):
     if open(path).read() != contents:
       raise svntest.Failure("Unexpected contents for rev 1 of " + path)
@@ -333,7 +333,7 @@ def update_receive_new_external(sbox):
            "\n"
 
   # Set and commit the property
-  change_external(os.path.join(wc_dir, "A/D"), new_externals_desc)
+  change_external(sbox.ospath('A/D'), new_externals_desc)
 
   # Update the other working copy, see if we get the new item.
   expected_output = svntest.wc.State(other_wc_dir, {
@@ -391,7 +391,7 @@ def update_lose_external(sbox):
            "\n"
 
   # Set and commit the property
-  change_external(os.path.join(wc_dir, "A/D"), new_externals_desc)
+  change_external(sbox.ospath('A/D'), new_externals_desc)
 
   # The code should handle a missing local externals item
   svntest.main.safe_rmtree(os.path.join(other_wc_dir, "A", "D", "exdir_A", \
@@ -455,7 +455,7 @@ def update_change_pristine_external(sbox
            "\n"
 
   # Set and commit the property
-  change_external(os.path.join(wc_dir, "A/D"), new_externals_desc)
+  change_external(sbox.ospath('A/D'), new_externals_desc)
 
   # Update other working copy, see if get the right change.
   expected_output = svntest.wc.State(other_wc_dir, {
@@ -516,7 +516,7 @@ def update_change_modified_external(sbox
            "\n"
 
   # Set and commit the property
-  change_external(os.path.join(wc_dir, "A/D"), new_externals_desc)
+  change_external(sbox.ospath('A/D'), new_externals_desc)
 
   # Update other working copy, see if get the right change.
   expected_output = svntest.wc.State(other_wc_dir, {
@@ -584,7 +584,7 @@ def update_receive_change_under_external
   svntest.actions.run_and_verify_update(wc_dir,
                                         expected_output, None, None)
 
-  external_gamma_path = os.path.join(wc_dir, 'A', 'D', 'exdir_A', 'D', 'gamma')
+  external_gamma_path = sbox.ospath('A/D/exdir_A/D/gamma')
   contents = open(external_gamma_path).read()
   if contents != ("This is the file 'gamma'.\n"
                   "New text in other gamma.\n"):
@@ -612,7 +612,7 @@ def update_receive_change_under_external
   svntest.actions.run_and_verify_update(sbox.ospath('A/C'),
                                         expected_output, None, None)
 
-  external_rho_path = os.path.join(wc_dir, 'A', 'C', 'exdir_G', 'rho')
+  external_rho_path = sbox.ospath('A/C/exdir_G/rho')
   contents = open(external_rho_path).read()
   if contents != ("This is the file 'rho'.\n"
                   "New text in other rho.\n"):
@@ -634,7 +634,7 @@ def modify_and_update_receive_new_extern
                                      repo_url, wc_dir)
 
   # Add one more external item
-  B_path = os.path.join(wc_dir, "A/B")
+  B_path = sbox.ospath('A/B')
   externals_desc = \
           external_url_for["A/D/exdir_A/G/"] + " exdir_G"     + \
           "\n"                                                + \
@@ -678,11 +678,11 @@ def disallow_dot_or_dotdot_directory_ref
                    "'.*' is an absolute path or involves '..'.*"
     change_external_expect_error(path, val, expected_err)
 
-  B_path = os.path.join(wc_dir, 'A', 'B')
-  G_path = os.path.join(wc_dir, 'A', 'D', 'G')
-  H_path = os.path.join(wc_dir, 'A', 'D', 'H')
-  C_path = os.path.join(wc_dir, 'A', 'C')
-  F_path = os.path.join(wc_dir, 'A', 'B', 'F')
+  B_path = sbox.ospath('A/B')
+  G_path = sbox.ospath('A/D/G')
+  H_path = sbox.ospath('A/D/H')
+  C_path = sbox.ospath('A/C')
+  F_path = sbox.ospath('A/B/F')
 
   external_urls = list(external_url_for.values())
 
@@ -745,28 +745,28 @@ def export_with_externals(sbox):
 
   # Probe the working copy a bit, see if it's as expected.
   expected_existing_paths = [
-    os.path.join(wc_dir, "A", "C", "exdir_G"),
-    os.path.join(wc_dir, "A", "C", "exdir_G", "pi"),
-    os.path.join(wc_dir, "A", "C", "exdir_H"),
-    os.path.join(wc_dir, "A", "C", "exdir_H", "omega"),
-    os.path.join(wc_dir, "A", "D", "x"),
-    os.path.join(wc_dir, "A", "D", "x", "y"),
-    os.path.join(wc_dir, "A", "D", "x", "y", "z"),
-    os.path.join(wc_dir, "A", "D", "x", "y", "z", "blah"),
-    os.path.join(wc_dir, "A", "D", "x", "y", "z", "blah", "E", "alpha"),
-    os.path.join(wc_dir, "A", "D", "x", "y", "z", "blah", "E", "beta"),
+    sbox.ospath('A/C/exdir_G'),
+    sbox.ospath('A/C/exdir_G/pi'),
+    sbox.ospath('A/C/exdir_H'),
+    sbox.ospath('A/C/exdir_H/omega'),
+    sbox.ospath('A/D/x'),
+    sbox.ospath('A/D/x/y'),
+    sbox.ospath('A/D/x/y/z'),
+    sbox.ospath('A/D/x/y/z/blah'),
+    sbox.ospath('A/D/x/y/z/blah/E/alpha'),
+    sbox.ospath('A/D/x/y/z/blah/E/beta'),
     ]
   probe_paths_exist(expected_existing_paths)
 
   # Pick some files, make sure their contents are as expected.
-  exdir_G_pi_path = os.path.join(wc_dir, "A", "C", "exdir_G", "pi")
+  exdir_G_pi_path = sbox.ospath('A/C/exdir_G/pi')
   contents = open(exdir_G_pi_path).read()
   if contents != ("This is the file 'pi'.\n"
                   "Added to pi in revision 3.\n"):
     raise svntest.Failure("Unexpected contents for rev 1 of " +
                           exdir_G_pi_path)
 
-  exdir_H_omega_path = os.path.join(wc_dir, "A", "C", "exdir_H", "omega")
+  exdir_H_omega_path = sbox.ospath('A/C/exdir_H/omega')
   contents = open(exdir_H_omega_path).read()
   if contents != "This is the file 'omega'.\n":
     raise svntest.Failure("Unexpected contents for rev 1 of " +
@@ -848,7 +848,7 @@ def external_with_peg_and_op_revision(sb
            "\n"
 
   # Set and commit the property.
-  change_external(os.path.join(wc_dir, "A/D"), new_externals_desc)
+  change_external(sbox.ospath('A/D'), new_externals_desc)
 
   # Update other working copy, see if we get the right change.
   expected_output = svntest.wc.State(wc_dir, {
@@ -859,7 +859,7 @@ def external_with_peg_and_op_revision(sb
                                         expected_output, None, None)
 
 
-  external_chi_path = os.path.join(wc_dir, 'A', 'D', 'exdir_A', 'H', 'chi')
+  external_chi_path = sbox.ospath('A/D/exdir_A/H/chi')
   contents = open(external_chi_path).read()
   if contents != "This is the file 'chi'.\n":
     raise svntest.Failure("Unexpected contents for externally modified " +
@@ -889,7 +889,7 @@ def new_style_externals(sbox):
            "\n"
 
   # Set and commit the property.
-  change_external(os.path.join(wc_dir, "A/C"), new_externals_desc)
+  change_external(sbox.ospath('A/C'), new_externals_desc)
 
   # Update other working copy.
   expected_output = svntest.wc.State(wc_dir, {
@@ -915,7 +915,7 @@ def disallow_propset_invalid_formatted_e
   sbox.build()
   wc_dir = sbox.wc_dir
 
-  A_path = os.path.join(wc_dir, 'A')
+  A_path = sbox.ospath('A')
 
   expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
   svntest.actions.run_and_verify_status(wc_dir, expected_status)
@@ -990,7 +990,7 @@ def old_style_externals_ignore_peg_reg(s
   ext = "exdir_G " + external_url_for["A/C/exdir_G"] + "@HEAD\n"
 
   # Set and commit the property.
-  change_external(os.path.join(wc_dir, "A"), ext)
+  change_external(sbox.ospath('A'), ext)
 
   # Update the working copy.  This should succeed (exitcode 0) but
   # should print warnings on the external because the URL with '@HEAD'
@@ -1027,7 +1027,7 @@ def cannot_move_or_remove_file_externals
                                      ".*gamma.*; please .* "
                                      "the svn:externals .*",
                                      'rm',
-                                     os.path.join(wc_dir, 'A', 'B', 'gamma'))
+                                     sbox.ospath('A/B/gamma'))
 
   # Should not be able to move the file external.
   svntest.actions.run_and_verify_svn("Able to move file external",
@@ -1036,15 +1036,15 @@ def cannot_move_or_remove_file_externals
                                      ".*gamma.*; please .*edit.*"
                                      "svn:externals.*",
                                      'mv',
-                                     os.path.join(wc_dir, 'A', 'B', 'gamma'),
-                                     os.path.join(wc_dir, 'A', 'B', 'gamma1'))
+                                     sbox.ospath('A/B/gamma'),
+                                     sbox.ospath('A/B/gamma1'))
 
   # But the directory that contains it can be deleted.
   expected_status = svntest.actions.get_virginal_state(wc_dir, 6)
 
   svntest.actions.run_and_verify_svn(None, None, [],
                                      'rm',
-                                     os.path.join(wc_dir, "A", "B"))
+                                     sbox.ospath('A/B'))
 
   expected_status.tweak('A/B', status='D ')
   expected_output = svntest.wc.State(wc_dir, {
@@ -1072,7 +1072,7 @@ def cannot_move_or_remove_file_externals
   svntest.actions.run_and_verify_update(wc_dir,
                                         expected_output, None, None)
 
-  open(os.path.join(wc_dir, 'A', 'D', 'gamma')).close()
+  open(sbox.ospath('A/D/gamma')).close()
 
 #----------------------------------------------------------------------
 
@@ -1139,8 +1139,8 @@ def external_into_path_with_spaces(sbox)
   svntest.actions.run_and_verify_update(wc_dir,
                                         expected_output, None, None)
   probe_paths_exist([
-      os.path.join(wc_dir, 'A', 'copy of D'),
-      os.path.join(wc_dir, 'A', 'another copy of D'),
+      sbox.ospath('A/copy of D'),
+      sbox.ospath('A/another copy of D'),
   ])
 
 #----------------------------------------------------------------------
@@ -1155,7 +1155,7 @@ def binary_file_externals(sbox):
 
   # Add a binary file A/theta, write PNG file data into it.
   theta_contents = open(os.path.join(sys.path[0], "theta.bin"), 'rb').read()
-  theta_path = os.path.join(wc_dir, 'A', 'theta')
+  theta_path = sbox.ospath('A/theta')
   svntest.main.file_write(theta_path, theta_contents, 'wb')
 
   svntest.main.run_svn(None, 'add', theta_path)
@@ -1175,7 +1175,7 @@ def binary_file_externals(sbox):
 
 
   # Create a file external on the binary file A/theta
-  C = os.path.join(wc_dir, 'A', 'C')
+  C = sbox.ospath('A/C')
   external = os.path.join(C, 'external')
   externals_prop = "^/A/theta external\n"
 
@@ -1226,7 +1226,7 @@ def update_lose_file_external(sbox):
 
 
   # Create a file external in A/C/external on the file A/mu
-  C = os.path.join(wc_dir, 'A', 'C')
+  C = sbox.ospath('A/C')
   external = os.path.join(C, 'external')
   externals_prop = "^/A/mu external\n"
 
@@ -1296,7 +1296,7 @@ def update_lose_file_external(sbox):
                                         None, None, None, None, None,
                                         True)
 
-  probe_paths_missing([os.path.join(wc_dir, 'A', 'C', 'external')])
+  probe_paths_missing([sbox.ospath('A/C/external')])
 
 
 #----------------------------------------------------------------------
@@ -1311,8 +1311,8 @@ def switch_relative_external(sbox):
   repo_url = sbox.repo_url
 
   # Create a relative external in A/D on ../B
-  A_path = os.path.join(wc_dir, 'A')
-  A_copy_path = os.path.join(wc_dir, 'A_copy')
+  A_path = sbox.ospath('A')
+  A_copy_path = sbox.ospath('A_copy')
   A_copy_url = repo_url + '/A_copy'
   D_path = os.path.join(A_path, 'D')
   ext_path = os.path.join(D_path, 'ext')
@@ -1398,7 +1398,7 @@ def relegate_external(sbox):
   wc_dir = sbox.wc_dir
   repo_dir = sbox.repo_dir
   repo_url = sbox.repo_url
-  A_path = os.path.join(wc_dir, 'A')
+  A_path = sbox.ospath('A')
 
   # setup an external within the same repository
   externals_desc = '^/A/B/E        external'
@@ -1454,7 +1454,7 @@ def wc_repos_file_externals(sbox):
   repo_url = sbox.repo_url
 
   # Add a file A/theta.
-  theta_path = os.path.join(wc_dir, 'A', 'theta')
+  theta_path = sbox.ospath('A/theta')
   svntest.main.file_write(theta_path, 'theta', 'w')
   svntest.main.run_svn(None, 'add', theta_path)
 
@@ -1475,7 +1475,7 @@ def wc_repos_file_externals(sbox):
 
 
   # Create a file external on the file A/theta
-  C = os.path.join(wc_dir, 'A', 'C')
+  C = sbox.ospath('A/C')
   external = os.path.join(C, 'theta')
   externals_prop = "^/A/theta theta\n"
 
@@ -1557,9 +1557,9 @@ def merge_target_with_externals(sbox):
   repo_url = sbox.repo_url
 
   # Some paths we'll care about
-  A_path              = os.path.join(wc_dir, "A")
-  A_branch_path       = os.path.join(wc_dir, "A-branch")
-  A_gamma_branch_path = os.path.join(wc_dir, "A-branch", "D", "gamma")
+  A_path              = sbox.ospath('A')
+  A_branch_path       = sbox.ospath('A-branch')
+  A_gamma_branch_path = sbox.ospath('A-branch/D/gamma')
 
   svntest.actions.run_and_verify_svn(None, None, [],
                                      'checkout',
@@ -1726,7 +1726,7 @@ def update_external_on_locally_added_dir
   svntest.actions.run_and_verify_update(wc_dir,
                                         expected_output, None, None)
 
-  probe_paths_exist([os.path.join(wc_dir, "A", "foo", "exdir_E")])
+  probe_paths_exist([sbox.ospath('A/foo/exdir_E')])
 
 # Test for issue #2267
 @Issue(2267)
@@ -1775,7 +1775,7 @@ def switch_external_on_locally_added_dir
   # Switch the working copy to the branch, see if we get the new item.
   svntest.actions.run_and_verify_svn(None, None, [], 'sw', A_copy_path, wc_dir)
 
-  probe_paths_exist([os.path.join(wc_dir, "foo", "exdir_E")])
+  probe_paths_exist([sbox.ospath('foo/exdir_E')])
 
 @Issue(3819)
 def file_external_in_sibling(sbox):
@@ -1986,7 +1986,7 @@ def copy_file_externals(sbox):
   sbox.build()
   wc_dir = sbox.wc_dir
 
-  X = os.path.join(wc_dir, 'X')
+  X = sbox.ospath('X')
 
   # svn mkdir X
   expected_stdout = ['A         ' + X + '\n']
@@ -2017,9 +2017,9 @@ def copy_file_externals(sbox):
   #  svn up
   #  ''')
 
-  X = os.path.join(wc_dir, 'X')
-  X_copy = os.path.join(wc_dir, 'X_copy')
-  X_xmu = os.path.join(wc_dir, 'X', 'xmu')
+  X = sbox.ospath('X')
+  X_copy = sbox.ospath('X_copy')
+  X_xmu = sbox.ospath('X/xmu')
 
   # svn ci
   expected_output = svntest.wc.State(wc_dir, {
@@ -2155,12 +2155,12 @@ def include_externals(sbox):
   sbox.build()
   wc_dir = sbox.wc_dir
 
-  A_D_H = os.path.join(wc_dir, 'A', 'D', 'H')
-  X = os.path.join(wc_dir, 'X')
-  X_Y = os.path.join(wc_dir, 'X', 'Y')
-  Xpegged = os.path.join(wc_dir, 'Xpegged')
-  Z = os.path.join(wc_dir, 'Z')
-  Z_zeta = os.path.join(wc_dir, 'Z', 'zeta')
+  A_D_H = sbox.ospath('A/D/H')
+  X = sbox.ospath('X')
+  X_Y = sbox.ospath('X/Y')
+  Xpegged = sbox.ospath('Xpegged')
+  Z = sbox.ospath('Z')
+  Z_zeta = sbox.ospath('Z/zeta')
 
   # mkdir Z
   os.makedirs(Z)
@@ -2291,15 +2291,15 @@ def include_externals(sbox):
   #   svn status
   #   """)
 
-  X = os.path.join(wc_dir, 'X')
-  X_xG = os.path.join(wc_dir, 'X', 'xG')
-  X_xG_pi = os.path.join(wc_dir, 'X', 'xG', 'pi')
-  X_xmu = os.path.join(wc_dir, 'X', 'xmu')
-  X_Y_xH_chi = os.path.join(wc_dir, 'X', 'Y', 'xH', 'chi')
-  X_Y_xH_xZ_zeta = os.path.join(wc_dir, 'X', 'Y', 'xH', 'xZ', 'zeta')
-  X_Y_xlambda = os.path.join(wc_dir, 'X', 'Y', 'xlambda')
-  Xpegged = os.path.join(wc_dir, 'Xpegged')
-  Xpegged_xE_alpha = os.path.join(wc_dir, 'Xpegged', 'xE', 'alpha')
+  X = sbox.ospath('X')
+  X_xG = sbox.ospath('X/xG')
+  X_xG_pi = sbox.ospath('X/xG/pi')
+  X_xmu = sbox.ospath('X/xmu')
+  X_Y_xH_chi = sbox.ospath('X/Y/xH/chi')
+  X_Y_xH_xZ_zeta = sbox.ospath('X/Y/xH/xZ/zeta')
+  X_Y_xlambda = sbox.ospath('X/Y/xlambda')
+  Xpegged = sbox.ospath('Xpegged')
+  Xpegged_xE_alpha = sbox.ospath('Xpegged/xE/alpha')
 
   # svn ci
   expected_output = svntest.wc.State(wc_dir, {
@@ -2579,9 +2579,9 @@ def include_immediate_dir_externals(sbox
   sbox.build()
   wc_dir = sbox.wc_dir
 
-  X = os.path.join(wc_dir, 'X')
-  X_XE = os.path.join(wc_dir, 'X', 'XE')
-  X_XE_alpha = os.path.join(wc_dir, 'X', 'XE', 'alpha')
+  X = sbox.ospath('X')
+  X_XE = sbox.ospath('X/XE')
+  X_XE_alpha = sbox.ospath('X/XE/alpha')
 
   # svn mkdir X
   expected_stdout = ['A         ' + X + '\n']
@@ -2701,8 +2701,8 @@ def remap_file_external_with_prop_del(sb
   sbox.build()
   wc_dir = sbox.wc_dir
 
-  A_path  = os.path.join(wc_dir, "A")
-  mu_path = os.path.join(wc_dir, "A", "mu")
+  A_path  = sbox.ospath('A')
+  mu_path = sbox.ospath('A/mu')
 
   # Add a property to A/mu
   svntest.actions.run_and_verify_svn(None, None, [],
@@ -2747,8 +2747,8 @@ def dir_external_with_dash_r_only(sbox):
   wc_dir = sbox.wc_dir
   url = sbox.repo_url
 
-  A_B_E_alpha = os.path.join(wc_dir, 'A', 'B', 'E', 'alpha')
-  E_ext = os.path.join(wc_dir, 'E_ext')
+  A_B_E_alpha = sbox.ospath('A/B/E/alpha')
+  E_ext = sbox.ospath('E_ext')
 
   # echo 'newer alpha' > A/B/E/alpha
   main.file_write(A_B_E_alpha, 'newer alpha\n')
@@ -2810,7 +2810,7 @@ def url_to_wc_copy_of_externals(sbox):
   # Create an external A/C/external pointing to ^/A/D/G.
   svntest.actions.run_and_verify_svn(None, None, [], 'ps',
                                      'svn:externals', '^/A/D/G external',
-                                     os.path.join(wc_dir, 'A', 'C'))
+                                     sbox.ospath('A/C'))
   svntest.actions.run_and_verify_svn(None, None, [], 'ci', '-m',
                                      'create an external', wc_dir)
   svntest.actions.run_and_verify_svn(None, None, [], 'up', wc_dir)
@@ -2840,7 +2840,7 @@ def url_to_wc_copy_of_externals(sbox):
   #   svn-F9E2C0EC' to 'C:\SVN\src-trunk-3\Debug\subversion\tests\cmdline\
   #   svn-test-work\working_copies\externals_tests-41\External-WC-to-URL-Copy':
   #   Access is denied.
-  external_root_path = os.path.join(wc_dir, "External-WC-to-URL-Copy")
+  external_root_path = sbox.ospath('External-WC-to-URL-Copy')
   external_ex_path = os.path.join(wc_dir, "External-WC-to-URL-Copy",
                                   "external")
   external_pi_path = os.path.join(wc_dir, "External-WC-to-URL-Copy",
@@ -2862,7 +2862,7 @@ def url_to_wc_copy_of_externals(sbox):
   ])
   exit_code, stdout, stderr = svntest.actions.run_and_verify_svn2(
     "OUTPUT", expected_stdout, [], 0, 'copy', repo_url + '/A/C',
-    os.path.join(wc_dir, 'External-WC-to-URL-Copy'))
+    sbox.ospath('External-WC-to-URL-Copy'))
 
 ########################################################################
 # Run the tests

Modified: subversion/branches/compressed-pristines/subversion/tests/cmdline/getopt_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/compressed-pristines/subversion/tests/cmdline/getopt_tests.py?rev=1373783&r1=1373782&r2=1373783&view=diff
==============================================================================
--- subversion/branches/compressed-pristines/subversion/tests/cmdline/getopt_tests.py (original)
+++ subversion/branches/compressed-pristines/subversion/tests/cmdline/getopt_tests.py Thu Aug 16 10:17:48 2012
@@ -25,7 +25,9 @@
 ######################################################################
 
 # General modules
-import sys, re, os.path
+import sys, re, os.path, logging
+
+logger = logging.getLogger()
 
 # Our testing module
 import svntest
@@ -138,31 +140,31 @@ def run_one_test(sbox, basename, *vararg
   actual_stderr = process_lines(actual_stderr)
 
   if exp_stdout != actual_stdout:
-    print("Standard output does not match.")
-    print("Expected standard output:")
-    print("=====")
+    logger.warn("Standard output does not match.")
+    logger.warn("Expected standard output:")
+    logger.warn("=====")
     for x in exp_stdout:
-      sys.stdout.write(x)
-    print("=====")
-    print("Actual standard output:")
-    print("=====")
+      logger.warn(x)
+    logger.warn("=====")
+    logger.warn("Actual standard output:")
+    logger.warn("=====")
     for x in actual_stdout:
-      sys.stdout.write(x)
-    print("=====")
+      logger.warn(x)
+    logger.warn("=====")
     raise svntest.Failure
 
   if exp_stderr != actual_stderr:
-    print("Standard error does not match.")
-    print("Expected standard error:")
-    print("=====")
+    logger.warn("Standard error does not match.")
+    logger.warn("Expected standard error:")
+    logger.warn("=====")
     for x in exp_stderr:
-      sys.stdout.write(x)
-    print("=====")
-    print("Actual standard error:")
-    print("=====")
+      logger.warn(x)
+    logger.warn("=====")
+    logger.warn("Actual standard error:")
+    logger.warn("=====")
     for x in actual_stderr:
-      sys.stdout.write(x)
-    print("=====")
+      logger.warn(x)
+    logger.warn("=====")
     raise svntest.Failure
 
 def getopt_no_args(sbox):

Modified: subversion/branches/compressed-pristines/subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout
URL: http://svn.apache.org/viewvc/subversion/branches/compressed-pristines/subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout?rev=1373783&r1=1373782&r2=1373783&view=diff
==============================================================================
--- subversion/branches/compressed-pristines/subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout (original)
+++ subversion/branches/compressed-pristines/subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout Thu Aug 16 10:17:48 2012
@@ -30,16 +30,41 @@ usage: 1. log [PATH][@REV]
   The --depth option is only valid in combination with the --diff option
   and limits the scope of the displayed diff to the specified depth.
 
+  If the --search option is used, log messages are displayed only if the
+  provided search pattern matches the author, date, log message text,
+  or, if the --verbose option is also provided, a changed path.
+  The search pattern may include glob syntax wildcards:
+      ?      matches any single character
+      *      matches a sequence of arbitrary characters
+      [...]  matches any of the characters listed inside the brackets
+  If --limit is used in combination with --search, --limit restricts the
+  number of log messages searched, rather than restricting the output
+  to a particular number of matching log messages.
+
   Examples:
-    svn log
-    svn log foo.c
-    svn log bar.c@42
-    svn log http://www.example.com/repo/project/foo.c
-    svn log http://www.example.com/repo/project foo.c bar.c
-    svn log http://www.example.com/repo/project@50 foo.c bar.c
 
-    This command shows the log entry for the revision the branch
-    ^/branches/foo was created in:
+    Show the latest 5 log messages for the current working copy
+    directory and display paths changed in each commit:
+      svn log -l 5 -v
+
+    Show the log for bar.c as of revision 42:
+      svn log bar.c@42
+
+    Show log messages and diffs for each commit to foo.c:
+      svn log --diff http://www.example.com/repo/project/foo.c
+    (Because the above command uses a full URL it does not require
+     a working copy.)
+
+    Show log messages for the children foo.c and bar.c of the directory
+    '/trunk' as it appeared in revision 50, using the ^/ URL shortcut:
+      svn log ^/trunk@50 foo.c bar.c
+
+    Show the log messages for any incoming changes to foo.c during the
+    next 'svn update':
+      svn log -r BASE:HEAD foo.c
+
+    Show the log message for the revision in which /branches/foo
+    was created:
       svn log --stop-on-copy --limit 1 -r0:HEAD ^/branches/foo
 
 Valid options:
@@ -85,6 +110,8 @@ Valid options:
                                    Ignore changes in EOL style.
                                 -p (--show-c-function):
                                    Show C function name in diff output.
+  --search ARG             : use ARG as search pattern (glob syntax)
+  --isearch ARG            : like --search, but case-insensitive
 
 Global options:
   --username ARG           : specify a username ARG

Modified: subversion/branches/compressed-pristines/subversion/tests/cmdline/import_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/compressed-pristines/subversion/tests/cmdline/import_tests.py?rev=1373783&r1=1373782&r2=1373783&view=diff
==============================================================================
--- subversion/branches/compressed-pristines/subversion/tests/cmdline/import_tests.py (original)
+++ subversion/branches/compressed-pristines/subversion/tests/cmdline/import_tests.py Thu Aug 16 10:17:48 2012
@@ -298,6 +298,7 @@ def import_avoid_empty_revision(sbox):
 #----------------------------------------------------------------------
 
 # test for issue 2433: "import" does not handle eol-style correctly
+# and for normalising files with mixed line-endings upon import (r1205193)
 @Issue(2433)
 def import_eol_style(sbox):
   "import should honor the eol-style property"
@@ -315,6 +316,7 @@ enable-auto-props = yes
 
 [auto-props]
 *.dsp = svn:eol-style=CRLF
+*.txt = svn:eol-style=native
 '''
   tmp_dir = os.path.abspath(svntest.main.temp_dir)
   config_dir = os.path.join(tmp_dir, 'autoprops_config')
@@ -369,6 +371,26 @@ enable-auto-props = yes
                                      file_path,
                                      '--config-dir', config_dir)
 
+  # create a file with inconsistent EOLs and eol-style=native, and import it
+  file_name = "test.txt"
+  file_path = file_name
+  imp_dir_path = 'dir2'
+  imp_file_path = os.path.join(imp_dir_path, file_name)
+
+  os.mkdir(imp_dir_path, 0755)
+  svntest.main.file_append_binary(imp_file_path,
+                                  "This is file test.txt.\n" + \
+                                  "The second line.\r\n" + \
+                                  "The third line.\r")
+
+  # The import should succeed and not error out
+  svntest.actions.run_and_verify_svn(None, None, [], 'import',
+                                     '-m', 'Log message for new import',
+                                     imp_dir_path,
+                                     sbox.repo_url,
+                                     '--config-dir', config_dir)
+
+
 #----------------------------------------------------------------------
 @Issue(3983)
 def import_into_foreign_repo(sbox):

Modified: subversion/branches/compressed-pristines/subversion/tests/cmdline/lock_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/compressed-pristines/subversion/tests/cmdline/lock_tests.py?rev=1373783&r1=1373782&r2=1373783&view=diff
==============================================================================
--- subversion/branches/compressed-pristines/subversion/tests/cmdline/lock_tests.py (original)
+++ subversion/branches/compressed-pristines/subversion/tests/cmdline/lock_tests.py Thu Aug 16 10:17:48 2012
@@ -26,7 +26,9 @@
 ######################################################################
 
 # General modules
-import re, os, stat
+import re, os, stat, logging
+
+logger = logging.getLogger()
 
 # Our testing module
 import svntest
@@ -79,9 +81,8 @@ def lock_file(sbox):
   svntest.actions.duplicate_dir(wc_dir, wc_b)
 
   # lock a file as wc_author
-  fname = 'iota'
-  file_path = os.path.join(sbox.wc_dir, fname)
-  file_path_b = os.path.join(wc_b, fname)
+  file_path = sbox.ospath('iota')
+  file_path_b = sbox.ospath('iota', wc_dir=wc_b)
 
   svntest.main.file_append(file_path, "This represents a binary file\n")
   svntest.main.run_svn(None, 'commit',
@@ -133,45 +134,42 @@ def commit_file_keep_lock(sbox):
   sbox.build()
   wc_dir = sbox.wc_dir
 
-  fname = 'A/mu'
-  file_path = os.path.join(sbox.wc_dir, fname)
-
-  # lock fname as wc_author
+  # lock 'A/mu' as wc_author
   svntest.actions.run_and_verify_svn(None, ".*locked by user", [], 'lock',
-                                     '-m', 'some lock comment', file_path)
+                                     '-m', 'some lock comment',
+                                     sbox.ospath('A/mu'))
 
   # make a change and commit it, holding lock
-  svntest.main.file_append(file_path, "Tweak!\n")
+  sbox.simple_append('A/mu', 'Tweak!\n')
   svntest.main.run_svn(None, 'commit', '-m', '', '--no-unlock',
-                       file_path)
+                       sbox.ospath('A/mu'))
 
   expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
-  expected_status.tweak(fname, wc_rev=2)
-  expected_status.tweak(fname, writelocked='K')
+  expected_status.tweak('A/mu', wc_rev=2, writelocked='K')
 
   # Make sure the file is still locked
   svntest.actions.run_and_verify_status(wc_dir, expected_status)
 
+
 def commit_file_unlock(sbox):
   "commit a file and release lock"
 
   sbox.build()
   wc_dir = sbox.wc_dir
 
-  fname = 'A/mu'
-  file_path = os.path.join(sbox.wc_dir, fname)
-
-  # lock fname as wc_author
+  # lock A/mu and iota as wc_author
   svntest.actions.run_and_verify_svn(None, ".*locked by user", [], 'lock',
-                                     '-m', 'some lock comment', file_path)
+                                     '-m', 'some lock comment',
+                                     sbox.ospath('A/mu'),
+                                     sbox.ospath('iota'))
 
   # make a change and commit it, allowing lock to be released
-  svntest.main.file_append(file_path, "Tweak!\n")
-  svntest.main.run_svn(None, 'commit', '-m', '',
-                       file_path)
+  sbox.simple_append('A/mu', 'Tweak!\n')
+  sbox.simple_commit()
 
   expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
-  expected_status.tweak(fname, wc_rev=2)
+  expected_status.tweak('A/mu', wc_rev=2)
+  expected_status.tweak('iota', wc_rev=2)
 
   # Make sure the file is unlocked
   svntest.actions.run_and_verify_status(wc_dir, expected_status)
@@ -183,20 +181,17 @@ def commit_propchange(sbox):
   sbox.build()
   wc_dir = sbox.wc_dir
 
-  fname = 'A/mu'
-  file_path = os.path.join(sbox.wc_dir, fname)
-
-  # lock fname as wc_author
+  # lock A/mu as wc_author
   svntest.actions.run_and_verify_svn(None, ".*locked by user", [], 'lock',
-                                     '-m', 'some lock comment', file_path)
+                                     '-m', 'some lock comment',
+                                     sbox.ospath('A/mu'))
 
   # make a property change and commit it, allowing lock to be released
-  svntest.main.run_svn(None, 'propset', 'blue', 'azul', file_path)
-  svntest.main.run_svn(None, 'commit',
-                             '-m', '', file_path)
+  sbox.simple_propset('blue', 'azul', 'A/mu')
+  sbox.simple_commit('A/mu')
 
   expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
-  expected_status.tweak(fname, wc_rev=2)
+  expected_status.tweak('A/mu', wc_rev=2)
 
   # Make sure the file is unlocked
   svntest.actions.run_and_verify_status(wc_dir, expected_status)
@@ -222,9 +217,8 @@ def break_lock(sbox):
   svntest.actions.duplicate_dir(wc_dir, wc_b)
 
   # lock a file as wc_author
-  fname = 'iota'
-  file_path = os.path.join(sbox.wc_dir, fname)
-  file_path_b = os.path.join(wc_b, fname)
+  file_path = sbox.ospath('iota')
+  file_path_b = sbox.ospath('iota', wc_dir=wc_b)
 
   svntest.actions.run_and_verify_svn(None, ".*locked by user", [], 'lock',
                                      '-m', '', file_path)
@@ -265,9 +259,8 @@ def steal_lock(sbox):
   svntest.actions.duplicate_dir(wc_dir, wc_b)
 
   # lock a file as wc_author
-  fname = 'iota'
-  file_path = os.path.join(sbox.wc_dir, fname)
-  file_path_b = os.path.join(wc_b, fname)
+  file_path = sbox.ospath('iota')
+  file_path_b = sbox.ospath('iota', wc_dir=wc_b)
 
   svntest.actions.run_and_verify_svn(None, ".*locked by user", [], 'lock',
                                      '-m', '', file_path)
@@ -295,14 +288,9 @@ def examine_lock(sbox):
   "examine the fields of a lockfile for correctness"
 
   sbox.build()
-  wc_dir = sbox.wc_dir
-
-  fname = 'iota'
-  comment = 'This is a lock test.'
-  file_path = os.path.join(sbox.wc_dir, fname)
 
   # lock a file as wc_author
-  svntest.actions.run_and_validate_lock(file_path,
+  svntest.actions.run_and_validate_lock(sbox.ospath('iota'),
                                         svntest.main.wc_author)
 
 #----------------------------------------------------------------------
@@ -315,21 +303,17 @@ def handle_defunct_lock(sbox):
   sbox.build()
   wc_dir = sbox.wc_dir
 
-
-  fname = 'iota'
-  file_path = os.path.join(sbox.wc_dir, fname)
-
   # set up our expected status
   expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
 
   # lock the file
   svntest.actions.run_and_verify_svn(None, ".*locked by user", [], 'lock',
-                                     '-m', '', file_path)
+                                     '-m', '', sbox.ospath('iota'))
 
   # Make a second copy of the working copy
   wc_b = sbox.add_wc_path('_b')
   svntest.actions.duplicate_dir(wc_dir, wc_b)
-  file_path_b = os.path.join(wc_b, fname)
+  file_path_b = sbox.ospath('iota', wc_dir=wc_b)
 
   # --- Meanwhile, in our other working copy... ---
 
@@ -339,7 +323,7 @@ def handle_defunct_lock(sbox):
 
 
   # update the 1st wc, which should clear the lock there
-  svntest.main.run_svn(None, 'update', wc_dir)
+  sbox.simple_update()
 
   # Make sure the file is unlocked
   svntest.actions.run_and_verify_status(wc_dir, expected_status)
@@ -357,9 +341,9 @@ def enforce_lock(sbox):
   sbox.build()
   wc_dir = sbox.wc_dir
 
-  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')
+  iota_path = sbox.ospath('iota')
+  lambda_path = sbox.ospath('A/B/lambda')
+  mu_path = sbox.ospath('A/mu')
 
   # svn:needs-lock value should be forced to a '*'
   svntest.actions.set_prop('svn:needs-lock', 'foo', iota_path)
@@ -381,8 +365,8 @@ def enforce_lock(sbox):
     if ((os.stat(iota_path)[0] & mode)
         or (os.stat(lambda_path)[0] & mode)
         or (os.stat(mu_path)[0] & mode)):
-      print("Setting 'svn:needs-lock' property on a file failed to set")
-      print("file mode to read-only.")
+      logger.warn("Setting 'svn:needs-lock' property on a file failed to set")
+      logger.warn("file mode to read-only.")
       raise svntest.Failure
 
     # obtain a lock on one of these files...
@@ -391,7 +375,7 @@ def enforce_lock(sbox):
 
     # ...and verify that the write bit gets set...
     if not (os.stat(iota_path)[0] & mode):
-      print("Locking a file with 'svn:needs-lock' failed to set write bit.")
+      logger.warn("Locking a file with 'svn:needs-lock' failed to set write bit.")
       raise svntest.Failure
 
     # ...and unlock it...
@@ -400,13 +384,13 @@ def enforce_lock(sbox):
 
     # ...and verify that the write bit gets unset
     if (os.stat(iota_path)[0] & mode):
-      print("Unlocking a file with 'svn:needs-lock' failed to unset write bit.")
+      logger.warn("Unlocking a file with 'svn:needs-lock' failed to unset write bit.")
       raise svntest.Failure
 
     # Verify that removing the property restores the file to read-write
     svntest.main.run_svn(None, 'propdel', 'svn:needs-lock', iota_path)
     if not (os.stat(iota_path)[0] & mode):
-      print("Deleting 'svn:needs-lock' failed to set write bit.")
+      logger.warn("Deleting 'svn:needs-lock' failed to set write bit.")
       raise svntest.Failure
 
 #----------------------------------------------------------------------
@@ -418,30 +402,22 @@ def update_while_needing_lock(sbox):
   "update handles svn:needs-lock correctly"
 
   sbox.build()
-  wc_dir = sbox.wc_dir
 
-  iota_path = os.path.join(wc_dir, 'iota')
-  svntest.main.run_svn(None,
-                       'propset', 'svn:needs-lock', 'foo', iota_path)
-  svntest.main.run_svn(None,
-                       'commit', '-m', 'log msg', iota_path)
-  svntest.main.run_svn(None,
-                       'up', wc_dir)
+  sbox.simple_propset('svn:needs-lock', 'foo', 'iota')
+  sbox.simple_commit('iota')
+  sbox.simple_update()
 
   # Lock, modify, commit, unlock, to create r3.
   svntest.actions.run_and_verify_svn(None, ".*locked by user", [], 'lock',
-                                     '-m', '', iota_path)
-  svntest.main.file_append(iota_path, "This line added in r2.\n")
-  svntest.main.run_svn(None, 'commit',
-                       '-m', '', iota_path) # auto-unlocks
+                                     '-m', '', sbox.ospath('iota'))
+  sbox.simple_append('iota', 'This line added in r2.\n')
+  sbox.simple_commit('iota') # auto-unlocks
 
   # Backdate to r2.
-  svntest.main.run_svn(None,
-                       'update', '-r2', iota_path)
+  sbox.simple_update(revision=2)
 
   # Try updating forward to r3 again.  This is where the bug happened.
-  svntest.main.run_svn(None,
-                       'update', '-r3', iota_path)
+  sbox.simple_update(revision=3)
 
 
 #----------------------------------------------------------------------
@@ -456,17 +432,16 @@ def defunct_lock(sbox):
   wc_b = sbox.add_wc_path('_b')
   svntest.actions.duplicate_dir(wc_dir, wc_b)
 
-  iota_path = os.path.join(wc_dir, 'iota')
-  iota_path_b = os.path.join(wc_b, 'iota')
+  iota_path = sbox.ospath('iota')
+  iota_path_b = sbox.ospath('iota', wc_dir=wc_b)
 
   mode = stat.S_IWGRP | stat.S_IWOTH | stat.S_IWRITE
 
 # Set the prop in wc a
-  svntest.main.run_svn(None, 'propset', 'svn:needs-lock', 'foo', iota_path)
+  sbox.simple_propset('svn:needs-lock', 'foo', 'iota')
 
   # commit r2
-  svntest.main.run_svn(None, 'commit',
-                       '-m', '', iota_path)
+  sbox.simple_commit('iota')
 
   # update wc_b
   svntest.main.run_svn(None, 'update', wc_b)
@@ -484,8 +459,8 @@ def defunct_lock(sbox):
 
   # make sure that iota got set to read-only
   if (os.stat(iota_path_b)[0] & mode):
-    print("Upon removal of a defunct lock, a file with 'svn:needs-lock'")
-    print("was not set back to read-only")
+    logger.warn("Upon removal of a defunct lock, a file with 'svn:needs-lock'")
+    logger.warn("was not set back to read-only")
     raise svntest.Failure
 
 
@@ -498,14 +473,13 @@ def deleted_path_lock(sbox):
   sbox.build()
   wc_dir = sbox.wc_dir
 
-  iota_path = os.path.join(wc_dir, 'iota')
+  iota_path = sbox.ospath('iota')
   iota_url = sbox.repo_url + '/iota'
 
   svntest.actions.run_and_verify_svn(None, ".*locked by user", [], 'lock',
                                      '-m', '', iota_path)
 
-  svntest.actions.run_and_verify_svn(None, None, [], 'delete', iota_path)
-
+  sbox.simple_rm('iota')
   svntest.actions.run_and_verify_svn(None, None, [], 'commit',
                                      '--no-unlock',
                                      '-m', '', iota_path)
@@ -524,9 +498,9 @@ def lock_unlock(sbox):
   sbox.build()
   wc_dir = sbox.wc_dir
 
-  pi_path = os.path.join(wc_dir, 'A', 'D', 'G', 'pi')
-  rho_path = os.path.join(wc_dir, 'A', 'D', 'G', 'rho')
-  tau_path = os.path.join(wc_dir, 'A', 'D', 'G', 'tau')
+  pi_path = sbox.ospath('A/D/G/pi')
+  rho_path = sbox.ospath('A/D/G/rho')
+  tau_path = sbox.ospath('A/D/G/tau')
 
   expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
   expected_status.tweak('A/D/G/pi', 'A/D/G/rho', 'A/D/G/tau', writelocked='K')
@@ -551,19 +525,17 @@ def deleted_dir_lock(sbox):
   sbox.build()
   wc_dir = sbox.wc_dir
 
-  parent_dir = os.path.join(wc_dir, 'A', 'D', 'G')
-  pi_path = os.path.join(wc_dir, 'A', 'D', 'G', 'pi')
-  rho_path = os.path.join(wc_dir, 'A', 'D', 'G', 'rho')
-  tau_path = os.path.join(wc_dir, 'A', 'D', 'G', 'tau')
+  pi_path = sbox.ospath('A/D/G/pi')
+  rho_path = sbox.ospath('A/D/G/rho')
+  tau_path = sbox.ospath('A/D/G/tau')
 
   svntest.actions.run_and_verify_svn(None, ".*locked by user", [], 'lock',
                                      '-m', '', pi_path, rho_path, tau_path)
 
-  svntest.actions.run_and_verify_svn(None, None, [], 'delete', parent_dir)
-
+  sbox.simple_rm('A/D/G')  # the parent directory
   svntest.actions.run_and_verify_svn(None, None, [], 'commit',
                                      '--no-unlock',
-                                     '-m', '', parent_dir)
+                                     '-m', '', sbox.ospath('A/D/G'))
 
 #----------------------------------------------------------------------
 # III.c : Lock a file and check the output of 'svn stat' from the same
@@ -581,30 +553,27 @@ def lock_status(sbox):
   fname = 'iota'
   file_path = os.path.join(sbox.wc_dir, fname)
 
-  svntest.main.file_append(file_path, "This is a spreadsheet\n")
-  svntest.main.run_svn(None, 'commit',
-                       '-m', '', file_path)
+  sbox.simple_append('iota', "This is a spreadsheet\n")
+  sbox.simple_commit('iota')
 
-  svntest.main.run_svn(None, 'lock',
-                       '-m', '', file_path)
+  svntest.main.run_svn(None, 'lock', '-m', '', sbox.ospath('iota'))
 
   expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
-  expected_status.tweak(fname, wc_rev=2)
-  expected_status.tweak(fname, writelocked='K')
+  expected_status.tweak('iota', wc_rev=2, writelocked='K')
 
   svntest.actions.run_and_verify_status(wc_dir, expected_status)
 
   # Verify status again after modifying the file
-  svntest.main.file_append(file_path, "check stat output after mod")
+  sbox.simple_append('iota', 'check stat output after mod')
 
-  expected_status.tweak(fname, status='M ')
+  expected_status.tweak('iota', status='M ')
 
   svntest.actions.run_and_verify_status(wc_dir, expected_status)
 
   # Verify status of lock from another working copy
   svntest.main.run_svn(None, 'update', wc_b)
   expected_status = svntest.actions.get_virginal_state(wc_b, 2)
-  expected_status.tweak(fname, writelocked='O')
+  expected_status.tweak('iota', writelocked='O')
 
   svntest.actions.run_and_verify_status(wc_b, expected_status)
 
@@ -705,7 +674,7 @@ def lock_non_existent_file(sbox):
     if line.find(error_msg) != -1:
       break
   else:
-    print("Error: %s : not found in: %s" % (error_msg, error))
+    logger.warn("Error: %s : not found in: %s" % (error_msg, error))
     raise svntest.Failure
 
 #----------------------------------------------------------------------
@@ -744,7 +713,7 @@ def revert_lock(sbox):
   sbox.build()
   wc_dir = sbox.wc_dir
 
-  iota_path = os.path.join(wc_dir, 'iota')
+  iota_path = sbox.ospath('iota')
 
   mode = stat.S_IWGRP | stat.S_IWOTH | stat.S_IWRITE
 
@@ -758,8 +727,8 @@ def revert_lock(sbox):
 
   # make sure that iota got set to read-only
   if (os.stat(iota_path)[0] & mode):
-    print("Committing a file with 'svn:needs-lock'")
-    print("did not set the file to read-only")
+    logger.warn("Committing a file with 'svn:needs-lock'")
+    logger.warn("did not set the file to read-only")
     raise svntest.Failure
 
   # verify status is as we expect
@@ -773,8 +742,8 @@ def revert_lock(sbox):
 
   # make sure that iota got read-only-ness removed
   if (os.stat(iota_path)[0] & mode == 0):
-    print("Deleting the 'svn:needs-lock' property ")
-    print("did not remove read-only-ness")
+    logger.warn("Deleting the 'svn:needs-lock' property ")
+    logger.warn("did not remove read-only-ness")
     raise svntest.Failure
 
   # revert the change
@@ -782,8 +751,8 @@ def revert_lock(sbox):
 
   # make sure that iota got set back to read-only
   if (os.stat(iota_path)[0] & mode):
-    print("Reverting a file with 'svn:needs-lock'")
-    print("did not set the file back to read-only")
+    logger.warn("Reverting a file with 'svn:needs-lock'")
+    logger.warn("did not set the file back to read-only")
     raise svntest.Failure
 
   # try propdel and revert from a different directory so
@@ -807,8 +776,8 @@ def revert_lock(sbox):
 
   # make sure it is still writable since we have the lock
   if (os.stat(iota_path)[0] & mode == 0):
-    print("Reverting a 'svn:needs-lock' file (with lock in wc) ")
-    print("did not leave the file writable")
+    logger.warn("Reverting a 'svn:needs-lock' file (with lock in wc) ")
+    logger.warn("did not leave the file writable")
     raise svntest.Failure
 
 
@@ -863,8 +832,8 @@ def lock_switched_files(sbox):
   sbox.build()
   wc_dir = sbox.wc_dir
 
-  gamma_path = os.path.join(wc_dir, 'A', 'D', 'gamma')
-  lambda_path = os.path.join(wc_dir, 'A', 'B', 'lambda')
+  gamma_path = sbox.ospath('A/D/gamma')
+  lambda_path = sbox.ospath('A/B/lambda')
   iota_URL = sbox.repo_url + '/iota'
   alpha_URL = sbox.repo_url + '/A/B/E/alpha'
 
@@ -910,7 +879,7 @@ def lock_uri_encoded(sbox):
 
   # lock a file as wc_author
   fname = 'amazing space'
-  file_path = os.path.join(wc_dir, fname)
+  file_path = sbox.ospath(fname)
 
   svntest.main.file_append(file_path, "This represents a binary file\n")
   svntest.actions.run_and_verify_svn(None, None, [], "add", file_path)
@@ -974,7 +943,7 @@ def lock_and_exebit1(sbox):
   sbox.build()
   wc_dir = sbox.wc_dir
 
-  gamma_path = os.path.join(wc_dir, 'A', 'D', 'gamma')
+  gamma_path = sbox.ospath('A/D/gamma')
 
   expected_err = ".*svn: warning: W125005: To turn off the svn:needs-lock property,.*"
   svntest.actions.run_and_verify_svn2(None, None, expected_err, 0,
@@ -992,8 +961,8 @@ def lock_and_exebit1(sbox):
   if (not gamma_stat & mode_r
       or gamma_stat & mode_w
       or not gamma_stat & mode_x):
-    print("Committing a file with 'svn:needs-lock, svn:executable'")
-    print("did not set the file to read-only, executable")
+    logger.warn("Committing a file with 'svn:needs-lock, svn:executable'")
+    logger.warn("did not set the file to read-only, executable")
     raise svntest.Failure
 
   # lock
@@ -1004,8 +973,8 @@ def lock_and_exebit1(sbox):
   if (not gamma_stat & mode_r
       or not gamma_stat & mode_w
       or not gamma_stat & mode_x):
-    print("Locking a file with 'svn:needs-lock, svn:executable'")
-    print("did not set the file to read-write, executable")
+    logger.warn("Locking a file with 'svn:needs-lock, svn:executable'")
+    logger.warn("did not set the file to read-write, executable")
     raise svntest.Failure
 
   # modify
@@ -1020,8 +989,8 @@ def lock_and_exebit1(sbox):
   if (not gamma_stat & mode_r
       or gamma_stat & mode_w
       or not gamma_stat & mode_x):
-    print("Unlocking a file with 'svn:needs-lock, svn:executable'")
-    print("did not set the file to read-only, executable")
+    logger.warn("Unlocking a file with 'svn:needs-lock, svn:executable'")
+    logger.warn("did not set the file to read-only, executable")
     raise svntest.Failure
 
   # ci
@@ -1033,8 +1002,8 @@ def lock_and_exebit1(sbox):
   if (not gamma_stat & mode_r
       or gamma_stat & mode_w
       or not gamma_stat & mode_x):
-    print("Commiting a file with 'svn:needs-lock, svn:executable'")
-    print("after unlocking modified file's permissions")
+    logger.warn("Commiting a file with 'svn:needs-lock, svn:executable'")
+    logger.warn("after unlocking modified file's permissions")
     raise svntest.Failure
 
 
@@ -1051,7 +1020,7 @@ def lock_and_exebit2(sbox):
   sbox.build()
   wc_dir = sbox.wc_dir
 
-  gamma_path = os.path.join(wc_dir, 'A', 'D', 'gamma')
+  gamma_path = sbox.ospath('A/D/gamma')
 
   expected_err = ".*svn: warning: W125005: To turn off the svn:needs-lock property,.*"
   svntest.actions.run_and_verify_svn2(None, None, expected_err, 0,
@@ -1069,8 +1038,8 @@ def lock_and_exebit2(sbox):
   if (not gamma_stat & mode_r
       or gamma_stat & mode_w
       or not gamma_stat & mode_x):
-    print("Committing a file with 'svn:needs-lock, svn:executable'")
-    print("did not set the file to read-only, executable")
+    logger.warn("Committing a file with 'svn:needs-lock, svn:executable'")
+    logger.warn("did not set the file to read-only, executable")
     raise svntest.Failure
 
   # lock
@@ -1081,8 +1050,8 @@ def lock_and_exebit2(sbox):
   if (not gamma_stat & mode_r
       or not gamma_stat & mode_w
       or not gamma_stat & mode_x):
-    print("Locking a file with 'svn:needs-lock, svn:executable'")
-    print("did not set the file to read-write, executable")
+    logger.warn("Locking a file with 'svn:needs-lock, svn:executable'")
+    logger.warn("did not set the file to read-write, executable")
     raise svntest.Failure
 
   # modify
@@ -1097,8 +1066,8 @@ def lock_and_exebit2(sbox):
   if (not gamma_stat & mode_r
       or gamma_stat & mode_w
       or not gamma_stat & mode_x):
-    print("Commiting a file with 'svn:needs-lock, svn:executable'")
-    print("did not set the file to read-only, executable")
+    logger.warn("Commiting a file with 'svn:needs-lock, svn:executable'")
+    logger.warn("did not set the file to read-only, executable")
     raise svntest.Failure
 
 def commit_xml_unsafe_file_unlock(sbox):
@@ -1173,7 +1142,6 @@ def repos_lock_with_info(sbox):
 
 #----------------------------------------------------------------------
 @Issue(4126)
-@Skip(svntest.main.is_ra_type_dav_serf) # Issue 4126 unpredictable result
 def unlock_already_unlocked_files(sbox):
   "(un)lock set of files, one already (un)locked"
 
@@ -1181,10 +1149,10 @@ def unlock_already_unlocked_files(sbox):
   wc_dir = sbox.wc_dir
 
   # Deliberately have no direct child of A as a target
-  iota_path = os.path.join(wc_dir, 'iota')
-  lambda_path = os.path.join(wc_dir, 'A', 'B', 'lambda')
-  alpha_path = os.path.join(wc_dir, 'A', 'B', 'E', 'alpha')
-  gamma_path = os.path.join(wc_dir, 'A', 'D', 'gamma')
+  iota_path = sbox.ospath('iota')
+  lambda_path = sbox.ospath('A/B/lambda')
+  alpha_path = sbox.ospath('A/B/E/alpha')
+  gamma_path = sbox.ospath('A/D/gamma')
 
   svntest.actions.run_and_verify_svn(None, ".*locked by user", [], 'lock',
                                      '--username', svntest.main.wc_author2,
@@ -1229,8 +1197,8 @@ def info_moved_path(sbox):
 
   sbox.build()
   wc_dir = sbox.wc_dir
-  fname = os.path.join(wc_dir, "iota")
-  fname2 = os.path.join(wc_dir, "iota2")
+  fname = sbox.ospath("iota")
+  fname2 = sbox.ospath("iota2")
 
   # Move iota, creating r2.
   svntest.actions.run_and_verify_svn(None, None, [],
@@ -1285,7 +1253,7 @@ def ls_url_encoded(sbox):
 
   sbox.build()
   wc_dir = sbox.wc_dir
-  dirname = os.path.join(wc_dir, "space dir")
+  dirname = sbox.ospath("space dir")
   fname = os.path.join(dirname, "f")
 
   # Create a dir with a space in its name and a file therein.
@@ -1391,7 +1359,7 @@ def unlocked_lock_of_other_user(sbox):
   wc_dir = sbox.wc_dir
 
   # lock a file with user jrandom
-  pi_path = os.path.join(wc_dir, 'A', 'D', 'G', 'pi')
+  pi_path = sbox.ospath('A/D/G/pi')
   expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
   expected_status.tweak('A/D/G/pi', writelocked='K')
 
@@ -1439,8 +1407,8 @@ def lock_twice_in_one_wc(sbox):
   sbox.build()
   wc_dir = sbox.wc_dir
 
-  mu_path = os.path.join(wc_dir, 'A', 'mu')
-  mu2_path = os.path.join(wc_dir, 'A', 'B', 'mu')
+  mu_path = sbox.ospath('A/mu')
+  mu2_path = sbox.ospath('A/B/mu')
 
   # Create a needs-lock file
   svntest.actions.set_prop('svn:needs-lock', '*', mu_path)
@@ -1454,7 +1422,7 @@ def lock_twice_in_one_wc(sbox):
   # Switch a second location for the same file in the same working copy
   svntest.actions.run_and_verify_svn(None, None, [],
                                      'switch', sbox.repo_url + '/A',
-                                     os.path.join(wc_dir, 'A', 'B'),
+                                     sbox.ospath('A/B'),
                                      '--ignore-ancestry')
 
   # Lock location 1
@@ -1490,8 +1458,8 @@ def lock_path_not_in_head(sbox):
   sbox.build()
   wc_dir = sbox.wc_dir
 
-  D_path      = os.path.join(wc_dir, 'A', 'D')
-  lambda_path = os.path.join(wc_dir, 'A', 'B', 'lambda')
+  D_path      = sbox.ospath('A/D')
+  lambda_path = sbox.ospath('A/B/lambda')
 
   # Commit deletion of A/D and A/B/lambda as r2, then update the WC
   # back to r1.  Then attempt to lock some paths that no longer exist
@@ -1529,9 +1497,9 @@ def verify_path_escaping(sbox):
 
   # Add test paths using two characters that need escaping in a url, but
   # are within the normal ascii range
-  file1 = os.path.join(wc_dir, 'file #1')
-  file2 = os.path.join(wc_dir, 'file #2')
-  file3 = os.path.join(wc_dir, 'file #3')
+  file1 = sbox.ospath('file #1')
+  file2 = sbox.ospath('file #2')
+  file3 = sbox.ospath('file #3')
 
   svntest.main.file_write(file1, 'File 1')
   svntest.main.file_write(file2, 'File 2')
@@ -1568,9 +1536,9 @@ def replace_and_propset_locked_path(sbox
   sbox.build()
   wc_dir = sbox.wc_dir
 
-  mu_path = os.path.join(wc_dir, 'A', 'mu')
-  G_path = os.path.join(wc_dir, 'A', 'D', 'G')
-  rho_path = os.path.join(G_path, 'rho')
+  mu_path = sbox.ospath('A/mu')
+  G_path = sbox.ospath('A/D/G')
+  rho_path = sbox.ospath('A/D/G/rho')
 
   # Lock mu and A/D/G/rho.
   svntest.actions.run_and_verify_svn(None, None, [],
@@ -1617,10 +1585,10 @@ def cp_isnt_ro(sbox):
   wc_dir = sbox.wc_dir
 
   mu_URL = sbox.repo_url + '/A/mu'
-  mu_path = os.path.join(wc_dir, 'A', 'mu')
-  mu2_path = os.path.join(wc_dir, 'A', 'mu2')
-  mu3_path = os.path.join(wc_dir, 'A', 'mu3')
-  kappa_path = os.path.join(wc_dir, 'kappa')
+  mu_path = sbox.ospath('A/mu')
+  mu2_path = sbox.ospath('A/mu2')
+  mu3_path = sbox.ospath('A/mu3')
+  kappa_path = sbox.ospath('kappa')
   open(kappa_path, 'w').write("This is the file 'kappa'.\n")
 
   ## added file
@@ -1693,6 +1661,12 @@ def update_locked_deleted(sbox):
   expected_status.tweak('iota', 'A/mu', 'A/B/E/alpha',
                         status='D ', writelocked='O')
 
+  expected_output = svntest.wc.State(wc_dir, {
+    'A/mu'              : Item(status='B '),
+    'A/B/E/alpha'       : Item(status='B '),
+    'iota'              : Item(status='B '),
+  })
+
   svntest.actions.run_and_verify_update(wc_dir, expected_output,
                                         None, expected_status)
 
@@ -1708,7 +1682,7 @@ def block_unlock_if_pre_unlock_hook_fail
   svntest.actions.create_failing_hook(repo_dir, "pre-unlock", "error text")
 
   # lock a file.
-  pi_path = os.path.join(wc_dir, 'A', 'D', 'G', 'pi')
+  pi_path = sbox.ospath('A/D/G/pi')
   expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
   expected_status.tweak('A/D/G/pi', writelocked='K')
 

Modified: subversion/branches/compressed-pristines/subversion/tests/cmdline/log_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/compressed-pristines/subversion/tests/cmdline/log_tests.py?rev=1373783&r1=1373782&r2=1373783&view=diff
==============================================================================
--- subversion/branches/compressed-pristines/subversion/tests/cmdline/log_tests.py (original)
+++ subversion/branches/compressed-pristines/subversion/tests/cmdline/log_tests.py Thu Aug 16 10:17:48 2012
@@ -391,25 +391,16 @@ def merge_history_repos(sbox):
   svntest.main.run_svn(None, 'ci', '-m',
                        "Modify 'mu' on branches/c.")
 
-  # Merge branches/c to trunk, which produces a conflict - r17
+  # Merge branches/c to trunk - r17
   #
   # Mergeinfo changes on /trunk:
   #    Merged /branches/c:r5-16
   os.chdir('trunk')
-  svntest.main.run_svn(None, 'merge', '--allow-mixed-revisions',
+  svntest.main.run_svn(None, 'up')
+  svntest.main.run_svn(None, 'merge', '--reintegrate',
                        os.path.join('..', branch_c) + '@HEAD')
-  svntest.main.file_write(os.path.join('A', 'mu'),
-                          "This is the file 'mu'.\n" +
-                          "Don't forget to look at 'upsilon', as well.\n" +
-                          "This is yet more content in 'mu'.",
-                          "wb")
-  # Resolve conflicts, and commit
-  svntest.actions.run_and_verify_resolved([os.path.join('A', 'mu'),
-                                           os.path.join('A', 'xi'),
-                                           os.path.join('A', 'upsilon')])
   svntest.main.run_svn(None, 'ci', '-m',
-                       "Merge branches/c to trunk, " +
-                       "resolving a conflict in 'mu'.",
+                       "Merge branches/c to trunk.",
                        '--username', svntest.main.wc_author2)
   os.chdir('..')
 
@@ -2218,7 +2209,6 @@ def log_xml_old(sbox):
 
 
 @Issue(4153)
-@XFail(svntest.main.is_ra_type_dav)
 def log_diff_moved(sbox):
   "log --diff on moved file"
 
@@ -2234,7 +2224,7 @@ def log_diff_moved(sbox):
   mu_at_1 = sbox.repo_url + '/A/mu@1'
   mu3_at_3 = sbox.repo_url + '/A/mu3@3'
 
-  r1diff = [make_diff_header('A/mu', 'revision 0', 'revision 1')
+  r1diff = [make_diff_header('mu', 'revision 0', 'revision 1')
             + ["@@ -0,0 +1 @@\n",
                "+This is the file 'mu'.\n"]]
 
@@ -2290,6 +2280,55 @@ def log_diff_moved(sbox):
   compare_diff_output(r2diff, log_chain[1]['diff_lines'])
   compare_diff_output(r1diff, log_chain[2]['diff_lines'])
 
+
+#----------------------------------------------------------------------
+def log_search(sbox):
+  "'svn log --search'"
+
+  guarantee_repos_and_wc(sbox)
+
+  os.chdir(sbox.wc_dir)
+
+  exit_code, output, err = svntest.actions.run_and_verify_svn(
+                             None, None, [], 'log', '--search',
+                             'for revision [367]')
+
+  log_chain = parse_log_output(output)
+  check_log_chain(log_chain, [7, 6, 3])
+
+  # case-insensitive search
+  exit_code, output, err = svntest.actions.run_and_verify_svn(
+                             None, None, [], 'log', '--isearch',
+                             'FOR REVISION [367]')
+
+  log_chain = parse_log_output(output)
+  check_log_chain(log_chain, [7, 6, 3])
+
+@SkipUnless(server_has_mergeinfo)
+def merge_sensitive_log_with_search(sbox):
+  "test 'svn log -g --search'"
+
+  merge_history_repos(sbox)
+
+  TRUNK_path = os.path.join(sbox.wc_dir, "trunk")
+
+  # Run log -g on a non-copying revision that adds mergeinfo,
+  # and perform a search that only matches the merged revision
+  exit_code, output, err = svntest.actions.run_and_verify_svn(None, None, [],
+                                                              'log', '-g',
+                                                              '-r6',
+                                                              '--search',
+                                                              'upsilon',
+                                                              TRUNK_path)
+
+  # Parse and check output. The only revision should be r4 (the merge rev).
+  log_chain = parse_log_output(output)
+  expected_merges = {
+    4 : [6],
+  }
+  check_merge_results(log_chain, expected_merges)
+
+
 ########################################################################
 # Run the tests
 
@@ -2333,6 +2372,8 @@ test_list = [ None,
               log_diff,
               log_xml_old,
               log_diff_moved,
+              log_search,
+              merge_sensitive_log_with_search,
              ]
 
 if __name__ == '__main__':