Struct jj_cli::cli_util::WorkspaceCommandTransaction
source · pub struct WorkspaceCommandTransaction<'a> { /* private fields */ }Expand description
A Transaction tied to a particular workspace.
WorkspaceCommandTransactions are created with
WorkspaceCommandHelper::start_transaction and committed with
WorkspaceCommandTransaction::finish. The inner Transaction can also be
extracted using WorkspaceCommandTransaction::into_inner in situations
where finer-grained control over the Transaction is necessary.
Implementations§
source§impl WorkspaceCommandTransaction<'_>
impl WorkspaceCommandTransaction<'_>
sourcepub fn base_workspace_helper(&self) -> &WorkspaceCommandHelper
pub fn base_workspace_helper(&self) -> &WorkspaceCommandHelper
Workspace helper that may use the base repo.
pub fn base_repo(&self) -> &Arc<ReadonlyRepo>
pub fn repo(&self) -> &MutableRepo
pub fn mut_repo(&mut self) -> &mut MutableRepo
pub fn check_out( &mut self, commit: &Commit ) -> Result<Commit, CheckOutCommitError>
pub fn edit(&mut self, commit: &Commit) -> Result<(), EditCommitError>
pub fn format_commit_summary(&self, commit: &Commit) -> String
pub fn write_commit_summary( &self, formatter: &mut dyn Formatter, commit: &Commit ) -> Result<()>
pub fn finish( self, ui: &mut Ui, description: impl Into<String> ) -> Result<(), CommandError>
sourcepub fn into_inner(self) -> Transaction
pub fn into_inner(self) -> Transaction
Returns the wrapped Transaction for circumstances where
finer-grained control is needed. The caller becomes responsible for
finishing the Transaction, including rebasing descendants and updating
the working copy, if applicable.
sourcepub fn advance_branches(
&mut self,
branches: Vec<AdvanceableBranch>,
move_to: &CommitId
)
pub fn advance_branches( &mut self, branches: Vec<AdvanceableBranch>, move_to: &CommitId )
Moves each branch in branches from an old commit it’s associated with
(configured by get_advanceable_branches) to the move_to commit. If
the branch is conflicted before the update, it will remain conflicted
after the update, but the conflict will involve the move_to commit
instead of the old commit.
Auto Trait Implementations§
impl<'a> !Freeze for WorkspaceCommandTransaction<'a>
impl<'a> !RefUnwindSafe for WorkspaceCommandTransaction<'a>
impl<'a> !Send for WorkspaceCommandTransaction<'a>
impl<'a> !Sync for WorkspaceCommandTransaction<'a>
impl<'a> Unpin for WorkspaceCommandTransaction<'a>
impl<'a> !UnwindSafe for WorkspaceCommandTransaction<'a>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more