Changeset 46899 in webkit
- Timestamp:
- Aug 7, 2009 11:14:36 AM (15 years ago)
- Location:
- trunk/WebKitTools
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKitTools/ChangeLog
r46895 r46899 1 2009-08-07 Pierre d'Herbemont <pdherbemont@apple.com> 2 3 Reviewed by Eric Seidel. 4 5 commit-log-editor does not produce a git commit log that is git friendly. 6 https://bugs.webkit.org/show_bug.cgi?id=27754 7 8 We make sure we end up with: 9 - A first paragraph describing the bug. It is eventually prefixed by 10 "WebKit: <line>" or "WebCore: <line>". This used to be 11 "WebCore:\n\n<line>". 12 - The Reviewed By line. 13 - An eventual Patch By line if author and committer doesn't match. 14 - The rest of the commit. 15 16 * Scripts/commit-log-editor: 17 1 18 2009-08-07 Adam Barth <abarth@webkit.org> 2 19 -
trunk/WebKitTools/Scripts/commit-log-editor
r46669 r46899 134 134 my $contents = ""; 135 135 my $blankLines = ""; 136 my $reviewedByLine = ""; 137 my $lineCount = 0; 138 my $date = ""; 139 my $author = ""; 140 my $email = ""; 141 my $hasAuthorInfoToWrite = 0; 136 142 while (<CHANGELOG>) { 137 143 if (/^\S/) { … … 139 145 } 140 146 if (/\S/) { 141 $contents .= $blankLines if $contents; 147 my $previousLineWasBlank = 1 unless $blankLines eq ""; 148 my $line = $_; 149 my $currentLineBlankLines = $blankLines; 142 150 $blankLines = ""; 143 $contents .= $_; 151 152 # Remove identation spaces 153 $line =~ s/^\s{8}//; 154 155 # Save the reviewed by line 156 if ($line =~ m/^Reviewed by .*/) { 157 $reviewedByLine = $line; 158 next; 159 } 160 161 # Grab the author and the date line 162 if ($line =~ m/^([0-9]{4}-[0-9]{2}-[0-9]{2})\s+(.*[^\s])\s+<(.*)>/ && $lineCount == 0) { 163 $date = $1; 164 $author = $2; 165 $email = $3; 166 $hasAuthorInfoToWrite = 1; 167 next; 168 } 169 170 $contents .= $currentLineBlankLines if $contents; 171 172 # Attempt to insert the "patch by" line, after the first blank line. 173 if ($previousLineWasBlank && $hasAuthorInfoToWrite && $lineCount > 0) { 174 my $authorAndCommitterAreSamePerson = $email eq $ENV{'EMAIL_ADDRESS'}; 175 if (!$authorAndCommitterAreSamePerson) { 176 $contents .= "Patch by $author <$email> on $date\n"; 177 $hasAuthorInfoToWrite = 0; 178 } 179 } 180 181 # Attempt to insert the "reviewed by" line, after the first blank line. 182 if ($previousLineWasBlank && $reviewedByLine && $lineCount > 0) { 183 $contents .= $reviewedByLine . "\n"; 184 $reviewedByLine = ""; 185 } 186 187 188 $lineCount++; 189 $contents .= $line; 144 190 } else { 145 191 $blankLines .= $_; 146 192 } 193 } 194 if ($reviewedByLine) { 195 $contents .= "\n".$reviewedByLine; 147 196 } 148 197 close CHANGELOG; … … 192 241 print NEWLOG normalizeLineEndings("\n", $endl) if !$first; 193 242 $first = 0; 194 print NEWLOG normalizeLineEndings("$label: \n\n", $endl);243 print NEWLOG normalizeLineEndings("$label: ", $endl); 195 244 } 196 245 print NEWLOG normalizeLineEndings($changeLogContents{$label}, $endl);
Note: See TracChangeset
for help on using the changeset viewer.