Bug 38186 - REGRESSION(r58261): webkit-patch upload does not work in an SVN checkout.
: REGRESSION(r58261): webkit-patch upload does not work in an SVN checkout.
Status: RESOLVED FIXED
Product: WebKit
Classification: Unclassified
Component: Tools / Tests
: 528+ (Nightly build)
: PC Mac OS X 10.5
: P2 Normal
Assigned To: Nobody
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-04-27 01:57 PDT by Maciej Stachowiak
Modified: 2010-04-27 02:35 PDT (History)
4 users (show)

See Also:


Attachments
Patch (2.69 KB, patch)
2010-04-27 02:02 PDT, Adam Barth
mjs: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Maciej Stachowiak 2010-04-27 01:57:22 PDT
webkit-patch upload does not work in an SVN checkout. This is a regression from r58261. It gives this error:

$ webkit-patch upload
Parsing ChangeLog: /Users/mjs/Work/src/Safari/OpenSource/WebCore/ChangeLog
Traceback (most recent call last):
  File "/Users/mjs/Work/src/Safari/OpenSource/WebKitTools/Scripts/webkit-patch", line 56, in <module>
    main()
  File "/Users/mjs/Work/src/Safari/OpenSource/WebKitTools/Scripts/webkit-patch", line 51, in main
    WebKitPatch(__file__).main()
  File "/Users/mjs/Work/src/Safari/OpenSource/WebKitTools/Scripts/webkitpy/tool/multicommandtool.py", line 302, in main
    result = command.check_arguments_and_execute(options, args, self)
  File "/Users/mjs/Work/src/Safari/OpenSource/WebKitTools/Scripts/webkitpy/tool/multicommandtool.py", line 113, in check_arguments_and_execute
    return self.execute(options, args, tool) or 0
  File "/Users/mjs/Work/src/Safari/OpenSource/WebKitTools/Scripts/webkitpy/tool/commands/abstractsequencedcommand.py", line 43, in execute
    self._sequence.run_and_handle_errors(tool, options, self._prepare_state(options, args, tool))
  File "/Users/mjs/Work/src/Safari/OpenSource/WebKitTools/Scripts/webkitpy/tool/commands/stepsequence.py", line 66, in run_and_handle_errors
    self._run(tool, options, state)
  File "/Users/mjs/Work/src/Safari/OpenSource/WebKitTools/Scripts/webkitpy/tool/commands/stepsequence.py", line 60, in _run
    step(tool, options).run(state)
  File "/Users/mjs/Work/src/Safari/OpenSource/WebKitTools/Scripts/webkitpy/tool/steps/checkstyle.py", line 56, in run
    if self._tool.scm().should_squash(self._options.squash):
AttributeError: SVN instance has no attribute 'should_squash'
Comment 1 Adam Barth 2010-04-27 02:02:20 PDT
Created attachment 54400 [details]
Patch
Comment 2 WebKit Review Bot 2010-04-27 02:05:08 PDT
Attachment 54400 [details] did not pass style-queue:

Failed to run "['WebKitTools/Scripts/check-webkit-style', '--no-squash']" exit_code: 1
WebKitTools/Scripts/webkitpy/common/checkout/scm.py:215:  deprecated form of raising exception  [pep8/W602] [5]
Total errors found: 1 in 3 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Maciej Stachowiak 2010-04-27 02:07:21 PDT
Comment on attachment 54400 [details]
Patch

r=me

You may want to fix the style complaints before committing.
Comment 4 Adam Barth 2010-04-27 02:10:24 PDT
Committed r58297: <http://trac.webkit.org/changeset/58297>
Comment 5 Adam Barth 2010-04-27 02:27:14 PDT
We use this style for "NotImplemented" exceptions because Eric said it integrates with some python tool.  I'm not sure if that's something we still care about now that we've adopted PEP8.
Comment 6 Eric Seidel 2010-04-27 02:31:10 PDT
The tool is pylint.

But we don't have to follow it to the letter. WE just have to throw NotImplemented.  But we could throw the more supported raise NotImplemented("foo") i think.
Comment 7 Eric Seidel 2010-04-27 02:32:28 PDT
raise NotImplementedError("foo") rather.
Comment 8 Eric Seidel 2010-04-27 02:35:26 PDT
We could test this using something like:
http://trac.webkit.org/browser/trunk/WebKitTools/Scripts/webkitpy/common/checkout/scm_unittest.py#L159
which just called SVN.should_squash to validate it returned false.