Struct jujutsu_lib::repo::MutableRepo
source · pub struct MutableRepo { /* private fields */ }Implementations§
source§impl MutableRepo
impl MutableRepo
pub fn new(
base_repo: Arc<ReadonlyRepo>,
index: Arc<ReadonlyIndex>,
view: &View
) -> MutableRepo
pub fn as_repo_ref(&self) -> RepoRef<'_>
pub fn base_repo(&self) -> &Arc<ReadonlyRepo>
pub fn store(&self) -> &Arc<Store>
pub fn op_store(&self) -> &Arc<dyn OpStore>
pub fn index(&self) -> &MutableIndex
pub fn view(&self) -> &View
pub fn has_changes(&self) -> bool
pub fn consume(self) -> (MutableIndex, View)
pub fn write_commit(&mut self, commit: Commit) -> Commit
sourcepub fn record_rewritten_commit(&mut self, old_id: CommitId, new_id: CommitId)
pub fn record_rewritten_commit(&mut self, old_id: CommitId, new_id: CommitId)
Record a commit as having been rewritten in this transaction. This
record is used by rebase_descendants().
Rewritten commits don’t have to be recorded here. This is just a convenient place to record it. It won’t matter after the transaction has been committed.
pub fn clear_rewritten_commits(&mut self)
sourcepub fn record_abandoned_commit(&mut self, old_id: CommitId)
pub fn record_abandoned_commit(&mut self, old_id: CommitId)
Record a commit as having been abandoned in this transaction. This
record is used by rebase_descendants().
Abandoned commits don’t have to be recorded here. This is just a convenient place to record it. It won’t matter after the transaction has been committed.
pub fn clear_abandoned_commits(&mut self)
pub fn has_rewrites(&self) -> bool
sourcepub fn create_descendant_rebaser<'settings, 'repo>(
&'repo mut self,
settings: &'settings UserSettings
) -> DescendantRebaser<'settings, 'repo>
pub fn create_descendant_rebaser<'settings, 'repo>(
&'repo mut self,
settings: &'settings UserSettings
) -> DescendantRebaser<'settings, 'repo>
Creates a DescendantRebaser to rebase descendants of the recorded
rewritten and abandoned commits.