Bug 71976 - Add a tool to list authors and reviewers contributed to a given file or directory
Summary: Add a tool to list authors and reviewers contributed to a given file or direc...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on: 72090
Blocks: 26533
  Show dependency treegraph
 
Reported: 2011-11-09 17:39 PST by Ryosuke Niwa
Modified: 2011-11-17 18:47 PST (History)
3 users (show)

See Also:


Attachments
Initial implementation (5.05 KB, patch)
2011-11-09 17:40 PST, Ryosuke Niwa
no flags Details | Formatted Diff | Diff
Add an change log entry (5.32 KB, patch)
2011-11-09 17:42 PST, Ryosuke Niwa
eric: review-
Details | Formatted Diff | Diff
updated to work on ToT (7.04 KB, patch)
2011-11-17 18:45 PST, Ryosuke Niwa
no flags 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-09 17:39:39 PST
This is a spin-off from https://bugs.webkit.org/show_bug.cgi?id=71957. It seems useful.
Comment 1 Ryosuke Niwa 2011-11-09 17:40:57 PST
Created attachment 114406 [details]
Initial implementation
Comment 2 Ryosuke Niwa 2011-11-09 17:42:29 PST
Created attachment 114408 [details]
Add an change log entry
Comment 3 Eric Seidel (no email) 2011-11-09 17:56:42 PST
Comment on attachment 114406 [details]
Initial implementation

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

Free functions are bad-news bears.  Eventually you'll want those on an object so they can be tested and mocked.

Why not make this a webkit-patch Command?

> Tools/Scripts/list-contributors-for-file:73
> +    dir = os.path.dirname(changelog_path)

Sad times.  Without a FilesSystem object it's very hard to test this sort of function.
Comment 4 Eric Seidel (no email) 2011-11-09 17:57:27 PST
Comment on attachment 114408 [details]
Add an change log entry

Testing. :(  I would recommend makign this a Command subclass and adding it to webkit-patch instead.  We can make it a separate script too if you'd like, but building on the webkitpy infrastructure will make this much easier for you.
Comment 5 Ryosuke Niwa 2011-11-10 22:31:15 PST
(In reply to comment #4)
> (From update of attachment 114408 [details])
> Testing. :(  I would recommend makign this a Command subclass and adding it to webkit-patch instead.  We can make it a separate script too if you'd like, but building on the webkitpy infrastructure will make this much easier for you.

Oops, I didn't mean to set r? flag for this one yet. I mainly developed this as a tool to diagnose ChangeLogEntry class. It has been super useful!
Comment 6 Ryosuke Niwa 2011-11-17 18:45:53 PST
Created attachment 115723 [details]
updated to work on ToT
Comment 7 Ryosuke Niwa 2011-11-17 18:47:17 PST
The latest version supports different modes of operations per command line flag. e.g. --parse-reviewer-names will list all reviewer names that are "invalid" as follows (0:5 means take the first 5 change logs):

list-contributors-for-file Source/WebCore/ --parse-reviewer-names 0:5
Parsing /Volumes/Data/webkit4/Source/WebCore/ChangeLog...
                   Geoff Garen (11) matched with ['"Geoffrey Garen" <ggaren@apple.com>'] (3)
          Kenneth Christiansen (20) matched with ['"Kenneth Rohde Christiansen" <kenneth@webkit.org>'] (6)
                   Geoff Garen (11) matched with ['"Geoffrey Garen" <ggaren@apple.com>'] (3)
                    Dave Hyatt (10) matched with ['"David Hyatt" <hyatt@apple.com>'] (2)
                    Dave Hyatt (10) matched with ['"David Hyatt" <hyatt@apple.com>'] (2)

Parsing /Volumes/Data/webkit4/Source/WebCore/ChangeLog-2011-10-19...
             Nikolas Zimmerman (17) matched with ['"Nikolas Zimmermann" <zimmermann@kde.org>'] (1)
                   Dave Kilzer (11) matched with ['"David Kilzer" <ddkilzer@webkit.org>'] (2)
                    Dave Hyatt (10) matched with ['"David Hyatt" <hyatt@apple.com>'] (2)
                    Dave Hyatt (10) matched with ['"David Hyatt" <hyatt@apple.com>'] (2)
                    Dave Hyatt (10) matched with ['"David Hyatt" <hyatt@apple.com>'] (2)
                    Dave Hyatt (10) matched with ['"David Hyatt" <hyatt@apple.com>'] (2)
                    Dave Hyatt (10) matched with ['"David Hyatt" <hyatt@apple.com>'] (2)
                    Dave Hyatt (10) matched with ['"David Hyatt" <hyatt@apple.com>'] (2)
                    Dave Hyatt (10) matched with ['"David Hyatt" <hyatt@apple.com>'] (2)
                    Dave Hyatt (10) matched with ['"David Hyatt" <hyatt@apple.com>'] (2)
                    Dave Hyatt (10) matched with ['"David Hyatt" <hyatt@apple.com>'] (2)