Bug 298688
| Summary: | [export-w3c-test-changes] should gracefully handle the 'nothing to commit' case | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Brianna Fan <bfan2> |
| Component: | Tools / Tests | Assignee: | Brianna Fan <bfan2> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | Other | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Brianna Fan
When we don't have changes to export to WPT, such as with an import/rebase commit, using `export-w3c-test-changes` can result in an error message. In most cases, we actually don't want to return an error since this behaviour is correct and expected (we don't need to export what already exists on the remote).
```
Checking for WPT changes
Fetching web-platform-tests repository
Cleaning web-platform-tests master branch
Switched to branch 'master'
Your branch is up to date with 'origin/master'.
HEAD is now at 8274ec185c Apply word-space to leading spaces if white-space is pre
Applying patch to web-platform-tests branch wpt-export-for-webkit-298214
Switched to a new branch 'wpt-export-for-webkit-298214'
Performing three-way merge...
Applied patch to 'fonts/math/css-units.woff' cleanly.
Performing three-way merge...
Applied patch to 'fonts/math/largeop-displayoperatorminheight1250.woff' cleanly.
Performing three-way merge...
Applied patch to 'fonts/math/largeop-displayoperatorminheight3000-2AFF-axisheight1000.woff' cleanly.
Performing three-way merge...
Applied patch to 'fonts/math/radical-rtlm.woff' cleanly.
Performing three-way merge...
Applied patch to 'fonts/math/stretchy-text-direction-asymetrical.woff' cleanly.
On branch wpt-export-for-webkit-298214
nothing to commit, working tree clean
ERROR: No changes to commit! Exiting...
ERROR: Cannot create web-platform-tests local branch from the patch '/var/folders/pt/kpszr_vd45q6xp8tbsv80rs80000gn/T/tmpoi4lsly9wpt_export_patch'
Keeping local branch wpt-export-for-webkit-298214
```
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/160325435>
Sam Sneddon [:gsnedders]
Heh, and this case was https://github.com/WebKit/WebKit/commit/eb66a3be277cf853c610486dd9ce5bafdef6fdc3 (https://github.com/WebKit/WebKit/pull/50167) — an import commit.
I think we just need `--allow-empty` — https://git-scm.com/docs/git-apply#Documentation/git-apply.txt---allow-empty
Brianna Fan
I don't think that's actually the failure point. If we got here, it means the patch we created is non-empty (we create the patch based on the WebKit PR, not compared to WPT ToT). It's actually about not returning an error when there are no changes to commit. I'm just wary of any cases that are actually failures that could possibly also result in no changes no commit.
Brianna Fan
Pull request: https://github.com/WebKit/WebKit/pull/50626
EWS
Committed 300242@main (ef97d89d09d3): <https://commits.webkit.org/300242@main>
Reviewed commits have been landed. Closing PR #50626 and removing active labels.