⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 282391 in webkit


Ignore:
Timestamp:
Sep 14, 2021, 8:56:51 AM (5 years ago)
Author:
commit-queue@webkit.org
Message:

Provide a way to update the commit message with an updated list of changed files/functions
​https://bugs.webkit.org/show_bug.cgi?id=230195

Patch by Hoa Dinh <​dvh@apple.com> on 2021-09-14
Reviewed by Jonathan Bedard.

Add a new parameter --only-files to request generation of only the part of the changed files/functions.

  • Scripts/prepare-ChangeLog:

(main):
(generateNewChangeLogs):

Location:
trunk/Tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r282370 r282391  
     12021-09-14  Hoa Dinh  <dvh@apple.com>
     2
     3        Provide a way to update the commit message with an updated list of changed files/functions
     4        https://bugs.webkit.org/show_bug.cgi?id=230195
     5
     6        Reviewed by Jonathan Bedard.
     7
     8        Add a new parameter --only-files to request generation of only the part of the changed files/functions.
     9
     10        * Scripts/prepare-ChangeLog:
     11        (main):
     12        (generateNewChangeLogs):
     13
    1142021-09-13  Wenson Hsieh  <wenson_hsieh@apple.com>
    215
  • trunk/Tools/Scripts/prepare-ChangeLog

    r275666 r282391  
    8585sub generateFileList(\%$$$\%);
    8686sub generateFunctionLists($$$$$);
    87 sub generateNewChangeLogs($$$$$$$$$$$$$$);
     87sub generateNewChangeLogs($$$$$$$$$$$$$$$);
    8888sub getLatestChangeLogs($);
    8989sub get_function_line_ranges($$);
    … …  
    146146    my $spewDiff = $ENV{"PREPARE_CHANGELOG_DIFF"};
    147147    my $updateChangeLogs = 1;
     148    my $onlyFiles = 0;
    148149    my $parseOptionsResult =
    149150        GetOptions("diff|d!" => \$spewDiff,
    … …  
    161162                   "open|o!" => \$openChangeLogs,
    162163                   "write!" => \$writeChangeLogs,
    163                    "update!" => \$updateChangeLogs);
     164                   "update!" => \$updateChangeLogs,
     165                   "only-files" => \$onlyFiles);
    164166    if (!$parseOptionsResult || $showHelp) {
    165167        print STDERR basename($0) . " [-b|--bug=<bugid>] [-d|--diff] [-h|--help] [-o|--open] [-g|--git-commit=<committish>] [--git-reviewer=<name>] [svndir1 [svndir2 ...]]\n";
    … …  
    179181        print STDERR "  --delimiters    When writing to stdout, label and print a \"~\" after each entry\n";
    180182        print STDERR "  --email=        Specify the email address to be used in the patch\n";
     183        print STDERR "  --only-files    Exclude the standard changelog header and only include references to files.\n";
    181184        return 1;
    182185    }
    … …  
    238241    }
    239242
    240     generateNewChangeLogs($prefixes, $filesInChangeLog, $addedRegressionTests, $requiresTests, $functionLists, $bugURL, $bugDescription, $bugRadarURL, $name, $emailAddress, $gitReviewer, $gitCommit, $writeChangeLogs, $delimiters);
     243    generateNewChangeLogs($prefixes, $filesInChangeLog, $addedRegressionTests, $requiresTests, $functionLists, $bugURL, $bugDescription, $bugRadarURL, $name, $emailAddress, $gitReviewer, $gitCommit, $writeChangeLogs, $delimiters, $onlyFiles);
    241244
    242245    if ($writeChangeLogs) {
    … …  
    632635}
    633636
    634 sub generateNewChangeLogs($$$$$$$$$$$$$$)
    635 {
    636     my ($prefixes, $filesInChangeLog, $addedRegressionTests, $requiresTests, $functionLists, $bugURL, $bugDescription, $bugRadarURL, $name, $emailAddress, $gitReviewer, $gitCommit, $writeChangeLogs, $delimiters) = @_;
     637sub generateNewChangeLogs($$$$$$$$$$$$$$$)
     638{
     639    my ($prefixes, $filesInChangeLog, $addedRegressionTests, $requiresTests, $functionLists, $bugURL, $bugDescription, $bugRadarURL, $name, $emailAddress, $gitReviewer, $gitCommit, $writeChangeLogs, $delimiters, $onlyFiles) = @_;
    637640
    638641    my $hasWebCoreChange = 0;
    … …  
    668671        }
    669672
    670         my $date = changeLogDate(ChangeLogTimeZone);
    671         print CHANGE_LOG normalizeLineEndings("$date  $name  <$emailAddress>\n\n", $endl);
     673        if (!$onlyFiles) {
     674            my $date = changeLogDate(ChangeLogTimeZone);
     675            print CHANGE_LOG normalizeLineEndings("$date  $name  <$emailAddress>\n\n", $endl);
     676        }
    672677
    673678        my ($reviewer, $description) = reviewerAndDescriptionForGitCommit($gitCommit, $gitReviewer) if $gitCommit;
    … …  
    681686        $bugURL = "Need the bug URL (OOPS!)." unless $bugURL;
    682687
    683         print CHANGE_LOG normalizeLineEndings("        $bugDescription\n", $endl) if $bugDescription;
    684         print CHANGE_LOG normalizeLineEndings("        $bugURL\n", $endl) if $bugURL;
    685         print CHANGE_LOG normalizeLineEndings("        $bugRadarURL\n", $endl) if $bugRadarURL;
    686         print CHANGE_LOG normalizeLineEndings("\n", $endl);
    687 
    688         print CHANGE_LOG normalizeLineEndings("        Reviewed by $reviewer.\n\n", $endl);
    689         print CHANGE_LOG normalizeLineEndings($description . "\n", $endl) if $description;
     688        if (!$onlyFiles) {
     689            print CHANGE_LOG normalizeLineEndings("        $bugDescription\n", $endl) if $bugDescription;
     690            print CHANGE_LOG normalizeLineEndings("        $bugURL\n", $endl) if $bugURL;
     691            print CHANGE_LOG normalizeLineEndings("        $bugRadarURL\n", $endl) if $bugRadarURL;
     692            print CHANGE_LOG normalizeLineEndings("\n", $endl);
     693
     694            print CHANGE_LOG normalizeLineEndings("        Reviewed by $reviewer.\n\n", $endl);
     695            print CHANGE_LOG normalizeLineEndings($description . "\n", $endl) if $description;
     696        }
    690697
    691698        my $shouldMentionTests = @$requiresTests;
Note: See TracChangeset for help on using the changeset viewer.