Changeset 51026 in webkit
- Timestamp:
- Nov 16, 2009 3:47:56 AM (14 years ago)
- Location:
- trunk/WebKitTools
- Files:
-
- 1 added
- 2 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKitTools/ChangeLog
r51025 r51026 1 2009-11-16 Adam Barth <abarth@webkit.org> 2 3 Reviewed by Eric Seidel. 4 5 Implement PatchCollection 6 https://bugs.webkit.org/show_bug.cgi?id=31541 7 8 This class holds a set of patches and lets clients iterate through 9 them. Optionally, clients can install a filter. 10 11 * Scripts/modules/patchcollection.py: Added. 12 * Scripts/modules/patchcollection_unittest.py: Added. 13 * Scripts/run-webkit-unittests: 14 1 15 2009-11-16 Eric Seidel <eric@webkit.org> 2 16 -
trunk/WebKitTools/Scripts/modules/patchcollection.py
- Property svn:executable deleted
r51025 r51026 1 1 #!/usr/bin/env python 2 # Copyright (c) 2009 Google Inc. All rights reserved.2 # Copyright (c) 2009, Google Inc. All rights reserved. 3 3 # 4 4 # Redistribution and use in source and binary forms, with or without … … 28 28 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 29 30 import unittest 30 class PatchCollection: 31 def __init__(self, bugs, filter=None): 32 self._bugs = bugs 33 self._filter = filter 34 self._patches = [] 31 35 32 from modules.bugzilla_unittest import * 33 from modules.buildbot_unittest import * 34 from modules.changelogs_unittest import * 35 from modules.committers_unittest import * 36 from modules.cpp_style_unittest import * 37 from modules.diff_parser_unittest import * 38 from modules.logging_unittest import * 39 from modules.scm_unittest import * 40 from modules.workqueue_unittest import * 36 def add(self, patch_id): 37 patch = self._bugs.fetch_attachment(patch_id) 38 if not patch: 39 return 40 if self._filter and not self._filter(patch): 41 return 42 self._patches.append(patch) 41 43 42 if __name__ == "__main__": 43 unittest.main() 44 def add_all_from_bug(self, bug_id): 45 patches = self._bugs.fetch_patches_from_bug(bug_id) 46 for patch in patches: 47 if self._filter and not self._filter(patch): 48 continue 49 self._patches.append(patch) 50 51 def next(self): 52 return self._patches.pop(0) 53 54 def __len__(self): 55 return len(self._patches) -
trunk/WebKitTools/Scripts/run-webkit-unittests
r51018 r51026 37 37 from modules.diff_parser_unittest import * 38 38 from modules.logging_unittest import * 39 from modules.patchcollection_unittest import * 39 40 from modules.scm_unittest import * 40 41 from modules.workqueue_unittest import *
Note: See TracChangeset
for help on using the changeset viewer.