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

Changeset 90229 in webkit


Ignore:
Timestamp:
Jul 1, 2011, 8:21:02 AM (15 years ago)
Author:
Adam Roben
Message:

commit-log-editor reorders ChangeLog entries in unexpected ways
https://bugs.webkit.org/show_bug.cgi?id=63804

Reviewed by Darin Adler.

commit-log-editor was changed in r46899 to move the bug title and URL to the top of the
commit message in order to make git-based tools, which expect the first line of the commit
message to be a summary of the change, to work better. But this reordering of the ChangeLog
entry was unpredictable and unexpected.

I changed prepare-ChangeLog to put the bug title and URL at the top of the ChangeLog entry
so that commit-log-editor doesn't have to move them. Then I changed commit-log-editor not to
try to move them.

  • Scripts/commit-log-editor: Partially reverted r46899. We no longer save the "Reviewed by"

line and try to move it down below the bug title and URL. The order of the text in the
ChangeLog is now preserved, except that we insert a "Patch by" line just above the "Reviewed
by" line in cases where the committer and author are not the same person.

  • Scripts/prepare-ChangeLog: Moved the "Reviewed by" line down below the bug title and URL.
Location:
trunk/Tools
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r90228 r90229  
     12011-07-01  Adam Roben  <aroben@apple.com>
     2
     3        commit-log-editor reorders ChangeLog entries in unexpected ways
     4        https://bugs.webkit.org/show_bug.cgi?id=63804
     5
     6        Reviewed by Darin Adler.
     7
     8        commit-log-editor was changed in r46899 to move the bug title and URL to the top of the
     9        commit message in order to make git-based tools, which expect the first line of the commit
     10        message to be a summary of the change, to work better. But this reordering of the ChangeLog
     11        entry was unpredictable and unexpected.
     12
     13        I changed prepare-ChangeLog to put the bug title and URL at the top of the ChangeLog entry
     14        so that commit-log-editor doesn't have to move them. Then I changed commit-log-editor not to
     15        try to move them.
     16
     17        * Scripts/commit-log-editor: Partially reverted r46899. We no longer save the "Reviewed by"
     18        line and try to move it down below the bug title and URL. The order of the text in the
     19        ChangeLog is now preserved, except that we insert a "Patch by" line just above the "Reviewed
     20        by" line in cases where the committer and author are not the same person.
     21
     22        * Scripts/prepare-ChangeLog: Moved the "Reviewed by" line down below the bug title and URL.
     23
    1242011-07-01  Mihnea Ovidenie  <mihnea@adobe.com>
    225
  • trunk/Tools/Scripts/commit-log-editor

    r76255 r90229  
    153153    my $contents = "";
    154154    my $blankLines = "";
    155     my $reviewedByLine = "";
    156155    my $lineCount = 0;
    157156    my $date = "";
     
    164163        }
    165164        if (/\S/) {
    166             my $previousLineWasBlank = 1 unless $blankLines eq "";
     165            $contents .= $blankLines if $contents;
     166            $blankLines = "";
     167
    167168            my $line = $_;
    168             my $currentLineBlankLines = $blankLines;
    169             $blankLines = "";
    170169
    171170            # Remove indentation spaces
    172171            $line =~ s/^ {8}//;
    173 
    174             # Save the reviewed / rubber stamped by line.
    175             if ($line =~ m/^Reviewed by .*/ || $line =~ m/^Rubber[ \-]?stamped by .*/) {
    176                 $reviewedByLine = $line;
    177                 next;
    178             }
    179172
    180173            # Grab the author and the date line
     
    187180            }
    188181
    189             $contents .= $currentLineBlankLines if $contents;
    190 
    191             # Attempt to insert the "patch by" line, after the first blank line.
    192             if ($previousLineWasBlank && $hasAuthorInfoToWrite && $lineCount > 0) {
     182            if ($line =~ m/^Reviewed by .*/ || $line =~ m/^Rubber[ \-]?stamped by .*/) {
     183                # Insert the "Patch by" line just above the "Reviewed by" line, if needed.
    193184                my $committerEmail = changeLogEmailAddress();
    194185                my $authorAndCommitterAreSamePerson = $email eq $committerEmail;
     
    199190            }
    200191
    201             # Attempt to insert the "reviewed by" line, after the first blank line.
    202             if ($previousLineWasBlank && $reviewedByLine && $lineCount > 0) {
    203                 $contents .= $reviewedByLine . "\n";
    204                 $reviewedByLine = "";
    205             }
    206192
    207193            $lineCount++;
     
    210196            $blankLines .= $_;
    211197        }
    212     }
    213     if ($reviewedByLine) {
    214         $contents .= "\n".$reviewedByLine;
    215198    }
    216199    close CHANGELOG;
  • trunk/Tools/Scripts/prepare-ChangeLog

    r87040 r90229  
    394394    $reviewer = "NOBODY (OO" . "PS!)" if !$reviewer;
    395395
    396     print CHANGE_LOG normalizeLineEndings("        Reviewed by $reviewer.\n\n", $endl);
    397396    print CHANGE_LOG normalizeLineEndings($description . "\n", $endl) if $description;
    398397
     
    401400    print CHANGE_LOG normalizeLineEndings("        $bugURL\n", $endl) if $bugURL;
    402401    print CHANGE_LOG normalizeLineEndings("\n", $endl);
     402
     403    print CHANGE_LOG normalizeLineEndings("        Reviewed by $reviewer.\n\n", $endl);
    403404
    404405    if ($prefix =~ m/WebCore/ || `pwd` =~ m/WebCore/) {
Note: See TracChangeset for help on using the changeset viewer.