[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[PATCH] bunch of unused variables in copy_tests.py

From: Kamesh Jayachandran <kamesh_at_collab.net>
Date: 2006-10-30 08:51:42 CET

Hi All,

Find the attached patch and log.

With regards
Kamesh Jayachandran

[[[
  Remove unused variables.
  Consistent usage of 'wc_dir' rather than 'sbox.wc_dir'.

* subversion/tests/cmdline/copy_tests.py
  (basic_copy_and_move_files, receive_copy_in_update,
   repos_to_wc, double_uri_escaping_1814,
   mixed_wc_to_url):
   Remove the unused variables.
  (wc_copy_parent_into_child, wc_copy_dir_to_itself,
   force_move):
   Consistent usage of 'wc_dir'.

Patch by: Kamesh Jayachandran <kamesh@collab.net>
]]]

Index: subversion/tests/cmdline/copy_tests.py
===================================================================
--- subversion/tests/cmdline/copy_tests.py (revision 22157)
+++ subversion/tests/cmdline/copy_tests.py (working copy)
@@ -270,16 +270,11 @@
   iota_path = os.path.join(wc_dir, 'iota')
   rho_path = os.path.join(wc_dir, 'A', 'D', 'G', 'rho')
   D_path = os.path.join(wc_dir, 'A', 'D')
- C_path = os.path.join(wc_dir, 'A', 'C')
   alpha_path = os.path.join(wc_dir, 'A', 'B', 'E', 'alpha')
   H_path = os.path.join(wc_dir, 'A', 'D', 'H')
   F_path = os.path.join(wc_dir, 'A', 'B', 'F')
+ alpha2_path = os.path.join(wc_dir, 'A', 'C', 'alpha2')
 
- new_mu_path = os.path.join(H_path, 'mu')
- new_iota_path = os.path.join(F_path, 'iota')
- rho_copy_path = os.path.join(D_path, 'rho')
- alpha2_path = os.path.join(C_path, 'alpha2')
-
   # Make local mods to mu and rho
   svntest.main.file_append (mu_path, 'appended mu text')
   svntest.main.file_append (rho_path, 'new appended text for rho')
@@ -369,13 +364,6 @@
   # Define a zillion paths in both working copies.
   G_path = os.path.join(wc_dir, 'A', 'D', 'G')
   newG_path = os.path.join(wc_dir, 'A', 'B', 'newG')
- newGpi_path = os.path.join(wc_dir, 'A', 'B', 'newG', 'pi')
- newGrho_path = os.path.join(wc_dir, 'A', 'B', 'newG', 'rho')
- newGtau_path = os.path.join(wc_dir, 'A', 'B', 'newG', 'tau')
- b_newG_path = os.path.join(wc_backup, 'A', 'B', 'newG')
- b_newGpi_path = os.path.join(wc_backup, 'A', 'B', 'newG', 'pi')
- b_newGrho_path = os.path.join(wc_backup, 'A', 'B', 'newG', 'rho')
- b_newGtau_path = os.path.join(wc_backup, 'A', 'B', 'newG', 'tau')
 
   # Copy directory A/D to A/B/newG
   svntest.actions.run_and_verify_svn(None, None, [], 'cp', G_path, newG_path)
@@ -925,7 +913,6 @@
   # We have a standard repository and working copy. Now we create a
   # second repository with the same greek tree, but different UUID.
   repo_dir = sbox.repo_dir
- repo_url = sbox.repo_url
   other_repo_dir, other_repo_url = sbox.add_repo_path('other')
   svntest.main.copy_repos(repo_dir, other_repo_dir, 1, 1)
 
@@ -1125,7 +1112,7 @@
   # error, and also B) copying root of a working copy attempted to
   # lock the non-working copy parent directory.
   was_cwd = os.getcwd()
- os.chdir(sbox.wc_dir)
+ os.chdir(wc_dir)
   try:
     svntest.actions.run_and_verify_svn(None,
                                        ['\n', 'Committed revision 2.\n'], [],
@@ -1447,7 +1434,6 @@
   "check for double URI escaping in svn ls -R"
 
   sbox.build()
- wc_dir = sbox.wc_dir
   
   base_url = svntest.main.current_repo_url + '/base'
 
@@ -1690,7 +1676,7 @@
   dnames = ['A','A/B']
 
   for dirname in dnames:
- dir_path = os.path.join(sbox.wc_dir, dirname)
+ dir_path = os.path.join(wc_dir, dirname)
 
     # try to copy dir to itself
     svntest.actions.run_and_verify_svn(None, [],
@@ -1713,8 +1699,6 @@
   sbox.build()
 
   wc_dir = sbox.wc_dir
- url = svntest.main.current_repo_url
- G_url = svntest.main.current_repo_url + '/A/D/G'
   Z_url = svntest.main.current_repo_url + '/A/D/Z'
   G_path = os.path.join(wc_dir, 'A', 'D', 'G')
   pi_path = os.path.join(wc_dir, 'A', 'D', 'G', 'pi')
@@ -1867,7 +1851,7 @@
                   "D iota\n",
                 ]
   was_cwd = os.getcwd()
- os.chdir(sbox.wc_dir)
+ os.chdir(wc_dir)
   try:
     svntest.actions.run_and_verify_svn(None, move_output,
                                        [],
@@ -1877,7 +1861,7 @@
     os.chdir(was_cwd)
 
   # check for the new content
- file_handle = file(os.path.join(sbox.wc_dir, "dest"), "r")
+ file_handle = file(os.path.join(wc_dir, "dest"), "r")
   modified_file_content = file_handle.readlines()
   file_handle.close()
   # Error if we dont find the modified contents...

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Oct 30 08:51:53 2006

This is an archived mail posted to the Subversion Dev mailing list.