Package org.tmatesoft.svn.core.internal.wc.admin

Examples of org.tmatesoft.svn.core.internal.wc.admin.SVNEntry


        }
        myCurrentFile.myPropertyDiff.put(name, value);
    }

    public void applyTextDelta(String path, String baseChecksum) throws SVNException {
        SVNEntry entry = myWCAccess.getEntry(myAdminInfo.getAnchor().getFile(myCurrentFile.myPath), false);
        if (entry != null && entry.isCopied()) {
            myCurrentFile.myIsAdded = false;
        }
        if (!myCurrentFile.myIsAdded) {
            SVNAdminArea dir = retrieve(myCurrentDirectory.myPath);
            String fileName = SVNPathUtil.tail(myCurrentFile.myPath);
View Full Code Here


    public void closeFile(String commitPath, String textChecksum) throws SVNException {
        String fileName = SVNPathUtil.tail(myCurrentFile.myPath);
       
        File filePath = myAdminInfo.getAnchor().getFile(myCurrentFile.myPath);
        SVNAdminArea dir = myWCAccess.probeRetrieve(filePath);
        SVNEntry entry = myWCAccess.getEntry(filePath, false);
        SVNProperties baseProperties = null;
        if (myCurrentFile.myIsAdded) {
            baseProperties = new SVNProperties();
        } else {
            baseProperties = dir != null ? dir.getBaseProperties(fileName).asMap() : new SVNProperties();
        }
        SVNProperties reposProperties = applyPropChanges(baseProperties, myCurrentFile.myPropertyDiff);
        String reposMimeType = reposProperties.getStringValue(SVNProperty.MIME_TYPE);
        File reposFile = myCurrentFile.myFile;
        File localFile = null;
        if (reposFile == null) {
            reposFile = dir.getBaseFile(fileName, false);
        }
        if (myCurrentFile.myIsAdded || (!myIsCompareToBase && entry.isScheduledForDeletion())) {
            if (myIsReverseDiff) {
                getDiffCallback().fileAdded(commitPath, null, reposFile, 0, myTargetRevision, null, reposMimeType, null,
                        myCurrentFile.myPropertyDiff, null);
            } else {
                getDiffCallback().fileDeleted(commitPath, reposFile, null, reposMimeType, null, reposProperties, null);
View Full Code Here

        if (myIsCompareToBase) {
            return;
        }
        SVNAdminArea dir = retrieve(info.myPath);
        boolean anchor = !"".equals(myAdminInfo.getTargetName()) && dir == myAdminInfo.getAnchor();
        SVNEntry thisDirEntry = dir.getEntry(dir.getThisDirName(), false);
        if (SVNWCAccess.matchesChangeList(myChangeLists, thisDirEntry) && !anchor &&
                !info.myComparedEntries.contains("")) {
            // generate prop diff for dir.
            if (dir.hasPropModifications(dir.getThisDirName())) {
                SVNVersionedProperties baseProps = dir.getBaseProperties(dir.getThisDirName());
                SVNProperties propDiff = baseProps.compareTo(dir.getProperties(dir.getThisDirName())).asMap();
                getDiffCallback().propertiesChanged(info.myPath, baseProps.asMap(), propDiff, null);
            }
        }
       
        if (info.myDepth == SVNDepth.EMPTY && !anchor) {
            return;
        }
       
        Set processedFiles = null;
        if (getDiffCallback().isDiffUnversioned()) {
            processedFiles = new SVNHashSet();
        }
        for (Iterator entries = dir.entries(false); entries.hasNext();) {
            SVNEntry entry = (SVNEntry) entries.next();
           
            if (processedFiles != null && !dir.getThisDirName().equals(entry.getName())) {
                processedFiles.add(entry.getName());
            }
            if (anchor && !myAdminInfo.getTargetName().equals(entry.getName())) {
                continue;
            }
            if (dir.getThisDirName().equals(entry.getName())) {
                continue;
            }
            if (info.myComparedEntries.contains(entry.getName())) {
                continue;
            }
            info.myComparedEntries.add(entry.getName());
            if (entry.isFile()) {
                reportModifiedFile(info, entry);
            } else if (entry.isDirectory()) {
                if (anchor || info.myDepth.compareTo(SVNDepth.FILES) > 0 ||
                    info.myDepth == SVNDepth.UNKNOWN) {
                    SVNDepth depthBelowHere = info.myDepth;
                    if (depthBelowHere == SVNDepth.IMMEDIATES) {
                        depthBelowHere = SVNDepth.EMPTY;
                    }
                    SVNDirectoryInfo childInfo = createDirInfo(info,
                                                               SVNPathUtil.append(info.myPath, entry.getName()),
                                                               false,
                                                               depthBelowHere);
                    localDirectoryDiff(childInfo);
                }
            }
View Full Code Here

    public SVNExtendedMergeEditor(SVNExtendedMergeDriver mergeDriver, ISVNExtendedMergeCallback mergeCallback, SVNAdminArea adminArea, File target, AbstractDiffCallback callback,
                                  SVNURL sourceURL, SVNRepository repos, long revision1, long revision2, boolean dryRun, SVNDepth depth, ISVNEventHandler handler,
                                  ISVNEventHandler cancelHandler) throws SVNException {
        super(adminArea, target, callback, repos, revision1, revision2, dryRun, handler, cancelHandler);

        SVNEntry rootEntry = adminArea.getEntry(adminArea.getThisDirName(), false);
        String url = rootEntry.getURL();
        myWCAccess = adminArea.getWCAccess();
        myDepth = depth;
        myTargetURL = SVNURL.parseURIEncoded(url);
        myMergeCallback = mergeCallback;
        myMergeDriver = mergeDriver;
View Full Code Here

        entry = myWCAccess.getEntry(path, true);
        if (entry != null) {
            return true;
        }
        File parentPath = path.getParentFile();
        SVNEntry parentEntry = myWCAccess.getEntry(parentPath, true);
        if (parentEntry != null) {
            SVNDepth parentDepth = parentEntry.getDepth();
            return checkEntryDepth(parentDepth, kind);
        }
        return walkToTarget(parentPath);
    }
View Full Code Here

    private boolean walkToTarget(File path) throws SVNException {
        if (myTarget.equals(path)) {
            return true;
        }
        File parentPath = path.getParentFile();
        SVNEntry parentEntry = myWCAccess.getEntry(parentPath, true);
        if (parentEntry != null) {
            SVNDepth parentDepth = parentEntry.getDepth();
            return checkEntryDepth(parentDepth, SVNNodeKind.DIR);
        }
        return walkToTarget(parentPath);
    }
View Full Code Here

        String path = getPath(file);
        SVNStatusType type = SVNStatusType.INAPPLICABLE;
        SVNEventAction action = SVNEventAction.SKIP;
        SVNEventAction expectedAction = SVNEventAction.UPDATE_DELETE;

        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

                if (depthAllows) {
                    deletePath(deleteTarget);
                }
            }

            SVNEntry targetEntry = myWCAccess.getEntry(target, true);
            boolean targetExists = targetEntry != null && !targetEntry.isScheduledForDeletion();
            boolean applyDelta;

            if (targetExists) {
                getMergeDriver().addMergeSource(path, mergeSources, target, remainingRanges, mergeInfoConflicts, copySource);
                applyDelta = false;
View Full Code Here

        try {
            SVNAdminAreaInfo info = wcAccess.openAnchor(path2, false, SVNDepth.recurseFromDepth(depth) ? SVNWCAccess.INFINITE_DEPTH : 0);
            File anchorPath = info.getAnchor().getRoot();
            String target = "".equals(info.getTargetName()) ? null : info.getTargetName();
           
            SVNEntry anchorEntry = info.getAnchor().getVersionedEntry("", false);
            if (anchorEntry.getURL() == null) {
                SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.ENTRY_MISSING_URL, "''{0}'' has no URL", anchorPath);
                SVNErrorManager.error(err, SVNLogType.WC);
            }
            SVNURL anchorURL = anchorEntry.getSVNURL();
            if (pegRevision.isValid()) {
                SVNRepositoryLocation[] locations = getLocations(url1, null, null, pegRevision, revision1, SVNRevision.UNDEFINED);
                url1 = locations[0].getURL();
                String anchorPath2 = SVNPathUtil.append(anchorURL.toString(), target == null ? "" : target);
                getDiffGenerator().init(url1.toString(), anchorPath2);
View Full Code Here

            int admDepth = getAdminDepth(depth);
            SVNAdminAreaInfo info = wcAccess.openAnchor(path2, false, admDepth);
            File anchorPath = info.getAnchor().getRoot();
            String target = "".equals(info.getTargetName()) ? null : info.getTargetName();
           
            SVNEntry anchorEntry = info.getAnchor().getVersionedEntry("", false);
            if (anchorEntry.getURL() == null) {
                SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.ENTRY_MISSING_URL, "''{0}'' has no URL", anchorPath);
                SVNErrorManager.error(err, SVNLogType.WC);
            }
            SVNURL url1;
            SVNURL anchorURL = anchorEntry.getSVNURL();
            if (pegRevision.isValid()) {
                SVNRepositoryLocation[] locations = getLocations(null, path1, null, pegRevision, revision1, SVNRevision.UNDEFINED);
                url1 = locations[0].getURL();
                String anchorPath2 = SVNPathUtil.append(anchorURL.toString(), target == null ? "" : target);
                if (!reverse) {
View Full Code Here

TOP

Related Classes of org.tmatesoft.svn.core.internal.wc.admin.SVNEntry

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.