MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / view_switch_plain

Function view_switch_plain

atomic-cli/src/commands/rpc.rs:3646–3660  ·  view source on GitHub ↗
(session: &Service, name: &str)

Source from the content-addressed store, hash-verified

3644}
3645
3646fn view_switch_plain(session: &Service, name: &str) -> CliResult<()> {
3647 let request = pb::SwitchViewRequest {
3648 repository: Some(session.reference.clone()),
3649 meta: None,
3650 view: name.to_string(),
3651 bypass_dirty_check: None,
3652 };
3653 let response = session.switch_view(request)?;
3654 super::view::switch::finish_service_switch(&super::find_repository_root()?, name)?;
3655 print_success(&format!(
3656 "Switched to view: {} ({} files updated)",
3657 name, response.files_written
3658 ));
3659 Ok(())
3660}
3661
3662/// `atomic view delete` over DeleteView (--force is presentational only).
3663pub fn view_delete(args: &super::view::Delete) -> CliResult<bool> {

Callers 2

view_createFunction · 0.85
view_splitFunction · 0.85

Calls 5

finish_service_switchFunction · 0.85
find_repository_rootFunction · 0.85
print_successFunction · 0.85
cloneMethod · 0.45
switch_viewMethod · 0.45

Tested by

no test coverage detected