Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: bb7321c89b8c945490a86f2f728de8eb637d2306
https://github.com/WebKit/WebKit/commit/bb7321c89b8c945490a86f2f728de8eb637d2306
Author: Sam Sneddon <[email protected]>
Date: 2026-01-09 (Fri, 09 Jan 2026)
Changed paths:
M Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py
M Tools/Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py
M Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/git_unittest.py
M Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/track_unittest.py
Log Message:
-----------
[webkitscmpy] Add unit tests for Git.branches_for
https://bugs.webkit.org/show_bug.cgi?id=305167
Reviewed by Darin Adler.
This adds tests, and fixes various bugs in our mocks.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py:
(Git.remote_for): Avoid mutating the cached `self.source_remotes()` list.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py:
(Git.__init__): Adopt the below API change.
(Git.branches_on): Change this from taking a hash (which might match
nothing) to a commit, thereby forcing callers to deal
with ensuring a commit matches. Then, rewrite the
entire method to the simplest and most obvious
definition, as being correct is more important than
being fast.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/git_unittest.py:
(TestGit.test_branches_for): The actual tests.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/track_unittest.py:
(TestTrack.test_branch): Fix this to have a novel commit only on the
security remotes, now Git.branches_on correctly
determines the canonical remote of 5@main is
origin.
Canonical link: https://commits.webkit.org/305386@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications