Title: [106082] trunk/Tools
- Revision
- 106082
- Author
- fpi...@apple.com
- Date
- 2012-01-26 20:10:30 -0800 (Thu, 26 Jan 2012)
Log Message
Tools/Scripts/commit-log-editor is broken due to $_ getting clobbered
https://bugs.webkit.org/show_bug.cgi?id=77177
Reviewed by Jon Honeycutt.
* Scripts/commit-log-editor:
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (106081 => 106082)
--- trunk/Tools/ChangeLog 2012-01-27 03:45:17 UTC (rev 106081)
+++ trunk/Tools/ChangeLog 2012-01-27 04:10:30 UTC (rev 106082)
@@ -1,3 +1,12 @@
+2012-01-26 Filip Pizlo <fpi...@apple.com>
+
+ Tools/Scripts/commit-log-editor is broken due to $_ getting clobbered
+ https://bugs.webkit.org/show_bug.cgi?id=77177
+
+ Reviewed by Jon Honeycutt.
+
+ * Scripts/commit-log-editor:
+
2012-01-26 Ojan Vafai <o...@chromium.org>
Decrease sleep time when killing server_process on Mac.
Modified: trunk/Tools/Scripts/commit-log-editor (106081 => 106082)
--- trunk/Tools/Scripts/commit-log-editor 2012-01-27 03:45:17 UTC (rev 106081)
+++ trunk/Tools/Scripts/commit-log-editor 2012-01-27 04:10:30 UTC (rev 106082)
@@ -132,24 +132,24 @@
my $logContents = "";
my $existingLog = 0;
open LOG, $log or die "Could not open the log file.";
-while (<LOG>) {
+while (my $curLine = <LOG>) {
if (isGit()) {
- if (/^# Changes to be committed:$/) {
+ if ($curLine =~ /^# Changes to be committed:$/) {
$inChangesToBeCommitted = 1;
- } elsif ($inChangesToBeCommitted && /^# \S/) {
+ } elsif ($inChangesToBeCommitted && $curLine =~ /^# \S/) {
$inChangesToBeCommitted = 0;
}
}
- if (!isGit() || /^#/) { #
- $logContents .= $_;
+ if (!isGit() || $curLine =~ /^#/) {
+ $logContents .= $curLine;
} else {
# $_ contains the current git log message
# (without the log comment info). We don't need it.
}
- $existingLog = isGit() && !(/^#/ || /^\s*$/) unless $existingLog;
+ $existingLog = isGit() && !($curLine =~ /^#/ || $curLine =~ /^\s*$/) unless $existingLog;
my $changeLogFileName = changeLogFileName();
- push @changeLogs, makeFilePathRelative($1) if $inChangesToBeCommitted && (/^(?:M|A)....(.*$changeLogFileName)\r?\n?$/ || /^#\t(?:modified|new file): (.*$changeLogFileName)$/) && !/-$changeLogFileName$/;
+ push @changeLogs, makeFilePathRelative($1) if $inChangesToBeCommitted && ($curLine =~ /^(?:M|A)....(.*$changeLogFileName)\r?\n?$/ || $curLine =~ /^#\t(?:modified|new file): (.*$changeLogFileName)$/) && $curLine !~ /-$changeLogFileName$/;
}
close LOG;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes