(legacy: &mut LegacyDatabases, dot_dir: &Path)
| 173 | } |
| 174 | |
| 175 | fn add_change_store(legacy: &mut LegacyDatabases, dot_dir: &Path) -> Result<(), RepositoryError> { |
| 176 | let changes = dot_dir.join(LEGACY_CHANGE_STORE_FILE); |
| 177 | if !changes.is_file() { |
| 178 | return Ok(()); |
| 179 | } |
| 180 | legacy.add(&changes).map_err(|error| { |
| 181 | if is_already_open(&error) { |
| 182 | RepositoryError::LegacyChangeStoreBusy { |
| 183 | path: changes.display().to_string(), |
| 184 | } |
| 185 | } else { |
| 186 | error.into() |
| 187 | } |
| 188 | }) |
| 189 | } |
| 190 | |
| 191 | /// Move the legacy files this process holds into `.atomic/legacy/<name>/`. |
| 192 | /// |
no test coverage detected