Repository navigation
[webkitscmpy] Separate cache by remote - #77838
webkit-commit-queue merged 1 commit into
Conversation
|
EWS run on previous version of this PR (hash 29cf317) Details
|
29cf317 to
949201a
Compare
|
EWS run on previous version of this PR (hash 949201a) Details |
gsnedders
left a comment
There was a problem hiding this comment.
Sorry for the delay here; there's not a huge amount of non-nit comments here.
949201a to
a34a64f
Compare
|
EWS run on previous version of this PR (hash a34a64f) Details
|
gsnedders
left a comment
There was a problem hiding this comment.
We do seem to break older versions of git-webkit, which seems problematic.
a34a64f to
1d38c4d
Compare
Good call. Did this in a bit of a different way (making the "remote" vs "local" explicit instead of a version), but it achieves the same effect. |
|
EWS run on current version of this PR (hash 1d38c4d) Details |
gsnedders
left a comment
There was a problem hiding this comment.
I still think an explicit version would be a good idea, but we can always do that as a follow-up I think.
https://bugs.webkit.org/show_bug.cgi?id=326753 rdar://189460513 Reviewed by Sam Sneddon. Only cache commits from production branches on canonical remotes, since those branches never move backwards, tracking each remote's copy of a branch separately and computing identifiers on demand. * Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py: (Git.Cache): Cache keys are full remote refs. (Git.Cache.load): Only read cached lists, discarding branches which aren't from canonical remotes. (Git.Cache.is_cacheable): Only the default branch and production branches are cached. (Git.Cache._remotes_for): The default branch is only tracked on the default remote. (Git.Cache._key): Construct a cache key from a remote and branch. (Git.Cache._parse_key): Extract the remote and branch from a cache key. (Git.Cache._keys_for): Cache keys for a branch, ordered by remote security level. (Git.Cache._save): Shared logic for atomically writing the cache to disk. (Git.Cache._reset): Discard computed identifiers. (Git.Cache._fill_branch): Compute identifiers for each copy of a branch. (Git.Cache._branch_point): Determine a branch point from its position on the default branch, only identifiers on the default branch are branch points. (Git.Cache._identifier_for): (Git.Cache._search): Compute identifiers one branch at a time until a commit is found. (Git.Cache._fill): Compute identifiers for a single remote's copy of a branch. (Git.Cache.populate): Update every canonical copy of a branch, populating the default branch for branches we don't cache. (Git.Cache._history_through): Find history shared with another copy of a branch. (Git.Cache._populate): Walk a remote branch, skipping the walk if another copy already contains the tip. Fail if a branch intersects with itself without shared history. Never abbreviate commit hashes. (Git.Cache._populate._append): Match branch names exactly. (Git.Cache._lookup): Find an identifier on any copy of a branch. (Git.Cache.to_hash): Use _lookup. (Git.Cache.to_revision): Ditto. (Git.Cache.to_identifier): Use _search. (Git): Define the default remote before constructing the cache. (Git.default_branch): Fall back to 'main' instead of None. (Git.commit): Never abbreviate commit hashes. (Git.commits): Ditto. (Git.find): The default branch can no longer be None. (Git.rebase): Local branches are no longer cached. (Git.pull): Ditto. (Git.remote_for): (Git.Cache.populate._append): Deleted. (Git.Cache.clear): Deleted. * Tools/Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py: (resolve_all_commits): Handle remote refs moved by update-ref. (rev_list.resolve): Resolve remote refs by the branch they name. (rev_list): Use resolve. * Tools/Scripts/libraries/webkitscmpy/webkitscmpy/scm_base.py: (ScmBase.default_branch): The default branch can no longer be None. (ScmBase.branch_priority): Sort key used to canonicalize commits. (ScmBase.prioritize_branches): Use branch_priority. (ScmBase.find): The default branch can no longer be None. * Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/git_unittest.py: (TestGit.test_log): (test_remote_for_default_branch): * Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/scm_unittest.py: (TestScm.test_prod_branches): (TestScm): (TestScm._Repository): (TestScm.test_branch_priority): (TestScm.test_branch_priority_sorted): (TestScm.test_prioritize_branches): (TestScm.test_prioritize_branches_preferred): Canonical link: https://commits.webkit.org/325941@main
1d38c4d to
064aa09
Compare
|
Committed 325941@main (064aa09): https://commits.webkit.org/325941@main Reviewed commits have been landed. Closing PR #77838 and removing active labels. |
064aa09
1d38c4d
🧪 api-ios🧪 mac-intel-wk2🛠 watch