Bug 73788 - In prepare-ChangeLog, move top level code into prepareChangeLog()
Summary: In prepare-ChangeLog, move top level code into prepareChangeLog()
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Kentaro Hara
URL:
Keywords:
Depends on:
Blocks: 73531
  Show dependency treegraph
 
Reported: 2011-12-04 16:40 PST by Kentaro Hara
Modified: 2011-12-09 01:46 PST (History)
5 users (show)

See Also:


Attachments
Patch (24.33 KB, patch)
2011-12-04 16:45 PST, Kentaro Hara
no flags Details | Formatted Diff | Diff
Patch (24.39 KB, patch)
2011-12-06 05:17 PST, Kentaro Hara
rniwa: review-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kentaro Hara 2011-12-04 16:40:56 PST
This is one of the steps to make prepare-ChangeLog a loadable Perl module (bug 73531).

We should create a new subroutine prepareChangeLog(), and move top level code into prepareChangeLog().
Comment 1 Kentaro Hara 2011-12-04 16:45:13 PST
Created attachment 117816 [details]
Patch
Comment 2 WebKit Review Bot 2011-12-04 18:27:25 PST
Comment on attachment 117816 [details]
Patch

Attachment 117816 [details] did not pass chromium-ews (chromium-xvfb):
Output: http://queues.webkit.org/results/10732508

New failing tests:
svg/custom/linking-uri-01-b.svg
Comment 3 Kentaro Hara 2011-12-06 05:17:18 PST
Created attachment 118030 [details]
Patch
Comment 4 Ryosuke Niwa 2011-12-08 17:07:59 PST
Comment on attachment 118030 [details]
Patch

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

I think this function is way too big. We should put each block into a small function first. As is, the patch is quite in-comprehensive and it'll mess up the svn blame quite a lot.

> Tools/Scripts/prepare-ChangeLog:220
> +    if (%changed_line_ranges) {

You might consider putting this entire block in some function.

> Tools/Scripts/prepare-ChangeLog:233
> +          FUNCTION: foreach my $function_range_ref (@function_ranges) {

Wrong indentation.
Comment 5 Kentaro Hara 2011-12-08 21:33:39 PST
(In reply to comment #4)
> (From update of attachment 118030 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=118030&action=review
> 
> I think this function is way too big. We should put each block into a small function first. As is, the patch is quite in-comprehensive and it'll mess up the svn blame quite a lot.

rniwa: Thank you for the review. I agree to splitting the big function, but I'd like to do it later with unit tests.

As ddlizker mentioned in bug 73531, our current objective is to change prepare-ChangeLog just enough to make it a loadable Perl module for unit testing. In other words, we should not make extra changes, e.g. refactoring like splitting the big function, to prepare-ChangeLog until we have unit tests for it.
Comment 6 Kentaro Hara 2011-12-09 01:46:28 PST
Based on discussions on IRC with rniwa, we decided to commit this patch more incrementally.

ddkilzer, aroben: rniwa is going to review these patches.