`atomic session fork` over ForkSession — the domain fork runs handler-side; both manifest hashes ride the wire for the local report.
(args: &super::session::SessionFork)
| 6649 | /// `atomic session fork` over ForkSession — the domain fork runs |
| 6650 | /// handler-side; both manifest hashes ride the wire for the local report. |
| 6651 | pub fn session_fork(args: &super::session::SessionFork) -> CliResult<bool> { |
| 6652 | let Some(session) = Service::open()? else { |
| 6653 | return Ok(false); |
| 6654 | }; |
| 6655 | let request = pb::ForkSessionRequest { |
| 6656 | repository: Some(session.reference.clone()), |
| 6657 | meta: request_meta(), |
| 6658 | session_id: args.parent_session_id.clone(), |
| 6659 | forked_session_id: args.child.clone(), |
| 6660 | at_turn: Some(args.at_turn), |
| 6661 | }; |
| 6662 | let response = session.fork_session(request)?; |
| 6663 | println!("Forked session {}", args.parent_session_id); |
| 6664 | println!( |
| 6665 | " Parent manifest: {}", |
| 6666 | full_hash(&response.parent_manifest) |
| 6667 | ); |
| 6668 | println!(" Child session: {}", args.child); |
| 6669 | println!(" Child manifest: {}", full_hash(&response.child_manifest)); |
| 6670 | println!(" Fork turn: {}", args.at_turn); |
| 6671 | Ok(true) |
| 6672 | } |
| 6673 | |
| 6674 | /// `atomic session rebuild` over RebuildSessionIndex — the counts ride |
| 6675 | /// the wire for the local report. |
no test coverage detected