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

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


        }
       
        if (changed) {
            String srcHexDigest = null;
            if (srcPath != null) {
                FSRevisionNode srcNode = srcRoot.getRevisionNode(srcPath);
                srcHexDigest = srcNode.getFileChecksum();
            }
           
            FSRepositoryUtil.sendTextDelta(myEditor, editPath, srcPath, srcHexDigest, srcRoot,
                    tgtPath, tgtRoot, myIsSendTextDeltas, myDeltaCombiner, myDeltaGenerator, myFSFS);
        }
View Full Code Here


    private void deltifyProperties(FSRevisionRoot srcRoot, FSRevisionRoot tgtRoot, String srcPath,
            String tgtPath, String editPath, boolean isDir) throws SVNException {
        if (myIsIncludeEntryProperties) {
           
            FSRevisionNode node = tgtRoot.getRevisionNode(tgtPath);
            long committedRevision = node.getCreatedRevision();
            if (SVNRevision.isValidRevisionNumber(committedRevision)) {
                if (isDir) {
                    myEditor.changeDirProperty(SVNProperty.COMMITTED_REVISION, SVNPropertyValue.create(String.valueOf(committedRevision)));
                } else {
                    myEditor.changeFileProperty(editPath, SVNProperty.COMMITTED_REVISION, SVNPropertyValue.create(String.valueOf(committedRevision)));
                }
               
                SVNProperties revisionProps = myFSFS.getRevisionProperties(committedRevision);
                String committedDateStr = revisionProps.getStringValue(SVNRevisionProperty.DATE);
                if (committedDateStr != null || srcPath != null) {
                    if (isDir) {
                        myEditor.changeDirProperty(SVNProperty.COMMITTED_DATE, SVNPropertyValue.create(committedDateStr));
                    } else {
                        myEditor.changeFileProperty(editPath,SVNProperty.COMMITTED_DATE, SVNPropertyValue.create(committedDateStr));
                    }
                }
                String lastAuthor = revisionProps.getStringValue(SVNRevisionProperty.AUTHOR);
                if (lastAuthor != null || srcPath != null) {
                    if (isDir) {
                        myEditor.changeDirProperty(SVNProperty.LAST_AUTHOR, SVNPropertyValue.create(lastAuthor));
                    } else {
                        myEditor.changeFileProperty(editPath,SVNProperty.LAST_AUTHOR, SVNPropertyValue.create(lastAuthor));
                    }
                }

                String uuid = myFSFS.getUUID();
                if (isDir) {
                    myEditor.changeDirProperty(SVNProperty.UUID, SVNPropertyValue.create(uuid));
                } else {
                    myEditor.changeFileProperty(editPath, SVNProperty.UUID, SVNPropertyValue.create(uuid));
                }
            }
        }
       
        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(myFSFS);
        } else {
            sourceProps = new SVNProperties();
        }

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

            boolean recursive, ISVNTreeHandler handler) throws SVNException {
        FSFS fsfs = open(repositoryRoot, revision);
        long revNum = SVNAdminHelper.getRevisionNumber(revision, fsfs.getYoungestRevision(), fsfs);
        FSRoot root = fsfs.createRevisionRoot(revNum);
        path = path == null ? "/" : path;
        FSRevisionNode node = root.getRevisionNode(path);
        FSID id = includeIDs ? node.getId() : null;
        SVNNodeKind kind = root.checkNodeKind(path);
        getTree(fsfs, root, path, kind, id, includeIDs, 0, recursive, handler);
    }
View Full Code Here

            boolean recursive, ISVNTreeHandler handler) throws SVNException {
        FSFS fsfs = open(repositoryRoot, transactionName);
        FSTransactionInfo txn = fsfs.openTxn(transactionName);
        FSRoot root = fsfs.createTransactionRoot(txn);
        path = path == null ? "/" : path;
        FSRevisionNode node = root.getRevisionNode(path);
        FSID id = includeIDs ? node.getId() : null;
        SVNNodeKind kind = root.checkNodeKind(path);
        getTree(fsfs, root, path, kind, id, includeIDs, 0, recursive, handler);
    }
View Full Code Here

        if (kind != SVNNodeKind.DIR) {
            return;
        }
       
        if (recursive || depth == 0) {
            FSRevisionNode node = root.getRevisionNode(path);
            Map entries = node.getDirEntries(fsfs);
            for (Iterator names = entries.keySet().iterator(); names.hasNext();) {
                String name = (String) names.next();
                FSEntry entry = (FSEntry) entries.get(name);
                getTree(fsfs, root, SVNPathUtil.getAbsolutePath(SVNPathUtil.append(path, entry.getName())),
                        entry.getType(), includeIDs ? entry.getId() : null, includeIDs, depth + 1, recursive, handler);
View Full Code Here

            }
            root = fsfs.createTransactionRoot(txn);
        }

        verifyPath(root, path);
        FSRevisionNode node = root.getRevisionNode(path);
        return node.getProperties(fsfs);
    }
View Full Code Here

            }

            String id = null;
            if (includeIDs) {
                FSRevisionRoot revRoot = fsfs.createRevisionRoot(revision);
                FSRevisionNode node = revRoot.getRevisionNode(history.getHistoryEntry().getPath());
                id = node.getId().toString();
            }

            if (handler != null) {
                try {
                    handler.handlePath(new SVNAdminPath(history.getHistoryEntry().getPath(), id, revision));
View Full Code Here

        }   
        return result;
    }

    private void addDescendantMergeInfo(Map result, FSRevisionRoot root, String path) throws SVNException {
        FSRevisionNode node = root.getRevisionNode(path);
        if (node.hasDescendantsWithMergeInfo()) {
            crawlDirectoryForMergeInfo(root, path, node, result);
        }
    }
View Full Code Here

        FSFS fsfs = root.getOwner();
        Map entries = node.getDirEntries(fsfs);
        for (Iterator entriesIter = entries.values().iterator(); entriesIter.hasNext();) {
            FSEntry entry = (FSEntry) entriesIter.next();
            String kidPath = SVNPathUtil.getAbsolutePath(SVNPathUtil.append(path, entry.getName()));
            FSRevisionNode kidNode = root.getRevisionNode(kidPath);
            if (kidNode.hasMergeInfo()) {
                SVNProperties propList = kidNode.getProperties(fsfs);
                String mergeInfoString = propList.getStringValue(SVNProperty.MERGE_INFO);
                if (mergeInfoString == null) {
                    SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.FS_CORRUPT,
                            "Node-revision #''{0}'' claims to have mergeinfo but doesn''t", entry.getId());
                    SVNErrorManager.error(err, SVNLogType.FSFS);
                }
                Map kidMergeInfo = SVNMergeInfoUtil.parseMergeInfo(new StringBuffer(mergeInfoString), null);
                result.put(kidPath, kidMergeInfo);
            }
            if (kidNode.hasDescendantsWithMergeInfo()) {
                crawlDirectoryForMergeInfo(root, kidPath, kidNode, result);
            }
        }
        return result;
    }
View Full Code Here

        } else if (printedHeader) {
            generator.displayHeader(ISVNGNUDiffGenerator.NO_DIFF, path, null, -1, os);
        }
       
        if (node.myHasPropModifications && node.myAction != SVNChangeEntry.TYPE_DELETED) {
            FSRevisionNode localNode = root.getRevisionNode(path);
            SVNProperties props = localNode.getProperties(root.getOwner());
            SVNProperties baseProps = null;
            if (node.myAction != SVNChangeEntry.TYPE_ADDED) {
                FSRevisionNode baseNode = baseRoot.getRevisionNode(basePath);
                baseProps = baseNode.getProperties(baseRoot.getOwner());
            }
            SVNProperties propsDiff = FSRepositoryUtil.getPropsDiffs(baseProps, props);
            if (propsDiff.size() > 0) {
                String displayPath = path.startsWith("/") ? path.substring(1) : path;
                generator.displayPropDiff(displayPath, baseProps, propsDiff, os);
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.