Changeset 51232 in webkit
- Timestamp:
- Nov 19, 2009 11:01:26 PM (14 years ago)
- Location:
- trunk/WebKitTools
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKitTools/ChangeLog
r51231 r51232 1 2009-11-19 Adam Barth <abarth@webkit.org> 2 3 Reviewed by Eric Seidel. 4 5 Abstract AbstractPatchProcessingCommand from AbstractPatchLandingCommand 6 https://bugs.webkit.org/show_bug.cgi?id=31707 7 8 This is to help when we implement build-attachment. 9 10 * Scripts/bugzilla-tool: 11 1 12 2009-11-19 Adam Barth <abarth@webkit.org> 2 13 -
trunk/WebKitTools/Scripts/bugzilla-tool
r51231 r51232 387 387 388 388 389 class AbstractPatchLandingCommand(Command): 390 def __init__(self, description, args_description): 391 options = WebKitLandingScripts.cleaning_options() + WebKitLandingScripts.land_options() 389 class AbstractPatchProcessingCommand(Command): 390 def __init__(self, description, args_description, options): 392 391 Command.__init__(self, description, args_description, options=options) 393 392 394 @staticmethod 395 def _fetch_list_of_patches_to_land(options, args, tool): 393 def _fetch_list_of_patches_to_process(self, options, args, tool): 394 raise NotImplementedError, "subclasses must implement" 395 396 def _prepare_to_process(self, options, args, tool): 396 397 raise NotImplementedError, "subclasses must implement" 397 398 … … 408 409 error("%s required" % self.argument_names) 409 410 411 self._prepare_to_process(options, args, tool) 412 patches = self._fetch_list_of_patches_to_process(options, args, tool) 413 414 # It's nice to print out total statistics. 415 bugs_to_patches = self._collect_patches_by_bug(patches) 416 log("Processing %s from %s." % (pluralize("patch", len(patches)), pluralize("bug", len(bugs_to_patches)))) 417 418 for patch in patches: 419 self._process_patch(patch, options, args, tool) 420 421 422 class AbstractPatchLandingCommand(AbstractPatchProcessingCommand): 423 def __init__(self, description, args_description): 424 options = WebKitLandingScripts.cleaning_options() + WebKitLandingScripts.land_options() 425 AbstractPatchProcessingCommand.__init__(self, description, args_description, options) 426 427 def _prepare_to_process(self, options, args, tool): 410 428 # Check the tree status first so we can fail early. 411 429 WebKitLandingScripts.ensure_builders_are_green(tool.buildbot, options) 412 430 WebKitLandingScripts.prepare_clean_working_directory(tool.scm(), options) 413 431 414 patches = self._fetch_list_of_patches_to_land(options, args, tool) 415 416 # It's nice to print out total statistics. 417 bugs_to_patches = self._collect_patches_by_bug(patches) 418 log("Landing %s from %s." % (pluralize("patch", len(patches)), pluralize("bug", len(bugs_to_patches)))) 419 420 for patch in patches: 421 WebKitLandingScripts.land_patch_and_handle_errors(patch, options, tool) 432 def _process_patch(self, patch, options, args, tool): 433 WebKitLandingScripts.land_patch_and_handle_errors(patch, options, tool) 422 434 423 435 … … 426 438 AbstractPatchLandingCommand.__init__(self, "Lands a patches from bugzilla, optionally building and testing them first", "ATTACHMENT_ID [ATTACHMENT_IDS]") 427 439 428 @staticmethod 429 def _fetch_list_of_patches_to_land(options, args, tool): 440 def _fetch_list_of_patches_to_process(self, options, args, tool): 430 441 return map(lambda patch_id: tool.bugs.fetch_attachment(patch_id), args) 431 442 … … 435 446 AbstractPatchLandingCommand.__init__(self, "Lands all patches on the given bugs, optionally building and testing them first", "BUGID [BUGIDS]") 436 447 437 @staticmethod 438 def _fetch_list_of_patches_to_land(options, args, tool): 448 def _fetch_list_of_patches_to_process(self, options, args, tool): 439 449 all_patches = [] 440 450 for bug_id in args:
Note: See TracChangeset
for help on using the changeset viewer.