/** * @return the differences between the given right tree(staged) and the resulting tree after * running {@link WriteTree2} with the given filters. The result's left refs are the * ones in the new tree, and the right refs the same as given in the rightTree */ private MapDifference<String, NodeRef> runWithPathFilter(RevTree leftTree, RevTree rightTree, String... filters) { // print(leftTree.getId()); // print(rightTree.getId()); final ObjectId newRepoRoot = command.setPathFilter(Arrays.asList(filters)).call(); assertNotNull(newRepoRoot); // print(newRepoRoot); // check all blobs have been moved from the index to the object database verifyRepositoryTree(NodeRef.ROOT, newRepoRoot); final boolean includeFeatures = true; ImmutableMap<String, NodeRef> stagedRefs = getRefsByPath(rightTree.getId(), includeFeatures); ImmutableMap<String, NodeRef> resultRefs = getRefsByPath(newRepoRoot, includeFeatures); MapDifference<String, NodeRef> difference = Maps.difference(resultRefs, stagedRefs); return difference; }
/** * @return the differences between the given right tree(staged) and the resulting tree after * running {@link WriteTree2} with the given filters. The result's left refs are the * ones in the new tree, and the right refs the same as given in the rightTree */ private MapDifference<String, NodeRef> runWithPathFilter(RevTree leftTree, RevTree rightTree, String... filters) { // print(leftTree.getId()); // print(rightTree.getId()); final ObjectId newRepoRoot = command.setPathFilter(Arrays.asList(filters)).call(); assertNotNull(newRepoRoot); // print(newRepoRoot); // check all blobs have been moved from the index to the object database verifyRepositoryTree(NodeRef.ROOT, newRepoRoot); final boolean includeFeatures = true; ImmutableMap<String, NodeRef> stagedRefs = getRefsByPath(rightTree.getId(), includeFeatures); ImmutableMap<String, NodeRef> resultRefs = getRefsByPath(newRepoRoot, includeFeatures); MapDifference<String, NodeRef> difference = Maps.difference(resultRefs, stagedRefs); return difference; }
writeTree.setOldRoot(oldRoot).setProgressListener(subProgress(writeTreeProgress)); if (!pathFilters.isEmpty()) { writeTree.setPathFilter(pathFilters);
writeTree.setOldRoot(oldRoot).setProgressListener(subProgress(writeTreeProgress)); if (!pathFilters.isEmpty()) { writeTree.setPathFilter(pathFilters);