jj/lib
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
..
protos view: add tracking of "public" heads (copying Mercurial's phase concept) 2021-01-16 11:48:35 -08:00
src repo: replace Repo trait by enum with readonly and mutable variants 2021-02-13 08:31:23 -08:00
tests repo: replace Repo trait by enum with readonly and mutable variants 2021-02-13 08:31:23 -08:00
build.rs protobuf: generate code at build-time 2020-12-24 01:05:17 -08:00
Cargo.toml cargo: release 0.1.1 2021-01-03 23:06:46 -08:00