return null; SnapshotDiffInfo diffs = new SnapshotDiffInfo(snapshotRootDir, snapshotDiffScopeDir, fromSnapshot, toSnapshot);
/** * Compute the difference between two snapshots (or a snapshot and the current * directory) of the directory. * * @param from The name of the start point of the comparison. Null indicating * the current tree. * @param to The name of the end point. Null indicating the current tree. * @return The difference between the start/end points. * @throws SnapshotException If there is no snapshot matching the starting * point, or if endSnapshotName is not null but cannot be identified * as a previous snapshot. */ SnapshotDiffInfo computeDiff(final INodeDirectory snapshotRoot, final String from, final String to) throws SnapshotException { Snapshot fromSnapshot = getSnapshotByName(snapshotRoot, from); Snapshot toSnapshot = getSnapshotByName(snapshotRoot, to); // if the start point is equal to the end point, return null if (from.equals(to)) { return null; } SnapshotDiffInfo diffs = new SnapshotDiffInfo(snapshotRoot, fromSnapshot, toSnapshot); computeDiffRecursively(snapshotRoot, snapshotRoot, new ArrayList<byte[]>(), diffs); return diffs; }
/** * Compute the difference between two snapshots (or a snapshot and the current * directory) of the directory. * * @param from The name of the start point of the comparison. Null indicating * the current tree. * @param to The name of the end point. Null indicating the current tree. * @return The difference between the start/end points. * @throws SnapshotException If there is no snapshot matching the starting * point, or if endSnapshotName is not null but cannot be identified * as a previous snapshot. */ SnapshotDiffInfo computeDiff(final INodeDirectory snapshotRoot, final String from, final String to) throws SnapshotException { Snapshot fromSnapshot = getSnapshotByName(snapshotRoot, from); Snapshot toSnapshot = getSnapshotByName(snapshotRoot, to); // if the start point is equal to the end point, return null if (from.equals(to)) { return null; } SnapshotDiffInfo diffs = new SnapshotDiffInfo(snapshotRoot, fromSnapshot, toSnapshot); computeDiffRecursively(snapshotRoot, snapshotRoot, new ArrayList<byte[]>(), diffs); return diffs; }