Bug 42984

Summary: webkit-patch post-commits is broken: AttributeError: Values instance has no attribute 'no_squash'
Product: WebKit Reporter: David Kilzer (:ddkilzer) <ddkilzer>
Component: Tools / TestsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, eric, ojan
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch eric: review+

Description David Kilzer (:ddkilzer) 2010-07-26 11:24:37 PDT
$ ./WebKitTools/Scripts/webkit-patch post-commits -m "Patch v1" HEAD
Traceback (most recent call last):
  File "./WebKitTools/Scripts/webkit-patch", line 64, in <module>
    main()
  File "./WebKitTools/Scripts/webkit-patch", line 59, in main
    WebKitPatch(__file__).main()
  File "/Volumes/Data/WebKit.git/WebKitTools/Scripts/webkitpy/tool/multicommandtool.py", line 308, in main
    result = command.check_arguments_and_execute(options, args, self)
  File "/Volumes/Data/WebKit.git/WebKitTools/Scripts/webkitpy/tool/multicommandtool.py", line 117, in check_arguments_and_execute
    return self.execute(options, args, tool) or 0
  File "/Volumes/Data/WebKit.git/WebKitTools/Scripts/webkitpy/tool/commands/upload.py", line 288, in execute
    steps.ObsoletePatches(tool, options).run(state)
  File "/Volumes/Data/WebKit.git/WebKitTools/Scripts/webkitpy/tool/steps/abstractstep.py", line 38, in __init__
    if options.no_squash:
AttributeError: Values instance has no attribute 'no_squash'

Note that "upload" keeps opening an editor for a patch that already has a ChangeLog, which is not what I want either:

./WebKitTools/Scripts/webkit-patch upload -m "Patch v1" -g HEAD
Comment 1 Eric Seidel (no email) 2010-07-26 12:29:00 PDT
Looks like this needs a test case. :)  Ojan is our master of --no-squash...
Comment 2 Ojan Vafai 2010-07-27 13:00:13 PDT
Created attachment 62731 [details]
Patch
Comment 3 Eric Seidel (no email) 2010-07-27 13:13:41 PDT
Comment on attachment 62731 [details]
Patch

How does this change PostCommits?
Comment 4 Ojan Vafai 2010-07-27 13:20:50 PDT
This issue was that post-commits used an object that inherited from AbstractStep, which would check the values of these options without using the options in the AbstractStep itself. I think there's an architectural issue in the code here, but I'm not sure it's worth fixing now.
Comment 5 Ojan Vafai 2010-07-27 13:24:00 PDT
Committed r64153: <http://trac.webkit.org/changeset/64153>