private static TreeWalk buildTreeWalk(Repository repository, RevTree tree, final String path) throws IOException { TreeWalk treeWalk = TreeWalk.forPath(repository, path, tree); if(treeWalk == null) { throw new FileNotFoundException("Did not find expected file '" + path + "' in tree '" + tree.getName() + "'"); } return treeWalk; } }
private static TreeWalk buildTreeWalk(Repository repository, RevTree tree, final String path) throws IOException { TreeWalk treeWalk = TreeWalk.forPath(repository, path, tree); if(treeWalk == null) { throw new FileNotFoundException("Did not find expected file '" + path + "' in tree '" + tree.getName() + "'"); } return treeWalk; } }
private void compareGitRevision(@NotNull Repository srcGit, @NotNull SVNPropertyValue srcHash, @NotNull Repository dstGit, @NotNull SVNPropertyValue dstHash) throws IOException { final RevCommit srcCommit = getCommit(srcGit, srcHash); final RevCommit dstCommit = getCommit(dstGit, dstHash); Assert.assertEquals(srcCommit.getTree().getName(), dstCommit.getTree().getName()); }
private static TreeWalk buildTreeWalk(org.eclipse.jgit.lib.Repository repository, String path, RevTree tree) throws IOException { TreeWalk treeWalk; if (StringUtils.isEmpty(path)) { treeWalk = new TreeWalk(repository); treeWalk.addTree(tree); treeWalk.setRecursive(true); treeWalk.setPostOrderTraversal(false); } else { treeWalk = TreeWalk.forPath(repository, path, tree); } if (treeWalk == null) { throw new FileNotFoundException("Did not find expected path '" + path + "' in tree '" + tree.getName() + "'"); } return treeWalk; }
String msg = NLS .bind(UIText.GitDocument_errorLoadTree, new Object[] { treeId.getName(), baseline, resource, repository }); Activator.logError(msg, new Throwable()); setResolved(null, null, null, ""); //$NON-NLS-1$