[prev in list] [next in list] [prev in thread] [next in thread] 

List:       subversion-cvs
Subject:    svn commit: r35608 - in branches/python-3-compatibility:
From:       Arfrever Frehtes Taifersar Arahesis <Arfrever.FTA () GMail ! Com>
Date:       2009-01-31 0:00:04
Message-ID: 200901310000.n0V004dS015298 () svn2 ! sjc ! collab ! net
[Download RAW message or body]

Author: arfrever
Date: Fri Jan 30 16:00:04 2009
New Revision: 35608

Log:
On the 'python-3-compatibility' branch:
Python 3 compatibility:
Update syntax of octal numbers.

* subversion/tests/cmdline/basic_tests.py:
* subversion/tests/cmdline/import_tests.py:
* subversion/tests/cmdline/prop_tests.py:
* subversion/tests/cmdline/schedule_tests.py:
* subversion/tests/cmdline/svntest/actions.py:
* subversion/tests/cmdline/svntest/main.py:
* subversion/tests/cmdline/update_tests.py:
* tools/backup/hot-backup.py.in:
* tools/client-side/change-svn-wc-format.py: Update syntax of octal numbers.

Modified:
   branches/python-3-compatibility/subversion/tests/cmdline/basic_tests.py
   branches/python-3-compatibility/subversion/tests/cmdline/import_tests.py
   branches/python-3-compatibility/subversion/tests/cmdline/prop_tests.py
   branches/python-3-compatibility/subversion/tests/cmdline/schedule_tests.py
   branches/python-3-compatibility/subversion/tests/cmdline/svntest/actions.py
   branches/python-3-compatibility/subversion/tests/cmdline/svntest/main.py
   branches/python-3-compatibility/subversion/tests/cmdline/update_tests.py
   branches/python-3-compatibility/tools/backup/hot-backup.py.in
   branches/python-3-compatibility/tools/client-side/change-svn-wc-format.py

Modified: branches/python-3-compatibility/subversion/tests/cmdline/basic_tests.py
URL: http://svn.collab.net/viewvc/svn/branches/python-3-compatibility/subversion/tests/cmdline/basic_tests.py?pathrev=35608&r1=35607&r2=35608
 ==============================================================================
--- branches/python-3-compatibility/subversion/tests/cmdline/basic_tests.py	Fri Jan \
                30 15:33:37 2009	(r35607)
+++ branches/python-3-compatibility/subversion/tests/cmdline/basic_tests.py	Fri Jan \
30 16:00:04 2009	(r35608) @@ -6,7 +6,7 @@
 #  See http://subversion.tigris.org for more information.
 #
 # ====================================================================
-# Copyright (c) 2000-2008 CollabNet.  All rights reserved.
+# Copyright (c) 2000-2009 CollabNet.  All rights reserved.
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution.  The terms
@@ -361,8 +361,8 @@ def basic_corruption(sbox):
   mu_saved_tb_path = mu_tb_path + "-saved"
   tb_dir_saved_mode = os.stat(tb_dir_path)[stat.ST_MODE]
   mu_tb_saved_mode = os.stat(mu_tb_path)[stat.ST_MODE]
-  os.chmod(tb_dir_path, 0777)  # ### What's a more portable way to do this?
-  os.chmod(mu_tb_path, 0666)   # ### Would rather not use hardcoded numbers.
+  os.chmod(tb_dir_path, 0o777)  # ### What's a more portable way to do this?
+  os.chmod(mu_tb_path, 0o666)   # ### Would rather not use hardcoded numbers.
   shutil.copyfile(mu_tb_path, mu_saved_tb_path)
   svntest.main.file_append(mu_tb_path, 'Aaagggkkk, corruption!')
   os.chmod(tb_dir_path, tb_dir_saved_mode)
@@ -374,8 +374,8 @@ def basic_corruption(sbox):
                                         wc_dir)
 
   # Restore the uncorrupted text base.
-  os.chmod(tb_dir_path, 0777)
-  os.chmod(mu_tb_path, 0666)
+  os.chmod(tb_dir_path, 0o777)
+  os.chmod(mu_tb_path, 0o666)
   os.remove(mu_tb_path)
   os.rename(mu_saved_tb_path, mu_tb_path)
   os.chmod(tb_dir_path, tb_dir_saved_mode)
@@ -407,8 +407,8 @@ def basic_corruption(sbox):
   mu_saved_tb_path = mu_tb_path + "-saved"
   tb_dir_saved_mode = os.stat(tb_dir_path)[stat.ST_MODE]
   mu_tb_saved_mode = os.stat(mu_tb_path)[stat.ST_MODE]
-  os.chmod(tb_dir_path, 0777)
-  os.chmod(mu_tb_path, 0666)
+  os.chmod(tb_dir_path, 0o777)
+  os.chmod(mu_tb_path, 0o666)
   shutil.copyfile(mu_tb_path, mu_saved_tb_path)
   svntest.main.file_append(mu_tb_path, 'Aiyeeeee, corruption!\nHelp!\n')
   os.chmod(tb_dir_path, tb_dir_saved_mode)
@@ -422,8 +422,8 @@ def basic_corruption(sbox):
                                         "svn: Checksum", other_wc)
 
   # Restore the uncorrupted text base.
-  os.chmod(tb_dir_path, 0777)
-  os.chmod(mu_tb_path, 0666)
+  os.chmod(tb_dir_path, 0o777)
+  os.chmod(mu_tb_path, 0o666)
   os.remove(mu_tb_path)
   os.rename(mu_saved_tb_path, mu_tb_path)
   os.chmod(tb_dir_path, tb_dir_saved_mode)
@@ -1445,7 +1445,7 @@ def basic_add_ignores(sbox):
   foo_c_path = os.path.join(dir_path, 'foo.c')
   foo_o_path = os.path.join(dir_path, 'foo.o')
 
-  os.mkdir(dir_path, 0755)
+  os.mkdir(dir_path, 0o755)
   open(foo_c_path, 'w')
   open(foo_o_path, 'w')
 
@@ -1495,7 +1495,7 @@ def basic_add_no_ignores(sbox):
   foo_lo_path = os.path.join(dir_path, 'foo.lo')
   foo_rej_path = os.path.join(dir_path, 'foo.rej')
 
-  os.mkdir(dir_path, 0755)
+  os.mkdir(dir_path, 0o755)
   open(foo_c_path, 'w')
   open(foo_o_path, 'w')
   open(foo_lo_path, 'w')
@@ -1524,9 +1524,9 @@ def basic_add_parents(sbox):
   omicron_path = os.path.join(Y_path, 'omicron')
 
   # Create some unversioned directories
-  os.mkdir(X_path, 0755)
-  os.mkdir(Y_path, 0755)
-  os.mkdir(Z_path, 0755)
+  os.mkdir(X_path, 0o755)
+  os.mkdir(Y_path, 0o755)
+  os.mkdir(Z_path, 0o755)
 
   # Create new files
   z = open(zeta_path, 'w')

Modified: branches/python-3-compatibility/subversion/tests/cmdline/import_tests.py
URL: http://svn.collab.net/viewvc/svn/branches/python-3-compatibility/subversion/tests/cmdline/import_tests.py?pathrev=35608&r1=35607&r2=35608
 ==============================================================================
--- branches/python-3-compatibility/subversion/tests/cmdline/import_tests.py	Fri Jan \
                30 15:33:37 2009	(r35607)
+++ branches/python-3-compatibility/subversion/tests/cmdline/import_tests.py	Fri Jan \
30 16:00:04 2009	(r35608) @@ -6,7 +6,7 @@
 #  See http://subversion.tigris.org for more information.
 #
 # ====================================================================
-# Copyright (c) 2000-2007 CollabNet.  All rights reserved.
+# Copyright (c) 2000-2007, 2009 CollabNet.  All rights reserved.
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution.  The terms
@@ -55,11 +55,11 @@ def import_executable(sbox):
     svntest.main.file_append(path, "some text")
 
   # set executable bits
-  os.chmod(all_path, 0777)
-  os.chmod(none_path, 0666)
-  os.chmod(user_path, 0766)
-  os.chmod(group_path, 0676)
-  os.chmod(other_path, 0667)
+  os.chmod(all_path, 0o777)
+  os.chmod(none_path, 0o666)
+  os.chmod(user_path, 0o766)
+  os.chmod(group_path, 0o676)
+  os.chmod(other_path, 0o667)
 
   # import new files into repository
   url = sbox.repo_url
@@ -135,7 +135,7 @@ def import_ignores(sbox):
   foo_c_path = os.path.join(dir_path, 'foo.c')
   foo_o_path = os.path.join(dir_path, 'foo.o')
 
-  os.mkdir(dir_path, 0755)
+  os.mkdir(dir_path, 0o755)
   open(foo_c_path, 'w')
   open(foo_o_path, 'w')
 
@@ -200,7 +200,7 @@ def import_no_ignores(sbox):
   foo_lo_path = os.path.join(dir_path, 'foo.lo')
   foo_rej_path = os.path.join(dir_path, 'foo.rej')
 
-  os.mkdir(dir_path, 0755)
+  os.mkdir(dir_path, 0o755)
   open(foo_c_path, 'w')
   open(foo_o_path, 'w')
   open(foo_lo_path, 'w')
@@ -308,7 +308,7 @@ enable-auto-props = yes
   imp_dir_path = 'dir'
   imp_file_path = os.path.join(imp_dir_path, file_name)
 
-  os.mkdir(imp_dir_path, 0755)
+  os.mkdir(imp_dir_path, 0o755)
   svntest.main.file_write(imp_file_path, "This is file test.dsp.\n")
 
   svntest.actions.run_and_verify_svn(None, None, [], 'import',

Modified: branches/python-3-compatibility/subversion/tests/cmdline/prop_tests.py
URL: http://svn.collab.net/viewvc/svn/branches/python-3-compatibility/subversion/tests/cmdline/prop_tests.py?pathrev=35608&r1=35607&r2=35608
 ==============================================================================
--- branches/python-3-compatibility/subversion/tests/cmdline/prop_tests.py	Fri Jan 30 \
                15:33:37 2009	(r35607)
+++ branches/python-3-compatibility/subversion/tests/cmdline/prop_tests.py	Fri Jan 30 \
16:00:04 2009	(r35608) @@ -6,7 +6,7 @@
 #  See http://subversion.tigris.org for more information.
 #
 # ====================================================================
-# Copyright (c) 2000-2004, 2008 CollabNet.  All rights reserved.
+# Copyright (c) 2000-2004, 2008-2009 CollabNet.  All rights reserved.
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution.  The terms
@@ -743,7 +743,7 @@ def copy_inherits_special_props(sbox):
   # copied file.
   if os.name == 'posix':
     svntest.main.run_svn(None, 'propset', 'svn:executable', 'on', new_path1)
-    os.chmod(new_path1, 0644)
+    os.chmod(new_path1, 0o644)
 
   # Commit the file
   svntest.main.run_svn(None,

Modified: branches/python-3-compatibility/subversion/tests/cmdline/schedule_tests.py
URL: http://svn.collab.net/viewvc/svn/branches/python-3-compatibility/subversion/tests/cmdline/schedule_tests.py?pathrev=35608&r1=35607&r2=35608
 ==============================================================================
--- branches/python-3-compatibility/subversion/tests/cmdline/schedule_tests.py	Fri \
                Jan 30 15:33:37 2009	(r35607)
+++ branches/python-3-compatibility/subversion/tests/cmdline/schedule_tests.py	Fri \
Jan 30 16:00:04 2009	(r35608) @@ -7,7 +7,7 @@
 #  See http://subversion.tigris.org for more information.
 #
 # ====================================================================
-# Copyright (c) 2000-2004, 2008 CollabNet.  All rights reserved.
+# Copyright (c) 2000-2004, 2008-2009 CollabNet.  All rights reserved.
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution.  The terms
@@ -181,11 +181,11 @@ def add_executable(sbox):
                                        'propget', "svn:executable", fileName)
 
   test_cases = [
-    ("all_exe",   0777, 1),
-    ("none_exe",  0666, 0),
-    ("user_exe",  0766, 1),
-    ("group_exe", 0676, 0),
-    ("other_exe", 0667, 0),
+    ("all_exe",   0o777, 1),
+    ("none_exe",  0o666, 0),
+    ("user_exe",  0o766, 1),
+    ("group_exe", 0o676, 0),
+    ("other_exe", 0o667, 0),
     ]
   for test_case in test_cases:
     runTest(sbox.wc_dir, *test_case)

Modified: branches/python-3-compatibility/subversion/tests/cmdline/svntest/actions.py
URL: http://svn.collab.net/viewvc/svn/branches/python-3-compatibility/subversion/tests/cmdline/svntest/actions.py?pathrev=35608&r1=35607&r2=35608
 ==============================================================================
--- branches/python-3-compatibility/subversion/tests/cmdline/svntest/actions.py	Fri \
                Jan 30 15:33:37 2009	(r35607)
+++ branches/python-3-compatibility/subversion/tests/cmdline/svntest/actions.py	Fri \
Jan 30 16:00:04 2009	(r35608) @@ -121,7 +121,7 @@ def \
guarantee_greek_repository(path):  sys.exit(1)
 
   # make the repos world-writeable, for mod_dav_svn's sake.
-  main.chmod_tree(path, 0666, 0666)
+  main.chmod_tree(path, 0o666, 0o666)
 
 
 def run_and_verify_svnlook(message, expected_stdout,

Modified: branches/python-3-compatibility/subversion/tests/cmdline/svntest/main.py
URL: http://svn.collab.net/viewvc/svn/branches/python-3-compatibility/subversion/tests/cmdline/svntest/main.py?pathrev=35608&r1=35607&r2=35608
 ==============================================================================
--- branches/python-3-compatibility/subversion/tests/cmdline/svntest/main.py	Fri Jan \
                30 15:33:37 2009	(r35607)
+++ branches/python-3-compatibility/subversion/tests/cmdline/svntest/main.py	Fri Jan \
30 16:00:04 2009	(r35608) @@ -609,7 +609,7 @@ def chmod_tree(path, mode, mask):
 def safe_rmtree(dirname, retry=0):
   "Remove the tree at DIRNAME, making it writable first"
   def rmtree(dirname):
-    chmod_tree(dirname, 0666, 0666)
+    chmod_tree(dirname, 0o666, 0o666)
     shutil.rmtree(dirname)
 
   if not os.path.exists(dirname):
@@ -728,7 +728,7 @@ def create_repos(path):
         new_contents = new_contents[:-1]
 
       # replace it
-      os.chmod(format_file_path, 0666)
+      os.chmod(format_file_path, 0o666)
       file_write(format_file_path, new_contents, 'wb')
 
     # post-commit
@@ -745,7 +745,7 @@ def create_repos(path):
           % repr([svnadmin_binary, 'pack', abs_path]))
 
   # make the repos world-writeable, for mod_dav_svn's sake.
-  chmod_tree(path, 0666, 0666)
+  chmod_tree(path, 0o666, 0o666)
 
 # For copying a repository
 def copy_repos(src_path, dst_path, head_revision, ignore_uuid = 1):
@@ -841,7 +841,7 @@ def create_python_hook_script (hook_path
   else:
     # For all other platforms
     file_write (hook_path, "#!%s\n%s" % (sys.executable, hook_script_code))
-    os.chmod (hook_path, 0755)
+    os.chmod (hook_path, 0o755)
 
 def write_restrictive_svnserve_conf(repo_dir, anon_access="none"):
   "Create a restrictive authz file ( no anynomous access )."

Modified: branches/python-3-compatibility/subversion/tests/cmdline/update_tests.py
URL: http://svn.collab.net/viewvc/svn/branches/python-3-compatibility/subversion/tests/cmdline/update_tests.py?pathrev=35608&r1=35607&r2=35608
 ==============================================================================
--- branches/python-3-compatibility/subversion/tests/cmdline/update_tests.py	Fri Jan \
                30 15:33:37 2009	(r35607)
+++ branches/python-3-compatibility/subversion/tests/cmdline/update_tests.py	Fri Jan \
30 16:00:04 2009	(r35608) @@ -1520,7 +1520,7 @@ def nested_in_read_only(sbox):
   svntest.actions.run_and_verify_status(B_path, expected_status)
 
   # Make enclosing wc read only
-  os.chmod(os.path.join(wc_dir, 'A', svntest.main.get_admin_name()), 0555)
+  os.chmod(os.path.join(wc_dir, 'A', svntest.main.get_admin_name()), 0o555)
 
   try:
     # Update of nested wc should still work
@@ -1542,7 +1542,7 @@ def nested_in_read_only(sbox):
                                           None, None, None, None, None, 0,
                                           '-r', '2', B_path)
   finally:
-    os.chmod(os.path.join(wc_dir, 'A', svntest.main.get_admin_name()), 0777)
+    os.chmod(os.path.join(wc_dir, 'A', svntest.main.get_admin_name()), 0o777)
 
 #----------------------------------------------------------------------
 

Modified: branches/python-3-compatibility/tools/backup/hot-backup.py.in
URL: http://svn.collab.net/viewvc/svn/branches/python-3-compatibility/tools/backup/hot-backup.py.in?pathrev=35608&r1=35607&r2=35608
 ==============================================================================
--- branches/python-3-compatibility/tools/backup/hot-backup.py.in	Fri Jan 30 15:33:37 \
                2009	(r35607)
+++ branches/python-3-compatibility/tools/backup/hot-backup.py.in	Fri Jan 30 16:00:04 \
2009	(r35608) @@ -66,7 +66,7 @@ def chmod_tree(path, mode, mask):
 def safe_rmtree(dirname, retry=0):
   "Remove the tree at DIRNAME, making it writable first"
   def rmtree(dirname):
-    chmod_tree(dirname, 0666, 0666)
+    chmod_tree(dirname, 0o666, 0o666)
     shutil.rmtree(dirname)
 
   if not os.path.exists(dirname):

Modified: branches/python-3-compatibility/tools/client-side/change-svn-wc-format.py
URL: http://svn.collab.net/viewvc/svn/branches/python-3-compatibility/tools/client-side/change-svn-wc-format.py?pathrev=35608&r1=35607&r2=35608
 ==============================================================================
--- branches/python-3-compatibility/tools/client-side/change-svn-wc-format.py	Fri Jan \
                30 15:33:37 2009	(r35607)
+++ branches/python-3-compatibility/tools/client-side/change-svn-wc-format.py	Fri Jan \
30 16:00:04 2009	(r35608) @@ -247,11 +247,11 @@ class Entries:
     assert len(str(format_nbr)) <= self.format_nbr_bytes
     format_string = '%0' + str(self.format_nbr_bytes) + 'd'
 
-    os.chmod(self.path, 0600)
+    os.chmod(self.path, 0o600)
     output = open(self.path, "r+", 0)
     output.write(format_string % format_nbr)
     output.close()
-    os.chmod(self.path, 0400)
+    os.chmod(self.path, 0o400)
 
 class Entry:
   "Describes an entry in a WC."

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=495&dsMessageId=1077334


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic