Changeset 52910 in webkit


Ignore:
Timestamp:
Jan 7, 2010 2:12:54 AM (14 years ago)
Author:
abarth@webkit.org
Message:

2010-01-07 Adam Barth <abarth@webkit.org>

Reviewed by Maciej Stachowiak.

Check style before uploading a patch
https://bugs.webkit.org/show_bug.cgi?id=33314

  • Scripts/webkitpy/commands/upload.py:
  • Scripts/webkitpy/steps/checkstyle.py:
  • Scripts/webkitpy/steps/options.py:
Location:
trunk/WebKitTools
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKitTools/ChangeLog

    r52909 r52910  
     12010-01-07  Adam Barth  <abarth@webkit.org>
     2
     3        Reviewed by Maciej Stachowiak.
     4
     5        Check style before uploading a patch
     6        https://bugs.webkit.org/show_bug.cgi?id=33314
     7
     8        * Scripts/webkitpy/commands/upload.py:
     9        * Scripts/webkitpy/steps/checkstyle.py:
     10        * Scripts/webkitpy/steps/options.py:
     11
    1122010-01-07  Adam Barth  <abarth@webkit.org>
    213
  • trunk/WebKitTools/Scripts/webkitpy/commands/upload.py

    r52909 r52910  
    116116    show_in_main_help = True
    117117    steps = [
     118        steps.CheckStyle,
    118119        steps.ConfirmDiff,
    119120        steps.ObsoletePatches,
     
    151152    show_in_main_help = True
    152153    steps = [
     154        steps.CheckStyle,
    153155        steps.PromptForBugOrTitle,
    154156        steps.CreateBug,
  • trunk/WebKitTools/Scripts/webkitpy/steps/checkstyle.py

    r52714 r52910  
    2727# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    2828
     29from webkitpy.executive import ScriptError
    2930from webkitpy.steps.abstractstep import AbstractStep
     31from webkitpy.steps.options import Options
     32from webkitpy.webkit_logging import error
    3033
    3134class CheckStyle(AbstractStep):
     35    @classmethod
     36    def options(cls):
     37        return [
     38            Options.non_interactive,
     39            Options.check_style,
     40        ]
     41
    3242    def run(self, state):
    33         self._run_script("check-webkit-style")
     43        if not self._options.check_style:
     44            return
     45        try:
     46            self._run_script("check-webkit-style")
     47        except ScriptError, e:
     48            if self._options.non_interactive:
     49                # We need to re-raise the exception here to have the
     50                # style-queue do the right thing.
     51                raise e
     52            if not self._tool.user.confirm("Are you sure you want to continue?"):
     53                exit(1)
  • trunk/WebKitTools/Scripts/webkitpy/steps/options.py

    r52726 r52910  
    3434    cc = make_option("--cc", action="store", type="string", dest="cc", help="Comma-separated list of email addresses to carbon-copy.")
    3535    check_builders = make_option("--ignore-builders", action="store_false", dest="check_builders", default=True, help="Don't check to see if the build.webkit.org builders are green before landing.")
     36    check_style = make_option("--ignore-style", action="store_false", dest="check_style", default=True, help="Don't check to see if the patch has proper style before uploading.")
    3637    clean = make_option("--no-clean", action="store_false", dest="clean", default=True, help="Don't check if the working directory is clean before applying patches")
    3738    close_bug = make_option("--no-close", action="store_false", dest="close_bug", default=True, help="Leave bug open after landing.")
Note: See TracChangeset for help on using the changeset viewer.