Bug 73788

Summary: In prepare-ChangeLog, move top level code into prepareChangeLog()
Product: WebKit Reporter: Kentaro Hara <haraken>
Component: Tools / TestsAssignee: Kentaro Hara <haraken>
Status: RESOLVED INVALID    
Severity: Normal CC: aroben, ddkilzer, dglazkov, rniwa, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 73531    
Attachments:
Description Flags
Patch
none
Patch rniwa: review-

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.