Changeset 167243 in webkit
- Timestamp:
- Apr 14, 2014, 5:24:23 AM (11 years ago)
- Location:
- trunk/Tools
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r167211 r167243 1 2014-04-14 Jozsef Berta <jberta.u-szeged@partner.samsung.com> 2 3 Fix commit-log-editor bug revealed by r165447 4 https://bugs.webkit.org/show_bug.cgi?id=130676 5 6 Reviewed by Csaba Osztrogonác. 7 8 * Scripts/commit-log-editor: 9 (createCommitMessage): Omitting empty Source/JavaScriptCore:... blocks. 10 Add \n before the first block too, because the longest common prefix now ends with only one newline. 11 (removeLongestCommonPrefixEndingInNewline): The longest common prefix ends with only one newline, 12 now the last block of the common prefix isn't duplicated below. Changing the function name accordingly. 13 1 14 2014-04-13 Darin Adler <darin@apple.com> 2 15 -
trunk/Tools/Scripts/commit-log-editor
r165676 r167243 43 43 sub normalizeLineEndings($$); 44 44 sub patchAuthorshipString($$$); 45 sub removeLongestCommonPrefixEndingIn DoubleNewline(\%);45 sub removeLongestCommonPrefixEndingInNewline(\%); 46 46 sub isCommitLogEditor($); 47 47 … … 297 297 } 298 298 299 my $commonPrefix = removeLongestCommonPrefixEndingInDoubleNewline(%changeLogContents); 300 301 my $first = 1; 299 my $commonPrefix = removeLongestCommonPrefixEndingInNewline(%changeLogContents); 300 302 301 my @result; 303 302 push @result, normalizeLineEndings($commonPrefix, $endl); 304 303 for my $sortKey (sort keys %changeLogSort) { 305 304 my $label = $changeLogSort{$sortKey}; 305 next if ($changeLogContents{$label} eq "\n"); 306 306 if (keys %changeLogSort > 1) { 307 push @result, normalizeLineEndings("\n", $endl) if !$first; 308 $first = 0; 307 push @result, normalizeLineEndings("\n", $endl); 309 308 push @result, normalizeLineEndings("$label: ", $endl); 310 309 } … … 336 335 } 337 336 338 sub removeLongestCommonPrefixEndingIn DoubleNewline(\%)337 sub removeLongestCommonPrefixEndingInNewline(\%) 339 338 { 340 339 my ($hashOfStrings) = @_; … … 356 355 return "" unless $prefixLength; 357 356 358 my $last DoubleNewline = rindex($prefix, "\n\n");359 return "" unless $last DoubleNewline > 0;357 my $lastNewline = rindex($prefix, "\n"); 358 return "" unless $lastNewline > 0; 360 359 361 360 foreach my $key (keys %{$hashOfStrings}) { 362 $hashOfStrings->{$key} = substr($hashOfStrings->{$key}, $last DoubleNewline);363 } 364 return substr($prefix, 0, $last DoubleNewline + 2);361 $hashOfStrings->{$key} = substr($hashOfStrings->{$key}, $lastNewline); 362 } 363 return substr($prefix, 0, $lastNewline + 1); 365 364 } 366 365
Note:
See TracChangeset
for help on using the changeset viewer.