Nim implementation.

This commit is contained in:
Jonathan Bernard
2016-01-26 00:29:49 -06:00
parent ab99661720
commit c16a5a684d
4 changed files with 315 additions and 43 deletions

View File

@ -143,7 +143,7 @@ public class TreeDiff {
if (rootName.startsWith('/')) rightOut = new File(rootName + '.right')
else rightOut = new File(relativeRoot, rootName + '.right')
objectMapper.writeValue(leftOut, left)
objectMapper.writeValue(rightOut, right) }
}
@ -171,7 +171,7 @@ public class TreeDiff {
frame(title: "TreeDif v${VERSION}", show: true) {
boxLayout()
}
}
@ -182,7 +182,7 @@ public class TreeDiff {
}
public static Set<String> samePathDifferentContents(DirAnalysis left, DirAnalysis right) {
return left.allEntries.findAll { l ->
return left.allEntries.findAll { l ->
FileEntry match = right.byRelativePath[l.relativePath]
return match != null && l.checksum != match.checksum }
.collect { it.relativePath } }
@ -300,15 +300,15 @@ where options are:
-g, --gui Launch the graphical interface (not yet implemented).
-s, --same
Output information about files that are the same on both sides.
-S, --exclude-same
Do not output information about files that are the same on both sides.
-c, --content-mismatch
Output information about files that have the same relative path on both
side but whose contents differ.
@ -363,7 +363,7 @@ where options are:
directories to scan for example).
-i, --analysis-in <left-dir-analysis> <right-dir-analysis>
Use pre-calculated directory analysis in place of reading local
directories. This is useful if you wish to do diffs between two
directory trees that are not on the same filesystem, or if you wish to