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])
| 3888 | /// a divergent or partial insert leaves the shared view exactly as it was |
| 3889 | /// (SPEC §5 / D1-A). Best-effort: rollback failures are logged, not fatal. |
| 3890 | fn rollback_inserts(repo: &Repository, view: &str, applied: &[ContentHash]) { |
| 3891 | use atomic_repository::UnrecordOptions; |
| 3892 | for hash in applied.iter().rev() { |
| 3893 | let options = UnrecordOptions::default().view(view.to_string()); |
| 3894 | if let Err(e) = repo.unrecord(hash, options) { |
| 3895 | print_warning(&format!( |
| 3896 | "Failed to roll back inserted change {} from '{}': {}", |
| 3897 | &hash.to_base32()[..12], |
| 3898 | view, |
| 3899 | e |
| 3900 | )); |
| 3901 | } |
| 3902 | } |
| 3903 | } |
| 3904 | |
| 3905 | /// Classify an imported commit as normal, merge, or squash. |
| 3906 | fn classify_commit(info: &ImportedCommitInfo) -> CommitClassification { |
no test coverage detected