ok/jj
1
0
Fork 0
forked from mirrors/jj
jj/lib/tests
Martin von Zweigbergk f1666375bd repo: replace Repo trait by enum with readonly and mutable variants
I want to keep the index updated within the transaction. I tried doing
that by adding a `trait Index`, implemented by `ReadonlyIndex` and
`MutableIndex`. However, `ReadonlyRepo::index` is of type
`Mutex<Option<Arc<IndexFile>>>` (because it is lazily initialized),
and we cannot get a `&dyn Index` that lives long enough to be returned
from a `Repo::index()` from that. It seems the best solution is to
instead create an `Index` enum (instead of a trait), with one readonly
and one mutable variant. This commit starts the migration to that
design by replacing the `Repo` trait by an enum. I never intended for
there there to be more implementations of `Repo` than `ReadonlyRepo`
and `MutableRepo` anyway.
2021-02-13 08:31:23 -08:00
..
test_bad_locking.rs repo: replace Repo trait by enum with readonly and mutable variants 2021-02-13 08:31:23 -08:00
test_commit_builder.rs
test_commit_concurrent.rs repo: replace Repo trait by enum with readonly and mutable variants 2021-02-13 08:31:23 -08:00
test_diff_summary.rs
test_evolution.rs repo: replace Repo trait by enum with readonly and mutable variants 2021-02-13 08:31:23 -08:00
test_git.rs repo: replace Repo trait by enum with readonly and mutable variants 2021-02-13 08:31:23 -08:00
test_index.rs index: use correct per-level file name in stats (previously always top-level) 2021-02-07 23:34:57 -08:00
test_init.rs
test_load_repo.rs repo: return error when attempting to load repo where there is none 2021-01-04 09:18:09 -08:00
test_merge_trees.rs
test_operations.rs repo: replace Repo trait by enum with readonly and mutable variants 2021-02-13 08:31:23 -08:00
test_transaction.rs repo: replace Repo trait by enum with readonly and mutable variants 2021-02-13 08:31:23 -08:00
test_view.rs repo: replace Repo trait by enum with readonly and mutable variants 2021-02-13 08:31:23 -08:00
test_working_copy.rs repo: replace Repo trait by enum with readonly and mutable variants 2021-02-13 08:31:23 -08:00
test_working_copy_concurrent.rs repo: return error when attempting to load repo where there is none 2021-01-04 09:18:09 -08:00