Record without saving or applying: just the change.
(repo: &Repository, header: ChangeHeader)
| 45 | |
| 46 | /// Record without saving or applying: just the change. |
| 47 | fn change_bytes(repo: &Repository, header: ChangeHeader) -> (String, Vec<u8>) { |
| 48 | let options = RecordOptions::new() |
| 49 | .with_all(true) |
| 50 | .save_to_store(false) |
| 51 | .apply_after_record(false); |
| 52 | let outcome = repo |
| 53 | .record(repo.require_working_copy_id().unwrap(), header, options) |
| 54 | .unwrap_or_else(|e| panic!("record in {}: {e}", repo.root().display())); |
| 55 | ( |
| 56 | atomic_core::types::Base32::to_base32(outcome.hash()), |
| 57 | outcome.v3_bytes().expect("v3 bytes").to_vec(), |
| 58 | ) |
| 59 | } |
| 60 | |
| 61 | struct Pair { |
| 62 | _dirs: (TempDir, TempDir), |
no test coverage detected