Package org.tmatesoft.svn.core

Examples of org.tmatesoft.svn.core.SVNNodeKind


            baseRoot = myBaseRoot;
        } else {
            baseRoot = myFSFS.createRevisionRoot(baseLocation.getRevision());
        }
       
        SVNNodeKind kind = baseRoot.checkNodeKind(baseLocation.getPath());
        if (kind == SVNNodeKind.NONE) {
            SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.FS_NOT_FOUND, "''{0}'' not found in filesystem", path);
            SVNErrorManager.error(err, SVNLogType.FSFS);
        }
       
View Full Code Here


        SVNLog log = myCurrentDirectory.getLog();
        SVNProperties attributes = new SVNProperties();

        attributes.put(SVNLog.NAME_ATTR, name);
        log.addCommand(SVNLog.DELETE_ENTRY, attributes, false);
        SVNNodeKind kind = entry.getKind();
        long previousRevision = entry.getRevision();
        boolean isDeleted = entry.isDeleted();
        SVNURL url = entry.getSVNURL();
        if (path.equals(myTarget)) {
            attributes.put(SVNLog.NAME_ATTR, name);
View Full Code Here

    private SVNLock lock(String path, String token, String username, String comment, Date expirationDate, long currentRevision,
            boolean stealLock, boolean isDAVComment) throws SVNException {
        long youngestRev = getYoungestRevision();
        FSRevisionRoot root = createRevisionRoot(youngestRev);
        SVNNodeKind kind = root.checkNodeKind(path);

        if (kind == SVNNodeKind.DIR) {
            SVNErrorManager.error(FSErrors.errorNotFile(path, this), SVNLogType.FSFS);
        } else if (kind == SVNNodeKind.NONE) {
            SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.FS_NOT_FOUND, "Path ''{0}'' doesn't exist in HEAD revision", path);
View Full Code Here

            return null;
        }
        String kind = value.substring(0, spaceInd);
        String rawID = value.substring(spaceInd + 1);
       
        SVNNodeKind type = SVNNodeKind.parseKind(kind);
        FSID id = FSID.fromString(rawID);
        if ((type != SVNNodeKind.DIR && type != SVNNodeKind.FILE) || id == null) {
            return null;
        }
        return new FSEntry(id, type, name);
View Full Code Here

       
        if (entry != null && entry.isAbsent()) {
            return SVNStatusType.MISSING;
        }

        SVNNodeKind expectedKind = getWorkingNodeKind(entry, path);
        SVNNodeKind diskKind = getDiskKind(path);
        if (entry != null && entry.isDirectory() && entry.isScheduledForDeletion() && diskKind == SVNNodeKind.DIR) {
            expectedKind = SVNNodeKind.DIR;
        }
        if (expectedKind == diskKind) {
            return SVNStatusType.INAPPLICABLE;
View Full Code Here

    }

    private SVNDirEntry buildDirEntry(FSEntry repEntry, SVNURL parentURL, FSRevisionNode entryNode, int entryFields) throws SVNException {
        entryNode = entryNode == null ? myFSFS.getRevisionNode(repEntry.getId()) : entryNode;

        SVNNodeKind kind = null;
        if ((entryFields & SVNDirEntry.DIRENT_KIND) != 0) {
            kind = repEntry.getType();
        }

        long size = 0;
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) {
            myEditor.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();
               
                if (myDepth == SVNDepth.INFINITY || srcKind != SVNNodeKind.DIR) {
                    int distance = srcEntry.getId().compareTo(tgtEntry.getId());
                    if (srcKind != tgtKind || (distance == -1 && !myIsIgnoreAncestry)) {
                        myEditor.deleteEntry(editFullPath, -1);
View Full Code Here

            SVNErrorManager.error(err, SVNLogType.FSFS);
        }
        revNode.setId(revnodeID);

        // Read the type.
        SVNNodeKind nodeKind = SVNNodeKind.parseKind((String) headers.get(FSRevisionNode.HEADER_TYPE));
        if (nodeKind == SVNNodeKind.NONE || nodeKind == SVNNodeKind.UNKNOWN) {
            SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.FS_CORRUPT, "Missing kind field in node-rev");
            SVNErrorManager.error(err, SVNLogType.FSFS);
        }
        revNode.setType(nodeKind);
View Full Code Here

            SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.FS_CORRUPT, "Invalid changes line in rev-file");
            SVNErrorManager.error(err, SVNLogType.FSFS);
        }
        String changesKindStr = changeLine.substring(0, delimiterInd);
        int dashIndex = changesKindStr.indexOf("-");
        SVNNodeKind nodeKind = SVNNodeKind.UNKNOWN;
        if (dashIndex >=0) {
            String nodeKindStr = changesKindStr.substring(dashIndex + 1);
            changesKindStr = changesKindStr.substring(0, dashIndex);
            if (SVNNodeKind.FILE.toString().equals(nodeKindStr)) {
                nodeKind = SVNNodeKind.FILE;
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.