Bug 64180 - REGRESSION (r90564): test-webkitpy failing on multiple bots due to commit-log-editor errors
: REGRESSION (r90564): test-webkitpy failing on multiple bots due to commit-log...
Status: RESOLVED FIXED
: WebKit
Tools / Tests
: 528+ (Nightly build)
: Unspecified Unspecified
: P2 Normal
Assigned To:
:
:
:
:
  Show dependency treegraph
 
Reported: 2011-07-08 11:05 PST by
Modified: 2011-07-08 11:51 PST (History)


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


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2011-07-08 11:05:09 PST
REGRESSION (r90564): test-webkitpy failing on multiple bots due to commit-log-editor errors
------- Comment #1 From 2011-07-08 11:07:15 PST -------
Created an attachment (id=100135) [details]
Patch
------- Comment #2 From 2011-07-08 11:09:11 PST -------
(From update of attachment 100135 [details])
Ok.  Do I need to make sure this env variable is set on the commit bots?
------- Comment #3 From 2011-07-08 11:20:51 PST -------
(In reply to comment #2)
> (From update of attachment 100135 [details] [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 From 2011-07-08 11:34:59 PST -------
(From update of attachment 100135 [details])
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 From 2011-07-08 11:46:31 PST -------
** 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 From 2011-07-08 11:48:03 PST -------
(From update of attachment 100135 [details])
Clearing flags on attachment: 100135

Committed r90648: <http://trac.webkit.org/changeset/90648>
------- Comment #7 From 2011-07-08 11:48:09 PST -------
All reviewed patches have been landed.  Closing bug.
------- Comment #8 From 2011-07-08 11:51:39 PST -------
(From update of attachment 100135 [details])
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.