Title: [106832] trunk/Tools
- Revision
- 106832
- Author
- [email protected]
- Date
- 2012-02-06 12:29:09 -0800 (Mon, 06 Feb 2012)
Log Message
webkit-patch apply-from-bug should be able to apply non-reviewed patches
https://bugs.webkit.org/show_bug.cgi?id=77883
Reviewed by Adam Barth.
This is very helpful if you use bugzilla as a replacement for git-stash.
Makes it simpler to re-apply the patch w/o having to look up the patch id.
* Scripts/webkitpy/tool/commands/download.py:
(ProcessBugsMixin._fetch_list_of_patches_to_process):
* Scripts/webkitpy/tool/commands/download_unittest.py:
(DownloadCommandsTest.test_apply_from_bug):
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (106831 => 106832)
--- trunk/Tools/ChangeLog 2012-02-06 20:12:38 UTC (rev 106831)
+++ trunk/Tools/ChangeLog 2012-02-06 20:29:09 UTC (rev 106832)
@@ -1,3 +1,18 @@
+2012-02-06 Eric Seidel <[email protected]>
+
+ webkit-patch apply-from-bug should be able to apply non-reviewed patches
+ https://bugs.webkit.org/show_bug.cgi?id=77883
+
+ Reviewed by Adam Barth.
+
+ This is very helpful if you use bugzilla as a replacement for git-stash.
+ Makes it simpler to re-apply the patch w/o having to look up the patch id.
+
+ * Scripts/webkitpy/tool/commands/download.py:
+ (ProcessBugsMixin._fetch_list_of_patches_to_process):
+ * Scripts/webkitpy/tool/commands/download_unittest.py:
+ (DownloadCommandsTest.test_apply_from_bug):
+
2012-02-06 Philippe Normand <[email protected]>
[webkitpy] cpp style-checker complains about readability/naming in GStreamer elements source files
Modified: trunk/Tools/Scripts/webkitpy/tool/commands/download.py (106831 => 106832)
--- trunk/Tools/Scripts/webkitpy/tool/commands/download.py 2012-02-06 20:12:38 UTC (rev 106831)
+++ trunk/Tools/Scripts/webkitpy/tool/commands/download.py 2012-02-06 20:29:09 UTC (rev 106832)
@@ -187,6 +187,12 @@
patches = tool.bugs.fetch_bug(bug_id).reviewed_patches()
log("%s found on bug %s." % (pluralize("reviewed patch", len(patches)), bug_id))
all_patches += patches
+ if not all_patches:
+ log("No reviewed patches found, looking for unreviewed patches.")
+ for bug_id in args:
+ patches = tool.bugs.fetch_bug(bug_id).patches()
+ log("%s found on bug %s." % (pluralize("patch", len(patches)), bug_id))
+ all_patches += patches
return all_patches
Modified: trunk/Tools/Scripts/webkitpy/tool/commands/download_unittest.py (106831 => 106832)
--- trunk/Tools/Scripts/webkitpy/tool/commands/download_unittest.py 2012-02-06 20:12:38 UTC (rev 106831)
+++ trunk/Tools/Scripts/webkitpy/tool/commands/download_unittest.py 2012-02-06 20:29:09 UTC (rev 106832)
@@ -104,10 +104,14 @@
expected_stderr = "Updating working directory\nProcessing 1 patch from 1 bug.\nProcessing patch 10000 from bug 50000.\n"
self.assert_execute_outputs(ApplyAttachment(), [10000], options=options, expected_stderr=expected_stderr)
- def test_apply_patches(self):
+ def test_apply_from_bug(self):
options = self._default_options()
options.update = True
options.local_commit = True
+
+ expected_stderr = "Updating working directory\n0 reviewed patches found on bug 50001.\nNo reviewed patches found, looking for unreviewed patches.\n1 patch found on bug 50001.\nProcessing 1 patch from 1 bug.\nProcessing patch 10002 from bug 50001.\n"
+ self.assert_execute_outputs(ApplyFromBug(), [50001], options=options, expected_stderr=expected_stderr)
+
expected_stderr = "Updating working directory\n2 reviewed patches found on bug 50000.\nProcessing 2 patches from 1 bug.\nProcessing patch 10000 from bug 50000.\nProcessing patch 10001 from bug 50000.\n"
self.assert_execute_outputs(ApplyFromBug(), [50000], options=options, expected_stderr=expected_stderr)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes