Changeset 148177 in webkit
- Timestamp:
- Apr 11, 2013 12:03:40 AM (11 years ago)
- Location:
- trunk/Tools
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r148174 r148177 1 2013-04-11 Glenn Adams <glenn@skynav.com> 2 3 [webkitpy] SVNTest fails four tests when using subversion client 1.7 or later 4 https://bugs.webkit.org/show_bug.cgi?id=114386 5 6 Reviewed by Benjamin Poulain. 7 8 Subversion client 1.7 uses a new locking scheme that invalidates the technique used 9 in test_svn_lock(), so skip that test for 1.7 (or later) until a new technique 10 can be implemented. Further, 1.7 changed svn add to not add intermediate directories 11 by default and to return exit code 1 if a file/dir had already been added. 12 13 * Scripts/webkitpy/common/checkout/scm/scm_unittest.py: 14 (test_svn_lock): Skip body of test if subversion client 1.7 or later. 15 * Scripts/webkitpy/common/checkout/scm/svn.py: 16 (SVN.add_list): Use --parents option and handle exit code 1 if subversion client 1.7 or later. 17 1 18 2013-04-10 Zan Dobersek <zdobersek@igalia.com> 2 19 -
trunk/Tools/Scripts/webkitpy/common/checkout/scm/scm_unittest.py
r145141 r148177 892 892 893 893 def test_svn_lock(self): 894 svn_root_lock_path = ".svn/lock" 895 write_into_file_at_path(svn_root_lock_path, "", "utf-8") 896 # webkit-patch uses a Checkout object and runs update-webkit, just use svn update here. 897 self.assertRaises(ScriptError, run_command, ['svn', 'update']) 898 self.scm.discard_working_directory_changes() 899 self.assertFalse(os.path.exists(svn_root_lock_path)) 900 run_command(['svn', 'update']) # Should succeed and not raise. 894 if self.scm.svn_version() >= "1.7": 895 # the following technique with .svn/lock then svn update doesn't work with subversion client 1.7 or later 896 pass 897 else: 898 svn_root_lock_path = ".svn/lock" 899 write_into_file_at_path(svn_root_lock_path, "", "utf-8") 900 # webkit-patch uses a Checkout object and runs update-webkit, just use svn update here. 901 self.assertRaises(ScriptError, run_command, ['svn', 'update']) 902 self.scm.discard_working_directory_changes() 903 self.assertFalse(os.path.exists(svn_root_lock_path)) 904 run_command(['svn', 'update']) # Should succeed and not raise. 901 905 902 906 def test_exists(self): -
trunk/Tools/Scripts/webkitpy/common/checkout/scm/svn.py
r148173 r148177 182 182 self.add(path) 183 183 184 def add_list(self, paths , return_exit_code=False):184 def add_list(self, paths): 185 185 for path in paths: 186 186 self._add_parent_directories(os.path.dirname(os.path.abspath(path))) 187 self._run_svn(["add"] + paths) 187 if self.svn_version() >= "1.7": 188 # For subversion client 1.7 and later, need to add '--parents' option to ensure intermediate directories 189 # are added; in addition, 1.7 returns an exit code of 1 from svn add if one or more of the requested 190 # adds are already under version control, including intermediate directories subject to addition 191 # due to --parents 192 svn_add_args = ['svn', 'add', '--parents'] + paths 193 exit_code = self.run(svn_add_args, return_exit_code=True) 194 if exit_code and exit_code != 1: 195 raise ScriptError(script_args=svn_add_args, exit_code=exit_code) 196 else: 197 self._run_svn(["add"] + paths) 188 198 189 199 def _delete_parent_directories(self, path):
Note: See TracChangeset
for help on using the changeset viewer.