Bug 60027 - webkit-patch post-commits HEAD^.. throws an exception
Summary: webkit-patch post-commits HEAD^.. throws an exception
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Windows 7
: P2 Normal
Assignee: Eric Seidel (no email)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-03 08:14 PDT by Adam Roben (:aroben)
Modified: 2011-05-03 15:20 PDT (History)
4 users (show)

See Also:


Attachments
Patch (18.27 KB, patch)
2011-05-03 08:17 PDT, Adam Roben (:aroben)
no flags Details | Formatted Diff | Diff
Patch (1.21 KB, patch)
2011-05-03 09:41 PDT, Eric Seidel (no email)
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-05-03 08:14:09 PDT
webkit-patch post-commits HEAD^.. throws an exception:

[Adam Roben@macpro8 OpenSource]\$ webkit-patch post-commits HEAD^..
Traceback (most recent call last):
  File "/home/Adam Roben/dev/WebKit/OpenSource/Tools/Scripts/webkit-patch", line 71, in <module>
    main()
  File "/home/Adam Roben/dev/WebKit/OpenSource/Tools/Scripts/webkit-patch", line 66, in main
    WebKitPatch(__file__).main()
  File "/home/Adam Roben/dev/WebKit/OpenSource/Tools/Scripts/webkitpy/tool/multicommandtool.py", line 308, in main
    result = command.check_arguments_and_execute(options, args, self)
  File "/home/Adam Roben/dev/WebKit/OpenSource/Tools/Scripts/webkitpy/tool/multicommandtool.py", line 117, in check_arguments_and_execute
    return self.execute(options, args, tool) or 0
  File "/home/Adam Roben/dev/WebKit/OpenSource/Tools/Scripts/webkitpy/tool/commands/upload.py", line 326, in execute
    commit_message = tool.scm().commit_message_for_local_commit(commit_id)
  File "/home/Adam Roben/dev/WebKit/OpenSource/Tools/Scripts/webkitpy/common/checkout/scm/git.py", line 442, in commit_message_for_local_commit
    return CommitMessage(commit_lines[first_line_after_headers:])
NameError: global name 'CommitMessage' is not defined

I don't know when this started happening.
Comment 1 Adam Roben (:aroben) 2011-05-03 08:17:17 PDT
Created attachment 92076 [details]
Patch
Comment 2 Adam Roben (:aroben) 2011-05-03 08:17:59 PDT
Comment on attachment 92076 [details]
Patch

This is the patch I was trying to upload.
Comment 3 Eric Seidel (no email) 2011-05-03 09:17:49 PDT
We need to import CommitMessage into git.py.  Sorry. :(
Comment 4 Eric Seidel (no email) 2011-05-03 09:41:54 PDT
Created attachment 92085 [details]
Patch
Comment 5 Adam Roben (:aroben) 2011-05-03 09:57:57 PDT
Comment on attachment 92085 [details]
Patch

Any way to write a test?
Comment 6 Eric Seidel (no email) 2011-05-03 10:19:38 PDT
There certainly are.  I just wrote this quickly on my train ride to work.  The scm tests take like 30m to run... (I'm working on fixing that), so I didn't bother.
Comment 7 Adam Barth 2011-05-03 10:46:59 PDT
Eric, do you have a plan to fix all these regressions?  There have been a handful of them at this point.
Comment 8 Eric Seidel (no email) 2011-05-03 11:02:10 PDT
Yes, I fixed this one this morning.  I went looking for other bugs on the train but didn't find them.  I think we have one other on file?  Do you know of more?  I'm certainly happy to fix these imports and add associated unit tests so we don't hit them again.  Much of this pain is due to the scm.py tests being too slow to run (and thus they've slowly gotten worse and worse coverage over time and fail to catch these sorts of things).
Comment 9 Adam Barth 2011-05-03 11:14:08 PDT
https://bugs.webkit.org/show_bug.cgi?id=59980 for example.

Lack of testing and slowness of testing is certainly one reason you caused these regressions.  However, it would be useful to read all the code carefully to make sure you're importing everything that you need.  Otherwise, we'll get a long tail of these sorts of bug reports.
Comment 10 Eric Seidel (no email) 2011-05-03 12:06:05 PDT
(In reply to comment #9)
> https://bugs.webkit.org/show_bug.cgi?id=59980 for example.
> 
> Lack of testing and slowness of testing is certainly one reason you caused these regressions.  However, it would be useful to read all the code carefully to make sure you're importing everything that you need.  Otherwise, we'll get a long tail of these sorts of bug reports.

My apologies for the regressions.
Comment 11 WebKit Commit Bot 2011-05-03 15:20:44 PDT
Comment on attachment 92085 [details]
Patch

Clearing flags on attachment: 92085

Committed r85672: <http://trac.webkit.org/changeset/85672>
Comment 12 WebKit Commit Bot 2011-05-03 15:20:50 PDT
All reviewed patches have been landed.  Closing bug.