/** * Browses directory entries from a repository and uses the provided * dir entry handler to process them. This method is * especially useful when having no Working Copy. * * <p> * On every entry that this method stops it gets some useful entry * information which is packed into an {@link org.tmatesoft.svn.core.SVNDirEntry} * object and passed to the <code>handler</code>'s * {@link org.tmatesoft.svn.core.ISVNDirEntryHandler#handleDirEntry(SVNDirEntry) handleDirEntry()} method. * * @param url a repository location to be "listed" * @param pegRevision a revision in which the item's URL is first looked up * @param revision a target revision * @param recursive <span class="javakeyword">true</span> to * descend recursively (relevant for directories) * @param handler a caller's directory entry handler (to process * info on an entry) * @throws SVNException * @see #doList(File, SVNRevision, SVNRevision, boolean, ISVNDirEntryHandler) */ public void doList(SVNURL url, SVNRevision pegRevision, SVNRevision revision, boolean recursive, ISVNDirEntryHandler handler) throws SVNException { doList(url, pegRevision, revision, false, recursive, handler); }
/** * Browses directory entries from a repository and uses the provided * dir entry handler to process them. This method is * especially useful when having no Working Copy. * * <p> * On every entry that this method stops it gets some useful entry * information which is packed into an {@link org.tmatesoft.svn.core.SVNDirEntry} * object and passed to the <code>handler</code>'s * {@link org.tmatesoft.svn.core.ISVNDirEntryHandler#handleDirEntry(SVNDirEntry) handleDirEntry()} method. * * @param url a repository location to be "listed" * @param pegRevision a revision in which the item's URL is first looked up * @param revision a target revision * @param fetchLocks <span class="javakeyword">true</span> to * fetch locks information from repository * @param recursive <span class="javakeyword">true</span> to * descend recursively (relevant for directories) * @param handler a caller's directory entry handler (to process * info on an entry) * @throws SVNException * @see #doList(File, SVNRevision, SVNRevision, boolean, ISVNDirEntryHandler) */ public void doList(SVNURL url, SVNRevision pegRevision, SVNRevision revision, boolean fetchLocks, boolean recursive, ISVNDirEntryHandler handler) throws SVNException { doList(url, pegRevision, revision, fetchLocks, recursive ? SVNDepth.INFINITY : SVNDepth.IMMEDIATES, SVNDirEntry.DIRENT_ALL, handler); }
/** * Browses directory entries from a repository (using Working * Copy paths to get corresponding URLs) and uses the provided dir * entry handler to process them. * * <p> * On every entry that this method stops it gets some useful entry * information which is packed into an {@link org.tmatesoft.svn.core.SVNDirEntry} * object and passed to the <code>handler</code>'s * {@link org.tmatesoft.svn.core.ISVNDirEntryHandler#handleDirEntry(SVNDirEntry) handleDirEntry()} method. * * @param path a WC item to get its repository location * @param pegRevision a revision in which the item's URL is first looked up * @param revision a target revision * @param recursive <span class="javakeyword">true</span> to * descend recursively (relevant for directories) * @param handler a caller's directory entry handler (to process * info on an entry) * @throws SVNException * @see #doList(SVNURL, SVNRevision, SVNRevision, boolean, ISVNDirEntryHandler) */ public void doList(File path, SVNRevision pegRevision, SVNRevision revision, boolean recursive, ISVNDirEntryHandler handler) throws SVNException { doList(path, pegRevision, revision, false, recursive, handler); }
/** * Browses directory entries from a repository and uses the provided * dir entry handler to process them. This method is * especially useful when having no Working Copy. * * <p> * On every entry that this method stops it gets some useful entry * information which is packed into an {@link org.tmatesoft.svn.core.SVNDirEntry} * object and passed to the <code>handler</code>'s * {@link org.tmatesoft.svn.core.ISVNDirEntryHandler#handleDirEntry(SVNDirEntry) handleDirEntry()} method. * * @param url a repository location to be "listed" * @param pegRevision a revision in which the item's URL is first looked up * @param revision a target revision * @param recursive <span class="javakeyword">true</span> to * descend recursively (relevant for directories) * @param handler a caller's directory entry handler (to process * info on an entry) * @throws SVNException * @deprecated use {@link #doList(SVNURL, SVNRevision, SVNRevision, boolean, SVNDepth, int, ISVNDirEntryHandler)} * instead */ public void doList(SVNURL url, SVNRevision pegRevision, SVNRevision revision, boolean recursive, ISVNDirEntryHandler handler) throws SVNException { doList(url, pegRevision, revision, false, recursive, handler); }
/** * Browses directory entries from a repository and uses the provided * dir entry handler to process them. This method is * especially useful when having no Working Copy. * * <p> * On every entry that this method stops it gets some useful entry * information which is packed into an {@link org.tmatesoft.svn.core.SVNDirEntry} * object and passed to the <code>handler</code>'s * {@link org.tmatesoft.svn.core.ISVNDirEntryHandler#handleDirEntry(SVNDirEntry) handleDirEntry()} method. * * @param url a repository location to be "listed" * @param pegRevision a revision in which the item's URL is first looked up * @param revision a target revision * @param recursive <span class="javakeyword">true</span> to * descend recursively (relevant for directories) * @param handler a caller's directory entry handler (to process * info on an entry) * @throws SVNException * @deprecated use {@link #doList(SVNURL, SVNRevision, SVNRevision, boolean, SVNDepth, int, ISVNDirEntryHandler)} * instead */ public void doList(SVNURL url, SVNRevision pegRevision, SVNRevision revision, boolean recursive, ISVNDirEntryHandler handler) throws SVNException { doList(url, pegRevision, revision, false, recursive, handler); }
/** * Browses directory entries from a repository and uses the provided * dir entry handler to process them. This method is * especially useful when having no Working Copy. * * <p> * On every entry that this method stops it gets some useful entry * information which is packed into an {@link org.tmatesoft.svn.core.SVNDirEntry} * object and passed to the <code>handler</code>'s * {@link org.tmatesoft.svn.core.ISVNDirEntryHandler#handleDirEntry(SVNDirEntry) handleDirEntry()} method. * * @param url a repository location to be "listed" * @param pegRevision a revision in which the item's URL is first looked up * @param revision a target revision * @param fetchLocks <span class="javakeyword">true</span> to * fetch locks information from repository * @param recursive <span class="javakeyword">true</span> to * descend recursively (relevant for directories) * @param handler a caller's directory entry handler (to process * info on an entry) * @throws SVNException * @see #doList(File, SVNRevision, SVNRevision, boolean, ISVNDirEntryHandler) */ public void doList(SVNURL url, SVNRevision pegRevision, SVNRevision revision, boolean fetchLocks, boolean recursive, ISVNDirEntryHandler handler) throws SVNException { doList(url, pegRevision, revision, fetchLocks, recursive ? SVNDepth.INFINITY : SVNDepth.IMMEDIATES, SVNDirEntry.DIRENT_ALL, handler); }
/** * Browses directory entries from a repository (using Working * Copy paths to get corresponding URLs) and uses the provided dir * entry handler to process them. * * <p> * On every entry that this method stops it gets some useful entry * information which is packed into an {@link org.tmatesoft.svn.core.SVNDirEntry} * object and passed to the <code>handler</code>'s * {@link org.tmatesoft.svn.core.ISVNDirEntryHandler#handleDirEntry(SVNDirEntry) handleDirEntry()} method. * * @param path a WC item to get its repository location * @param pegRevision a revision in which the item's URL is first looked up * @param revision a target revision * @param recursive <span class="javakeyword">true</span> to * descend recursively (relevant for directories) * @param handler a caller's directory entry handler (to process * info on an entry) * @throws SVNException * @deprecated use {@link #doList(File, SVNRevision, SVNRevision, boolean, SVNDepth, int, ISVNDirEntryHandler)} * instead */ public void doList(File path, SVNRevision pegRevision, SVNRevision revision, boolean recursive, ISVNDirEntryHandler handler) throws SVNException { doList(path, pegRevision, revision, false, recursive ? SVNDepth.INFINITY : SVNDepth.IMMEDIATES, SVNDirEntry.DIRENT_ALL, handler); }
/** * Browses directory entries from a repository (using Working * Copy paths to get corresponding URLs) and uses the provided dir * entry handler to process them. * * <p> * On every entry that this method stops it gets some useful entry * information which is packed into an {@link org.tmatesoft.svn.core.SVNDirEntry} * object and passed to the <code>handler</code>'s * {@link org.tmatesoft.svn.core.ISVNDirEntryHandler#handleDirEntry(SVNDirEntry) handleDirEntry()} method. * * @param path a WC item to get its repository location * @param pegRevision a revision in which the item's URL is first looked up * @param revision a target revision * @param recursive <span class="javakeyword">true</span> to * descend recursively (relevant for directories) * @param handler a caller's directory entry handler (to process * info on an entry) * @throws SVNException * @deprecated use {@link #doList(File, SVNRevision, SVNRevision, boolean, SVNDepth, int, ISVNDirEntryHandler)} * instead */ public void doList(File path, SVNRevision pegRevision, SVNRevision revision, boolean recursive, ISVNDirEntryHandler handler) throws SVNException { doList(path, pegRevision, revision, false, recursive ? SVNDepth.INFINITY : SVNDepth.IMMEDIATES, SVNDirEntry.DIRENT_ALL, handler); }
/** * Browses directory entries from a repository (using Working * Copy paths to get corresponding URLs) and uses the provided dir * entry handler to process them. * * <p> * On every entry that this method stops it gets some useful entry * information which is packed into an {@link org.tmatesoft.svn.core.SVNDirEntry} * object and passed to the <code>handler</code>'s * {@link org.tmatesoft.svn.core.ISVNDirEntryHandler#handleDirEntry(SVNDirEntry) handleDirEntry()} method. * * @param path a WC item to get its repository location * @param pegRevision a revision in which the item's URL is first looked up * @param revision a target revision * @param fetchLocks <span class="javakeyword">true</span> to fetch locks * information from a repository * @param recursive <span class="javakeyword">true</span> to * descend recursively (relevant for directories) * @param handler a caller's directory entry handler (to process * info on an entry) * @throws SVNException * * @deprecated use {@link #doList(File, SVNRevision, SVNRevision, boolean, SVNDepth, int, ISVNDirEntryHandler)} * instead */ public void doList(File path, SVNRevision pegRevision, SVNRevision revision, boolean fetchLocks, boolean recursive, ISVNDirEntryHandler handler) throws SVNException { doList(path, pegRevision, revision, fetchLocks, recursive ? SVNDepth.INFINITY : SVNDepth.IMMEDIATES, SVNDirEntry.DIRENT_ALL, handler); }
/** * Browses directory entries from a repository (using Working * Copy paths to get corresponding URLs) and uses the provided dir * entry handler to process them. * * <p> * On every entry that this method stops it gets some useful entry * information which is packed into an {@link org.tmatesoft.svn.core.SVNDirEntry} * object and passed to the <code>handler</code>'s * {@link org.tmatesoft.svn.core.ISVNDirEntryHandler#handleDirEntry(SVNDirEntry) handleDirEntry()} method. * * @param path a WC item to get its repository location * @param pegRevision a revision in which the item's URL is first looked up * @param revision a target revision * @param fetchLocks <span class="javakeyword">true</span> to fetch locks * information from a repository * @param recursive <span class="javakeyword">true</span> to * descend recursively (relevant for directories) * @param handler a caller's directory entry handler (to process * info on an entry) * @throws SVNException * * @deprecated use {@link #doList(File, SVNRevision, SVNRevision, boolean, SVNDepth, int, ISVNDirEntryHandler)} * instead */ public void doList(File path, SVNRevision pegRevision, SVNRevision revision, boolean fetchLocks, boolean recursive, ISVNDirEntryHandler handler) throws SVNException { doList(path, pegRevision, revision, fetchLocks, recursive ? SVNDepth.INFINITY : SVNDepth.IMMEDIATES, SVNDirEntry.DIRENT_ALL, handler); }
doList(path, pegRevision, revision, false, recursive ? SVNDepth.INFINITY : SVNDepth.IMMEDIATES, SVNDirEntry.DIRENT_ALL, handler);
doList(url, pegRevision, revision, false, recursive ? SVNDepth.INFINITY : SVNDepth.IMMEDIATES, SVNDirEntry.DIRENT_ALL, handler);
public DirEntry[] list(String url, Revision revision, Revision pegRevision, boolean recurse) throws ClientException { final Collection allEntries = new ArrayList(); SVNLogClient client = getSVNLogClient(); ISVNDirEntryHandler handler = new ISVNDirEntryHandler(){ public void handleDirEntry(SVNDirEntry dirEntry) { allEntries.add(JavaHLObjectFactory.createDirEntry(dirEntry)); } }; try { if(isURL(url)){ client.doList(SVNURL.parseURIEncoded(url), JavaHLObjectFactory.getSVNRevision(pegRevision), JavaHLObjectFactory.getSVNRevision(revision), recurse, handler); } else { client.doList(new File(url).getAbsoluteFile(), JavaHLObjectFactory.getSVNRevision(pegRevision), JavaHLObjectFactory.getSVNRevision(revision), recurse, handler); } } catch (SVNException e) { throwException(e); } return (DirEntry[]) allEntries.toArray(new DirEntry[allEntries.size()]); }
pegRev[0] = getRevisionNumber(revision, repos, null); doList(repos, pegRev[0], handler, fetchLocks, recursive);
@Override public List<String> getBranches(SVNRepository repository, SVNURL url) { List<String> results = new ArrayList<>(); try { getLogClient(repository).doList( url, SVNRevision.HEAD, SVNRevision.HEAD, false, false, dirEntry -> { if (dirEntry.getKind() == SVNNodeKind.DIR) { results.add(dirEntry.getName()); } } ); } catch (SVNException ex) { throw translateSVNException(ex); } return results; }
doList(repos, rev, handler, fetchLocks, recursive);
private void dumpRepositoryContents() throws SVNException { System.out.println("Repository contents:"); SVNURL repoURL = SVNURL.parseURIEncoded( "svn://localhost/"); SVNLogClient logClient = new SVNLogClient((ISVNAuthenticationManager)null, null); logClient.doList(repoURL, SVNRevision.HEAD, SVNRevision.HEAD, false, true, dirEntry -> System.out.println(dirEntry.getRelativePath())); }
private void list(String url, Revision revision, Revision pegRevision, int depth, int direntFields, boolean fetchLocks, ISVNDirEntryHandler handler) throws ClientException { SVNLogClient client = getSVNLogClient(); try { if (isURL(url)) { client.doList(SVNURL.parseURIEncoded(url), JavaHLObjectFactory.getSVNRevision(pegRevision), JavaHLObjectFactory.getSVNRevision(revision), fetchLocks, JavaHLObjectFactory.getSVNDepth(depth), direntFields, handler); } else { client.doList(new File(url).getAbsoluteFile(), JavaHLObjectFactory.getSVNRevision(pegRevision), JavaHLObjectFactory.getSVNRevision(revision), fetchLocks, JavaHLObjectFactory.getSVNDepth(depth), direntFields, handler); } } catch (SVNException e) { throwException(e); } finally { resetLog(); } }
private void list(String url, Revision revision, Revision pegRevision, int depth, int direntFields, boolean fetchLocks, ISVNDirEntryHandler handler) throws ClientException { SVNLogClient client = getSVNLogClient(); try { if (isURL(url)) { client.doList(SVNURL.parseURIEncoded(url), JavaHLObjectFactory.getSVNRevision(pegRevision), JavaHLObjectFactory.getSVNRevision(revision), fetchLocks, JavaHLObjectFactory.getSVNDepth(depth), direntFields, handler); } else { client.doList(new File(url).getAbsoluteFile(), JavaHLObjectFactory.getSVNRevision(pegRevision), JavaHLObjectFactory.getSVNRevision(revision), fetchLocks, JavaHLObjectFactory.getSVNDepth(depth), direntFields, handler); } } catch (SVNException e) { throwException(e); } finally { resetLog(); } }
private void list(String url, Revision revision, Revision pegRevision, int depth, int direntFields, boolean fetchLocks, ISVNDirEntryHandler handler) throws ClientException { SVNLogClient client = getSVNLogClient(); try { if (isURL(url)) { client.doList(SVNURL.parseURIEncoded(url), JavaHLObjectFactory.getSVNRevision(pegRevision), JavaHLObjectFactory.getSVNRevision(revision), fetchLocks, JavaHLObjectFactory.getSVNDepth(depth), direntFields, handler); } else { client.doList(new File(url).getAbsoluteFile(), JavaHLObjectFactory.getSVNRevision(pegRevision), JavaHLObjectFactory.getSVNRevision(revision), fetchLocks, JavaHLObjectFactory.getSVNDepth(depth), direntFields, handler); } } catch (SVNException e) { throwException(e); } finally { resetLog(); } }