You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ju...@apache.org on 2010/08/06 15:46:38 UTC

svn commit: r982959 - in /subversion/trunk/subversion/tests/cmdline/svntest: actions.py main.py sandbox.py

Author: julianfoad
Date: Fri Aug  6 13:46:37 2010
New Revision: 982959

URL: http://svn.apache.org/viewvc?rev=982959&view=rev
Log:
In the Python test suite, rename global variables that reference the
'Greek tree' repository to indicate that.

* subversion/tests/cmdline/svntest/main.py
  (pristine_dir): Rename to 'pristine_greek_repos_dir'.
  (pristine_url): Rename to 'pristine_greek_repos_url'.
  (run_tests): Track the renames.

* subversion/tests/cmdline/svntest/actions.py
  (setup_pristine_repository, guarantee_empty_repository,
   guarantee_greek_repository): Track the renames.

* subversion/tests/cmdline/svntest/sandbox.py
  (Sandbox.*): Track the renames.

Modified:
    subversion/trunk/subversion/tests/cmdline/svntest/actions.py
    subversion/trunk/subversion/tests/cmdline/svntest/main.py
    subversion/trunk/subversion/tests/cmdline/svntest/sandbox.py

Modified: subversion/trunk/subversion/tests/cmdline/svntest/actions.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/svntest/actions.py?rev=982959&r1=982958&r2=982959&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/svntest/actions.py (original)
+++ subversion/trunk/subversion/tests/cmdline/svntest/actions.py Fri Aug  6 13:46:37 2010
@@ -38,7 +38,7 @@ def no_sleep_for_timestamps():
 def do_sleep_for_timestamps():
   os.environ['SVN_I_LOVE_CORRUPTED_WORKING_COPIES_SO_DISABLE_SLEEP_FOR_TIMESTAMPS'] = 'no'
 
-def setup_pristine_repository():
+def setup_pristine_greek_repository():
   """Create the pristine repository and 'svn import' the greek tree"""
 
   # these directories don't exist out of the box, so we may have to create them
@@ -49,8 +49,8 @@ def setup_pristine_repository():
     os.makedirs(main.general_repo_dir) # this also creates all the intermediate dirs
 
   # If there's no pristine repos, create one.
-  if not os.path.exists(main.pristine_dir):
-    main.create_repos(main.pristine_dir)
+  if not os.path.exists(main.pristine_greek_repos_dir):
+    main.create_repos(main.pristine_greek_repos_dir)
 
     # if this is dav, gives us access rights to import the greek tree.
     if main.is_ra_type_dav():
@@ -66,7 +66,7 @@ def setup_pristine_repository():
     exit_code, output, errput = main.run_svn(None, 'import', '-m',
                                              'Log message for revision 1.',
                                              main.greek_dump_dir,
-                                             main.pristine_url)
+                                             main.pristine_greek_repos_url)
 
     # check for any errors from the import
     if len(errput):
@@ -99,9 +99,9 @@ def setup_pristine_repository():
 
     # Finally, disallow any changes to the "pristine" repos.
     error_msg = "Don't modify the pristine repository"
-    create_failing_hook(main.pristine_dir, 'start-commit', error_msg)
-    create_failing_hook(main.pristine_dir, 'pre-lock', error_msg)
-    create_failing_hook(main.pristine_dir, 'pre-revprop-change', error_msg)
+    create_failing_hook(main.pristine_greek_repos_dir, 'start-commit', error_msg)
+    create_failing_hook(main.pristine_greek_repos_dir, 'pre-lock', error_msg)
+    create_failing_hook(main.pristine_greek_repos_dir, 'pre-revprop-change', error_msg)
 
 
 ######################################################################
@@ -110,7 +110,7 @@ def guarantee_empty_repository(path):
   """Guarantee that a local svn repository exists at PATH, containing
   nothing."""
 
-  if path == main.pristine_dir:
+  if path == main.pristine_greek_repos_dir:
     print("ERROR:  attempt to overwrite the pristine repos!  Aborting.")
     sys.exit(1)
 
@@ -121,19 +121,19 @@ def guarantee_empty_repository(path):
 # Used by every test, so that they can run independently of  one
 # another. Every time this routine is called, it recursively copies
 # the `pristine repos' to a new location.
-# Note: make sure setup_pristine_repository was called once before
+# Note: make sure setup_pristine_greek_repository was called once before
 # using this function.
 def guarantee_greek_repository(path):
   """Guarantee that a local svn repository exists at PATH, containing
   nothing but the greek-tree at revision 1."""
 
-  if path == main.pristine_dir:
+  if path == main.pristine_greek_repos_dir:
     print("ERROR:  attempt to overwrite the pristine repos!  Aborting.")
     sys.exit(1)
 
   # copy the pristine repository to PATH.
   main.safe_rmtree(path)
-  if main.copy_repos(main.pristine_dir, path, 1):
+  if main.copy_repos(main.pristine_greek_repos_dir, path, 1):
     print("ERROR:  copying repository failed.")
     sys.exit(1)
 

Modified: subversion/trunk/subversion/tests/cmdline/svntest/main.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/svntest/main.py?rev=982959&r1=982958&r2=982959&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/svntest/main.py (original)
+++ subversion/trunk/subversion/tests/cmdline/svntest/main.py Fri Aug  6 13:46:37 2010
@@ -161,7 +161,7 @@ entriesdump_binary = os.path.abspath('en
 
 # Location to the pristine repository, will be calculated from test_area_url
 # when we know what the user specified for --url.
-pristine_url = None
+pristine_greek_repos_url = None
 
 # Global variable to track all of our options
 options = None
@@ -187,7 +187,7 @@ general_wc_dir = os.path.join(work_dir, 
 temp_dir = os.path.join(work_dir, 'local_tmp')
 
 # (derivatives of the tmp dir.)
-pristine_dir = os.path.join(temp_dir, "repos")
+pristine_greek_repos_dir = os.path.join(temp_dir, "repos")
 greek_dump_dir = os.path.join(temp_dir, "greekfiles")
 default_config_dir = os.path.abspath(os.path.join(temp_dir, "config"))
 
@@ -1418,7 +1418,7 @@ def run_tests(test_list, serial_only = F
         appropriate exit code.
   """
 
-  global pristine_url
+  global pristine_greek_repos_url
   global svn_binary
   global svnadmin_binary
   global svnlook_binary
@@ -1482,8 +1482,8 @@ def run_tests(test_list, serial_only = F
       parser.error("invalid test number, range of numbers, " +
                    "or function '%s'\n" % arg)
 
-  # Calculate pristine_url from test_area_url.
-  pristine_url = options.test_area_url + '/' + pathname2url(pristine_dir)
+  # Calculate pristine_greek_repos_url from test_area_url.
+  pristine_greek_repos_url = options.test_area_url + '/' + pathname2url(pristine_greek_repos_dir)
 
   if options.use_jsvn:
     if options.svn_bin is None:
@@ -1536,7 +1536,7 @@ def run_tests(test_list, serial_only = F
     create_config_dir(default_config_dir)
 
     # Setup the pristine repository
-    svntest.actions.setup_pristine_repository()
+    svntest.actions.setup_pristine_greek_repository()
 
   # Run the tests.
   exit_code = _internal_run_tests(test_list, testnums, options.parallel)

Modified: subversion/trunk/subversion/tests/cmdline/svntest/sandbox.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/svntest/sandbox.py?rev=982959&r1=982958&r2=982959&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/svntest/sandbox.py (original)
+++ subversion/trunk/subversion/tests/cmdline/svntest/sandbox.py Fri Aug  6 13:46:37 2010
@@ -51,8 +51,8 @@ class Sandbox:
       self.repo_url = (svntest.main.options.test_area_url + '/'
                        + svntest.main.pathname2url(self.repo_dir))
     else:
-      self.repo_dir = svntest.main.pristine_dir
-      self.repo_url = svntest.main.pristine_url
+      self.repo_dir = svntest.main.pristine_greek_repos_dir
+      self.repo_url = svntest.main.pristine_greek_repos_url
 
     ### TODO: Move this into to the build() method
     # For dav tests we need a single authz file which must be present,
@@ -155,7 +155,7 @@ class Sandbox:
         sbox.cleanup_test_paths()
     # cleanup all test specific working copies and repositories
     for path in self.test_paths:
-      if not path is svntest.main.pristine_dir:
+      if not path is svntest.main.pristine_greek_repos_dir:
         _cleanup_test_path(path)
 
   def is_built(self):