Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 4087d3f231d5c4b52ffc8c5be1d3344a9d37ba36
      
https://github.com/WebKit/WebKit/commit/4087d3f231d5c4b52ffc8c5be1d3344a9d37ba36
  Author: Dawn Morningstar <[email protected]>
  Date:   2026-07-08 (Wed, 08 Jul 2026)

  Changed paths:
    M Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/apply.py
    M Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/diff/diff.py
    M Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/diff/html_diff.py
    M Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/apply_unittest.py
    A Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/diff_unittest.py

  Log Message:
  -----------
  git-webkit apply should let you review and choose among a bug's attached 
patches
https://bugs.webkit.org/show_bug.cgi?id=318912
rdar://181747976

Reviewed by Jonathan Bedard.

`git-webkit apply` picked a patch from a numbered list and then rendered
its diff, which crashed on exactly the generated triage patches it targets:
their format-patch `From` line carries the null SHA, and the HTML differ
tried to resolve it as a commit in the checkout. Rework the interactive flow:
present a bug's patches in the order the tracker lists them, review the chosen
patch as an HTML diff before applying it, and return to the menu when it is 
rejected.
Closing the diff or pressing Enter accepts; answering 'n' rejects.
A named patch is reviewed too. Once a patch is committed, open its
message in the editor and offer to create a pull request.

* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/apply.py:
(Apply):
(Apply.review):
(Apply.select_patch):
(Apply.edit_commit_message):
(Apply.offer_pull_request):
(Apply.main):
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/diff/diff.py:
(DiffBase.add_line):
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/diff/html_diff.py:
(__init__):
(__exit__._wait_for_enter):
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/apply_unittest.py:
(TestApply.test_select_patch_named_reviewed_when_interactive):
(TestApply):
(TestApply.test_select_patch_named_rejected_when_interactive_returns_none):
(TestApply.test_select_patch_named_non_interactive_skips_review):
(TestApply.test_select_patch_non_interactive_returns_single):
(TestApply.test_select_patch_non_interactive_returns_first_in_tracker_order):
(TestApply.test_select_patch_menu_preserves_tracker_order_and_defaults_to_first):
(TestApply.test_select_patch_offers_every_variant_in_the_menu):
(TestApply.test_select_patch_interactive_accepts_reviewed_patch):
(TestApply.test_select_patch_interactive_single_rejected_returns_none):
(TestApply.test_select_patch_interactive_reject_returns_to_menu):
(TestApply.test_review_accepts_when_diff_accepted):
(TestApply.test_review_rejects_when_diff_rejected):
(TestApply.test_review_rejects_undownloadable_patch):
(TestApply.test_offer_pull_request_invokes_pull_request_when_accepted):
(TestApply.test_offer_pull_request_skips_when_declined):
(TestApply.test_main_named_patch_rejected_reports_not_applied):
(TestApply.test_main_reviews_and_opens_editor_when_interactive):
(TestApply.test_main_creates_pull_request_when_accepted):
(TestApply.test_main_skips_pull_request_when_declined):
(TestApply.test_main_no_editor_when_not_committing):
(TestApply.test_main_declined_review_is_not_applied):
(TestApply.test_main_skips_review_and_editor_when_not_interactive):
(TestApply.test_select_patch_single): Deleted.
(TestApply.test_select_patch_prompts_with_preferred_default): Deleted.
(TestApply.test_select_patch_defaults_to_first_when_none_preferred): Deleted.
(TestApply.test_main_previews_diff_when_interactive): Deleted.
(TestApply.test_main_skips_diff_when_not_interactive): Deleted.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/diff_unittest.py: Added.
(_Commit):
(_Commit.__init__):
(_Commit.__str__):
(TestDiffBase):
(TestDiffBase._from_line):
(TestDiffBase._repo):
(TestDiffBase.test_from_line_rewritten_when_hash_resolves):
(TestDiffBase.test_from_line_falls_back_when_hash_unresolvable):
(TestDiffBase.test_from_line_ignored_without_repository):

Canonical link: https://commits.webkit.org/316772@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to