|
|
|
@ -49,6 +49,7 @@ public class ArbitraryDataDiff {
|
|
|
|
|
this.hashPreviousState(); |
|
|
|
|
this.findAddedOrModifiedFiles(); |
|
|
|
|
this.findRemovedFiles(); |
|
|
|
|
this.validate(); |
|
|
|
|
this.writeMetadata(); |
|
|
|
|
|
|
|
|
|
} finally { |
|
|
|
@ -222,6 +223,12 @@ public class ArbitraryDataDiff {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void validate() { |
|
|
|
|
if (this.addedPaths.isEmpty() && this.modifiedPaths.isEmpty() && this.removedPaths.isEmpty()) { |
|
|
|
|
throw new IllegalStateException("Current state matches previous state. Nothing to do."); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void writeMetadata() throws IOException { |
|
|
|
|
ArbitraryDataMetadataPatch metadata = new ArbitraryDataMetadataPatch(this.diffPath); |
|
|
|
|
metadata.setAddedPaths(this.addedPaths); |
|
|
|
|