Struct jj_lib::repo::MutableRepo

source ·
pub struct MutableRepo { /* private fields */ }

Implementations§

source§

impl MutableRepo

source

pub fn new( base_repo: Arc<ReadonlyRepo>, index: &dyn ReadonlyIndex, view: &View ) -> MutableRepo

source

pub fn base_repo(&self) -> &Arc<ReadonlyRepo>

source

pub fn mutable_index(&self) -> &dyn MutableIndex

source

pub fn has_changes(&self) -> bool

source

pub fn consume(self) -> (Box<dyn MutableIndex>, View)

source

pub fn new_commit( &mut self, settings: &UserSettings, parents: Vec<CommitId>, tree_id: MergedTreeId ) -> CommitBuilder<'_>

source

pub fn rewrite_commit( &mut self, settings: &UserSettings, predecessor: &Commit ) -> CommitBuilder<'_>

source

pub fn write_commit(&mut self, commit: Commit) -> BackendResult<Commit>

source

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.

source

pub fn clear_rewritten_commits(&mut self)

source

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.

source

pub fn clear_abandoned_commits(&mut self)

source

pub fn has_rewrites(&self) -> bool

source

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.

source

pub fn rebase_descendants( &mut self, settings: &UserSettings ) -> Result<usize, TreeMergeError>

source

pub fn rebase_descendants_return_map( &mut self, settings: &UserSettings ) -> Result<HashMap<CommitId, CommitId>, TreeMergeError>

source

pub fn set_wc_commit( &mut self, workspace_id: WorkspaceId, commit_id: CommitId ) -> Result<(), RewriteRootCommit>

source

pub fn remove_wc_commit(&mut self, workspace_id: &WorkspaceId)

source

pub fn check_out( &mut self, workspace_id: WorkspaceId, settings: &UserSettings, commit: &Commit ) -> Result<Commit, CheckOutCommitError>

source

pub fn edit( &mut self, workspace_id: WorkspaceId, commit: &Commit ) -> Result<(), EditCommitError>

source

pub fn add_head(&mut self, head: &Commit)

source

pub fn add_heads(&mut self, heads: &[Commit])

source

pub fn remove_head(&mut self, head: &CommitId)

source

pub fn add_public_head(&mut self, head: &Commit)

source

pub fn remove_public_head(&mut self, head: &CommitId)

source

pub fn has_branch(&self, name: &str) -> bool

Returns true if any local or remote branch of the given name exists.

source

pub fn remove_branch(&mut self, name: &str)

source

pub fn get_local_branch(&self, name: &str) -> RefTarget

source

pub fn set_local_branch_target(&mut self, name: &str, target: RefTarget)

source

pub fn merge_local_branch( &mut self, name: &str, base_target: &RefTarget, other_target: &RefTarget )

source

pub fn get_remote_branch(&self, name: &str, remote_name: &str) -> RemoteRef

source

pub fn set_remote_branch( &mut self, name: &str, remote_name: &str, remote_ref: RemoteRef )

source

pub fn track_remote_branch(&mut self, name: &str, remote_name: &str)

Merges the specified remote branch in to local branch, and starts tracking it.

source

pub fn untrack_remote_branch(&mut self, name: &str, remote_name: &str)

Stops tracking the specified remote branch.

source

pub fn remove_remote(&mut self, remote_name: &str)

source

pub fn rename_remote(&mut self, old: &str, new: &str)

source

pub fn get_tag(&self, name: &str) -> RefTarget

source

pub fn set_tag_target(&mut self, name: &str, target: RefTarget)

source

pub fn merge_tag( &mut self, name: &str, base_target: &RefTarget, other_target: &RefTarget )

source

pub fn get_git_ref(&self, name: &str) -> RefTarget

source

pub fn set_git_ref_target(&mut self, name: &str, target: RefTarget)

source

pub fn git_head(&self) -> RefTarget

source

pub fn set_git_head_target(&mut self, target: RefTarget)

source

pub fn set_view(&mut self, data: View)

source

pub fn merge(&mut self, base_repo: &ReadonlyRepo, other_repo: &ReadonlyRepo)

Trait Implementations§

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> Pointable for T

§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more