WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
174197
Make prepare-ChangeLog -g <commit> generate a more standard ChangeLog entry.
https://bugs.webkit.org/show_bug.cgi?id=174197
Summary
Make prepare-ChangeLog -g <commit> generate a more standard ChangeLog entry.
Emilio Cobos Álvarez
Reported
2017-07-06 01:22:08 PDT
Make prepare-ChangeLog -g <commit> generate a more standard ChangeLog entry. Before this change, |prepare-ChangeLog -g HEAD| generated something like: <git commit title> <git commit long description> Need a short description (OOPS!) Need the bug URL (OOPS!) Reviewed by NOBODY (OOPS!). No new tests (OOPS!). This change converts that in: <git commit title> Need the bug URL (OOPS!) Reviewed by NOBODY (OOPS!). <git commit long description> No new tests (OOPS!). This bit me the first time I tried to submit a patch to WebKit, and still I have to manually edit the ChangeLog every time I use the script. This generates a more convenient and standard ChangeLog entry.
Attachments
Patch
(2.71 KB, patch)
2017-07-06 01:24 PDT
,
Emilio Cobos Álvarez
no flags
Details
Formatted Diff
Diff
Patch
(2.71 KB, patch)
2017-07-06 01:27 PDT
,
Emilio Cobos Álvarez
no flags
Details
Formatted Diff
Diff
Patch
(2.49 KB, patch)
2017-07-12 02:15 PDT
,
Emilio Cobos Álvarez
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from ews124 for ios-simulator-wk2
(12.86 MB, application/zip)
2017-07-12 05:18 PDT
,
Build Bot
no flags
Details
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Emilio Cobos Álvarez
Comment 1
2017-07-06 01:24:58 PDT
Created
attachment 314708
[details]
Patch
Emilio Cobos Álvarez
Comment 2
2017-07-06 01:27:21 PDT
Created
attachment 314709
[details]
Patch
Michael Catanzaro
Comment 3
2017-07-11 15:54:47 PDT
Comment on
attachment 314709
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=314709&action=review
> Tools/Scripts/prepare-ChangeLog:684 > + if (!$bugDescription && $description) { > + my @lines = split(/\n/, $description); > + $bugDescription = shift @lines; > + $bugDescription =~ s/^\s*//g; > + if (scalar @lines > 0 and $lines[0] =~ /^\s*$/) { > + shift @lines; > + } > + $description = join("\n", @lines) > + }
Hmmm. On the one hand, this seems like a great change. On the other hand, this code looks like gobbledygook. First, congratulate yourself on having learned enough Perl to do this. Next, try to find a reviewer who understands Perl too. I'm just not comfortable giving r+ when I have no clue how to read the code.
Darin Adler
Comment 4
2017-07-11 21:12:42 PDT
Comment on
attachment 314709
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=314709&action=review
Seems fine. Since non-perl programmers can’t read the code to strip off the first line anyway, I would consider doing it with a single regular expression like this: ($bugDescription, $description) = ($description =~ /^(?:\s*(.*)\n)?(?:\s*\n)*(.*)/) if !$bugDescription && $description; Could write that all on one line, too, if you prefer. Note that my version strips multiple blank lines, not just one. Could use a "?" instead of a "*" to strip only one.
> Tools/Scripts/prepare-ChangeLog:677 > + my @lines = split(/\n/, $description);
I think it’s more efficient to split on "\n" rather than /\n/ but not sure. Of course, if you use my alternative version you won’t need that.
> Tools/Scripts/prepare-ChangeLog:679 > + $bugDescription =~ s/^\s*//g;
No need for the "g" here; this only applies once, not multiple times. Also, I would have used + rather than * myself.
Emilio Cobos Álvarez
Comment 5
2017-07-12 02:15:04 PDT
(In reply to Darin Adler from
comment #4
)
> Comment on
attachment 314709
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=314709&action=review
> > Seems fine. > > Since non-perl programmers can’t read the code to strip off the first line > anyway, I would consider doing it with a single regular expression like this: > > ($bugDescription, $description) > = ($description =~ /^(?:\s*(.*)\n)?(?:\s*\n)*(.*)/) > if !$bugDescription && $description; > > Could write that all on one line, too, if you prefer. Note that my version > strips multiple blank lines, not just one. Could use a "?" instead of a "*" > to strip only one.
Multiple sounds fine (though I don't think it's common). I had it to tweak it slightly so it grabbed the multiline description entirely and not only the first line of it, but your suggestion is much more compact :) Thanks for the review!
Emilio Cobos Álvarez
Comment 6
2017-07-12 02:15:17 PDT
Created
attachment 315219
[details]
Patch
Build Bot
Comment 7
2017-07-12 05:17:59 PDT
Comment on
attachment 315219
[details]
Patch
Attachment 315219
[details]
did not pass ios-sim-ews (ios-simulator-wk2): Output:
http://webkit-queues.webkit.org/results/4106398
New failing tests: imported/w3c/IndexedDB-private-browsing/idbfactory_open.html
Build Bot
Comment 8
2017-07-12 05:18:00 PDT
Created
attachment 315230
[details]
Archive of layout-test-results from ews124 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews124 Port: ios-simulator-wk2 Platform: Mac OS X 10.12.5
WebKit Commit Bot
Comment 9
2017-07-12 10:16:52 PDT
Comment on
attachment 315219
[details]
Patch Clearing flags on attachment: 315219 Committed
r219406
: <
http://trac.webkit.org/changeset/219406
>
WebKit Commit Bot
Comment 10
2017-07-12 10:16:53 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug