Record everything in `repo`'s working tree and land it: on the host, applied locally; in a sandbox's cache, submitted through the service.
(repo: &Repository, message: &str)
| 78 | /// Record everything in `repo`'s working tree and land it: on the host, |
| 79 | /// applied locally; in a sandbox's cache, submitted through the service. |
| 80 | fn record(repo: &Repository, message: &str) -> Result<Hash, String> { |
| 81 | let outcome = repo |
| 82 | .record( |
| 83 | repo.require_working_copy_id().unwrap(), |
| 84 | header(message), |
| 85 | record_options().apply_after_record(true), |
| 86 | ) |
| 87 | .map_err(|e| e.to_string())?; |
| 88 | if !outcome.was_applied() { |
| 89 | return Err(format!("record did not apply: {:?}", outcome.errors())); |
| 90 | } |
| 91 | Ok(*outcome.hash()) |
| 92 | } |
| 93 | |
| 94 | fn host() -> Host { |
| 95 | host_with(DaemonState::new()) |
no test coverage detected