pub struct Workspace { /* private fields */ }
Expand description
Represents a workspace, i.e. what’s typically the .jj/ directory and its parent.
Implementations§
source§impl Workspace
impl Workspace
pub fn init_local( user_settings: &UserSettings, workspace_root: &Path ) -> Result<(Self, Arc<ReadonlyRepo>), WorkspaceInitError>
sourcepub fn init_internal_git(
user_settings: &UserSettings,
workspace_root: &Path
) -> Result<(Self, Arc<ReadonlyRepo>), WorkspaceInitError>
pub fn init_internal_git( user_settings: &UserSettings, workspace_root: &Path ) -> Result<(Self, Arc<ReadonlyRepo>), WorkspaceInitError>
Initializes a workspace with a new Git backend and bare Git repo in
.jj/repo/store/git
.
sourcepub fn init_colocated_git(
user_settings: &UserSettings,
workspace_root: &Path
) -> Result<(Self, Arc<ReadonlyRepo>), WorkspaceInitError>
pub fn init_colocated_git( user_settings: &UserSettings, workspace_root: &Path ) -> Result<(Self, Arc<ReadonlyRepo>), WorkspaceInitError>
Initializes a workspace with a new Git backend and Git repo that shares the same working copy.
sourcepub fn init_external_git(
user_settings: &UserSettings,
workspace_root: &Path,
git_repo_path: &Path
) -> Result<(Self, Arc<ReadonlyRepo>), WorkspaceInitError>
pub fn init_external_git( user_settings: &UserSettings, workspace_root: &Path, git_repo_path: &Path ) -> Result<(Self, Arc<ReadonlyRepo>), WorkspaceInitError>
Initializes a workspace with an existing Git repo at the specified path.
pub fn init_with_factories( user_settings: &UserSettings, workspace_root: &Path, backend_initializer: &BackendInitializer<'_>, signer: Signer, op_store_initializer: &OpStoreInitializer<'_>, op_heads_store_initializer: &OpHeadsStoreInitializer<'_>, index_store_initializer: &IndexStoreInitializer<'_>, submodule_store_initializer: &SubmoduleStoreInitializer<'_>, working_copy_initializer: &WorkingCopyInitializer<'_>, workspace_id: WorkspaceId ) -> Result<(Self, Arc<ReadonlyRepo>), WorkspaceInitError>
pub fn init_with_backend( user_settings: &UserSettings, workspace_root: &Path, backend_initializer: &BackendInitializer<'_>, signer: Signer ) -> Result<(Self, Arc<ReadonlyRepo>), WorkspaceInitError>
pub fn init_workspace_with_existing_repo( user_settings: &UserSettings, workspace_root: &Path, repo: &Arc<ReadonlyRepo>, working_copy_initializer: &WorkingCopyInitializer<'_>, workspace_id: WorkspaceId ) -> Result<(Self, Arc<ReadonlyRepo>), WorkspaceInitError>
pub fn load( user_settings: &UserSettings, workspace_path: &Path, store_factories: &StoreFactories, working_copy_factories: &HashMap<String, WorkingCopyFactory> ) -> Result<Self, WorkspaceLoadError>
pub fn workspace_root(&self) -> &PathBuf
pub fn workspace_id(&self) -> &WorkspaceId
pub fn repo_path(&self) -> &PathBuf
pub fn repo_loader(&self) -> &RepoLoader
pub fn working_copy(&self) -> &dyn WorkingCopy
pub fn start_working_copy_mutation( &mut self ) -> Result<LockedWorkspace<'_>, WorkingCopyStateError>
pub fn check_out( &mut self, operation_id: OperationId, old_tree_id: Option<&MergedTreeId>, commit: &Commit ) -> Result<CheckoutStats, CheckoutError>
Auto Trait Implementations§
impl !RefUnwindSafe for Workspace
impl !Send for Workspace
impl !Sync for Workspace
impl Unpin for Workspace
impl !UnwindSafe for Workspace
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