/** * Check the result of a single file SVNClient.list call * @param tested the result array * @param singleFilePath the path to be checked * @throws Exception */ void check(DirEntry[] tested, String singleFilePath) { Assert.assertEquals("not a single dir entry", 1, tested.length); Item item = (Item)items.get(singleFilePath); Assert.assertNotNull("not found in working copy", item); Assert.assertNotNull("not a file", item.myContent); Assert.assertEquals("state says file, working copy not", tested[0].getNodeKind(), item.nodeKind == -1 ? NodeKind.file : item.nodeKind); }
/** * Check the result of a single file SVNClient.list call * @param tested the result array * @param singleFilePath the path to be checked * @throws Exception */ void check(DirEntry[] tested, String singleFilePath) { Assert.assertEquals("not a single dir entry", 1, tested.length); Item item = (Item)items.get(singleFilePath); Assert.assertNotNull("not found in working copy", item); Assert.assertNotNull("not a file", item.myContent); Assert.assertEquals("state says file, working copy not", tested[0].getNodeKind(), item.nodeKind == -1 ? NodeKind.file : item.nodeKind); }
public void doEntry(DirEntry dirent, Lock lock) { // All of this is meant to retain backward compatibility with // the old svn_client_ls-style API. For further information about // what is going on here, see the comments in // libsvn_client/list.c:store_dirent(). if (dirent.getPath().length() == 0) { if (dirent.getNodeKind() == NodeKind.file) { String absPath = dirent.getAbsPath(); int lastSeparator = absPath.lastIndexOf('/'); String path = absPath.substring(lastSeparator, absPath.length()); dirent.setPath(path); } else { // It's the requested directory, which we don't want // to add. return; } } dirents.add(dirent); }
tested[i].getNodeKind(), item.nodeKind == -1 ? NodeKind.file : item.nodeKind); tested[i].getNodeKind(), item.nodeKind == -1 ? NodeKind.dir : item.nodeKind); for (int i = 0; i < tested.length; i++) if (tested[i].getNodeKind() == NodeKind.dir)
public void doEntry(DirEntry dirent, Lock lock) { // All of this is meant to retain backward compatibility with // the old svn_client_ls-style API. For further information about // what is going on here, see the comments in // libsvn_client/list.c:store_dirent(). if (dirent.getPath().length() == 0) { if (dirent.getNodeKind() == NodeKind.file) { String absPath = dirent.getAbsPath(); int lastSeparator = absPath.lastIndexOf('/'); String path = absPath.substring(lastSeparator, absPath.length()); dirent.setPath(path); } else { // It's the requested directory, which we don't want // to add. return; } } dirents.add(dirent); }
tested[i].getNodeKind(), item.nodeKind == -1 ? NodeKind.file : item.nodeKind); tested[i].getNodeKind(), item.nodeKind == -1 ? NodeKind.dir : item.nodeKind); for (int i = 0; i < tested.length; i++) if (tested[i].getNodeKind() == NodeKind.dir)