Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

repo: pretend root commit exists in the root operation #4594

Merged
merged 6 commits into from
Oct 8, 2024

Conversation

yuja
Copy link
Collaborator

@yuja yuja commented Oct 7, 2024

Checklist

If applicable:

  • I have updated CHANGELOG.md
  • I have updated the documentation (README.md, docs/, demos/)
  • I have updated the config schema (cli/src/config-schema.json)
  • I have added tests to cover my changes

Copy link
Owner

@martinvonz martinvonz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

lib/tests/test_commit_concurrent.rs Outdated Show resolved Hide resolved
I'll add a few helper methods to RepoLoader. It seems also nicer that
repo.loader() doesn't allocate new RepoLoader.
It's hosted by RepoLoader for now. I'm not sure if we'll need a higher-level
abstraction like Store.
See the next patch for why. It might look odd that OpStore depends on the root
CommitId, but that seems okay because OpStore manages Views, and a View is
basically a set of CommitIds.
This removes an invalid View state from the root operation.

Note that the root index will have to be reindexed in order to resolve "root()"
in the root operation. I don't think this would practically matter, so this
patch doesn't bump the index version to invalidate the existing indexes.

See also 48a9f9e "repo: use Transaction for creating repo-init operation."
It no longer makes sense to handle missing root commit by the revset frontend,
but panicking wouldn't be good either. Let's make it error out.
@yuja yuja enabled auto-merge (rebase) October 8, 2024 04:19
@yuja yuja merged commit 760134f into martinvonz:main Oct 8, 2024
18 checks passed
@yuja yuja deleted the push-tqstvzwvtwny branch October 8, 2024 04:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants