Prove duplicate originals the same and consolidate them on workers
dr_ui::duplicates is the half of #67 that touches files. The check reads each copy's first and last megabyte by range through the backend and hashes them (or compares stored content hashes where every copy has one), keeps the probes in the catalog, and reads each copy's sidecar: a group whose bytes differ, whose copies cannot be read, or whose develop edits differ is left out and the review says why. Consolidating a group carries the one edit onto the survivor's sidecar where it has none, moves the other copies into the trash, and then commits dr_catalog::duplicates::consolidate. A failure after the first move puts the files and the sidecar back; a run that died between the moves and the commit is finished by the next one, which finds each moved file at its trash path. Tested end to end on a folder library of real files: the copies land in .darkroom-trash, the skipped groups are untouched, the edit reaches the survivor, a catalog failure moves everything back, and restore returns the copies byte for byte.
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -26,6 +26,7 @@ mod bursts;
|
||||
mod collections_ui;
|
||||
#[cfg(test)]
|
||||
mod decoder_seam;
|
||||
mod duplicates;
|
||||
mod derived_sync;
|
||||
mod develop;
|
||||
mod develop_ui;
|
||||
|
||||
Reference in New Issue
Block a user