RESOLVED FIXED 116219
Fix Analyze ChangeLog's entry processing
https://bugs.webkit.org/show_bug.cgi?id=116219
Summary Fix Analyze ChangeLog's entry processing
Peter Gal
Reported 2013-05-16 05:17:29 PDT
If someone wants to run the analyze-changelog command for the Source/WebCore/ then there will be a runtime failure, due to the fact that there is a variable which is not initialized if no entries found.
Attachments
proposed patch (1.41 KB, patch)
2013-05-16 05:19 PDT, Peter Gal
no flags
Peter Gal
Comment 1 2013-05-16 05:19:40 PDT
Created attachment 201944 [details] proposed patch This'll initialize the 'i' variable to 0. Also it'll remove the unneeded i+=1 line (the i is incremented automatically by the for loop's enumerate).
Ryosuke Niwa
Comment 2 2013-05-16 08:59:19 PDT
Comment on attachment 201944 [details] proposed patch View in context: https://bugs.webkit.org/attachment.cgi?id=201944&action=review > Tools/Scripts/webkitpy/tool/commands/analyzechangelog.py:183 > + i = 0 Instead of doing that, exit early when "not entries".
Peter Gal
Comment 3 2013-05-16 09:16:55 PDT
(In reply to comment #2) > (From update of attachment 201944 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=201944&action=review > > > Tools/Scripts/webkitpy/tool/commands/analyzechangelog.py:183 > > + i = 0 > > Instead of doing that, exit early when "not entries". That was my first try, but the 'entries' is a generator. So to do the early exit first we need to ask for one element then check if there is any and do some magic with it.
Ryosuke Niwa
Comment 4 2013-05-16 09:58:53 PDT
Comment on attachment 201944 [details] proposed patch View in context: https://bugs.webkit.org/attachment.cgi?id=201944&action=review >>> Tools/Scripts/webkitpy/tool/commands/analyzechangelog.py:183 >>> + i = 0 >> >> Instead of doing that, exit early when "not entries". > > That was my first try, but the 'entries' is a generator. So to do the early exit first we need to ask for one element then check if there is any and do some magic with it. I see. Makes sense.
WebKit Commit Bot
Comment 5 2013-05-16 20:17:39 PDT
Comment on attachment 201944 [details] proposed patch Clearing flags on attachment: 201944 Committed r150237: <http://trac.webkit.org/changeset/150237>
WebKit Commit Bot
Comment 6 2013-05-16 20:17:41 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.