Bug 33578 - webkit-patch land fails if a user doesn't provide a bug ID
Summary: webkit-patch land fails if a user doesn't provide a bug ID
Status: RESOLVED DUPLICATE of bug 33634
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
Depends on:
Reported: 2010-01-13 00:06 PST by Shinichiro Hamaji
Modified: 2010-02-01 19:22 PST (History)
0 users

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Shinichiro Hamaji 2010-01-13 00:06:55 PST
webkit-patch land fails if a user doesn't provide a bug ID by command line flags and ChangeLog doesn't contain the bug URL.

Traceback (most recent call last):
  File "./WebKitTools/Scripts/webkit-patch", line 108, in <module>
  File "/Users/hamaji/GitKit/WebKitTools/Scripts/webkitpy/multicommandtool.py", line 299, in main
    return command.check_arguments_and_execute(options, args, self)
  File "/Users/hamaji/GitKit/WebKitTools/Scripts/webkitpy/multicommandtool.py", line 113, in check_arguments_and_execute
    return self.execute(options, args, tool) or 0
  File "/Users/hamaji/GitKit/WebKitTools/Scripts/webkitpy/commands/abstractsequencedcommand.py", line 43, in execute
    self._sequence.run_and_handle_errors(tool, options, self._prepare_state(options, args, tool))
  File "/Users/hamaji/GitKit/WebKitTools/Scripts/webkitpy/stepsequence.py", line 66, in run_and_handle_errors
    self._run(tool, options, state)
  File "/Users/hamaji/GitKit/WebKitTools/Scripts/webkitpy/stepsequence.py", line 60, in _run
    step(tool, options).run(state)
  File "/Users/hamaji/GitKit/WebKitTools/Scripts/webkitpy/steps/updatechangelogswithreviewer.py", line 54, in run
    bug_id = state.get("bug_id") or state["patch"].bug_id()
KeyError: 'patch'

This is the line in question:

    bug_id = state.get("bug_id") or state["patch"].bug_id()

I'm not sure when state["patch"] can be set (I didn't understand the recent changes on this tool yet). If this won't be set, we may be able to remove expression after "or". Otherwise, we may want to do like

    bug_id = state.get("bug_id")
    if not bug_id and "patch" in state
        bug_id = state["patch"].bug_id()

Comment 1 Shinichiro Hamaji 2010-02-01 19:22:06 PST
This was fixed in another bug.

*** This bug has been marked as a duplicate of bug 33634 ***