Bug 115391 - [webkitpy] Need abstract base class for commands that analyze commit logs
Summary: [webkitpy] Need abstract base class for commands that analyze commit logs
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: Glenn Adams
URL:
Keywords:
Depends on: 115285
Blocks: 115387 115388
  Show dependency treegraph
 
Reported: 2013-04-29 17:30 PDT by Glenn Adams
Modified: 2013-05-01 19:09 PDT (History)
8 users (show)

See Also:


Attachments
Patch (5.83 KB, patch)
2013-04-30 21:23 PDT, Glenn Adams
no flags Details | Formatted Diff | Diff
Patch for landing (5.79 KB, patch)
2013-05-01 18:41 PDT, Glenn Adams
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Glenn Adams 2013-04-29 17:30:59 PDT
There is one existing command, suggest-nominations, that analyzes commit logs. There are two additional commands proposed [1][2] that also need to analyze commit logs. In order to factor out common shared functionality, the commit log analysis functionality should be placed in an abstract base class that subclass Command, let's call this AbstractCommitLogCommand.
Comment 1 Glenn Adams 2013-04-29 17:31:49 PDT
(In reply to comment #0)
> There is one existing command, suggest-nominations, that analyzes commit logs. There are two additional commands proposed [1][2] that also need to analyze commit logs. In order to factor out common shared functionality, the commit log analysis functionality should be placed in an abstract base class that subclass Command, let's call this AbstractCommitLogCommand.

[1] https://bugs.webkit.org/show_bug.cgi?id=115387
[2] https://bugs.webkit.org/show_bug.cgi?id=115388
Comment 2 Glenn Adams 2013-04-30 21:23:43 PDT
Created attachment 200202 [details]
Patch
Comment 3 Benjamin Poulain 2013-05-01 18:29:49 PDT
Comment on attachment 200202 [details]
Patch

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

> Tools/Scripts/webkitpy/tool/commands/suggestnominations.py:62
> +        options = sorted(options, lambda a, b: cmp(a._long_opts, b._long_opts))

I would prefer named arguments with sorted().
Comment 4 Glenn Adams 2013-05-01 18:41:38 PDT
Created attachment 200297 [details]
Patch for landing
Comment 5 Glenn Adams 2013-05-01 18:45:06 PDT
(In reply to comment #3)
> (From update of attachment 200202 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=200202&action=review
> 
> > Tools/Scripts/webkitpy/tool/commands/suggestnominations.py:62
> > +        options = sorted(options, lambda a, b: cmp(a._long_opts, b._long_opts))
> 
> I would prefer named arguments with sorted().

Fixed.
Comment 6 WebKit Commit Bot 2013-05-01 19:09:33 PDT
Comment on attachment 200297 [details]
Patch for landing

Clearing flags on attachment: 200297

Committed r149480: <http://trac.webkit.org/changeset/149480>
Comment 7 WebKit Commit Bot 2013-05-01 19:09:36 PDT
All reviewed patches have been landed.  Closing bug.