`atomic insert ` over InsertChanges — the raw reference rides the single-ref arm (the handler resolves it with the local resolver's semantics); both --deps forms (the escape hatch rides apply_dependencies). Rendered with the local single-insert body's exact print functions.
(
change: &str,
view: Option<String>,
allow_conflicts: bool,
deps: bool,
)
| 4029 | /// apply_dependencies). Rendered with the local single-insert body's |
| 4030 | /// exact print functions. |
| 4031 | pub fn insert_single( |
| 4032 | change: &str, |
| 4033 | view: Option<String>, |
| 4034 | allow_conflicts: bool, |
| 4035 | deps: bool, |
| 4036 | ) -> CliResult<bool> { |
| 4037 | let Some(session) = Service::open()? else { |
| 4038 | return Ok(false); |
| 4039 | }; |
| 4040 | let request = insert_request( |
| 4041 | &session, |
| 4042 | Some(pb::insert_changes_request::Source::SingleRef( |
| 4043 | change.to_string(), |
| 4044 | )), |
| 4045 | view, |
| 4046 | allow_conflicts, |
| 4047 | deps, |
| 4048 | false, |
| 4049 | ); |
| 4050 | let response = insert_rpc(&session, request)?; |
| 4051 | let hash = response |
| 4052 | .resolved_change |
| 4053 | .as_ref() |
| 4054 | .and_then(|h| h.value.clone().try_into().ok()) |
| 4055 | .map(Merkle); |
| 4056 | if let Some(hash) = hash { |
| 4057 | print_info(&format!( |
| 4058 | "Inserting change {}...", |
| 4059 | crate::commands::format_hash(&hash, true) |
| 4060 | )); |
| 4061 | } |
| 4062 | let applied = insert_applied_hashes(&response); |
| 4063 | let new_state = response |
| 4064 | .new_state |
| 4065 | .as_ref() |
| 4066 | .and_then(|h| h.value.clone().try_into().ok()) |
| 4067 | .map(Merkle) |
| 4068 | .unwrap_or_default(); |
| 4069 | super::insert::print_insert_outcome(&applied, new_state, response.has_conflicts); |
| 4070 | print_insert_refresh(&response, false); |
| 4071 | Ok(true) |
| 4072 | } |
| 4073 | |
| 4074 | /// `atomic insert view <source> [--to <target>] [-n]` over InsertChanges — |
| 4075 | /// both --deps forms and the dry-run preview (the handler computes the |
no test coverage detected