Package org.tmatesoft.svn.core

Examples of org.tmatesoft.svn.core.SVNNodeKind


                    SVNMergeRangeList rangeList = (SVNMergeRangeList) mergedMergeInfo.get(path);
                    SVNMergeRange[] ranges = rangeList.getRanges();
                    for (int j = 0; j < ranges.length; j++) {
                        SVNMergeRange range = ranges[j];
                        FSRevisionRoot root = myFSFS.createRevisionRoot(range.getEndRevision());
                        SVNNodeKind kind = root.checkNodeKind(path);
                        if (kind != SVNNodeKind.FILE) {
                            continue;
                        }
                       
                        newPathRevisions = findInterestingRevisions(newPathRevisions, path,
View Full Code Here


                        SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.RA_SVN_MALFORMED_DATA, "Dirlist element not a list");
                        SVNErrorManager.error(err, SVNLogType.NETWORK);
                    }
                    List direntProps = SVNReader.parseTuple("swnsr(?s)(?s)", item.getItems(), null);
                    String name = SVNReader.getString(direntProps, 0);
                    SVNNodeKind kind = SVNNodeKind.parseKind(SVNReader.getString(direntProps, 1));
                    long size = SVNReader.getLong(direntProps, 2);
                    boolean hasProps = SVNReader.getBoolean(direntProps, 3);
                    long createdRevision = SVNReader.getLong(direntProps, 4);
                    Date createdDate = SVNDate.parseDate(SVNReader.getString(direntProps, 5));
                    String lastAuthor = SVNReader.getString(direntProps, 6);
View Full Code Here

            authenticate();
            List values = read("(?l)", null, false);
            values = (List) values.get(0);
            if (values != null) {
                List direntProps = SVNReader.parseTuple("wnsr(?s)(?s)", values, null);
                SVNNodeKind kind = SVNNodeKind.parseKind(SVNReader.getString(direntProps, 0));
                long size = SVNReader.getLong(direntProps, 1);
                boolean hasProps = SVNReader.getBoolean(direntProps, 2);
                long createdRevision = SVNReader.getLong(direntProps, 3);
                Date createdDate = SVNDate.parseDate(SVNReader.getString(direntProps, 4));
                String lastAuthor = SVNReader.getString(direntProps, 5);
                parentEntry = new SVNDirEntry(url, repositoryRoot, "", kind, size, hasProps, createdRevision, createdDate, lastAuthor);
            }

            // get entries.
            buffer = new Object[]{"get-dir", path, rev, Boolean.FALSE, Boolean.TRUE};
            write("(w(s(n)ww))", buffer);
            authenticate();
            values = read("rll", null, false);
            revision = values.get(0) != null ? SVNReader.getLong(values, 0) : revision;

            if (handler != null) {
                List dirents = (List) values.get(2);
                for (Iterator iterator = dirents.iterator(); iterator.hasNext();) {
                    SVNItem item = (SVNItem) iterator.next();
                    if (item.getKind() != SVNItem.LIST) {
                        SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.RA_SVN_MALFORMED_DATA, "Dirlist element not a list");
                        SVNErrorManager.error(err, SVNLogType.NETWORK);
                    }
                    List direntProps = SVNReader.parseTuple("swnsr(?s)(?s)", item.getItems(), null);
                    String name = SVNReader.getString(direntProps, 0);
                    SVNNodeKind kind = SVNNodeKind.parseKind(SVNReader.getString(direntProps, 1));
                    long size = SVNReader.getLong(direntProps, 2);
                    boolean hasProps = SVNReader.getBoolean(direntProps, 3);
                    long createdRevision = SVNReader.getLong(direntProps, 4);
                    Date createdDate = SVNDate.parseDate(SVNReader.getString(direntProps, 5));
                    String lastAuthor = SVNReader.getString(direntProps, 6);
View Full Code Here

            }
            items = (List) items.get(0);
            if (items != null && !items.isEmpty()) {
                SVNURL repositoryRoot = getRepositoryRoot(false);
                List values = SVNReader.parseTuple("wnsr(?s)(?s)", items, null);
                SVNNodeKind kind = SVNNodeKind.parseKind(SVNReader.getString(values, 0));
                long size = SVNReader.getLong(values, 1);
                boolean hasProperties = SVNReader.getBoolean(values, 2);
                long createdRevision = SVNReader.getLong(values, 3);
                Date createdDate = SVNDate.parseDate(SVNReader.getString(values, 4));
                String lastAuthor = SVNReader.getString(values, 5);
View Full Code Here

        }
        return true;
    }

    public void deleteEntry(String path, long revision) throws SVNException {
        SVNNodeKind nodeKind = myRepos.checkPath(path, myRevision1);
        SVNAdminArea dir = retrieve(myCurrentDirectory.myWCFile, true);
        if (nodeKind != SVNNodeKind.FILE) {
            deleteEntry(path, nodeKind, dir);
            return;
        }
View Full Code Here

        SVNEntry entry = myWCAccess.getEntry(file, false);
        if (entry == null) {
            return;
        }
        SVNNodeKind nodeKind = entry.getKind();
        SVNAdminArea dir = retrieve(myCurrentDirectory.myWCFile, true);

        if (dir != null) {
            if (nodeKind == SVNNodeKind.FILE) {
                SVNVersionedProperties baseProperties = dir.getBaseProperties(file.getName());
View Full Code Here

        }
    }

    public static File ensureDirectoryExists(File path) throws SVNException {
        SVNFileType type = SVNFileType.getType(path);
        SVNNodeKind kind = SVNFileType.getNodeKind(type);
        if (kind != SVNNodeKind.NONE && kind != SVNNodeKind.DIR) {
            SVNErrorMessage error = SVNErrorMessage.create(SVNErrorCode.IO_ERROR, "''{0}'' is not a directory", path);
            SVNErrorManager.error(error, SVNLogType.WC);
        } else if (kind == SVNNodeKind.NONE) {
            boolean created = path.mkdirs();
View Full Code Here

                                                         "Invalid target path");
            SVNErrorManager.error(err, SVNLogType.FSFS);
        }
       
        String srcFullPath = SVNPathUtil.getAbsolutePath(SVNPathUtil.append(srcParentDir, srcEntry));
        SVNNodeKind tgtKind = tgtRoot.checkNodeKind(tgtFullPath);
        SVNNodeKind srcKind = srcRoot.checkNodeKind(srcFullPath);
       
        if (tgtKind == SVNNodeKind.NONE && srcKind == SVNNodeKind.NONE) {
            editor.closeEdit();
            return;
        }
View Full Code Here

        for (Iterator tgtEntries = targetEntries.keySet().iterator(); tgtEntries.hasNext();) {
            String name = (String) tgtEntries.next();
            FSEntry tgtEntry = (FSEntry) targetEntries.get(name);
           
            SVNNodeKind tgtKind = tgtEntry.getType();
            String targetFullPath = SVNPathUtil.getAbsolutePath(SVNPathUtil.append(tgtPath, tgtEntry.getName()));
            String editFullPath = SVNPathUtil.getAbsolutePath(SVNPathUtil.append(editPath, tgtEntry.getName()));
           
            if (sourceEntries != null && sourceEntries.containsKey(name)) {
                FSEntry srcEntry = (FSEntry) sourceEntries.get(name);
                String sourceFullPath = SVNPathUtil.getAbsolutePath(SVNPathUtil.append(srcPath, tgtEntry.getName()));
                SVNNodeKind srcKind = srcEntry.getType();
               
                int distance = srcEntry.getId().compareTo(tgtEntry.getId());
                if (srcKind != tgtKind || distance == -1) {
                    editor.deleteEntry(editFullPath, -1);
                    addFileOrDir(fsfs, editor, srcRoot, tgtRoot, targetFullPath, editFullPath, tgtKind);
View Full Code Here

        SVNRepository repository2 = createRepository(url2, null, null, false);

        final long rev1 = getRevisionNumber(revision1, repository1, path1);
        long rev2 = -1;
        String target1 = null;
        SVNNodeKind kind1 = null;
        SVNNodeKind kind2 = null;
        try {
            rev2 = getRevisionNumber(revision2, repository2, path2);           
            kind1 = repository1.checkPath("", rev1);
            kind2 = repository2.checkPath("", rev2);
            if (kind1 == SVNNodeKind.NONE) {
View Full Code Here

TOP

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

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.