pub struct LockedLocalWorkingCopy { /* private fields */ }
Expand description
A working copy that’s locked on disk. The lock is held until you call
finish()
or discard()
.
Implementations§
Source§impl LockedLocalWorkingCopy
impl LockedLocalWorkingCopy
pub fn reset_watchman(&mut self) -> Result<(), SnapshotError>
Trait Implementations§
Source§impl LockedWorkingCopy for LockedLocalWorkingCopy
impl LockedWorkingCopy for LockedLocalWorkingCopy
Source§fn as_any_mut(&mut self) -> &mut dyn Any
fn as_any_mut(&mut self) -> &mut dyn Any
Should return
self
. For down-casting purposes.Source§fn old_operation_id(&self) -> &OperationId
fn old_operation_id(&self) -> &OperationId
The operation at the time the lock was taken
Source§fn old_tree_id(&self) -> &MergedTreeId
fn old_tree_id(&self) -> &MergedTreeId
The tree at the time the lock was taken
Source§fn snapshot(
&mut self,
options: &SnapshotOptions<'_>,
) -> Result<(MergedTreeId, SnapshotStats), SnapshotError>
fn snapshot( &mut self, options: &SnapshotOptions<'_>, ) -> Result<(MergedTreeId, SnapshotStats), SnapshotError>
Snapshot the working copy. Returns the tree id and stats.
Source§fn check_out(
&mut self,
commit: &Commit,
options: &CheckoutOptions,
) -> Result<CheckoutStats, CheckoutError>
fn check_out( &mut self, commit: &Commit, options: &CheckoutOptions, ) -> Result<CheckoutStats, CheckoutError>
Check out the specified commit in the working copy.
Source§fn rename_workspace(&mut self, new_name: WorkspaceNameBuf)
fn rename_workspace(&mut self, new_name: WorkspaceNameBuf)
Update the workspace name.
Source§fn reset(&mut self, commit: &Commit) -> Result<(), ResetError>
fn reset(&mut self, commit: &Commit) -> Result<(), ResetError>
Update to another commit without touching the files in the working copy.
Source§fn recover(&mut self, commit: &Commit) -> Result<(), ResetError>
fn recover(&mut self, commit: &Commit) -> Result<(), ResetError>
Update to another commit without touching the files in the working copy,
without assuming that the previous tree exists.
Source§fn sparse_patterns(&self) -> Result<&[RepoPathBuf], WorkingCopyStateError>
fn sparse_patterns(&self) -> Result<&[RepoPathBuf], WorkingCopyStateError>
See
WorkingCopy::sparse_patterns()
Source§fn set_sparse_patterns(
&mut self,
new_sparse_patterns: Vec<RepoPathBuf>,
options: &CheckoutOptions,
) -> Result<CheckoutStats, CheckoutError>
fn set_sparse_patterns( &mut self, new_sparse_patterns: Vec<RepoPathBuf>, options: &CheckoutOptions, ) -> Result<CheckoutStats, CheckoutError>
Updates the patterns that decide which paths from the current tree
should be checked out in the working copy.
Source§fn finish(
self: Box<Self>,
operation_id: OperationId,
) -> Result<Box<dyn WorkingCopy>, WorkingCopyStateError>
fn finish( self: Box<Self>, operation_id: OperationId, ) -> Result<Box<dyn WorkingCopy>, WorkingCopyStateError>
Finish the modifications to the working copy by writing the updated
states to disk. Returns the new (unlocked) working copy.
Auto Trait Implementations§
impl !Freeze for LockedLocalWorkingCopy
impl !RefUnwindSafe for LockedLocalWorkingCopy
impl Send for LockedLocalWorkingCopy
impl !Sync for LockedLocalWorkingCopy
impl Unpin for LockedLocalWorkingCopy
impl !UnwindSafe for LockedLocalWorkingCopy
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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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