mirror of
https://github.com/martinvonz/jj.git
synced 2024-12-28 15:34:22 +00:00
MutableRepo: rename repo
to base_repo
to clarify its role
This commit is contained in:
parent
69de4698ac
commit
ee8423a69e
1 changed files with 6 additions and 6 deletions
|
@ -480,7 +480,7 @@ impl RepoLoader {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct MutableRepo<'r> {
|
pub struct MutableRepo<'r> {
|
||||||
repo: &'r ReadonlyRepo,
|
base_repo: &'r ReadonlyRepo,
|
||||||
index: MutableIndex,
|
index: MutableIndex,
|
||||||
view: MutableView,
|
view: MutableView,
|
||||||
evolution: Mutex<Option<MutableEvolution>>,
|
evolution: Mutex<Option<MutableEvolution>>,
|
||||||
|
@ -488,7 +488,7 @@ pub struct MutableRepo<'r> {
|
||||||
|
|
||||||
impl<'r> MutableRepo<'r> {
|
impl<'r> MutableRepo<'r> {
|
||||||
pub fn new(
|
pub fn new(
|
||||||
repo: &'r ReadonlyRepo,
|
base_repo: &'r ReadonlyRepo,
|
||||||
index: Arc<ReadonlyIndex>,
|
index: Arc<ReadonlyIndex>,
|
||||||
view: &ReadonlyView,
|
view: &ReadonlyView,
|
||||||
evolution: Option<&Arc<ReadonlyEvolution>>,
|
evolution: Option<&Arc<ReadonlyEvolution>>,
|
||||||
|
@ -497,7 +497,7 @@ impl<'r> MutableRepo<'r> {
|
||||||
let mut_index = MutableIndex::incremental(index);
|
let mut_index = MutableIndex::incremental(index);
|
||||||
let mut_evolution = evolution.map(|evolution| evolution.start_modification());
|
let mut_evolution = evolution.map(|evolution| evolution.start_modification());
|
||||||
Arc::new(MutableRepo {
|
Arc::new(MutableRepo {
|
||||||
repo,
|
base_repo,
|
||||||
index: mut_index,
|
index: mut_index,
|
||||||
view: mut_view,
|
view: mut_view,
|
||||||
evolution: Mutex::new(mut_evolution),
|
evolution: Mutex::new(mut_evolution),
|
||||||
|
@ -509,15 +509,15 @@ impl<'r> MutableRepo<'r> {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn base_repo(&self) -> &'r ReadonlyRepo {
|
pub fn base_repo(&self) -> &'r ReadonlyRepo {
|
||||||
self.repo
|
self.base_repo
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn store(&self) -> &Arc<StoreWrapper> {
|
pub fn store(&self) -> &Arc<StoreWrapper> {
|
||||||
self.repo.store()
|
self.base_repo.store()
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn op_store(&self) -> &Arc<dyn OpStore> {
|
pub fn op_store(&self) -> &Arc<dyn OpStore> {
|
||||||
self.repo.op_store()
|
self.base_repo.op_store()
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn index(&self) -> &MutableIndex {
|
pub fn index(&self) -> &MutableIndex {
|
||||||
|
|
Loading…
Reference in a new issue