Title: [167751] trunk/Tools
Revision
167751
Author
jcr...@apple.com
Date
2014-04-24 00:07:06 -0700 (Thu, 24 Apr 2014)

Log 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.

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (167750 => 167751)


--- trunk/Tools/ChangeLog	2014-04-24 06:37:51 UTC (rev 167750)
+++ trunk/Tools/ChangeLog	2014-04-24 07:07:06 UTC (rev 167751)
@@ -1,3 +1,21 @@
+2014-04-23  James Craig  <jcr...@apple.com>
+
+        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.
+
 2014-04-23  Anders Carlsson  <ander...@apple.com>
 
         Try to fix iOS build.

Modified: trunk/Tools/Scripts/commit-log-editor (167750 => 167751)


--- trunk/Tools/Scripts/commit-log-editor	2014-04-24 06:37:51 UTC (rev 167750)
+++ trunk/Tools/Scripts/commit-log-editor	2014-04-24 07:07:06 UTC (rev 167751)
@@ -176,7 +176,7 @@
         chomp($webkitGenerateCommitMessage = `git config --bool core.webkitGenerateCommitMessage`);
     }
     if ($webkitGenerateCommitMessage ne "false") {
-        open CHANGELOG_ENTRIES, "-|", "$FindBin::Bin/prepare-ChangeLog --git-index --no-write" or die "prepare-ChangeLog failed: $!.\n";
+        open CHANGELOG_ENTRIES, "-|", "$FindBin::Bin/prepare-ChangeLog --git-index --no-write --no-style" or die "prepare-ChangeLog failed: $!.\n";
         while (<CHANGELOG_ENTRIES>) {
             print NEWLOG normalizeLineEndings($_, $endl);
         }

Modified: trunk/Tools/Scripts/prepare-ChangeLog (167750 => 167751)


--- trunk/Tools/Scripts/prepare-ChangeLog	2014-04-24 06:37:51 UTC (rev 167750)
+++ trunk/Tools/Scripts/prepare-ChangeLog	2014-04-24 07:07:06 UTC (rev 167751)
@@ -128,6 +128,7 @@
     my $gitCommit = 0;
     my $gitIndex = "";
     my $gitReviewer = "";
+    my $checkWebKitStyle = 1;
     my $openChangeLogs = 0;
     my $writeChangeLogs = 1;
     my $showHelp = 0;
@@ -144,6 +145,7 @@
                    "git-index" => \$gitIndex,
                    "git-reviewer:s" => \$gitReviewer,
                    "help|h!" => \$showHelp,
+                   "style!" => \$checkWebKitStyle,
                    "open|o!" => \$openChangeLogs,
                    "write!" => \$writeChangeLogs,
                    "update!" => \$updateChangeLogs);
@@ -158,6 +160,7 @@
         print STDERR "  --git-reviewer  When populating the ChangeLogs from a git commit claim that the spcified name reviewed the change.\n";
         print STDERR "                  This option is useful when the git commit lacks a Signed-Off-By: line\n";
         print STDERR "  -h|--help       Show this help message\n";
+        print STDERR "  --[no-]style    Run check-webkit-style script when done (default: style)\n";
         print STDERR "  -o|--open       Open ChangeLogs in an editor when done\n";
         print STDERR "  --[no-]update   Update ChangeLogs from svn before adding entry (default: update)\n";
         print STDERR "  --[no-]write    Write ChangeLogs to disk (otherwise send new entries to stdout) (default: write)\n";
@@ -225,6 +228,11 @@
         printDiff($changedFiles, $gitCommit, $gitIndex, $mergeBase);
     }
 
+    if ($checkWebKitStyle) {
+        print STDERR "  Running check-webkit-style.\n  ";
+        system "$FindBin::Bin/check-webkit-style";
+    }  
+
     # Open ChangeLogs.
     if ($openChangeLogs && @$changeLogs) {
         openChangeLogs($changeLogs);
@@ -1657,7 +1665,7 @@
 
     my $command;
     if (isSVN()) {
-        $command = "'$FindBin::Bin/svn-create-patch' $changedFilesString";
+        $command = "'$FindBin::Bin/svn-create-patch --no-style' $changedFilesString";
     } elsif (isGit()) {
         $command = GIT . " diff -M -C " . diffFromToString($gitCommit, $gitIndex, $mergeBase);
         $command .= " -- $changedFilesString" unless $gitCommit;

Modified: trunk/Tools/Scripts/svn-create-patch (167750 => 167751)


--- trunk/Tools/Scripts/svn-create-patch	2014-04-24 06:37:51 UTC (rev 167750)
+++ trunk/Tools/Scripts/svn-create-patch	2014-04-24 07:07:06 UTC (rev 167751)
@@ -77,15 +77,17 @@
 $ENV{'LC_ALL'} = 'C';
 
 my $showHelp;
+my $checkWebKitStyle = 1;
 my $ignoreChangelogs = 0;
 my $devNull = File::Spec->devnull();
 
 my $result = GetOptions(
     "help"       => \$showHelp,
-    "ignore-changelogs"    => \$ignoreChangelogs
+    "ignore-changelogs" => \$ignoreChangelogs,
+    "style!" => \$checkWebKitStyle,
 );
 if (!$result || $showHelp) {
-    print STDERR basename($0) . " [-h|--help] [--ignore-changelogs] [svndir1 [svndir2 ...]]\n";
+    print STDERR basename($0) . " [-h|--help] [--ignore-changelogs] [--[no-]style] [svndir1 [svndir2 ...]]\n";
     exit 1;
 }
 
@@ -106,6 +108,11 @@
     generateDiff($path, $prefix);
 }
 
+if ($checkWebKitStyle) {
+    print STDERR "  Running check-webkit-style.\n  ";
+    system "$FindBin::Bin/check-webkit-style";
+}
+
 exit 0;
 
 # Overall sort, considering multiple criteria.

Modified: trunk/Tools/Scripts/webkit-tools-completion.sh (167750 => 167751)


--- trunk/Tools/Scripts/webkit-tools-completion.sh	2014-04-24 06:37:51 UTC (rev 167750)
+++ trunk/Tools/Scripts/webkit-tools-completion.sh	2014-04-24 07:07:06 UTC (rev 167751)
@@ -109,6 +109,6 @@
 
 complete -F _webkit-patch_complete webkit-patch
 complete -o default -W "--continue --fix-merged --help --no-continue --no-warnings --warnings -c -f -h -w" resolve-ChangeLogs
-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
+complete -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
 complete -W "--clean --debug --help -h" build-webkit
 complete -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

Modified: trunk/Tools/Scripts/webkitpy/common/checkout/scm/svn.py (167750 => 167751)


--- trunk/Tools/Scripts/webkitpy/common/checkout/scm/svn.py	2014-04-24 06:37:51 UTC (rev 167750)
+++ trunk/Tools/Scripts/webkitpy/common/checkout/scm/svn.py	2014-04-24 07:07:06 UTC (rev 167751)
@@ -273,7 +273,7 @@
         elif changed_files == None:
             changed_files = []
         script_path = self._filesystem.join(self.checkout_root, "Tools", "Scripts", "svn-create-patch")
-        return self.run([script_path] + changed_files,
+        return self.run([script_path, "--no-style"] + changed_files,
             cwd=self.checkout_root, return_stderr=False,
             decode_output=False)
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to