Bug 26383 - prepare-ChangeLog should have a --bug= argument and use it for url autofill
Summary: prepare-ChangeLog should have a --bug= argument and use it for url autofill
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-06-14 02:30 PDT by Eric Seidel (no email)
Modified: 2009-07-02 11:21 PDT (History)
4 users (show)

See Also:


Attachments
First attempt (3.54 KB, patch)
2009-07-01 17:12 PDT, Eric Seidel (no email)
mjs: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Seidel (no email) 2009-06-14 02:30:12 PDT
prepare-ChangeLog should have a --bug= argument and use it for url autofill

It could use this to auto-fill in the bugzilla URL as well as the title of the bugzilla bug.
Comment 1 Eric Seidel (no email) 2009-07-01 17:12:27 PDT
Created attachment 32163 [details]
First attempt
Comment 2 Maciej Stachowiak 2009-07-01 20:46:12 PDT
Comment on attachment 32163 [details]
First attempt

r=me

I'm not sure about having quite so many "GOES HERE" fields, but let's see how it works out.
Comment 3 Eric Seidel (no email) 2009-07-01 21:07:06 PDT
(In reply to comment #2)
> (From update of attachment 32163 [details] [review])
> r=me
> 
> I'm not sure about having quite so many "GOES HERE" fields, but let's see how
> it works out.

Yeah. I have similar concerns about "GOES HERE".  Especially since now on every ChangeLog you'll get a note about a missing description which you'll have to add.

I chose "GOES HERE" over WARNING: because I've seen people post patches with WARNING: in them, as though they did not understand that it was a template string they were supposed to remove.

I will send out a note to webkit-dev announcing this change and inviting further input.
Comment 4 Eric Seidel (no email) 2009-07-01 22:13:46 PDT
Committing to http://svn.webkit.org/repository/webkit/trunk ...
	M	WebKitTools/ChangeLog
	M	WebKitTools/Scripts/prepare-ChangeLog
Committed r45464
http://trac.webkit.org/changeset/45464
Comment 5 David Kilzer (:ddkilzer) 2009-07-02 05:55:07 PDT
Comment on attachment 32163 [details]
First attempt

>+if ($bugNumber) {
>+    $bugURL = "https://bugs.webkit.org/show_bug.cgi?id=$bugNumber";
>+    my $bugXMLURL = "$bugURL&ctype=xml";
>+    # Perl has no built in XML processing, so we'll fetch and parse with curl and grep
>+    my $descriptionLine = `curl --silent "$bugXMLURL" | grep short_desc`;
>+    $descriptionLine =~ /<short_desc>(.*)<\/short_desc>/;
>+    $bugDescription = $1;
>+    print STDERR "  Description from bug $bugNumber:\n    \"$bugDescription\".\n";
>+}

It would be nice if you had used libwww-perl modules to fetch the URL instead of shelling out to curl (to keep the script more portable), but I'm afraid using libwww-perl would require much more than one line of code here.
Comment 6 Eric Seidel (no email) 2009-07-02 11:21:43 PDT
Yeah.  :( Once I realized there was no way to parse XML with the modules I had installed (I listed them all and looked through the first!) I kinda gave up on perl actually doing what I wanted and resorted to shell scripting.  My thought was that this may eventually convert to another language anyway...