`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)
| 6689 | /// `atomic session fork` over ForkSession — the domain fork runs |
| 6690 | /// handler-side; both manifest hashes ride the wire for the local report. |
| 6691 | pub fn session_fork(args: &super::session::SessionFork) -> CliResult<bool> { |
| 6692 | let Some(session) = Service::open()? else { |
| 6693 | return Ok(false); |
| 6694 | }; |
| 6695 | let request = pb::ForkSessionRequest { |
| 6696 | repository: Some(session.reference.clone()), |
| 6697 | meta: request_meta(), |
| 6698 | session_id: args.parent_session_id.clone(), |
| 6699 | forked_session_id: args.child.clone(), |
| 6700 | at_turn: Some(args.at_turn), |
| 6701 | }; |
| 6702 | let response = session.fork_session(request)?; |
| 6703 | println!("Forked session {}", args.parent_session_id); |
| 6704 | println!( |
| 6705 | " Parent manifest: {}", |
| 6706 | full_hash(&response.parent_manifest) |
| 6707 | ); |
| 6708 | println!(" Child session: {}", args.child); |
| 6709 | println!(" Child manifest: {}", full_hash(&response.child_manifest)); |
| 6710 | println!(" Fork turn: {}", args.at_turn); |
| 6711 | Ok(true) |
| 6712 | } |
| 6713 | |
| 6714 | /// `atomic session rebuild` over RebuildSessionIndex — the counts ride |
| 6715 | /// the wire for the local report. |
no test coverage detected