Bug 64180 - REGRESSION (r90564): test-webkitpy failing on multiple bots due to commit-log-editor errors
Summary: REGRESSION (r90564): test-webkitpy failing on multiple bots due to commit-log...
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: Adam Roben (:aroben)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-08 11:05 PDT by Adam Roben (:aroben)
Modified: 2011-07-08 11:51 PDT (History)
3 users (show)

See Also:


Attachments
Patch (2.12 KB, patch)
2011-07-08 11:07 PDT, Adam Roben (:aroben)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Roben (:aroben) 2011-07-08 11:05:09 PDT
REGRESSION (r90564): test-webkitpy failing on multiple bots due to commit-log-editor errors
Comment 1 Adam Roben (:aroben) 2011-07-08 11:07:15 PDT
Created attachment 100135 [details]
Patch
Comment 2 Adam Barth 2011-07-08 11:09:11 PDT
Comment on attachment 100135 [details]
Patch

Ok.  Do I need to make sure this env variable is set on the commit bots?
Comment 3 Adam Roben (:aroben) 2011-07-08 11:20:51 PDT
(In reply to comment #2)
> (From update of attachment 100135 [details])
> Ok.  Do I need to make sure this env variable is set on the commit bots?

No. You already ensured the git variable user.name is set, which is used as a fallback.
Comment 4 Eric Seidel (no email) 2011-07-08 11:34:59 PDT
Comment on attachment 100135 [details]
Patch

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

> Tools/Scripts/webkitpy/common/checkout/checkout_unittest.py:129
> +            kwargs['env'] = env

You can just pass it as env=env and it will automagically end up on the other side as part of kwargs.  **kwargs is expanding the "kwargs" dictionary (not a special name) to be named args.
Comment 5 Eric Seidel (no email) 2011-07-08 11:46:31 PDT
** can be used to either stuff all the named args into a dictionary (of any name of your choosing, although conventionally kwargs) or to expand a dictionary into named args when calling a function.

so defining a function as:

def foo(*blah, **moreblah)

will take all the non-named args, and put them into a tuple() blah, and all the named args and put them into a dict() moreblah

Calling *listname will expand an arglist into a list of args, but only during a function call it seems.  I thought * was a generic "expand tuple" operator, but I've since learned this morning it's just part of the language grammar. :)

http://docs.python.org/reference/expressions.html#calls
Comment 6 WebKit Review Bot 2011-07-08 11:48:03 PDT
Comment on attachment 100135 [details]
Patch

Clearing flags on attachment: 100135

Committed r90648: <http://trac.webkit.org/changeset/90648>
Comment 7 WebKit Review Bot 2011-07-08 11:48:09 PDT
All reviewed patches have been landed.  Closing bug.
Comment 8 Adam Roben (:aroben) 2011-07-08 11:51:39 PDT
Comment on attachment 100135 [details]
Patch

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

>> Tools/Scripts/webkitpy/common/checkout/checkout_unittest.py:129
>> +            kwargs['env'] = env
> 
> You can just pass it as env=env and it will automagically end up on the other side as part of kwargs.  **kwargs is expanding the "kwargs" dictionary (not a special name) to be named args.

If kwargs happens to already contain a value for 'env' then passing env=env will cause a runtime error.