Package org.tmatesoft.svn.core

Examples of org.tmatesoft.svn.core.SVNDirEntry


            String name = SVNPathUtil.tail(repos.getLocation().getPath());
            SVNURL fileULR = repos.getLocation();
            repos.setLocation(repos.getLocation().removePathTail(), false);
            Collection dirEntries = repos.getDir("", rev, null, (Collection) null);

            SVNDirEntry fileEntry = null;
            for (Iterator ents = dirEntries.iterator(); ents.hasNext();) {
                SVNDirEntry dirEntry = (SVNDirEntry) ents.next();
                if (name.equals(dirEntry.getName())) {
                    fileEntry = dirEntry;
                    break;
                }
            }
            if (fileEntry != null) {
View Full Code Here


    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);
            }
        }
    }
View Full Code Here

    public void listEntries(String path) throws SVNException {
        try {
            Collection<SVNDirEntry> entries = repositorio.getDir(path, -1, null, (Collection<SVNDirEntry>) null);
            Iterator<SVNDirEntry> iterator = entries.iterator();
            while (iterator.hasNext()) {
                SVNDirEntry entry = iterator.next();
                if (entry.getKind() == SVNNodeKind.DIR) {
                    // listEntries( (path.equals("")) ? entry.getName()
                    // : path + "/" + entry.getName());
                }
            }
        } catch (Exception exception) {
View Full Code Here


    public SVNEntrada getEntry(String path, long revision) throws SVNException {
        SVNEntrada entrada = null;
        try {
          SVNDirEntry entry = repositorio.info(path, revision);
          entrada = new SVNEntrada(entry);
          entrada.setPath(path);
        }
        catch (Exception exception) {
            throw new SVNException(exception);
View Full Code Here

            Collection entries = repositorio.getDir(path, -1, null, (Collection) null);
            Iterator iterator = entries.iterator();

            ArrayList<SVNEntrada> resultado = new ArrayList<SVNEntrada>();
            while (iterator.hasNext()) {
                SVNDirEntry entry = (SVNDirEntry) iterator.next();
                /*
                 * System.out.println("/" + (path.equals("") ? "" : path + "/") +
                 * entry.getName() + " (author: '" + entry.getAuthor() + "';
                 * revision: " + entry.getRevision() + "; date: " +
                 * entry.getDate() + ")");
                 */
                /*
                 * Checking up if the entry is a directory.
                 */
                if (entry.getKind() == SVNNodeKind.DIR) {
                    // listEntries( (path.equals("")) ? entry.getName()
                    // : path + "/" + entry.getName());
                }
                SVNEntrada entrada = new SVNEntrada(entry);
                entrada.setPath((path.equals("")) ? entry.getName() : path + "/" + entry.getName());
                resultado.add(entrada);
            }
            Collections.sort(resultado, new Comparator<SVNEntrada>() {

                public int compare(SVNEntrada entrada1, SVNEntrada entrada2) {
View Full Code Here

            if (entries != null) {
                entries.addAll(getDirEntries(parent, parentURL, SVNDirEntry.DIRENT_ALL));
            }

            SVNDirEntry parentDirEntry = buildDirEntry(new FSEntry(parent.getId(), parent.getType(), ""), parentURL, parent, SVNDirEntry.DIRENT_ALL);
            return parentDirEntry;
        } finally {
            closeRepository();
        }
    }
View Full Code Here

            if (handler != null) {
                SVNURL parentURL = getLocation().appendPath(path, false);
                Collection entriesCollection = getDirEntries(parent, parentURL, entryFields);
                Iterator entries = entriesCollection.iterator();
                while (entries.hasNext()) {
                    SVNDirEntry entry = (SVNDirEntry) entries.next();
                    handler.handleDirEntry(entry);
                }
            }
            if (properties != null) {
                properties.putAll(collectProperties(parent));
View Full Code Here

            String fullPath = getFullPath(path);
            String parentFullPath = "/".equals(path) ? fullPath : SVNPathUtil.removeTail(fullPath);
            SVNURL url = getLocation().setPath(parentFullPath, false);
            String name = SVNPathUtil.tail(path);
            FSEntry fsEntry = new FSEntry(revNode.getId(), revNode.getType(), name);
            SVNDirEntry entry = buildDirEntry(fsEntry, url, revNode, SVNDirEntry.DIRENT_ALL);
            return entry;
        } finally {
            closeRepository();
        }
    }
View Full Code Here

                lastCommitDate = timeString != null ? SVNDate.parseDateString(timeString) : null;
            }
        }

        SVNURL entryURL = parentURL.appendPath(repEntry.getName(), false);
        SVNDirEntry dirEntry = new SVNDirEntry(entryURL, getRepositoryRoot(false), repEntry.getName(), kind, size, hasProps, revision, lastCommitDate, lastAuthor, log);
        dirEntry.setRelativePath(repEntry.getName());
        return dirEntry;
    }
View Full Code Here

                        author = authorValue == null ? null : authorValue.getString();
                    }
                   
                    SVNURL childURL = getLocation().setPath(fullPath, true);
                    childURL = childURL.appendPath(name, false);
                    SVNDirEntry dirEntry = new SVNDirEntry(childURL, repositryRoot, name, kind, size, hasProperties, lastRevision, date, author);
                    handler.handleDirEntry(dirEntry);
                }               
            }
            if (properties != null) {
                DAVProperties dirProps = DAVUtil.getResourceProperties(myConnection, path, null, null);
View Full Code Here

TOP

Related Classes of org.tmatesoft.svn.core.SVNDirEntry

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.