Remove change refs a failed squash-insert added to `view`, newest first, so a divergent or partial insert leaves the shared view exactly as it was (SPEC §5 / D1-A). Best-effort: rollback failures are logged, not fatal.
(repo: &Repository, view: &str, applied: &[ContentHash])
| 8391 | /// a divergent or partial insert leaves the shared view exactly as it was |
| 8392 | /// (SPEC §5 / D1-A). Best-effort: rollback failures are logged, not fatal. |
| 8393 | fn rollback_inserts(repo: &Repository, view: &str, applied: &[ContentHash]) { |
| 8394 | use atomic_repository::UnrecordOptions; |
| 8395 | for hash in applied.iter().rev() { |
| 8396 | let options = UnrecordOptions::default().view(view.to_string()); |
| 8397 | if let Err(e) = repo.unrecord(hash, options) { |
| 8398 | print_warning(&format!( |
| 8399 | "Failed to roll back inserted change {} from '{}': {}", |
| 8400 | &hash.to_base32()[..12], |
| 8401 | view, |
| 8402 | e |
| 8403 | )); |
| 8404 | } |
| 8405 | } |
| 8406 | } |
| 8407 | |
| 8408 | /// Classify an imported commit as normal, merge, or squash. |
| 8409 | fn classify_commit(info: &ImportedCommitInfo) -> CommitClassification { |
no test coverage detected