Changeset 182119 in webkit
- Timestamp:
- Mar 29, 2015 11:47:04 AM (9 years ago)
- Location:
- trunk/Tools
- Files:
-
- 1 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/BuildSlaveSupport/clean-build
r158393 r182119 51 51 shutil.rmtree(webkit_build_directory) 52 52 53 subprocess.Popen(['python', os.path.join(os.path.dirname(__file__), "..", "Scripts", "clean-webkit"]) 54 53 55 if __name__ == '__main__': 54 56 sys.exit(main()) -
trunk/Tools/ChangeLog
r182103 r182119 1 2015-03-29 Youenn Fablet <youenn.fablet@crf.canon.fr> 2 3 [buildbot] clean-build script should remove untracked files and revert local changes too 4 https://bugs.webkit.org/show_bug.cgi?id=142400 5 6 Reviewed by Ryosuke Niwa. 7 8 This patch cleans the WebKit folder by deleting SCM untracked files and reverting changes for tracked files. 9 10 * BuildSlaveSupport/clean-build: 11 (main): Adding call to Tools/Scripts/clean-webkit. 12 * Scripts/clean-webkit: Added. 13 (main): Removes untracked and changed files. 14 * Scripts/webkitpy/common/checkout/scm/git.py: 15 (Git.untracked_files): Retrieves GIT untracked files. 16 * Scripts/webkitpy/common/checkout/scm/scm.py: 17 (SCM.untracked_files): Retrieves SVN untracked files. 18 (SCM): 19 (SCM.discard_untracked_files): Deletes untracked files/folders. 20 * Scripts/webkitpy/common/checkout/scm/scm_unittest.py: 21 (SCMTest._shared_test_untracked_files): Unit testing for untracked files. 22 (test_untracked_files): 23 (GitSVNTest.test_untracked_files): 24 * Scripts/webkitpy/common/checkout/scm/svn.py: 25 (SVN.untracked_files): 26 1 27 2015-03-27 Gyuyoung Kim <gyuyoung.kim@samsung.com> 2 28 -
trunk/Tools/Scripts/webkitpy/common/checkout/scm/git.py
r175991 r182119 215 215 return self.run_status_and_extract_filenames(status_command, updated_in_index_regexp) 216 216 217 def untracked_files(self): 218 status_command = [self.executable_name, 'status', '--short', '--ignored'] 219 status_command.extend(self._patch_directories) 220 # Remove the last / for folders to match SVN behavior. 221 return [value if not value.endswith('/') else value[:-1] for value in self.run_status_and_extract_filenames(status_command, "^[?!][?!] (?P<filename>.+)$")] 222 217 223 def changed_files(self, git_commit=None): 218 224 # FIXME: --diff-filter could be used to avoid the "extract_filenames" step. -
trunk/Tools/Scripts/webkitpy/common/checkout/scm/scm.py
r159796 r182119 205 205 self._subclass_must_implement() 206 206 207 def untracked_files(self): 208 self._subclass_must_implement() 209 210 def discard_untracked_files(self): 211 for filename in self.untracked_files(): 212 if self._filesystem.isdir(filename): 213 self._filesystem.rmtree(filename) 214 else: 215 self._filesystem.remove(filename) 216 207 217 def discard_working_directory_changes(self): 208 218 self._subclass_must_implement() -
trunk/Tools/Scripts/webkitpy/common/checkout/scm/scm_unittest.py
r174136 r182119 310 310 os.chdir(old_cwd) 311 311 312 def _shared_test_untracked_files(self, scm): 313 write_into_file_at_path("test_file_new", "new content") 314 self.assertItemsEqual(scm.untracked_files(), ["test_file_new"]) 315 316 os.mkdir("test_dir_new") 317 write_into_file_at_path("test_dir_new/test_file_new", "new stuff") 318 self.assertItemsEqual(scm.untracked_files(), ["test_dir_new", "test_file_new"]) 319 320 # Validate that untracked_files do not change with .gitignore/svn:ignore. 321 # FIXME: Add svn:ignore property setting 322 write_into_file_at_path(".gitignore", "test_file_new\ntest_dir_new\n") 323 self.assertItemsEqual(scm.untracked_files(), [".gitignore", "test_dir_new", "test_file_new"]) 324 325 old_cwd = os.getcwd() 326 os.chdir("test_dir_new") 327 # Validate that untracked_files do not change with our cwd. 328 self.assertItemsEqual(scm.untracked_files(), [".gitignore", "test_dir_new", "test_file_new"]) 329 330 os.chdir(old_cwd) 331 shutil.rmtree("test_dir_new") 332 os.remove(".gitignore") 333 os.remove("test_file_new") 334 312 335 def _shared_test_added_files(self): 313 336 write_into_file_at_path("test_file", "changed content") … … 807 830 self._shared_test_changed_files() 808 831 832 def test_untracked_files(self): 833 self._shared_test_untracked_files(self.scm) 834 809 835 def test_changed_files_for_revision(self): 810 836 self._shared_test_changed_files_for_revision() … … 1460 1486 self._shared_test_changed_files() 1461 1487 1488 def test_untracked_files(self): 1489 self._shared_test_untracked_files(self.scm) 1490 1462 1491 def test_changed_files_for_revision(self): 1463 1492 self._shared_test_changed_files_for_revision() -
trunk/Tools/Scripts/webkitpy/common/checkout/scm/svn.py
r167957 r182119 145 145 return self._run_svn(["diff"], cwd=self.checkout_root, decode_output=False) != "" 146 146 147 def untracked_files(self): 148 status_command = [self.executable_name, "status", "--no-ignore"] 149 status_command.extend(self._patch_directories) 150 return self.run_status_and_extract_filenames(status_command, self._status_regexp("I?")) 151 147 152 def discard_working_directory_changes(self): 148 153 # Make sure there are no locks lying around from a previously aborted svn invocation.
Note: See TracChangeset
for help on using the changeset viewer.