Commit 81d54d1f authored by eric@webkit.org's avatar eric@webkit.org
Browse files

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):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@106832 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 07d6d0ca
2012-02-06 Eric Seidel <eric@webkit.org>
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 <pnormand@igalia.com>
 
[webkitpy] cpp style-checker complains about readability/naming in GStreamer elements source files
......@@ -187,6 +187,12 @@ class ProcessBugsMixin(object):
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
......
......@@ -104,10 +104,14 @@ class DownloadCommandsTest(CommandsTest):
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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment