Bug 77177 - Tools/Scripts/commit-log-editor is broken due to $_ getting clobbered
Summary: Tools/Scripts/commit-log-editor is broken due to $_ getting clobbered
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-26 19:53 PST by Filip Pizlo
Modified: 2012-01-26 20:11 PST (History)
0 users

See Also:


Attachments
the patch (2.18 KB, patch)
2012-01-26 19:55 PST, Filip Pizlo
no flags Details | Formatted Diff | Diff
the patch (2.19 KB, patch)
2012-01-26 19:56 PST, Filip Pizlo
jhoneycutt: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Filip Pizlo 2012-01-26 19:53:47 PST
Probably should not be relying on $_ not being clobbered in such a large loop body in the first place.
Comment 1 Filip Pizlo 2012-01-26 19:55:09 PST
Created attachment 124242 [details]
the patch
Comment 2 Filip Pizlo 2012-01-26 19:56:54 PST
Created attachment 124244 [details]
the patch

Forgot about one implicit use of $_.
Comment 3 Jon Honeycutt 2012-01-26 20:06:52 PST
Comment on attachment 124244 [details]
the patch

View in context: https://bugs.webkit.org/attachment.cgi?id=124244&action=review

> Tools/ChangeLog:3
> +        Tools/Scripts/change-log-editor is broken due to $_ getting clobbered

change-log-editor -> commit-log-editor

> Tools/Scripts/commit-log-editor:136
>  while (<LOG>) {
> +    my $curLine = $_;

You could do while (my $curLine = <LOG>) {

> Tools/Scripts/commit-log-editor:145
> +    if (!isGit() || $curLine =~ /^#/) { #

Could remove this EOL comment while you're here.
Comment 4 Filip Pizlo 2012-01-26 20:11:24 PST
Landed in http://trac.webkit.org/changeset/106082