private static void list(SVNRepository repository, String path, long rev, boolean recursive, ISVNDirEntryHandler handler) throws SVNException { Collection entries = new TreeSet(); entries = repository.getDir(path, rev, null, entries); for (Iterator iterator = entries.iterator(); iterator.hasNext();) { SVNDirEntry entry = (SVNDirEntry) iterator.next(); String childPath = SVNPathUtil.append(path, entry.getName()); entry.setRelativePath(childPath); handler.handleDirEntry(entry); if (entry.getKind() == SVNNodeKind.DIR && entry.getDate() != null && recursive) { list(repository, childPath, rev, recursive, handler); } } }
private static void list(SVNRepository repository, String path, long rev, SVNDepth depth, int entryFields, ISVNDirEntryHandler handler) throws SVNException { if (depth == SVNDepth.EMPTY) { return; } Collection entries = new TreeSet(); entries = repository.getDir(path, rev, null, entryFields, entries); for (Iterator iterator = entries.iterator(); iterator.hasNext();) { SVNDirEntry entry = (SVNDirEntry) iterator.next(); String childPath = SVNPathUtil.append(path, entry.getName()); entry.setRelativePath(childPath); if (entry.getKind() == SVNNodeKind.FILE || depth == SVNDepth.IMMEDIATES || depth == SVNDepth.INFINITY) { handler.handleDirEntry(entry); } if (entry.getKind() == SVNNodeKind.DIR && entry.getDate() != null && depth == SVNDepth.INFINITY) { list(repository, childPath, rev, depth, entryFields, handler); } } }
private static void list(SVNRepository repository, String path, long rev, SVNDepth depth, int entryFields, ISVNDirEntryHandler handler) throws SVNException { if (depth == SVNDepth.EMPTY) { return; } Collection entries = new TreeSet(); entries = repository.getDir(path, rev, null, entryFields, entries); for (Iterator iterator = entries.iterator(); iterator.hasNext();) { SVNDirEntry entry = (SVNDirEntry) iterator.next(); String childPath = SVNPathUtil.append(path, entry.getName()); entry.setRelativePath(childPath); if (entry.getKind() == SVNNodeKind.FILE || depth == SVNDepth.IMMEDIATES || depth == SVNDepth.INFINITY) { handler.handleDirEntry(entry); } if (entry.getKind() == SVNNodeKind.DIR && entry.getDate() != null && depth == SVNDepth.INFINITY) { list(repository, childPath, rev, depth, entryFields, handler); } } }
private static void list(SVNRepository repository, String path, long rev, SVNDepth depth, int entryFields, ISVNDirEntryHandler handler) throws SVNException { if (depth == SVNDepth.EMPTY) { return; } Collection entries = new TreeSet(); try { entries = repository.getDir(path, rev, null, entryFields, entries); } catch (SVNAuthenticationException e) { return; } catch (SVNException e) { if (e.getErrorMessage().getErrorCode() == SVNErrorCode.RA_NOT_AUTHORIZED) { return; } throw e; } for (Iterator iterator = entries.iterator(); iterator.hasNext();) { SVNDirEntry entry = (SVNDirEntry) iterator.next(); String childPath = SVNPathUtil.append(path, entry.getName()); entry.setRelativePath(childPath); if (entry.getKind() == SVNNodeKind.FILE || depth == SVNDepth.IMMEDIATES || depth == SVNDepth.INFINITY) { handler.handleDirEntry(entry); } if (entry.getKind() == SVNNodeKind.DIR && entry.getDate() != null && depth == SVNDepth.INFINITY) { list(repository, childPath, rev, depth, entryFields, handler); } } } }
private SVNDirEntry buildDirEntry(FSEntry repEntry, SVNURL parentURL, FSRevisionNode entryNode, boolean includeLogs) throws SVNException { entryNode = entryNode == null ? myFSFS.getRevisionNode(repEntry.getId()) : entryNode; long size = 0; if (entryNode.getType() == SVNNodeKind.FILE) { size = entryNode.getFileLength(); } Map props = null; props = entryNode.getProperties(myFSFS); boolean hasProps = (props == null || props.size() == 0) ? false : true; Map revProps = null; revProps = myFSFS.getRevisionProperties(repEntry.getId().getRevision()); String lastAuthor = null; String log = null; Date lastCommitDate = null; if (revProps != null && revProps.size() > 0) { lastAuthor = (String) revProps.get(SVNRevisionProperty.AUTHOR); log = (String) revProps.get(SVNRevisionProperty.LOG); String timeString = (String) revProps.get(SVNRevisionProperty.DATE); lastCommitDate = timeString != null ? SVNTimeUtil.parseDateString(timeString) : null; } SVNURL entryURL = parentURL.appendPath(repEntry.getName(), false); SVNDirEntry dirEntry = new SVNDirEntry(entryURL, repEntry.getName(), repEntry.getType(), size, hasProps, repEntry.getId().getRevision(), lastCommitDate, lastAuthor, includeLogs ? log : null); dirEntry.setRelativePath(repEntry.getName()); return dirEntry; }
SVNDirEntry entry = (SVNDirEntry) iterator.next(); String childPath = SVNPathUtil.append(path, entry.getName()); entry.setRelativePath(childPath); if (entry.getKind() == SVNNodeKind.FILE || depth == SVNDepth.IMMEDIATES || depth == SVNDepth.INFINITY) { entry.setExternalParentUrl(externalParentUrl);
fileEntry.setRelativePath(name); nestedHandler.handleDirEntry(fileEntry); } else {
entry.setRelativePath(kind == SVNNodeKind.FILE ? name : ""); entry.setRelativePath(""); entry.setRelativePath(entry.getKind() == SVNNodeKind.DIR ? "" : entry.getName());
entry.setRelativePath(kind == SVNNodeKind.FILE ? name : ""); entry.setRelativePath(""); entry.setRelativePath(entry.getKind() == SVNNodeKind.DIR ? "" : entry.getName());
entry.setRelativePath(kind == SVNNodeKind.FILE ? name : ""); entry.setRelativePath(""); entry.setRelativePath(entry.getKind() == SVNNodeKind.DIR ? "" : entry.getName());
entry.setRelativePath(kind == SVNNodeKind.FILE ? name : ""); entry.setRelativePath(""); entry.setName(""); entry.setRelativePath(entry.getKind() == SVNNodeKind.DIR ? "" : entry.getName());
dirEntry.setRelativePath(repEntry.getName()); return dirEntry;
dirEntry.setRelativePath(repEntry.getName()); return dirEntry;
dirEntry.setRelativePath(repEntry.getName()); return dirEntry;