Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 659cfaf4fb28aacbf69f6b7eccecc46181535460
      
https://github.com/WebKit/WebKit/commit/659cfaf4fb28aacbf69f6b7eccecc46181535460
  Author: Ryan Haddad <[email protected]>
  Date:   2026-09-10 (Thu, 10 Sep 2026)

  Changed paths:
    M Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/revert.py
    M Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/revert_unittest.py

  Log Message:
  -----------
  [webkitscmpy] git-webkit revert crashes instead of reporting an unresolvable 
commit
https://bugs.webkit.org/show_bug.cgi?id=322744
rdar://186010871

Reviewed by Aakash Jain.

Revert.get_commit_info() returns a 3-tuple on its error path but a 2-tuple on 
success, and
the sole caller unpacks two values. So any unresolvable commit id (such as a 
typo, wrong branch,
or a checkout that hasn't fetched a recent commit) raises "too many values to 
unpack" right after
printing the intended "Could not find" message, and the top-level handler turns 
that into a
full traceback with exit code -1 instead of a clean exit 1. This is also the 
underlying cause
of https://bugs.webkit.org/show_bug.cgi?id=322685.

* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/revert.py:
(Revert.get_commit_info): Return a 2-tuple on the error path, and include the 
exception's
message in the printed "Could not find" line so the reason for the error is 
more clear.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/revert_unittest.py:
(TestRevert.test_unresolvable_commit): Added.

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



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

Reply via email to