def review_patch(self, patch): task = StyleQueueTask(self, patch) try: style_check_succeeded = task.run() if not style_check_succeeded: # Caller unlocks when review_patch returns True, so we only need to unlock on transient failure. self._unlock_patch(patch) return style_check_succeeded except UnableToApplyPatch as e: self._did_error(patch, "%s unable to apply patch." % self.name) return False except PatchIsNotValid as error: self._did_error( patch, "%s did not process patch. Reason: %s" % (self.name, error.failure_message)) return False except ScriptError as e: output = re.sub(r'Failed to run .+ exit_code: 1', '', e.output) message = "Attachment %s did not pass %s:\n\n%s\n\nIf any of these errors are false positives, please file a bug against check-webkit-style." % ( patch.id(), self.name, output) self._tool.bugs.post_comment_to_bug(patch.bug_id(), message, cc=self.watchers) self._did_fail(patch) return False return True
def review_patch(self, patch): task = StyleQueueTask(self, patch) if not task.validate(): self._did_error(patch, "%s did not process patch." % self.name) return False try: return task.run() except UnableToApplyPatch, e: self._did_error(patch, "%s unable to apply patch." % self.name) return False
def review_patch(self, patch): task = StyleQueueTask(self, patch) try: style_check_succeeded = task.run() if not style_check_succeeded: # Caller unlocks when review_patch returns True, so we only need to unlock on transient failure. self._unlock_patch(patch) return style_check_succeeded except UnableToApplyPatch, e: self._did_error(patch, "%s unable to apply patch." % self.name) return False