Changeset 106832 in webkit


Ignore:
Timestamp:
Feb 6, 2012 12:29:09 PM (12 years ago)
Author:
eric@webkit.org
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):

Location:
trunk/Tools
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r106814 r106832  
     12012-02-06  Eric Seidel  <eric@webkit.org>
     2
     3        webkit-patch apply-from-bug should be able to apply non-reviewed patches
     4        https://bugs.webkit.org/show_bug.cgi?id=77883
     5
     6        Reviewed by Adam Barth.
     7
     8        This is very helpful if you use bugzilla as a replacement for git-stash.
     9        Makes it simpler to re-apply the patch w/o having to look up the patch id.
     10
     11        * Scripts/webkitpy/tool/commands/download.py:
     12        (ProcessBugsMixin._fetch_list_of_patches_to_process):
     13        * Scripts/webkitpy/tool/commands/download_unittest.py:
     14        (DownloadCommandsTest.test_apply_from_bug):
     15
    1162012-02-06  Philippe Normand  <pnormand@igalia.com>
    217
  • trunk/Tools/Scripts/webkitpy/tool/commands/download.py

    r105464 r106832  
    188188            log("%s found on bug %s." % (pluralize("reviewed patch", len(patches)), bug_id))
    189189            all_patches += patches
     190        if not all_patches:
     191            log("No reviewed patches found, looking for unreviewed patches.")
     192            for bug_id in args:
     193                patches = tool.bugs.fetch_bug(bug_id).patches()
     194                log("%s found on bug %s." % (pluralize("patch", len(patches)), bug_id))
     195                all_patches += patches
    190196        return all_patches
    191197
  • trunk/Tools/Scripts/webkitpy/tool/commands/download_unittest.py

    r105945 r106832  
    105105        self.assert_execute_outputs(ApplyAttachment(), [10000], options=options, expected_stderr=expected_stderr)
    106106
    107     def test_apply_patches(self):
     107    def test_apply_from_bug(self):
    108108        options = self._default_options()
    109109        options.update = True
    110110        options.local_commit = True
     111
     112        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"
     113        self.assert_execute_outputs(ApplyFromBug(), [50001], options=options, expected_stderr=expected_stderr)
     114
    111115        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"
    112116        self.assert_execute_outputs(ApplyFromBug(), [50000], options=options, expected_stderr=expected_stderr)
Note: See TracChangeset for help on using the changeset viewer.