Changeset 167751 in webkit


Ignore:
Timestamp:
Apr 24, 2014 12:07:06 AM (10 years ago)
Author:
jcraig@apple.com
Message:

prepare-Changelog and svn-create-patch should optionally run check-webkit-style.
https://bugs.webkit.org/show_bug.cgi?id=131115

Reviewed by Daniel Bates.

Added [--[no-]style] param to run check-webkit-style as part of prepare-Changelog and svn-create-patch.

  • Scripts/commit-log-editor: Added --no-style.
  • Scripts/prepare-ChangeLog: Primary patch.

(main): Primary patch.
(createPatchCommand): Added --no-style.

  • Scripts/svn-create-patch: Primary patch.
  • Scripts/webkit-tools-completion.sh: Added --style and --no-style.
  • Scripts/webkitpy/common/checkout/scm/svn.py: Added --no-style.

(SVN.create_patch): Added --no-style.

Location:
trunk/Tools
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r167736 r167751  
     12014-04-23  James Craig  <jcraig@apple.com>
     2
     3        prepare-Changelog and svn-create-patch should optionally run check-webkit-style.
     4        https://bugs.webkit.org/show_bug.cgi?id=131115
     5
     6        Reviewed by Daniel Bates.
     7
     8        Added [--[no-]style] param to run check-webkit-style as part of prepare-Changelog and svn-create-patch.
     9
     10        * Scripts/commit-log-editor: Added --no-style.
     11        * Scripts/prepare-ChangeLog: Primary patch.
     12        (main): Primary patch.
     13        (createPatchCommand): Added --no-style.
     14        * Scripts/svn-create-patch: Primary patch.
     15        * Scripts/webkit-tools-completion.sh: Added --style and --no-style.
     16        * Scripts/webkitpy/common/checkout/scm/svn.py: Added --no-style.
     17        (SVN.create_patch): Added --no-style.
     18
    1192014-04-23  Anders Carlsson  <andersca@apple.com>
    220
  • trunk/Tools/Scripts/commit-log-editor

    r167243 r167751  
    177177    }
    178178    if ($webkitGenerateCommitMessage ne "false") {
    179         open CHANGELOG_ENTRIES, "-|", "$FindBin::Bin/prepare-ChangeLog --git-index --no-write" or die "prepare-ChangeLog failed: $!.\n";
     179        open CHANGELOG_ENTRIES, "-|", "$FindBin::Bin/prepare-ChangeLog --git-index --no-write --no-style" or die "prepare-ChangeLog failed: $!.\n";
    180180        while (<CHANGELOG_ENTRIES>) {
    181181            print NEWLOG normalizeLineEndings($_, $endl);
  • trunk/Tools/Scripts/prepare-ChangeLog

    r166235 r167751  
    129129    my $gitIndex = "";
    130130    my $gitReviewer = "";
     131    my $checkWebKitStyle = 1;
    131132    my $openChangeLogs = 0;
    132133    my $writeChangeLogs = 1;
     
    145146                   "git-reviewer:s" => \$gitReviewer,
    146147                   "help|h!" => \$showHelp,
     148                   "style!" => \$checkWebKitStyle,
    147149                   "open|o!" => \$openChangeLogs,
    148150                   "write!" => \$writeChangeLogs,
     
    159161        print STDERR "                  This option is useful when the git commit lacks a Signed-Off-By: line\n";
    160162        print STDERR "  -h|--help       Show this help message\n";
     163        print STDERR "  --[no-]style    Run check-webkit-style script when done (default: style)\n";
    161164        print STDERR "  -o|--open       Open ChangeLogs in an editor when done\n";
    162165        print STDERR "  --[no-]update   Update ChangeLogs from svn before adding entry (default: update)\n";
     
    225228        printDiff($changedFiles, $gitCommit, $gitIndex, $mergeBase);
    226229    }
     230
     231    if ($checkWebKitStyle) {
     232        print STDERR "  Running check-webkit-style.\n  ";
     233        system "$FindBin::Bin/check-webkit-style";
     234    } 
    227235
    228236    # Open ChangeLogs.
     
    16581666    my $command;
    16591667    if (isSVN()) {
    1660         $command = "'$FindBin::Bin/svn-create-patch' $changedFilesString";
     1668        $command = "'$FindBin::Bin/svn-create-patch --no-style' $changedFilesString";
    16611669    } elsif (isGit()) {
    16621670        $command = GIT . " diff -M -C " . diffFromToString($gitCommit, $gitIndex, $mergeBase);
  • trunk/Tools/Scripts/svn-create-patch

    r165676 r167751  
    7878
    7979my $showHelp;
     80my $checkWebKitStyle = 1;
    8081my $ignoreChangelogs = 0;
    8182my $devNull = File::Spec->devnull();
     
    8384my $result = GetOptions(
    8485    "help"       => \$showHelp,
    85     "ignore-changelogs"    => \$ignoreChangelogs
     86    "ignore-changelogs" => \$ignoreChangelogs,
     87    "style!" => \$checkWebKitStyle,
    8688);
    8789if (!$result || $showHelp) {
    88     print STDERR basename($0) . " [-h|--help] [--ignore-changelogs] [svndir1 [svndir2 ...]]\n";
     90    print STDERR basename($0) . " [-h|--help] [--ignore-changelogs] [--[no-]style] [svndir1 [svndir2 ...]]\n";
    8991    exit 1;
    9092}
     
    105107for my $path (sort patchpathcmp values %diffFiles) {
    106108    generateDiff($path, $prefix);
     109}
     110
     111if ($checkWebKitStyle) {
     112    print STDERR "  Running check-webkit-style.\n  ";
     113    system "$FindBin::Bin/check-webkit-style";
    107114}
    108115
  • trunk/Tools/Scripts/webkit-tools-completion.sh

    r137237 r167751  
    110110complete -F _webkit-patch_complete webkit-patch
    111111complete -o default -W "--continue --fix-merged --help --no-continue --no-warnings --warnings -c -f -h -w" resolve-ChangeLogs
    112 complete -o default -W "--bug --diff --git-commit --git-index --git-reviewer --help --no-update --no-write --open --update --write -d -h -o" prepare-ChangeLog
     112complete -o default -W "--bug --diff --git-commit --git-index --git-reviewer --help --no-style --no-update --no-write --open --style --update --write -d -h -o" prepare-ChangeLog
    113113complete -W "--clean --debug --help -h" build-webkit
    114114complete -o default -W "--add-platform-exceptions --complex-text --configuration --guard-malloc --help --http --ignore-tests --launch-safari --leaks --merge-leak-depth --new-test-results --no-http --no-show-results --no-new-test-results --no-sample-on-timeout --no-strip-editing-callbacks --pixel-tests --platform --port --quiet --random --reset-results --results-directory --reverse --root --sample-on-timeout --singly --skipped --slowest --strict --strip-editing-callbacks --threaded --timeout --tolerance --use-remote-links-to-tests --valgrind --verbose -1 -c -g -h -i -l -m -o -p -q -t -v" run-webkit-tests
  • trunk/Tools/Scripts/webkitpy/common/checkout/scm/svn.py

    r159796 r167751  
    274274            changed_files = []
    275275        script_path = self._filesystem.join(self.checkout_root, "Tools", "Scripts", "svn-create-patch")
    276         return self.run([script_path] + changed_files,
     276        return self.run([script_path, "--no-style"] + changed_files,
    277277            cwd=self.checkout_root, return_stderr=False,
    278278            decode_output=False)
Note: See TracChangeset for help on using the changeset viewer.