Finish the existing Git boundary after a successful service-owned native switch. The service has released its workspace lease and database handle.
(repo_root: &std::path::Path, view: &str)
| 151 | /// Finish the existing Git boundary after a successful service-owned native |
| 152 | /// switch. The service has released its workspace lease and database handle. |
| 153 | pub(crate) fn finish_service_switch(repo_root: &std::path::Path, view: &str) -> CliResult<()> { |
| 154 | let repo = Repository::open_for_workspace_transaction_wait( |
| 155 | repo_root, |
| 156 | atomic_repository::database_lock_wait(), |
| 157 | ) |
| 158 | .map_err(CliError::Repository)?; |
| 159 | let shadow_sync = crate::commands::git::shadow::sync_git_head_to_view(&repo, repo_root, view)?; |
| 160 | drop(repo); |
| 161 | checkpoint_shadow_switch(shadow_sync, repo_root, view) |
| 162 | } |
| 163 | |
| 164 | impl Command for Switch { |
| 165 | fn run(&self) -> CliResult<()> { |
no test coverage detected