Package org.tmatesoft.svn.core.internal.io.fs

Examples of org.tmatesoft.svn.core.internal.io.fs.FSRevisionNode


            deltifyDirs(fsfs, editor, srcRoot, tgtRoot, srcPath, tgtPath, editPath);
            editor.closeDir();
        } else {
            editor.openFile(editPath, baseRevision);
            deltifyFiles(fsfs, editor, srcRoot, tgtRoot, srcPath, tgtPath, editPath);
            FSRevisionNode tgtNode = tgtRoot.getRevisionNode(tgtPath);
            editor.closeFile(editPath, tgtNode.getFileChecksum());
        }
    }
View Full Code Here


        }
       
        if (changed) {
            String srcHexDigest = null;
            if (srcPath != null) {
                FSRevisionNode srcNode = srcRoot.getRevisionNode(srcPath);
                srcHexDigest = srcNode.getFileChecksum();
            }
            editor.applyTextDelta(editPath, srcHexDigest);
            editor.textDeltaChunk(editPath, SVNDiffWindow.EMPTY);
        }
    }
View Full Code Here

    }
   
    private static void deltifyDirs(FSFS fsfs, ISVNEditor editor, FSRevisionRoot srcRoot, FSRevisionRoot tgtRoot, String srcPath, String tgtPath, String editPath) throws SVNException {
        deltifyProperties(fsfs, editor, srcRoot, tgtRoot, srcPath, tgtPath, editPath, true);

        FSRevisionNode targetNode = tgtRoot.getRevisionNode(tgtPath);
        Map targetEntries = targetNode.getDirEntries(fsfs);
       
        Map sourceEntries = null;
        if (srcPath != null) {
            FSRevisionNode sourceNode = srcRoot.getRevisionNode(srcPath);
            sourceEntries = sourceNode.getDirEntries(fsfs);
        }

        for (Iterator tgtEntries = targetEntries.keySet().iterator(); tgtEntries.hasNext();) {
            String name = (String) tgtEntries.next();
            FSEntry tgtEntry = (FSEntry) targetEntries.get(name);
View Full Code Here

            }
        }
    }

    private static void deltifyProperties(FSFS fsfs, ISVNEditor editor, FSRevisionRoot srcRoot, FSRevisionRoot tgtRoot, String srcPath, String tgtPath, String editPath, boolean isDir) throws SVNException {
        FSRevisionNode targetNode = tgtRoot.getRevisionNode(tgtPath);

        SVNProperties sourceProps = null;
        if (srcPath != null) {
            FSRevisionNode sourceNode = srcRoot.getRevisionNode(srcPath);
            boolean propsChanged = !FSRepositoryUtil.arePropertiesEqual(sourceNode, targetNode);
            if (!propsChanged) {
                return;
            }
            sourceProps = sourceNode.getProperties(fsfs);
        } else {
            sourceProps = new SVNProperties();
        }

        SVNProperties targetProps = targetNode.getProperties(fsfs);
View Full Code Here

        }
    }

    public void removeNodeProperties() throws SVNException {
        FSTransactionRoot txnRoot = myCurrentRevisionBaton.myTxnRoot;
        FSRevisionNode node = txnRoot.getRevisionNode(myCurrentNodeBaton.myPath);
        SVNProperties props = node.getProperties(myFSFS);
       
        for (Iterator propNames = props.nameSet().iterator(); propNames.hasNext();) {
            String propName = (String) propNames.next();
            myCurrentRevisionBaton.getCommitter().changeNodeProperty(myCurrentNodeBaton.myPath, propName, null);
        }
View Full Code Here

            SVNErrorManager.error(err, SVNLogType.FSFS);
        }
       
        FSRevisionRoot copyRoot = myFSFS.createRevisionRoot(srcRevision);
        if (nodeBaton.myCopySourceChecksum != null) {
            FSRevisionNode revNode = copyRoot.getRevisionNode(nodeBaton.myCopyFromPath);
            String hexDigest = revNode.getFileChecksum();
            if (hexDigest != null && !hexDigest.equals(nodeBaton.myCopySourceChecksum)) {
                SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.CHECKSUM_MISMATCH,
                        "Copy source checksum mismatch on copy from ''{0}''@{1}\n" +
                        " to ''{2}'' in rev based on r{3}:\n" +
                        "   expected:  {4}\n" +
View Full Code Here

            myEditor.closeDir();
            myEditor.closeEdit();
            return;
        }

        FSRevisionNode srcNode = srcRoot.getRevisionNode(srcFullPath);
        FSRevisionNode tgtNode = tgtRoot.getRevisionNode(tgtFullPath);
        int distance = srcNode.getId().compareTo(tgtNode.getId());

        if (distance == 0) {
            myEditor.closeEdit();
        } else if (srcEntry != null) {
            if (srcKind != tgtKind || distance == -1) {
View Full Code Here

            deltifyDirs(srcRoot, tgtRoot, null, tgtPath, editPath);
            myEditor.closeDir();
        } else {
            myEditor.addFile(editPath, null, -1);
            deltifyFiles(srcRoot, tgtRoot, null, tgtPath, editPath);
            FSRevisionNode tgtNode = tgtRoot.getRevisionNode(tgtPath);
            myEditor.closeFile(editPath, tgtNode.getFileChecksum());
        }
    }
View Full Code Here

    private void deltifyDirs(FSRevisionRoot srcRoot, FSRevisionRoot tgtRoot, String srcPath,
            String tgtPath, String editPath) throws SVNException {
        deltifyProperties(srcRoot, tgtRoot, srcPath, tgtPath, editPath, true);

        FSRevisionNode targetNode = tgtRoot.getRevisionNode(tgtPath);
        Map targetEntries = targetNode.getDirEntries(myFSFS);
       
        Map sourceEntries = null;
        if (srcPath != null) {
            FSRevisionNode sourceNode = srcRoot.getRevisionNode(srcPath);
            sourceEntries = sourceNode.getDirEntries(myFSFS);
        }

        for (Iterator tgtEntries = targetEntries.keySet().iterator(); tgtEntries.hasNext();) {
            String name = (String) tgtEntries.next();
            FSEntry tgtEntry = (FSEntry) targetEntries.get(name);
View Full Code Here

            deltifyDirs(srcRoot, tgtRoot, srcPath, tgtPath, editPath);
            myEditor.closeDir();
        } else {
            myEditor.openFile(editPath, baseRevision);
            deltifyFiles(srcRoot, tgtRoot, srcPath, tgtPath, editPath);
            FSRevisionNode tgtNode = tgtRoot.getRevisionNode(tgtPath);
            myEditor.closeFile(editPath, tgtNode.getFileChecksum());
        }
    }
View Full Code Here

TOP

Related Classes of org.tmatesoft.svn.core.internal.io.fs.FSRevisionNode

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.