Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 590d1e9137936246434463aef7c785f05889d5e0
https://github.com/WebKit/WebKit/commit/590d1e9137936246434463aef7c785f05889d5e0
Author: Dawn Morningstar <[email protected]>
Date: 2026-07-07 (Tue, 07 Jul 2026)
Changed paths:
M Tools/Scripts/libraries/webkitbugspy/setup.py
M Tools/Scripts/libraries/webkitbugspy/webkitbugspy/__init__.py
M Tools/Scripts/libraries/webkitbugspy/webkitbugspy/bugzilla.py
M Tools/Scripts/libraries/webkitbugspy/webkitbugspy/issue.py
M Tools/Scripts/libraries/webkitbugspy/webkitbugspy/mocks/bugzilla.py
M Tools/Scripts/libraries/webkitbugspy/webkitbugspy/mocks/radar.py
M Tools/Scripts/libraries/webkitbugspy/webkitbugspy/radar.py
M
Tools/Scripts/libraries/webkitbugspy/webkitbugspy/tests/bugzilla_unittest.py
M Tools/Scripts/libraries/webkitbugspy/webkitbugspy/tests/radar_unittest.py
M Tools/Scripts/libraries/webkitscmpy/setup.py
M Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py
M Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/__init__.py
A Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/apply.py
A Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/apply_unittest.py
Log Message:
-----------
[git-webkit] Add `git-webkit apply` to apply a patch attached to a bug
tracker issue
https://bugs.webkit.org/show_bug.cgi?id=317370
rdar://179992085
Reviewed by Jonathan Bedard.
`git-webkit apply <issue> [name]` downloads a patch attached to a bug
tracker issue and applies it with `git am` (or `git apply --3way` when
--no-commit is passed). It resolves any tracker webkitbugspy knows about --
an issue URL, rdar://<id>, or a bare radar id -- lists every attached
patch, and lets the user choose which one to apply, defaulting to a known
triage patch when one is present. On an interactive terminal it opens the
chosen patch as an HTML diff and waits until the viewer is dismissed before
applying (interrupt to abort).
The concept of an attachment is pushed down into webkitbugspy so the
sub-program just asks the issue for its patches and gets None back when the
tracker has no notion of attachments. Radar and Bugzilla implement it;
Bugzilla lists attachment metadata and downloads a patch's contents lazily.
* Tools/Scripts/libraries/webkitbugspy/setup.py:
* Tools/Scripts/libraries/webkitbugspy/webkitbugspy/__init__.py: Bump to 0.15.3.
* Tools/Scripts/libraries/webkitbugspy/webkitbugspy/issue.py:
(Issue.Attachment): Added.
(Issue.Attachment.is_patch):
(Issue.Attachment.contents): Lazily fetch and cache the attachment's bytes.
(Issue.__init__): Initialize _attachments.
(Issue.attachments): Added; None when the tracker has no attachment concept.
(Issue.patches): Added; the attachments that look like patches.
* Tools/Scripts/libraries/webkitbugspy/webkitbugspy/radar.py:
(Tracker.populate): Populate attachments from radar.attachments.
(Tracker._attachment_contents): Download an attachment's bytes, or None if
locked.
* Tools/Scripts/libraries/webkitbugspy/webkitbugspy/bugzilla.py:
(Tracker.populate): List attachment metadata (without downloading contents).
(Tracker._attachment_contents): Download a single attachment's bytes lazily.
* Tools/Scripts/libraries/webkitbugspy/webkitbugspy/mocks/radar.py:
(RadarModel.Enclosure): Added.
(RadarModel.Attachment): Added.
(RadarModel.__init__): Expose attachments.
(Radar.exceptions.AttachmentLockedException): Added.
* Tools/Scripts/libraries/webkitbugspy/webkitbugspy/mocks/bugzilla.py:
(Bugzilla.request): Route the attachment list and single-attachment endpoints.
(Bugzilla._attachment_records):
(Bugzilla._attachment_json):
(Bugzilla._attachments):
(Bugzilla._attachment):
* Tools/Scripts/libraries/webkitbugspy/webkitbugspy/tests/radar_unittest.py:
(TestRadar.test_attachments):
(TestRadar.test_patches):
(TestRadar.test_patch_contents):
(TestRadar.test_locked_attachment):
(TestRadar.test_no_attachments):
* Tools/Scripts/libraries/webkitbugspy/webkitbugspy/tests/bugzilla_unittest.py:
(TestBugzilla.test_attachments):
(TestBugzilla.test_patches):
(TestBugzilla.test_no_attachments):
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Require
webkitbugspy 0.15.3.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/__init__.py:
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/apply.py: Added.
(Apply):
(Apply.parser):
(Apply.resolve_issue): Resolve a link, URL, or bare radar id to an issue.
(Apply.select_patch): Pick a patch by name, or choose from the issue's patches.
(Apply.main):
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/apply_unittest.py: Added.
(TestApply):
Canonical link: https://commits.webkit.org/316684@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications