Struct jujutsu_lib::repo::MutableRepo
source · [−]pub struct MutableRepo { /* private fields */ }Implementations
sourceimpl 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)
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.
pub fn rebase_descendants(&mut self, settings: &UserSettings) -> usize
pub fn set_checkout(&mut self, workspace_id: WorkspaceId, commit_id: CommitId)
pub fn remove_checkout(&mut self, workspace_id: &WorkspaceId)
pub fn check_out(
&mut self,
workspace_id: WorkspaceId,
settings: &UserSettings,
commit: &Commit
) -> Commit
pub fn add_head(&mut self, head: &Commit)
pub fn remove_head(&mut self, head: &CommitId)
pub fn add_public_head(&mut self, head: &Commit)
pub fn remove_public_head(&mut self, head: &CommitId)
pub fn get_branch(&self, name: &str) -> Option<BranchTarget>
pub fn set_branch(&mut self, name: String, target: BranchTarget)
pub fn remove_branch(&mut self, name: &str)
pub fn get_local_branch(&self, name: &str) -> Option<RefTarget>
pub fn set_local_branch(&mut self, name: String, target: RefTarget)
pub fn remove_local_branch(&mut self, name: &str)
pub fn get_remote_branch(
&self,
name: &str,
remote_name: &str
) -> Option<RefTarget>
pub fn set_remote_branch(
&mut self,
name: String,
remote_name: String,
target: RefTarget
)
pub fn remove_remote_branch(&mut self, name: &str, remote_name: &str)
pub fn get_tag(&self, name: &str) -> Option<RefTarget>
pub fn set_tag(&mut self, name: String, target: RefTarget)
pub fn remove_tag(&mut self, name: &str)
pub fn set_git_ref(&mut self, name: String, target: RefTarget)
pub fn remove_git_ref(&mut self, name: &str)
pub fn set_git_head(&mut self, head_id: CommitId)
pub fn clear_git_head(&mut self)
pub fn set_view(&mut self, data: View)
pub fn merge(&mut self, base_repo: &ReadonlyRepo, other_repo: &ReadonlyRepo)
pub fn merge_single_ref(
&mut self,
ref_name: &RefName,
base_target: Option<&RefTarget>,
other_target: Option<&RefTarget>
)
Auto Trait Implementations
impl !RefUnwindSafe for MutableRepo
impl Send for MutableRepo
impl !Sync for MutableRepo
impl Unpin for MutableRepo
impl !UnwindSafe for MutableRepo
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more