subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gst...@apache.org
Subject svn commit: r1330582 [1/4] - /subversion/trunk/subversion/tests/cmdline/
Date Wed, 25 Apr 2012 22:03:09 GMT
Author: gstein
Date: Wed Apr 25 22:03:08 2012
New Revision: 1330582

URL: http://svn.apache.org/viewvc?rev=1330582&view=rev
Log:
Programmatically rewrite a bunch of tests using sbox-ospath.py. Below
is a table of each test rewritten, and how many automated rewrites
were performed for that test.

  TEST               REWRITES
  basic              76
  commit             105
  copy               231
  depth              24, 3 undone
  diff               56
  externals          92
  merge_reintegrate  96
  patch              119
  stat               32
  switch             98, 8 undone
  update             105

* subversion/tests/cmdline/commit_tests.py:
* subversion/tests/cmdline/externals_tests.py:
* subversion/tests/cmdline/patch_tests.py:
* subversion/tests/cmdline/switch_tests.py:
* subversion/tests/cmdline/diff_tests.py:
* subversion/tests/cmdline/basic_tests.py:
* subversion/tests/cmdline/merge_reintegrate_tests.py:
* subversion/tests/cmdline/depth_tests.py:
* subversion/tests/cmdline/copy_tests.py:
* subversion/tests/cmdline/stat_tests.py:
* subversion/tests/cmdline/update_tests.py:
  (...): rewrite os.path.join() calls to sbox.ospath()

Modified:
    subversion/trunk/subversion/tests/cmdline/basic_tests.py
    subversion/trunk/subversion/tests/cmdline/commit_tests.py
    subversion/trunk/subversion/tests/cmdline/copy_tests.py
    subversion/trunk/subversion/tests/cmdline/depth_tests.py
    subversion/trunk/subversion/tests/cmdline/diff_tests.py
    subversion/trunk/subversion/tests/cmdline/externals_tests.py
    subversion/trunk/subversion/tests/cmdline/merge_reintegrate_tests.py
    subversion/trunk/subversion/tests/cmdline/patch_tests.py
    subversion/trunk/subversion/tests/cmdline/stat_tests.py
    subversion/trunk/subversion/tests/cmdline/switch_tests.py
    subversion/trunk/subversion/tests/cmdline/update_tests.py

Modified: subversion/trunk/subversion/tests/cmdline/basic_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/basic_tests.py?rev=1330582&r1=1330581&r2=1330582&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/basic_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/basic_tests.py Wed Apr 25 22:03:08 2012
@@ -67,11 +67,11 @@ def basic_checkout(sbox):
                                      wc_dir)
 
   # Make some changes to the working copy
-  mu_path = os.path.join(wc_dir, 'A', 'mu')
+  mu_path = sbox.ospath('A/mu')
   svntest.main.file_append(mu_path, 'appended mu text')
-  lambda_path = os.path.join(wc_dir, 'A', 'B', 'lambda')
+  lambda_path = sbox.ospath('A/B/lambda')
   os.remove(lambda_path)
-  G_path = os.path.join(wc_dir, 'A', 'D', 'G')
+  G_path = sbox.ospath('A/D/G')
 
   svntest.actions.run_and_verify_svn(None, None, [], 'rm', G_path)
 
@@ -110,7 +110,7 @@ def basic_status(sbox):
 
   svntest.actions.run_and_verify_status(wc_dir, output)
 
-  os.chdir(os.path.join(wc_dir, 'A'))
+  os.chdir(sbox.ospath('A'))
   output = svntest.actions.get_virginal_state("..", 1)
   svntest.actions.run_and_verify_status("..", output)
 
@@ -123,8 +123,8 @@ def basic_commit(sbox):
   wc_dir = sbox.wc_dir
 
   # Make a couple of local mods to files
-  mu_path = os.path.join(wc_dir, 'A', 'mu')
-  rho_path = os.path.join(wc_dir, 'A', 'D', 'G', 'rho')
+  mu_path = sbox.ospath('A/mu')
+  rho_path = sbox.ospath('A/D/G/rho')
   svntest.main.file_append(mu_path, 'appended mu text')
   svntest.main.file_append(rho_path, 'new appended text for rho')
 
@@ -159,8 +159,8 @@ def basic_update(sbox):
   svntest.actions.duplicate_dir(wc_dir, wc_backup)
 
   # Make a couple of local mods to files
-  mu_path = os.path.join(wc_dir, 'A', 'mu')
-  rho_path = os.path.join(wc_dir, 'A', 'D', 'G', 'rho')
+  mu_path = sbox.ospath('A/mu')
+  rho_path = sbox.ospath('A/D/G/rho')
   svntest.main.file_append(mu_path, 'appended mu text')
   svntest.main.file_append(rho_path, 'new appended text for rho')
 
@@ -205,7 +205,7 @@ def basic_update(sbox):
 
   # Unversioned paths, those that are not immediate children of a versioned
   # path, are skipped and do not raise an error
-  xx_path = os.path.join(wc_dir, 'xx', 'xx')
+  xx_path = sbox.ospath('xx/xx')
   exit_code, out, err = svntest.actions.run_and_verify_svn(
     "update xx/xx",
     ["Skipped '"+xx_path+"'\n",
@@ -326,7 +326,7 @@ def basic_mkdir_wc_with_parents(sbox):
   sbox.build()
   wc_dir = sbox.wc_dir
 
-  Y_Z_path = os.path.join(wc_dir, 'Y', 'Z')
+  Y_Z_path = sbox.ospath('Y/Z')
 
   svntest.actions.run_and_verify_svn("erroneous mkdir dir/subdir", [],
                                      ".*Try 'svn mkdir --parents' instead.*",
@@ -372,7 +372,7 @@ def basic_corruption(sbox):
   svntest.actions.duplicate_dir(wc_dir, other_wc)
 
   # Make a local mod to mu
-  mu_path = os.path.join(wc_dir, 'A', 'mu')
+  mu_path = sbox.ospath('A/mu')
   svntest.main.file_append(mu_path, 'appended mu text')
 
   # Created expected output tree for 'svn ci'
@@ -476,8 +476,8 @@ def basic_merging_update(sbox):
   wc_dir = sbox.wc_dir
 
   # First change the greek tree to make two files 10 lines long
-  mu_path = os.path.join(wc_dir, 'A', 'mu')
-  rho_path = os.path.join(wc_dir, 'A', 'D', 'G', 'rho')
+  mu_path = sbox.ospath('A/mu')
+  rho_path = sbox.ospath('A/D/G/rho')
   mu_text = ""
   rho_text = ""
   for x in range(2,11):
@@ -582,8 +582,8 @@ def basic_conflict(sbox):
   svntest.actions.duplicate_dir(wc_dir, wc_backup)
 
   # Make a couple of local mods to files which will be committed
-  mu_path = os.path.join(wc_dir, 'A', 'mu')
-  rho_path = os.path.join(wc_dir, 'A', 'D', 'G', 'rho')
+  mu_path = sbox.ospath('A/mu')
+  rho_path = sbox.ospath('A/D/G/rho')
   svntest.main.file_append(mu_path, 'Original appended text for mu\n')
   svntest.main.file_append(rho_path, 'Original appended text for rho\n')
 
@@ -689,9 +689,9 @@ def basic_cleanup(sbox):
   wc_dir = sbox.wc_dir
 
   # Lock some directories.
-  B_path = os.path.join(wc_dir, 'A', 'B')
-  G_path = os.path.join(wc_dir, 'A', 'D', 'G')
-  C_path = os.path.join(wc_dir, 'A', 'C')
+  B_path = sbox.ospath('A/B')
+  G_path = sbox.ospath('A/D/G')
+  C_path = sbox.ospath('A/C')
   svntest.actions.lock_admin_dir(B_path)
   svntest.actions.lock_admin_dir(G_path)
   svntest.actions.lock_admin_dir(C_path)
@@ -727,11 +727,11 @@ def basic_revert(sbox):
   wc_dir = sbox.wc_dir
 
   # Modify some files and props.
-  beta_path = os.path.join(wc_dir, 'A', 'B', 'E', 'beta')
-  gamma_path = os.path.join(wc_dir, 'A', 'D', 'gamma')
-  iota_path = os.path.join(wc_dir, 'iota')
-  rho_path = os.path.join(wc_dir, 'A', 'D', 'G', 'rho')
-  zeta_path = os.path.join(wc_dir, 'A', 'D', 'H', 'zeta')
+  beta_path = sbox.ospath('A/B/E/beta')
+  gamma_path = sbox.ospath('A/D/gamma')
+  iota_path = sbox.ospath('iota')
+  rho_path = sbox.ospath('A/D/G/rho')
+  zeta_path = sbox.ospath('A/D/H/zeta')
   svntest.main.file_append(beta_path, "Added some text to 'beta'.\n")
   svntest.main.file_append(iota_path, "Added some text to 'iota'.\n")
   svntest.main.file_append(rho_path, "Added some text to 'rho'.\n")
@@ -808,7 +808,7 @@ def basic_revert(sbox):
 
   # Check that a directory scheduled to be added, but physically
   # removed, can be reverted.
-  X_path = os.path.join(wc_dir, 'X')
+  X_path = sbox.ospath('X')
 
   svntest.actions.run_and_verify_svn(None, None, [], 'mkdir', X_path)
 
@@ -826,7 +826,7 @@ def basic_revert(sbox):
 
   # Check that a directory scheduled for deletion, but physically
   # removed, can be reverted.
-  E_path = os.path.join(wc_dir, 'A', 'B', 'E')
+  E_path = sbox.ospath('A/B/E')
   expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
 
   ### Most of the rest of this test is ineffective, due to the
@@ -892,7 +892,7 @@ def basic_switch(sbox):
   ### Switch the file `iota' to `A/D/gamma'.
 
   # Construct some paths for convenience
-  iota_path = os.path.join(wc_dir, 'iota')
+  iota_path = sbox.ospath('iota')
   gamma_url = sbox.repo_url + '/A/D/gamma'
 
   # Create expected output tree
@@ -926,7 +926,7 @@ def basic_switch(sbox):
   ### Switch the directory `A/D/H' to `A/D/G'.
 
   # Construct some paths for convenience
-  ADH_path = os.path.join(wc_dir, 'A', 'D', 'H')
+  ADH_path = sbox.ospath('A/D/H')
   chi_path = os.path.join(ADH_path, 'chi')
   omega_path = os.path.join(ADH_path, 'omega')
   psi_path = os.path.join(ADH_path, 'psi')
@@ -1009,22 +1009,22 @@ def basic_delete(sbox):
   wc_dir = sbox.wc_dir
 
   # modify text of chi
-  chi_parent_path = os.path.join(wc_dir, 'A', 'D', 'H')
+  chi_parent_path = sbox.ospath('A/D/H')
   chi_path = os.path.join(chi_parent_path, 'chi')
   svntest.main.file_append(chi_path, 'added to chi')
 
   # modify props of rho (file)
-  rho_parent_path = os.path.join(wc_dir, 'A', 'D', 'G')
+  rho_parent_path = sbox.ospath('A/D/G')
   rho_path = os.path.join(rho_parent_path, 'rho')
   svntest.main.run_svn(None, 'ps', 'abc', 'def', rho_path)
 
   # modify props of F (dir)
-  F_parent_path = os.path.join(wc_dir, 'A', 'B')
+  F_parent_path = sbox.ospath('A/B')
   F_path = os.path.join(F_parent_path, 'F')
   svntest.main.run_svn(None, 'ps', 'abc', 'def', F_path)
 
   # unversioned file
-  sigma_parent_path = os.path.join(wc_dir, 'A', 'C')
+  sigma_parent_path = sbox.ospath('A/C')
   sigma_path = os.path.join(sigma_parent_path, 'sigma')
   svntest.main.file_append(sigma_path, 'unversioned sigma')
 
@@ -1034,13 +1034,13 @@ def basic_delete(sbox):
   os.mkdir(Q_path)
 
   # added directory hierarchies
-  X_parent_path =  os.path.join(wc_dir, 'A', 'B')
+  X_parent_path =  sbox.ospath('A/B')
   X_path = os.path.join(X_parent_path, 'X')
   svntest.main.run_svn(None, 'mkdir', X_path)
   X_child_path = os.path.join(X_path, 'xi')
   svntest.main.file_append(X_child_path, 'added xi')
   svntest.main.run_svn(None, 'add', X_child_path)
-  Y_parent_path = os.path.join(wc_dir, 'A', 'D')
+  Y_parent_path = sbox.ospath('A/D')
   Y_path = os.path.join(Y_parent_path, 'Y')
   svntest.main.run_svn(None, 'mkdir', Y_path)
 
@@ -1089,7 +1089,7 @@ def basic_delete(sbox):
   svntest.actions.run_and_verify_status(wc_dir, expected_output)
 
   # 'svn rm' that should work
-  E_path =  os.path.join(wc_dir, 'A', 'B', 'E')
+  E_path =  sbox.ospath('A/B/E')
   svntest.actions.run_and_verify_svn(None, None, [], 'rm', E_path)
 
   # 'svn rm --force' that should work
@@ -1109,13 +1109,13 @@ def basic_delete(sbox):
                                      'rm', '--force', X_path)
 
   # Deleting already removed from wc versioned item with --force
-  iota_path = os.path.join(wc_dir, 'iota')
+  iota_path = sbox.ospath('iota')
   os.remove(iota_path)
   svntest.actions.run_and_verify_svn(None, None, [],
                                      'rm', '--force', iota_path)
 
   # and without --force
-  gamma_path = os.path.join(wc_dir, 'A', 'D', 'gamma')
+  gamma_path = sbox.ospath('A/D/gamma')
   os.remove(gamma_path)
   svntest.actions.run_and_verify_svn(None, None, [], 'rm', gamma_path)
 
@@ -1179,7 +1179,7 @@ def basic_delete(sbox):
     raise svntest.Failure
 
   # Deleting unversioned file explicitly
-  foo_path = os.path.join(wc_dir, 'foo')
+  foo_path = sbox.ospath('foo')
   svntest.main.file_append(foo_path, 'unversioned foo')
   svntest.actions.run_and_verify_svn(None, None, [],
                                      'rm', '--force', foo_path)
@@ -1208,7 +1208,7 @@ def basic_checkout_deleted(sbox):
   wc_dir = sbox.wc_dir
 
   # Delete A/D and commit.
-  D_path = os.path.join(wc_dir, 'A', 'D')
+  D_path = sbox.ospath('A/D')
   svntest.actions.run_and_verify_svn("error scheduling A/D for deletion",
                                      None, [], 'rm', '--force', D_path)
 
@@ -1227,7 +1227,7 @@ def basic_checkout_deleted(sbox):
 
   # Now try to checkout revision 1 of A/D.
   url = sbox.repo_url + '/A/D'
-  wc2 = os.path.join(sbox.wc_dir, 'new_D')
+  wc2 = sbox.ospath('new_D')
   svntest.actions.run_and_verify_svn("error checking out r1 of A/D",
                                      None, [], 'co', '-r', '1',
                                      url + "@1", wc2)
@@ -1244,7 +1244,7 @@ def basic_node_kind_change(sbox):
   wc_dir = sbox.wc_dir
 
   # Schedule a file for deletion
-  gamma_path = os.path.join(wc_dir, 'A', 'D', 'gamma')
+  gamma_path = sbox.ospath('A/D/gamma')
   svntest.main.run_svn(None, 'rm', gamma_path)
 
   # Status shows deleted file
@@ -1299,7 +1299,7 @@ def basic_import(sbox):
   wc_dir = sbox.wc_dir
 
   # create a new directory with files of various permissions
-  new_path = os.path.join(wc_dir, 'new_file')
+  new_path = sbox.ospath('new_file')
 
   svntest.main.file_append(new_path, "some text")
 
@@ -1357,7 +1357,7 @@ def basic_cat(sbox):
   sbox.build(read_only = True)
   wc_dir = sbox.wc_dir
 
-  mu_path = os.path.join(wc_dir, 'A', 'mu')
+  mu_path = sbox.ospath('A/mu')
 
   # Get repository text even if wc is modified
   svntest.main.file_append(mu_path, "some text")
@@ -1393,22 +1393,22 @@ def basic_ls(sbox):
   svntest.actions.run_and_verify_svn('ls a working copy directory',
                                      ['B/\n', 'C/\n', 'D/\n', 'mu\n'],
                                      [], 'ls',
-                                     os.path.join(wc_dir, 'A'))
+                                     sbox.ospath('A'))
 
   svntest.actions.run_and_verify_svn('ls working copy directory with -r BASE',
                                      ['B/\n', 'C/\n', 'D/\n', 'mu\n'],
                                      [], 'ls', '-r', 'BASE',
-                                     os.path.join(wc_dir, 'A'))
+                                     sbox.ospath('A'))
 
   svntest.actions.run_and_verify_svn('ls a single file',
                                      ['mu\n'],
                                      [], 'ls',
-                                     os.path.join(wc_dir, 'A', 'mu'))
+                                     sbox.ospath('A/mu'))
 
   svntest.actions.run_and_verify_svn('recursive ls',
                                      ['E/\n', 'E/alpha\n', 'E/beta\n', 'F/\n',
                                       'lambda\n' ], [], 'ls', '-R',
-                                     os.path.join(wc_dir, 'A', 'B'))
+                                     sbox.ospath('A/B'))
 
 
 #----------------------------------------------------------------------
@@ -1474,16 +1474,16 @@ def basic_auth_cache(sbox):
                                      repo_url, wc_dir)
 
   # Failed with "not locked" error on missing directory
-  svntest.main.safe_rmtree(os.path.join(wc_dir, 'A', 'B', 'E'))
+  svntest.main.safe_rmtree(sbox.ospath('A/B/E'))
   svntest.actions.run_and_verify_svn(None, None, [],
                                      'status', '-u',
-                                     os.path.join(wc_dir, 'A', 'B'))
+                                     sbox.ospath('A/B'))
 
   # Failed with "already locked" error on new dir
   svntest.actions.run_and_verify_svn(None, None, [],
                                      'copy',
                                      repo_url + '/A/B/E',
-                                     os.path.join(wc_dir, 'A', 'D', 'G'))
+                                     sbox.ospath('A/D/G'))
 
 
 #----------------------------------------------------------------------
@@ -1500,7 +1500,7 @@ def basic_add_ignores(sbox):
   sbox.build(read_only = True)
   wc_dir = sbox.wc_dir
 
-  dir_path = os.path.join(wc_dir, 'dir')
+  dir_path = sbox.ospath('dir')
   foo_c_path = os.path.join(dir_path, 'foo.c')
   foo_o_path = os.path.join(dir_path, 'foo.o')
 
@@ -1530,7 +1530,7 @@ def basic_add_local_ignores(sbox):
   sbox.build(read_only = True)
   wc_dir = sbox.wc_dir
 
-  dir_path = os.path.join(wc_dir, 'dir')
+  dir_path = sbox.ospath('dir')
   file_path = os.path.join(dir_path, 'app.lock')
 
   svntest.actions.run_and_verify_svn(None, svntest.verify.AnyOutput, [],
@@ -1548,7 +1548,7 @@ def basic_add_no_ignores(sbox):
   sbox.build(read_only = True)
   wc_dir = sbox.wc_dir
 
-  dir_path = os.path.join(wc_dir, 'dir')
+  dir_path = sbox.ospath('dir')
   foo_c_path = os.path.join(dir_path, 'foo.c')
   # add a few files that match the default ignore patterns
   foo_o_path = os.path.join(dir_path, 'foo.o')
@@ -1577,7 +1577,7 @@ def basic_add_parents(sbox):
   sbox.build()
   wc_dir = sbox.wc_dir
 
-  X_path = os.path.join(wc_dir, 'X')
+  X_path = sbox.ospath('X')
   Y_path = os.path.join(X_path, 'Y')
   Z_path = os.path.join(Y_path, 'Z')
   zeta_path = os.path.join(Z_path, 'zeta')
@@ -1778,7 +1778,7 @@ def info_nonhead(sbox):
 
   wc_dir = sbox.wc_dir
   repo_url = sbox.repo_url
-  fname = os.path.join(wc_dir, 'iota')
+  fname = sbox.ospath('iota')
   furl = repo_url + "/iota"
 
   # Remove iota and commit.
@@ -1811,7 +1811,7 @@ def ls_nonhead(sbox):
   wc_dir = sbox.wc_dir
 
   # Delete A/D/rho and commit.
-  G_path = os.path.join(wc_dir, 'A', 'D', 'G')
+  G_path = sbox.ospath('A/D/G')
   svntest.actions.run_and_verify_svn("error scheduling A/D/G for deletion",
                                      None, [], 'rm', G_path)
 
@@ -1840,7 +1840,7 @@ def cat_added_PREV(sbox):
 
   sbox.build(read_only = True)
   wc_dir = sbox.wc_dir
-  f_path = os.path.join(wc_dir, 'f')
+  f_path = sbox.ospath('f')
 
   # Create and add a file.
   svntest.main.file_append(f_path, 'new text')
@@ -1871,8 +1871,8 @@ def delete_keep_local(sbox):
 
   sbox.build()
   wc_dir = sbox.wc_dir
-  iota_path = os.path.join(wc_dir, 'iota')
-  C_path = os.path.join(wc_dir, 'A', 'C')
+  iota_path = sbox.ospath('iota')
+  C_path = sbox.ospath('A/C')
 
   # Remove file iota
   svntest.actions.run_and_verify_svn(None, None, [], 'rm', '--keep-local',
@@ -1914,7 +1914,7 @@ def delete_keep_local_twice(sbox):
   sbox.build()
   wc_dir = sbox.wc_dir
 
-  dir = os.path.join(wc_dir, 'dir')
+  dir = sbox.ospath('dir')
 
   svntest.actions.run_and_verify_svn(None, None, [], 'mkdir', dir)
 
@@ -2066,11 +2066,11 @@ def automatic_conflict_resolution(sbox):
   svntest.actions.duplicate_dir(wc_dir, wc_backup)
 
   # Make a couple of local mods to files which will be committed
-  mu_path = os.path.join(wc_dir, 'A', 'mu')
-  lambda_path = os.path.join(wc_dir, 'A', 'B', 'lambda')
-  rho_path = os.path.join(wc_dir, 'A', 'D', 'G', 'rho')
-  tau_path = os.path.join(wc_dir, 'A', 'D', 'G', 'tau')
-  omega_path = os.path.join(wc_dir, 'A', 'D', 'H', 'omega')
+  mu_path = sbox.ospath('A/mu')
+  lambda_path = sbox.ospath('A/B/lambda')
+  rho_path = sbox.ospath('A/D/G/rho')
+  tau_path = sbox.ospath('A/D/G/tau')
+  omega_path = sbox.ospath('A/D/H/omega')
   svntest.main.file_append(mu_path, 'Original appended text for mu\n')
   svntest.main.file_append(lambda_path, 'Original appended text for lambda\n')
   svntest.main.file_append(rho_path, 'Original appended text for rho\n')
@@ -2319,7 +2319,7 @@ def basic_relative_url_using_current_dir
   sbox.build()
 
   # First, make a new revision of iota.
-  iota = os.path.join(sbox.wc_dir, 'iota')
+  iota = sbox.ospath('iota')
   svntest.main.file_append(iota, "New contents for iota\n")
   svntest.main.run_svn(None, 'ci',
                        '-m', '', iota)
@@ -2344,13 +2344,13 @@ def basic_relative_url_using_other_targe
   sbox.build()
 
   # First, make a new revision of iota.
-  iota = os.path.join(sbox.wc_dir, 'iota')
+  iota = sbox.ospath('iota')
   svntest.main.file_append(iota, "New contents for iota\n")
   svntest.main.run_svn(None, 'ci',
                        '-m', '', iota)
 
   # Now, make a new revision of A/mu .
-  mu = os.path.join(sbox.wc_dir, 'A', 'mu')
+  mu = sbox.ospath('A/mu')
   mu_url = sbox.repo_url + '/A/mu'
 
   svntest.main.file_append(mu, "New contents for mu\n")
@@ -2422,7 +2422,7 @@ def basic_relative_url_with_peg_revision
   sbox.build()
 
   # First, make a new revision of iota.
-  iota = os.path.join(sbox.wc_dir, 'iota')
+  iota = sbox.ospath('iota')
   svntest.main.file_append(iota, "New contents for iota\n")
   svntest.main.run_svn(None, 'ci',
                        '-m', '', iota)
@@ -2430,7 +2430,7 @@ def basic_relative_url_with_peg_revision
   iota_url = sbox.repo_url + '/iota'
 
   # Now, make a new revision of A/mu .
-  mu = os.path.join(sbox.wc_dir, 'A', 'mu')
+  mu = sbox.ospath('A/mu')
   mu_url = sbox.repo_url + '/A/mu'
 
   svntest.main.file_append(mu, "New contents for mu\n")
@@ -2565,8 +2565,8 @@ def delete_and_add_same_file(sbox):
 
   wc_dir = sbox.wc_dir
 
-  iota = os.path.join(wc_dir, 'iota')
-  iota2 = os.path.join(wc_dir, 'iota2')
+  iota = sbox.ospath('iota')
+  iota2 = sbox.ospath('iota2')
 
   shutil.copyfile(iota, iota2)
 
@@ -2727,7 +2727,7 @@ def ls_multiple_and_non_existent_targets
 
   def non_existent_wc_target():
     "non-existent wc target"
-    non_existent_path = os.path.join(wc_dir, 'non-existent')
+    non_existent_path = sbox.ospath('non-existent')
 
     expected_err = ".*W155010.*"
     svntest.actions.run_and_verify_svn2(None, None, expected_err,
@@ -2745,7 +2745,7 @@ def ls_multiple_and_non_existent_targets
 
     alpha = sbox.ospath('A/B/E/alpha')
     beta = sbox.ospath('A/B/E/beta')
-    non_existent_path = os.path.join(wc_dir, 'non-existent')
+    non_existent_path = sbox.ospath('non-existent')
 
     # All targets are existing
     svntest.actions.run_and_verify_svn2(None, None, [],
@@ -2799,7 +2799,7 @@ def add_multiple_targets(sbox):
 
   file1 = sbox.ospath('file1')
   file2 = sbox.ospath('file2')
-  non_existent_path = os.path.join(wc_dir, 'non-existent')
+  non_existent_path = sbox.ospath('non-existent')
 
   svntest.main.file_write(file1, "file1 contents", 'w+')
   svntest.main.file_write(file2, "file2 contents", 'w+')
@@ -2898,8 +2898,8 @@ def rm_missing_with_case_clashing_ondisk
   sbox.build(read_only = True)
   wc_dir = sbox.wc_dir
 
-  iota_path = os.path.join(wc_dir, 'iota')
-  IOTA_path = os.path.join(wc_dir, 'IOTA')
+  iota_path = sbox.ospath('iota')
+  IOTA_path = sbox.ospath('IOTA')
 
   # Out-of-svn move, to make iota missing, while IOTA appears as unversioned.
   os.rename(iota_path, IOTA_path)

Modified: subversion/trunk/subversion/tests/cmdline/commit_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/commit_tests.py?rev=1330582&r1=1330581&r2=1330582&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/commit_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/commit_tests.py Wed Apr 25 22:03:08 2012
@@ -160,7 +160,7 @@ def commit_one_file(sbox):
 
   expected_status = make_standard_slew_of_changes(wc_dir)
 
-  omega_path = os.path.join(wc_dir, 'A', 'D', 'H', 'omega')
+  omega_path = sbox.ospath('A/D/H/omega')
 
   # Create expected state.
   expected_output = svntest.wc.State(wc_dir, {
@@ -186,7 +186,7 @@ def commit_one_new_file(sbox):
 
   expected_status = make_standard_slew_of_changes(wc_dir)
 
-  gloo_path = os.path.join(wc_dir, 'A', 'D', 'H', 'gloo')
+  gloo_path = sbox.ospath('A/D/H/gloo')
 
   # Create expected state.
   expected_output = svntest.wc.State(wc_dir, {
@@ -212,7 +212,7 @@ def commit_one_new_binary_file(sbox):
 
   expected_status = make_standard_slew_of_changes(wc_dir)
 
-  gloo_path = os.path.join(wc_dir, 'A', 'D', 'H', 'gloo')
+  gloo_path = sbox.ospath('A/D/H/gloo')
   svntest.main.run_svn(None, 'propset', 'svn:mime-type',
                        'application/octet-stream', gloo_path)
 
@@ -241,12 +241,12 @@ def commit_multiple_targets(sbox):
   # This test will commit three targets:  psi, B, and pi.  In that order.
 
   # Make local mods to many files.
-  AB_path = os.path.join(wc_dir, 'A', 'B')
-  lambda_path = os.path.join(wc_dir, 'A', 'B', 'lambda')
-  rho_path = os.path.join(wc_dir, 'A', 'D', 'G', 'rho')
-  pi_path = os.path.join(wc_dir, 'A', 'D', 'G', 'pi')
-  omega_path = os.path.join(wc_dir, 'A', 'D', 'H', 'omega')
-  psi_path = os.path.join(wc_dir, 'A', 'D', 'H', 'psi')
+  AB_path = sbox.ospath('A/B')
+  lambda_path = sbox.ospath('A/B/lambda')
+  rho_path = sbox.ospath('A/D/G/rho')
+  pi_path = sbox.ospath('A/D/G/pi')
+  omega_path = sbox.ospath('A/D/H/omega')
+  psi_path = sbox.ospath('A/D/H/psi')
   svntest.main.file_append(lambda_path, 'new appended text for lambda')
   svntest.main.file_append(rho_path, 'new appended text for rho')
   svntest.main.file_append(pi_path, 'new appended text for pi')
@@ -255,7 +255,7 @@ def commit_multiple_targets(sbox):
 
   # Just for kicks, add a property to A/D/G as well.  We'll make sure
   # that it *doesn't* get committed.
-  ADG_path = os.path.join(wc_dir, 'A', 'D', 'G')
+  ADG_path = sbox.ospath('A/D/G')
   svntest.main.run_svn(None, 'propset', 'foo', 'bar', ADG_path)
 
   # Create expected output tree for 'svn ci'.  We should see changes
@@ -295,12 +295,12 @@ def commit_multiple_targets_2(sbox):
   # This test will commit four targets:  psi, B, omega and pi.  In that order.
 
   # Make local mods to many files.
-  AB_path = os.path.join(wc_dir, 'A', 'B')
-  lambda_path = os.path.join(wc_dir, 'A', 'B', 'lambda')
-  rho_path = os.path.join(wc_dir, 'A', 'D', 'G', 'rho')
-  pi_path = os.path.join(wc_dir, 'A', 'D', 'G', 'pi')
-  omega_path = os.path.join(wc_dir, 'A', 'D', 'H', 'omega')
-  psi_path = os.path.join(wc_dir, 'A', 'D', 'H', 'psi')
+  AB_path = sbox.ospath('A/B')
+  lambda_path = sbox.ospath('A/B/lambda')
+  rho_path = sbox.ospath('A/D/G/rho')
+  pi_path = sbox.ospath('A/D/G/pi')
+  omega_path = sbox.ospath('A/D/H/omega')
+  psi_path = sbox.ospath('A/D/H/psi')
   svntest.main.file_append(lambda_path, 'new appended text for lambda')
   svntest.main.file_append(rho_path, 'new appended text for rho')
   svntest.main.file_append(pi_path, 'new appended text for pi')
@@ -309,7 +309,7 @@ def commit_multiple_targets_2(sbox):
 
   # Just for kicks, add a property to A/D/G as well.  We'll make sure
   # that it *doesn't* get committed.
-  ADG_path = os.path.join(wc_dir, 'A', 'D', 'G')
+  ADG_path = sbox.ospath('A/D/G')
   svntest.main.run_svn(None, 'propset', 'foo', 'bar', ADG_path)
 
   # Created expected output tree for 'svn ci'.  We should see changes
@@ -350,7 +350,7 @@ def commit_inclusive_dir(sbox):
 
   expected_status = make_standard_slew_of_changes(wc_dir)
 
-  D_path = os.path.join(wc_dir, 'A', 'D')
+  D_path = sbox.ospath('A/D')
 
   # Create expected state.
   expected_output = svntest.wc.State(wc_dir, {
@@ -440,7 +440,7 @@ def commit_unversioned_thing(sbox):
   wc_dir = sbox.wc_dir
 
   # Create an unversioned file in the wc.
-  svntest.main.file_append(os.path.join(wc_dir, 'blorg'), "nothing to see")
+  svntest.main.file_append(sbox.ospath('blorg'), "nothing to see")
 
   # Commit a non-existent file and *expect* failure:
   svntest.actions.run_and_verify_commit(wc_dir,
@@ -459,7 +459,7 @@ def nested_dir_replacements(sbox):
   sbox.build()
   wc_dir = sbox.wc_dir
 
-  A_D = os.path.join(wc_dir, 'A', 'D')
+  A_D = sbox.ospath('A/D')
 
   # Delete and re-add A/D (a replacement), and A/D/H (another replace).
   svntest.main.run_svn(None, 'rm', A_D)
@@ -542,7 +542,7 @@ def hudson_part_1(sbox):
   wc_dir = sbox.wc_dir
 
   # Remove gamma from the working copy.
-  gamma_path = os.path.join(wc_dir, 'A', 'D', 'gamma')
+  gamma_path = sbox.ospath('A/D/gamma')
   svntest.main.run_svn(None, 'rm', gamma_path)
 
   # Create expected commit output.
@@ -593,7 +593,7 @@ def hudson_part_1_variation_1(sbox):
   wc_dir = sbox.wc_dir
 
   # Remove H from the working copy.
-  H_path = os.path.join(wc_dir, 'A', 'D', 'H')
+  H_path = sbox.ospath('A/D/H')
   svntest.main.run_svn(None, 'rm', H_path)
 
   # Create expected commit output.
@@ -644,7 +644,7 @@ def hudson_part_1_variation_2(sbox):
   wc_dir = sbox.wc_dir
 
   # Remove gamma from the working copy.
-  gamma_path = os.path.join(wc_dir, 'A', 'D', 'gamma')
+  gamma_path = sbox.ospath('A/D/gamma')
   svntest.main.run_svn(None, 'rm', gamma_path)
 
   # Create expected commit output.
@@ -703,8 +703,8 @@ def hudson_part_2(sbox):
   wc_dir = sbox.wc_dir
 
   # Remove gamma from the working copy.
-  D_path = os.path.join(wc_dir, 'A', 'D')
-  gamma_path = os.path.join(wc_dir, 'A', 'D', 'gamma')
+  D_path = sbox.ospath('A/D')
+  gamma_path = sbox.ospath('A/D/gamma')
   svntest.main.run_svn(None, 'rm', gamma_path)
 
   # Create expected commit output.
@@ -751,8 +751,8 @@ def hudson_part_2_1(sbox):
   wc_dir = sbox.wc_dir
 
   # Move all the files in H to G
-  H_path = os.path.join(wc_dir, 'A', 'D', 'H')
-  G_path = os.path.join(wc_dir, 'A', 'D', 'G')
+  H_path = sbox.ospath('A/D/H')
+  G_path = sbox.ospath('A/D/G')
   chi_path = os.path.join(H_path, 'chi')
   psi_path = os.path.join(H_path, 'psi')
   omega_path = os.path.join(H_path, 'omega')
@@ -842,7 +842,7 @@ fp.close()"""
                                          hook_format % "post_commit_hook")
 
   # Modify iota just so there is something to commit.
-  iota_path = os.path.join(wc_dir, "iota")
+  iota_path = sbox.ospath('iota')
   svntest.main.file_append(iota_path, "More stuff in iota")
 
   # Commit, no output expected.
@@ -880,10 +880,10 @@ def merge_mixed_revisions(sbox):
   wc_dir = sbox.wc_dir
 
   # Make some convenient paths.
-  iota_path = os.path.join(wc_dir, 'iota')
-  H_path = os.path.join(wc_dir, 'A', 'D', 'H')
-  chi_path = os.path.join(wc_dir, 'A', 'D', 'H', 'chi')
-  omega_path = os.path.join(wc_dir, 'A', 'D', 'H', 'omega')
+  iota_path = sbox.ospath('iota')
+  H_path = sbox.ospath('A/D/H')
+  chi_path = sbox.ospath('A/D/H/chi')
+  omega_path = sbox.ospath('A/D/H/omega')
 
   # Here's the reproduction formula, in 5 parts.
   # Hoo, what a buildup of state!
@@ -1029,15 +1029,15 @@ def commit_uri_unsafe(sbox):
     nasty_name = '#![]{}()<>%'
 
   # Make some convenient paths.
-  hash_dir = os.path.join(wc_dir, '#hash#')
+  hash_dir = sbox.ospath('#hash#')
   nasty_dir = os.path.join(wc_dir, nasty_name)
-  space_path = os.path.join(wc_dir, 'A', 'D', 'space path')
-  bang_path = os.path.join(wc_dir, 'A', 'D', 'H', 'bang!')
-  bracket_path = os.path.join(wc_dir, 'A', 'D', 'H', 'bra[ket')
-  brace_path = os.path.join(wc_dir, 'A', 'D', 'H', 'bra{e')
+  space_path = sbox.ospath('A/D/space path')
+  bang_path = sbox.ospath('A/D/H/bang!')
+  bracket_path = sbox.ospath('A/D/H/bra[ket')
+  brace_path = sbox.ospath('A/D/H/bra{e')
   angle_path = os.path.join(wc_dir, 'A', 'D', 'H', angle_name)
-  paren_path = os.path.join(wc_dir, 'A', 'D', 'pare)(theses')
-  percent_path = os.path.join(wc_dir, '#hash#', 'percen%')
+  paren_path = sbox.ospath('A/D/pare)(theses')
+  percent_path = sbox.ospath('#hash#/percen%')
   nasty_path = os.path.join(wc_dir, 'A', nasty_name)
 
   os.mkdir(hash_dir)
@@ -1099,8 +1099,8 @@ def commit_deleted_edited(sbox):
   wc_dir = sbox.wc_dir
 
   # Make some convenient paths.
-  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')
 
   # Edit the files.
   svntest.main.file_append(iota_path, "This file has been edited.")
@@ -1134,10 +1134,10 @@ def commit_in_dir_scheduled_for_addition
   sbox.build()
   wc_dir = sbox.wc_dir
 
-  A_path = os.path.join(wc_dir, 'A')
-  Z_path = os.path.join(wc_dir, 'Z')
+  A_path = sbox.ospath('A')
+  Z_path = sbox.ospath('Z')
   Z_abspath = os.path.abspath(Z_path)
-  mu_path = os.path.join(wc_dir, 'Z', 'mu')
+  mu_path = sbox.ospath('Z/mu')
 
   svntest.main.run_svn(None, 'move', A_path, Z_path)
 
@@ -1154,7 +1154,7 @@ def commit_in_dir_scheduled_for_addition
                                         "' is not known to exist in the",
                                         mu_path)
 
-  Q_path = os.path.join(wc_dir, 'Q')
+  Q_path = sbox.ospath('Q')
   Q_abspath = os.path.abspath(Q_path)
   bloo_path = os.path.join(Q_path, 'bloo')
 
@@ -1193,7 +1193,7 @@ def commit_rmd_and_deleted_file(sbox):
 
   sbox.build()
   wc_dir = sbox.wc_dir
-  mu_path = os.path.join(wc_dir, 'A', 'mu')
+  mu_path = sbox.ospath('A/mu')
 
   # 'svn remove' mu
   svntest.main.run_svn(None, 'rm', mu_path)
@@ -1214,7 +1214,7 @@ def commit_add_file_twice(sbox):
   wc_dir = sbox.wc_dir
 
   # Create a file
-  gloo_path = os.path.join(wc_dir, 'A', 'D', 'H', 'gloo')
+  gloo_path = sbox.ospath('A/D/H/gloo')
   svntest.main.file_append(gloo_path, "hello")
   svntest.main.run_svn(None, 'add', gloo_path)
 
@@ -1266,7 +1266,7 @@ def commit_from_long_dir(sbox):
   abs_wc_dir = os.path.realpath(os.path.join(was_dir, wc_dir))
 
   # something to commit
-  svntest.main.file_append(os.path.join(wc_dir, 'iota'), "modified iota")
+  svntest.main.file_append(sbox.ospath('iota'), "modified iota")
 
   # Create expected output tree.
   expected_output = svntest.wc.State('', {
@@ -1297,7 +1297,7 @@ def commit_with_lock(sbox):
   # modify gamma and lock its directory
   wc_dir = sbox.wc_dir
 
-  D_path = os.path.join(wc_dir, 'A', 'D')
+  D_path = sbox.ospath('A/D')
   gamma_path = os.path.join(D_path, 'gamma')
   svntest.main.file_append(gamma_path, "modified gamma")
   svntest.actions.lock_admin_dir(D_path)
@@ -1375,7 +1375,7 @@ def failed_commit(sbox):
   svntest.actions.duplicate_dir(wc_dir, other_wc_dir)
 
   # Make different changes in the two working copies
-  iota_path = os.path.join(wc_dir, "iota")
+  iota_path = sbox.ospath('iota')
   svntest.main.file_append(iota_path, "More stuff in iota")
 
   other_iota_path = os.path.join(other_wc_dir, "iota")
@@ -1414,7 +1414,7 @@ def commit_multiple_wc_nested(sbox):
   wc_dir = sbox.wc_dir
 
   # Checkout a second working copy
-  wc2_dir = os.path.join(wc_dir, 'A', 'wc2')
+  wc2_dir = sbox.ospath('A/wc2')
   url = sbox.repo_url
   svntest.actions.run_and_verify_svn("Output on stderr where none expected",
                                      svntest.verify.AnyOutput, [],
@@ -1422,7 +1422,7 @@ def commit_multiple_wc_nested(sbox):
                                      url, wc2_dir)
 
   # Modify both working copies
-  mu_path = os.path.join(wc_dir, 'A', 'mu')
+  mu_path = sbox.ospath('A/mu')
   svntest.main.file_append(mu_path, 'appended mu text')
   lambda2_path = os.path.join(wc2_dir, 'A', 'B', 'lambda')
   svntest.main.file_append(lambda2_path, 'appended lambda2 text')
@@ -1459,8 +1459,8 @@ def commit_multiple_wc(sbox):
   svntest.sandbox._cleanup_test_path(wc_dir)
 
   # Checkout two wcs
-  wc1_dir = os.path.join(wc_dir, 'wc1')
-  wc2_dir = os.path.join(wc_dir, 'wc2')
+  wc1_dir = sbox.ospath('wc1')
+  wc2_dir = sbox.ospath('wc2')
   url = sbox.repo_url
   svntest.actions.run_and_verify_svn("Output on stderr where none expected",
                                      svntest.verify.AnyOutput, [],
@@ -1515,8 +1515,8 @@ def commit_multiple_wc_multiple_repos(sb
   svntest.sandbox._cleanup_test_path(wc_dir)
 
   # Checkout two wcs
-  wc1_dir = os.path.join(wc_dir, 'wc1')
-  wc2_dir = os.path.join(wc_dir, 'wc2')
+  wc1_dir = sbox.ospath('wc1')
+  wc2_dir = sbox.ospath('wc2')
   svntest.actions.run_and_verify_svn("Output on stderr where none expected",
                                      svntest.verify.AnyOutput, [],
                                      'checkout',
@@ -1791,7 +1791,7 @@ def commit_out_of_date_deletions(sbox):
   wc_dir = sbox.wc_dir
 
   # Need another empty dir
-  I_path = os.path.join(wc_dir, 'A', 'I')
+  I_path = sbox.ospath('A/I')
   os.mkdir(I_path)
   svntest.main.run_svn(None, 'add', I_path)
   svntest.main.run_svn(None, 'ci', '-m', 'prep', wc_dir)
@@ -1802,19 +1802,19 @@ def commit_out_of_date_deletions(sbox):
   svntest.actions.duplicate_dir(wc_dir, wc_backup)
 
   # Edits in wc 1
-  C_path = os.path.join(wc_dir, 'A', 'C')
-  omega_path = os.path.join(wc_dir, 'A', 'D', 'H', 'omega')
-  alpha_path = os.path.join(wc_dir, 'A', 'B', 'E', 'alpha')
+  C_path = sbox.ospath('A/C')
+  omega_path = sbox.ospath('A/D/H/omega')
+  alpha_path = sbox.ospath('A/B/E/alpha')
   svntest.main.run_svn(None, 'propset', 'fooprop', 'foopropval', C_path)
   svntest.main.file_append(omega_path, 'appended omega text')
   svntest.main.run_svn(None, 'propset', 'fooprop', 'foopropval', alpha_path)
 
   # Deletions in wc 1
-  I_path = os.path.join(wc_dir, 'A', 'I')
-  F_path = os.path.join(wc_dir, 'A', 'B', 'F')
-  chi_path = os.path.join(wc_dir, 'A', 'D', 'H', 'chi')
-  beta_path = os.path.join(wc_dir, 'A', 'B', 'E', 'beta')
-  psi_path = os.path.join(wc_dir, 'A', 'D', 'H', 'psi')
+  I_path = sbox.ospath('A/I')
+  F_path = sbox.ospath('A/B/F')
+  chi_path = sbox.ospath('A/D/H/chi')
+  beta_path = sbox.ospath('A/B/E/beta')
+  psi_path = sbox.ospath('A/D/H/psi')
   svntest.main.run_svn(None, 'rm', I_path, F_path, chi_path, beta_path,
                        psi_path)
 
@@ -1871,8 +1871,8 @@ def commit_with_bad_log_message(sbox):
   sbox.build()
   wc_dir = sbox.wc_dir
 
-  iota_path = os.path.join(wc_dir, 'iota')
-  log_msg_path = os.path.join(wc_dir, 'log-message')
+  iota_path = sbox.ospath('iota')
+  log_msg_path = sbox.ospath('log-message')
 
   # Make a random change, so there's something to commit.
   svntest.main.file_append(iota_path, 'fish')
@@ -1895,8 +1895,8 @@ def commit_with_mixed_line_endings(sbox)
 
   expected_status = make_standard_slew_of_changes(wc_dir)
 
-  iota_path = os.path.join(wc_dir, 'iota')
-  log_msg_path = os.path.join(wc_dir, 'log-message')
+  iota_path = sbox.ospath('iota')
+  log_msg_path = sbox.ospath('log-message')
 
   # Make a random change, so there's something to commit.
   svntest.main.file_append(iota_path, 'kebab')
@@ -1919,8 +1919,8 @@ def commit_with_mixed_line_endings_in_ig
 
   expected_status = make_standard_slew_of_changes(wc_dir)
 
-  iota_path = os.path.join(wc_dir, 'iota')
-  log_msg_path = os.path.join(wc_dir, 'log-message')
+  iota_path = sbox.ospath('iota')
+  log_msg_path = sbox.ospath('log-message')
 
   # Make a random change, so there's something to commit.
   svntest.main.file_append(iota_path, 'cheeseburger')
@@ -1990,7 +1990,7 @@ def mods_in_schedule_delete(sbox):
   wc_dir = sbox.wc_dir
 
   # Schedule a delete, then put in local mods
-  C_path = os.path.join(wc_dir, 'A', 'C')
+  C_path = sbox.ospath('A/C')
   svntest.actions.run_and_verify_svn(None, svntest.verify.AnyOutput, [],
                                      'rm', C_path)
 
@@ -2026,8 +2026,8 @@ def tab_test(sbox):
   sbox.build()
   wc_dir = sbox.wc_dir
 
-  tab_file = os.path.join(wc_dir, 'A', "tab\tfile")
-  tab_dir  = os.path.join(wc_dir, 'A', "tab\tdir")
+  tab_file = sbox.ospath('A/tab\tfile')
+  tab_dir  = sbox.ospath('A/tab\tdir')
   source_url = sbox.repo_url + "/source_dir"
   tab_url = sbox.repo_url + "/tab%09dir"
 
@@ -2091,30 +2091,30 @@ def local_mods_are_not_commits(sbox):
   # copy wc->wc
   svntest.actions.run_and_verify_svn(None, None, expected_error,
                                      'cp', '-m', 'log msg',
-                                     os.path.join(wc_dir, 'iota'),
-                                     os.path.join(wc_dir, 'iota2'))
+                                     sbox.ospath('iota'),
+                                     sbox.ospath('iota2'))
 
   # copy repos->wc
   svntest.actions.run_and_verify_svn(None, None, expected_error,
                                      'cp', '-m', 'log msg',
                                      sbox.repo_url + "/iota",
-                                     os.path.join(wc_dir, 'iota2'))
+                                     sbox.ospath('iota2'))
 
   # delete
   svntest.actions.run_and_verify_svn(None, None, expected_error,
                                      'rm', '-m', 'log msg',
-                                     os.path.join(wc_dir, 'A', 'D', 'gamma'))
+                                     sbox.ospath('A/D/gamma'))
 
   # mkdir
   svntest.actions.run_and_verify_svn(None, None, expected_error,
                                      'mkdir', '-m', 'log msg',
-                                     os.path.join(wc_dir, 'newdir'))
+                                     sbox.ospath('newdir'))
 
   # rename
   svntest.actions.run_and_verify_svn(None, None, expected_error,
                                      'cp', '-m', 'log msg',
-                                     os.path.join(wc_dir, 'A', 'mu'),
-                                     os.path.join(wc_dir, 'A', 'yu'))
+                                     sbox.ospath('A/mu'),
+                                     sbox.ospath('A/yu'))
 
 
 #----------------------------------------------------------------------
@@ -2136,7 +2136,7 @@ def post_commit_hook_test(sbox):
   svntest.actions.create_failing_hook(repo_dir, "post-commit", error_msg)
 
   # Modify iota just so there is something to commit.
-  iota_path = os.path.join(wc_dir, "iota")
+  iota_path = sbox.ospath('iota')
   svntest.main.file_append(iota_path, "lakalakalakalaka")
 
   # Now, commit and examine the output (we happen to know that the
@@ -2163,7 +2163,7 @@ def commit_same_folder_in_targets(sbox):
   sbox.build()
   wc_dir = sbox.wc_dir
 
-  iota_path = os.path.join(wc_dir, 'iota')
+  iota_path = sbox.ospath('iota')
 
   svntest.main.file_append(iota_path, "added extra line to file iota")
 
@@ -2196,8 +2196,8 @@ def commit_inconsistent_eol(sbox):
   sbox.build()
   wc_dir = sbox.wc_dir
 
-  iota_path = os.path.join(wc_dir, 'iota')
-  mu_path = os.path.join(wc_dir, 'A', 'mu')
+  iota_path = sbox.ospath('iota')
+  mu_path = sbox.ospath('A/mu')
 
   svntest.main.run_svn(None, 'propset', 'svn:eol-style', 'native', iota_path)
   svntest.main.file_append_binary(iota_path,
@@ -2263,8 +2263,8 @@ def commit_with_revprop(sbox):
   wc_dir = sbox.wc_dir
   expected_status = make_standard_slew_of_changes(wc_dir)
 
-  omega_path = os.path.join(wc_dir, 'A', 'D', 'H', 'omega')
-  gloo_path = os.path.join(wc_dir, 'A', 'D', 'H', 'gloo')
+  omega_path = sbox.ospath('A/D/H/omega')
+  gloo_path = sbox.ospath('A/D/H/gloo')
   expected_output = svntest.wc.State(wc_dir, {
     'A/D/H/omega' : Item(verb='Sending'),
     'A/D/H/gloo' : Item(verb='Adding'),
@@ -2296,8 +2296,8 @@ def import_with_revprop(sbox):
   "set revision props during import"
 
   sbox.build()
-  local_dir = os.path.join(sbox.wc_dir, 'folder')
-  local_file = os.path.join(sbox.wc_dir, 'folder', 'file')
+  local_dir = sbox.ospath('folder')
+  local_file = sbox.ospath('folder/file')
   os.mkdir(local_dir)
   svntest.main.file_write(local_file, "xxxx")
 
@@ -2345,7 +2345,7 @@ def copy_WC2R_with_revprop(sbox):
 
   sbox.build()
   remote_dir = sbox.repo_url + "/dir"
-  local_dir = os.path.join(sbox.wc_dir, 'folder')
+  local_dir = sbox.ospath('folder')
   svntest.actions.run_and_verify_svn(None, None, [],
                                      'mkdir', local_dir)
 
@@ -2518,7 +2518,7 @@ def start_commit_hook_test(sbox):
   svntest.actions.create_failing_hook(repo_dir, "start-commit", error_msg)
 
   # Modify iota just so there is something to commit.
-  iota_path = os.path.join(wc_dir, "iota")
+  iota_path = sbox.ospath('iota')
   svntest.main.file_append(iota_path, "More stuff in iota")
 
   # Commit, expect error code 1
@@ -2558,7 +2558,7 @@ def pre_commit_hook_test(sbox):
   svntest.actions.create_failing_hook(repo_dir, "pre-commit", error_msg)
 
   # Modify iota just so there is something to commit.
-  iota_path = os.path.join(wc_dir, "iota")
+  iota_path = sbox.ospath('iota')
   svntest.main.file_append(iota_path, "More stuff in iota")
 
   # Commit, expect error code 1
@@ -2624,9 +2624,9 @@ def changelist_near_conflict(sbox):
   sbox.build()
 
   wc_dir = sbox.wc_dir
-  iota_path = os.path.join(wc_dir, "iota")
-  mu_path = os.path.join(wc_dir, "A", "mu")
-  gloo_path = os.path.join(wc_dir, "A", "D", "H", "gloo")
+  iota_path = sbox.ospath('iota')
+  mu_path = sbox.ospath('A/mu')
+  gloo_path = sbox.ospath('A/D/H/gloo')
 
   expected_status = make_standard_slew_of_changes(wc_dir)
 
@@ -2665,7 +2665,7 @@ def commit_out_of_date_file(sbox):
   wc_backup = sbox.add_wc_path('backup')
   svntest.actions.duplicate_dir(wc_dir, wc_backup)
 
-  pi_path = os.path.join(wc_dir, 'A', 'D', 'G', 'pi')
+  pi_path = sbox.ospath('A/D/G/pi')
   backup_pi_path = os.path.join(wc_backup, 'A', 'D', 'G', 'pi')
 
   svntest.main.file_append(pi_path, "new line\n")
@@ -2708,7 +2708,7 @@ def start_commit_detect_capabilities(sbo
   svntest.main.create_python_hook_script(start_commit_hook, hook_text)
 
   # Commit something.
-  iota_path = os.path.join(wc_dir, "iota")
+  iota_path = sbox.ospath('iota')
   svntest.main.file_append(iota_path, "More stuff in iota")
   svntest.actions.run_and_verify_svn(None, [], [], 'ci', '--quiet',
                                      '-m', 'log msg', wc_dir)
@@ -2730,9 +2730,9 @@ def commit_added_missing(sbox):
 
   sbox.build()
   wc_dir = sbox.wc_dir
-  mu_path = os.path.join(wc_dir, 'A', 'mu')
-  a_path = os.path.join(wc_dir, 'A', 'a.txt')
-  b_path = os.path.join(wc_dir, 'A', 'b.txt')
+  mu_path = sbox.ospath('A/mu')
+  a_path = sbox.ospath('A/a.txt')
+  b_path = sbox.ospath('A/b.txt')
 
   # Make two copies of mu: a and b
   svntest.main.run_svn(None, 'cp', mu_path, a_path)
@@ -2765,9 +2765,9 @@ def tree_conflicts_block_commit(sbox):
 
   svntest.actions.build_greek_tree_conflicts(sbox)
   wc_dir = sbox.wc_dir
-  A = os.path.join(wc_dir, 'A')
-  D = os.path.join(wc_dir, 'A', 'D')
-  G = os.path.join(wc_dir, 'A', 'D', 'G')
+  A = sbox.ospath('A')
+  D = sbox.ospath('A/D')
+  G = sbox.ospath('A/D/G')
 
   error_re = "remains in conflict"
   commit_fails_at_path(wc_dir, wc_dir, error_re)
@@ -2792,7 +2792,7 @@ def tree_conflicts_resolved(sbox):
   svntest.actions.duplicate_dir(wc_dir, wc_dir_2)
 
   # Mark the tree conflict victims as resolved
-  G = os.path.join(wc_dir, 'A', 'D', 'G')
+  G = sbox.ospath('A/D/G')
   victims = [ os.path.join(G, v) for v in ['pi', 'rho', 'tau'] ]
   svntest.actions.run_and_verify_resolved(victims)
 
@@ -2818,7 +2818,7 @@ def commit_multiple_nested_deletes(sbox)
   sbox.build()
   wc_dir = sbox.wc_dir
 
-  A = os.path.join(wc_dir, 'A')
+  A = sbox.ospath('A')
   A_B = os.path.join(A, 'B')
 
   sbox.simple_rm('A')



Mime
View raw message