Bug 72703 - ChangeLog should be able to parse annotated changelogs
Summary: ChangeLog should be able to parse annotated changelogs
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Ryosuke Niwa
URL:
Keywords:
Depends on:
Blocks: 72243
  Show dependency treegraph
 
Reported: 2011-11-18 01:44 PST by Ryosuke Niwa
Modified: 2011-12-02 20:59 PST (History)
4 users (show)

See Also:


Attachments
Patch (10.54 KB, patch)
2011-11-18 02:12 PST, Ryosuke Niwa
eric: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ryosuke Niwa 2011-11-18 01:44:52 PST
In order to parse change logs from different directories and correlate entries, we need a way to determine which change log entry corresponds to which revision.
Comment 1 Ryosuke Niwa 2011-11-18 02:12:31 PST
Created attachment 115770 [details]
Patch
Comment 2 WebKit Review Bot 2011-11-18 02:16:08 PST
Attachment 115770 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Tools/ChangeLog', u'Tools/Scripts/webkitpy..." exit_code: 1

Tools/Scripts/webkitpy/common/checkout/changelog_unittest.py:256:  trailing whitespace  [pep8/W291] [5]
Tools/Scripts/webkitpy/common/checkout/changelog_unittest.py:258:  trailing whitespace  [pep8/W291] [5]
Tools/Scripts/webkitpy/common/checkout/changelog_unittest.py:260:  trailing whitespace  [pep8/W291] [5]
Tools/Scripts/webkitpy/common/checkout/changelog_unittest.py:264:  trailing whitespace  [pep8/W291] [5]
Tools/Scripts/webkitpy/common/checkout/changelog_unittest.py:266:  trailing whitespace  [pep8/W291] [5]
Tools/Scripts/webkitpy/common/checkout/changelog_unittest.py:272:  trailing whitespace  [pep8/W291] [5]
Tools/Scripts/webkitpy/common/checkout/changelog_unittest.py:274:  trailing whitespace  [pep8/W291] [5]
Tools/Scripts/webkitpy/common/checkout/changelog_unittest.py:277:  trailing whitespace  [pep8/W291] [5]
Tools/Scripts/webkitpy/common/checkout/changelog_unittest.py:279:  trailing whitespace  [pep8/W291] [5]
Tools/Scripts/webkitpy/common/checkout/changelog_unittest.py:282:  trailing whitespace  [pep8/W291] [5]
Tools/Scripts/webkitpy/common/checkout/changelog_unittest.py:286:  trailing whitespace  [pep8/W291] [5]
Total errors found: 11 in 6 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Ryosuke Niwa 2011-11-18 02:18:50 PST
(In reply to comment #2)
> If any of these errors are false positives, please file a bug against check-webkit-style.

Indeed this is a false positive. The trailing space is required for svn blame format.
Comment 4 Ryosuke Niwa 2011-11-18 02:23:04 PST
Filed https://bugs.webkit.org/show_bug.cgi?id=72706 for the style checker.
Comment 5 Ryosuke Niwa 2011-11-18 12:06:00 PST
Ping reviewers.
Comment 6 Eric Seidel (no email) 2011-11-30 11:37:14 PST
Comment on attachment 115770 [details]
Patch

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

Looks good.

> Tools/Scripts/webkitpy/common/checkout/changelog.py:287
> +        most_probable_revision = max(revisions_in_entry, key=revisions_in_entry.__getitem__) if revisions_in_entry else None

I'm not sure I understand this?  Also, isn't there a getitem helper used for this sort of thing?  Object.getitem orsoemthing?   Maybe I'm thinking of operator.itemgetter?
Comment 7 David Levin 2011-11-30 15:07:32 PST
Comment on attachment 115770 [details]
Patch

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

> Tools/Scripts/webkitpy/common/checkout/changelog.py:247
> +    def _sepearate_revision_and_line(line):

fyi, typo: sepearate
Comment 8 Ryosuke Niwa 2011-12-02 20:53:43 PST
(In reply to comment #6)
> (From update of attachment 115770 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=115770&action=review
> 
> Looks good.
> 
> > Tools/Scripts/webkitpy/common/checkout/changelog.py:287
> > +        most_probable_revision = max(revisions_in_entry, key=revisions_in_entry.__getitem__) if revisions_in_entry else None
> 
> I'm not sure I understand this?  Also, isn't there a getitem helper used for this sort of thing?  Object.getitem orsoemthing?   Maybe I'm thinking of operator.itemgetter?

Here, I'm taking the revision that appear most frequently as the guess.
Comment 9 Ryosuke Niwa 2011-12-02 20:54:08 PST
(In reply to comment #7)
> (From update of attachment 115770 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=115770&action=review
> 
> > Tools/Scripts/webkitpy/common/checkout/changelog.py:247
> > +    def _sepearate_revision_and_line(line):
> 
> fyi, typo: sepearate

Will fix.
Comment 10 Ryosuke Niwa 2011-12-02 20:58:43 PST
Thanks for the review. Landing it now.
Comment 11 Ryosuke Niwa 2011-12-02 20:59:31 PST
Committed r101901: <http://trac.webkit.org/changeset/101901>