summaryrefslogtreecommitdiff
path: root/Tools/Scripts/webkitpy/tool/commands/download.py
diff options
context:
space:
mode:
Diffstat (limited to 'Tools/Scripts/webkitpy/tool/commands/download.py')
-rw-r--r--Tools/Scripts/webkitpy/tool/commands/download.py23
1 files changed, 23 insertions, 0 deletions
diff --git a/Tools/Scripts/webkitpy/tool/commands/download.py b/Tools/Scripts/webkitpy/tool/commands/download.py
index 611ca9254..4f6b7370e 100644
--- a/Tools/Scripts/webkitpy/tool/commands/download.py
+++ b/Tools/Scripts/webkitpy/tool/commands/download.py
@@ -202,6 +202,23 @@ class ProcessBugsMixin(object):
return all_patches
+class ProcessURLsMixin(object):
+ def _fetch_list_of_patches_to_process(self, options, args, tool):
+ all_patches = []
+ for url in args:
+ bug_id = urls.parse_bug_id(url)
+ if bug_id:
+ patches = tool.bugs.fetch_bug(bug_id).patches()
+ log("%s found on bug %s." % (pluralize("patch", len(patches)), bug_id))
+ all_patches += patches
+
+ attachment_id = urls.parse_attachment_id(url)
+ if attachment_id:
+ all_patches += tool.bugs.fetch_attachment(attachment_id)
+
+ return all_patches
+
+
class CheckStyle(AbstractPatchSequencingCommand, ProcessAttachmentsMixin):
name = "check-style"
help_text = "Run check-webkit-style on the specified attachments"
@@ -317,6 +334,12 @@ class LandFromBug(AbstractPatchLandingCommand, ProcessBugsMixin):
show_in_main_help = True
+class LandFromURL(AbstractPatchLandingCommand, ProcessURLsMixin):
+ name = "land-from-url"
+ help_text = "Land all patches on the given URLs, optionally building and testing them first"
+ argument_names = "URL [URLS]"
+
+
class ValidateChangelog(AbstractSequencedCommand):
name = "validate-changelog"
help_text = "Validate that the ChangeLogs and reviewers look reasonable"