| Differences between
and this patch
- Tools/ChangeLog +17 lines
Lines 1-3 Tools/ChangeLog_sec1
1
2014-04-03  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 NOBODY (OOPS!).
7
8
        Added [--[no-]style] param to run check-webkit-style as part of prepare-Changelog and svn-create-patch.
9
        Added as default for prepare-Changelog, but not in svn-create-patch, to avoid loops in recursive calls.
10
11
        * Scripts/commit-log-editor:
12
        * Scripts/prepare-ChangeLog:
13
        (main):
14
        (checkWebKitStyle):
15
        * Scripts/svn-create-patch:
16
        (checkWebKitStyle):
17
1
2014-04-03  Santosh Mahto  <santoshbit2007@gmail.com>
18
2014-04-03  Santosh Mahto  <santoshbit2007@gmail.com>
2
19
3
        Unreviewed. Moving my name to commiter section
20
        Unreviewed. Moving my name to commiter section
- Tools/Scripts/commit-log-editor -1 / +1 lines
Lines 176-182 if (isGit() && @changeLogs == 0) { Tools/Scripts/commit-log-editor_sec1
176
        chomp($webkitGenerateCommitMessage = `git config --bool core.webkitGenerateCommitMessage`);
176
        chomp($webkitGenerateCommitMessage = `git config --bool core.webkitGenerateCommitMessage`);
177
    }
177
    }
178
    if ($webkitGenerateCommitMessage ne "false") {
178
    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";
180
        while (<CHANGELOG_ENTRIES>) {
180
        while (<CHANGELOG_ENTRIES>) {
181
            print NEWLOG normalizeLineEndings($_, $endl);
181
            print NEWLOG normalizeLineEndings($_, $endl);
182
        }
182
        }
- Tools/Scripts/prepare-ChangeLog +15 lines
Lines 72-77 sub determinePropertyChanges($$$); Tools/Scripts/prepare-ChangeLog_sec1
72
sub diffCommand($$$$);
72
sub diffCommand($$$$);
73
sub diffFromToString($$$);
73
sub diffFromToString($$$);
74
sub diffHeaderFormat();
74
sub diffHeaderFormat();
75
sub checkWebKitStyle();
75
sub extractLineRangeAfterChange($);
76
sub extractLineRangeAfterChange($);
76
sub extractLineRangeBeforeChange($);
77
sub extractLineRangeBeforeChange($);
77
sub fetchBugDescriptionFromURL($$);
78
sub fetchBugDescriptionFromURL($$);
Lines 128-133 sub main() Tools/Scripts/prepare-ChangeLog_sec2
128
    my $gitCommit = 0;
129
    my $gitCommit = 0;
129
    my $gitIndex = "";
130
    my $gitIndex = "";
130
    my $gitReviewer = "";
131
    my $gitReviewer = "";
132
    my $checkWebKitStyle = 1;
131
    my $openChangeLogs = 0;
133
    my $openChangeLogs = 0;
132
    my $writeChangeLogs = 1;
134
    my $writeChangeLogs = 1;
133
    my $showHelp = 0;
135
    my $showHelp = 0;
Lines 144-149 sub main() Tools/Scripts/prepare-ChangeLog_sec3
144
                   "git-index" => \$gitIndex,
146
                   "git-index" => \$gitIndex,
145
                   "git-reviewer:s" => \$gitReviewer,
147
                   "git-reviewer:s" => \$gitReviewer,
146
                   "help|h!" => \$showHelp,
148
                   "help|h!" => \$showHelp,
149
                   "style!" => \$checkWebKitStyle,
147
                   "open|o!" => \$openChangeLogs,
150
                   "open|o!" => \$openChangeLogs,
148
                   "write!" => \$writeChangeLogs,
151
                   "write!" => \$writeChangeLogs,
149
                   "update!" => \$updateChangeLogs);
152
                   "update!" => \$updateChangeLogs);
Lines 158-163 sub main() Tools/Scripts/prepare-ChangeLog_sec4
158
        print STDERR "  --git-reviewer  When populating the ChangeLogs from a git commit claim that the spcified name reviewed the change.\n";
161
        print STDERR "  --git-reviewer  When populating the ChangeLogs from a git commit claim that the spcified name reviewed the change.\n";
159
        print STDERR "                  This option is useful when the git commit lacks a Signed-Off-By: line\n";
162
        print STDERR "                  This option is useful when the git commit lacks a Signed-Off-By: line\n";
160
        print STDERR "  -h|--help       Show this help message\n";
163
        print STDERR "  -h|--help       Show this help message\n";
164
        print STDERR "  --[no-]style    Run check-webkit-style script when done (default: style)\n";
161
        print STDERR "  -o|--open       Open ChangeLogs in an editor when done\n";
165
        print STDERR "  -o|--open       Open ChangeLogs in an editor when done\n";
162
        print STDERR "  --[no-]update   Update ChangeLogs from svn before adding entry (default: update)\n";
166
        print STDERR "  --[no-]update   Update ChangeLogs from svn before adding entry (default: update)\n";
163
        print STDERR "  --[no-]write    Write ChangeLogs to disk (otherwise send new entries to stdout) (default: write)\n";
167
        print STDERR "  --[no-]write    Write ChangeLogs to disk (otherwise send new entries to stdout) (default: write)\n";
Lines 225-230 sub main() Tools/Scripts/prepare-ChangeLog_sec5
225
        printDiff($changedFiles, $gitCommit, $gitIndex, $mergeBase);
229
        printDiff($changedFiles, $gitCommit, $gitIndex, $mergeBase);
226
    }
230
    }
227
231
232
    # Run check-webkit-style.
233
    if ($checkWebKitStyle) {
234
        checkWebKitStyle();
235
    }  
236
228
    # Open ChangeLogs.
237
    # Open ChangeLogs.
229
    if ($openChangeLogs && @$changeLogs) {
238
    if ($openChangeLogs && @$changeLogs) {
230
        openChangeLogs($changeLogs);
239
        openChangeLogs($changeLogs);
Lines 588-593 sub printDiff($$$$) Tools/Scripts/prepare-ChangeLog_sec6
588
    close DIFF;
597
    close DIFF;
589
}
598
}
590
599
600
sub checkWebKitStyle()
601
{
602
    print STDERR "  Running check-webkit-style.\n  ";
603
    system dirname(File::Spec->rel2abs(__FILE__)) . "/check-webkit-style";
604
}
605
591
sub openChangeLogs($)
606
sub openChangeLogs($)
592
{
607
{
593
    my ($changeLogs) = @_;
608
    my ($changeLogs) = @_;
- Tools/Scripts/svn-create-patch -2 / +18 lines
Lines 56-61 use Time::gmtime; Tools/Scripts/svn-create-patch_sec1
56
use VCSUtils;
56
use VCSUtils;
57
57
58
sub binarycmp($$);
58
sub binarycmp($$);
59
sub checkWebKitStyle();
59
sub diffOptionsForFile($);
60
sub diffOptionsForFile($);
60
sub findBaseUrl($);
61
sub findBaseUrl($);
61
sub findMimeType($;$);
62
sub findMimeType($;$);
Lines 77-91 sub testfilecmp($$); Tools/Scripts/svn-create-patch_sec2
77
$ENV{'LC_ALL'} = 'C';
78
$ENV{'LC_ALL'} = 'C';
78
79
79
my $showHelp;
80
my $showHelp;
81
my $checkWebKitStyle = 0;
80
my $ignoreChangelogs = 0;
82
my $ignoreChangelogs = 0;
81
my $devNull = File::Spec->devnull();
83
my $devNull = File::Spec->devnull();
82
84
83
my $result = GetOptions(
85
my $result = GetOptions(
84
    "help"       => \$showHelp,
86
    "help"       => \$showHelp,
85
    "ignore-changelogs"    => \$ignoreChangelogs
87
    "ignore-changelogs"    => \$ignoreChangelogs,
88
    "style!" => \$checkWebKitStyle
86
);
89
);
87
if (!$result || $showHelp) {
90
if (!$result || $showHelp) {
88
    print STDERR basename($0) . " [-h|--help] [--ignore-changelogs] [svndir1 [svndir2 ...]]\n";
91
    print STDERR basename($0) . " [-h|--help] [--ignore-changelogs] [--[no-]style] [svndir1 [svndir2 ...]]\n";
89
    exit 1;
92
    exit 1;
90
}
93
}
91
94
Lines 106-111 for my $path (sort patchpathcmp values % Tools/Scripts/svn-create-patch_sec3
106
    generateDiff($path, $prefix);
109
    generateDiff($path, $prefix);
107
}
110
}
108
111
112
# Run check-webkit-style.
113
unless (caller) {
114
    if ($checkWebKitStyle) {
115
        checkWebKitStyle();
116
    }
117
}
118
109
exit 0;
119
exit 0;
110
120
111
# Overall sort, considering multiple criteria.
121
# Overall sort, considering multiple criteria.
Lines 132-137 sub binarycmp($$) Tools/Scripts/svn-create-patch_sec4
132
    return $fileDataA->{isBinary} <=> $fileDataB->{isBinary};
142
    return $fileDataA->{isBinary} <=> $fileDataB->{isBinary};
133
}
143
}
134
144
145
sub checkWebKitStyle()
146
{
147
    print STDERR "  Finished svn-create-patch. Running check-webkit-style.\n  ";
148
    system dirname(File::Spec->rel2abs(__FILE__)) . "/check-webkit-style";
149
}
150
135
sub diffOptionsForFile($)
151
sub diffOptionsForFile($)
136
{
152
{
137
    my ($file) = @_;
153
    my ($file) = @_;
- Tools/Scripts/webkit-tools-completion.sh -1 / +1 lines
Lines 109-114 _webkit-patch_complete() Tools/Scripts/webkit-tools-completion.sh_sec1
109
109
110
complete -F _webkit-patch_complete webkit-patch
110
complete -F _webkit-patch_complete webkit-patch
111
complete -o default -W "--continue --fix-merged --help --no-continue --no-warnings --warnings -c -f -h -w" resolve-ChangeLogs
111
complete -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
112
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
113
complete -W "--clean --debug --help -h" build-webkit
113
complete -W "--clean --debug --help -h" build-webkit
114
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
114
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

Return to Bug 131115