Bug 193746 - test_exporter.py: webkitpy.common.system.executive.ScriptError from create_branch_with_patch
Summary: test_exporter.py: webkitpy.common.system.executive.ScriptError from create_br...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: PC Linux
: P2 Normal
Assignee: Michael Catanzaro
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-01-23 16:24 PST by Michael Catanzaro
Modified: 2019-01-24 09:31 PST (History)
8 users (show)

See Also:


Attachments
Patch (1.45 KB, patch)
2019-01-23 16:25 PST, Michael Catanzaro
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Catanzaro 2019-01-23 16:24:38 PST
Playing with export-w3c-test-changes for the first time, I noticed this error:

WARNING: Failed to run "['git', 'apply', '--index', '/tmp/tmpPKjSPLwpt_export_patch']" exit_code: 1 cwd: /home/mcatanzaro/Projects/WebKit/WebKitBuild/w3c-tests/web-platform-tests
Traceback (most recent call last):
  File "/home/mcatanzaro/Projects/WebKit/Tools/Scripts/export-w3c-test-changes", line 35, in <module>
    sys.exit(test_exporter.main(sys.argv[1:], sys.stdout, sys.stderr))
  File "/home/mcatanzaro/Projects/WebKit/Tools/Scripts/webkitpy/w3c/test_exporter.py", line 451, in main
    test_exporter.do_export()
  File "/home/mcatanzaro/Projects/WebKit/Tools/Scripts/webkitpy/w3c/test_exporter.py", line 361, in do_export
    if not self.create_branch_with_patch(git_patch_file):
  File "/home/mcatanzaro/Projects/WebKit/Tools/Scripts/webkitpy/w3c/test_exporter.py", line 296, in create_branch_with_patch
    self._git.apply_mail_patch(['--abort'])
  File "/home/mcatanzaro/Projects/WebKit/Tools/Scripts/webkitpy/common/checkout/scm/git.py", line 594, in apply_mail_patch
    return self._run_git(['apply', '--index'] + options)
  File "/home/mcatanzaro/Projects/WebKit/Tools/Scripts/webkitpy/common/checkout/scm/git.py", line 106, in _run_git
    return self.run(full_command_args, **full_kwargs)
  File "/home/mcatanzaro/Projects/WebKit/Tools/Scripts/webkitpy/common/checkout/scm/scm.py", line 78, in run
    decode_output=decode_output)
  File "/home/mcatanzaro/Projects/WebKit/Tools/Scripts/webkitpy/common/system/executive.py", line 412, in run_command
    (error_handler or self.default_error_handler)(script_error)
  File "/home/mcatanzaro/Projects/WebKit/Tools/Scripts/webkitpy/common/system/abstractexecutive.py", line 97, in default_error_handler
    raise error
webkitpy.common.system.executive.ScriptError: Failed to run "['git', 'apply', '--index', '--abort']" exit_code: 129 cwd: /home/mcatanzaro/Projects/WebKit/WebKitBuild/w3c-tests/web-platform-tests

It calls 'git apply --index --abort', but --abort is not a valid argument to 'git apply', so we'd best just not call it. This gets me a little bit farther before the next error. :)
Comment 1 Michael Catanzaro 2019-01-23 16:25:57 PST
Created attachment 359970 [details]
Patch
Comment 2 youenn fablet 2019-01-24 07:10:34 PST
Comment on attachment 359970 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=359970&action=review

> Tools/Scripts/webkitpy/w3c/test_exporter.py:-296
> -            self._git.apply_mail_patch(['--abort'])

I think it was working at some point.
I wonder whether we want to let it as is so that one can manually fix it or use self._git.reset_hard() to clean the mess.
Comment 3 Michael Catanzaro 2019-01-24 09:03:01 PST
(In reply to youenn fablet from comment #2)
> I think it was working at some point.
> I wonder whether we want to let it as is so that one can manually fix it or
> use self._git.reset_hard() to clean the mess.

Not sure, but this is a little better than the status quo.
Comment 4 WebKit Commit Bot 2019-01-24 09:30:16 PST
Comment on attachment 359970 [details]
Patch

Clearing flags on attachment: 359970

Committed r240438: <https://trac.webkit.org/changeset/240438>
Comment 5 WebKit Commit Bot 2019-01-24 09:30:17 PST
All reviewed patches have been landed.  Closing bug.
Comment 6 Radar WebKit Bug Importer 2019-01-24 09:31:40 PST
<rdar://problem/47518183>