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

Switch to Thrift in SimpleOpStore #700

Merged
merged 2 commits into from
Nov 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
description, even if there already was a description set. It now also only
works on the working-copy commit (there's no `-r` argument).

* The storage format for the operation log has changed. It will be
automatically upgraded the first time you run a command in an existing repo.
The operation IDs will change in that process.

### New features

* The new `jj git remote rename` command allows git remotes to be renamed
Expand Down
26 changes: 26 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@

cargoLock = {
lockFile = "${self}/Cargo.lock";
outputHashes = {
"thrift-0.17.0" = "sha256-Zczwq6zRKPXXj7JR0X/0Osl1Lafo5r+2wK5tuWJbvI8=";
};
};
nativeBuildInputs = [
pkg-config gzip makeWrapper
Expand Down
6 changes: 6 additions & 0 deletions lib/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ regex = "1.7.0"
serde_json = "1.0.87"
tempfile = "3.3.0"
thiserror = "1.0.37"
# thrift v0.17.0 (specified by hash for security reasons)
thrift = { git = "https://github.com/apache/thrift", rev = "4d493e867b349f3475203ef9848353b315203c51", default-features = false }
uuid = { version = "1.2.1", features = ["v4"] }
whoami = "1.2.3"
zstd = "0.11.2"
Expand All @@ -50,4 +52,8 @@ test-case = "2.2.2"
testutils = { path = "testutils" }

[features]
default = ["legacy_protobuf"]
vendored-openssl = ["git2/vendored-openssl"]
# Enable upgrade of repositories created with storage backends based on
# Protobuf format (from before we switched to Thrift)
legacy_protobuf = []
3 changes: 3 additions & 0 deletions lib/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ pub mod nightly_shims;
pub mod op_heads_store;
pub mod op_store;
pub mod operation;
#[cfg(feature = "legacy_protobuf")]
mod proto_op_store;
pub mod protos;
pub mod refs;
pub mod repo;
Expand All @@ -46,6 +48,7 @@ pub mod revset_graph_iterator;
pub mod rewrite;
pub mod settings;
pub mod simple_op_store;
mod simple_op_store_model;
pub mod stacked_table;
pub mod store;
pub mod transaction;
Expand Down
Loading