Examples of SVNTreeConflictDescription


Examples of org.tmatesoft.svn.core.wc.SVNTreeConflictDescription

        if (inSkippedTree(fullPath) && !inDeletedTree(fullPath, true)) {
            myCurrentDirectory.isSkipped = true;
            return;
        }

        SVNTreeConflictDescription treeConflict;
        File victim = alreadyInTreeConflict(fullPath);
        if (victim != null) {
            treeConflict = null;
        } else {
            SVNURL theirURL = SVNURL.parseURIEncoded(myCurrentDirectory.URL);
            treeConflict = checkTreeConflict(fullPath, entry, parentInfo.getAdminArea(), parentInfo.getLog(), SVNConflictAction.EDIT, SVNNodeKind.DIR, theirURL);
        }

        if (treeConflict != null && treeConflict.getConflictReason() == SVNConflictReason.DELETED && !inDeletedTree(fullPath, true)) {
            addDeletedTree(fullPath);
        }

        boolean hasPropConflicts = adminArea.hasPropConflict(adminArea.getThisDirName());

        if (victim != null || treeConflict != null || hasPropConflicts) {
            if (!inDeletedTree(fullPath, true)) {
                myCurrentDirectory.isSkipped = true;
            }
            addSkippedTree(fullPath);

            if (!inDeletedTree(fullPath, false)) {
                SVNEventAction eventAction = hasPropConflicts ? SVNEventAction.SKIP : SVNEventAction.TREE_CONFLICT;
                SVNStatusType propStatus = hasPropConflicts ? SVNStatusType.CONFLICTED : null;
                SVNEvent event = SVNEventFactory.createSVNEvent(fullPath, SVNNodeKind.DIR, null, myTargetRevision, null, propStatus, null, eventAction, SVNEventAction.UPDATE_UPDATE, null, null);
                event.setPreviousRevision(myCurrentDirectory.myPreviousRevision);
                if (myCurrentDirectory.URL != null) {
                    event.setURL(SVNURL.parseURIEncoded(myCurrentDirectory.URL));
                }
                if (entry != null) {
                    event.setPreviousURL(entry.getSVNURL());
                }
                myWCAccess.handleEvent(event);
            }

            if (hasPropConflicts || (treeConflict != null && treeConflict.getConflictReason() != SVNConflictReason.DELETED)) {
                return;
            }
        }

        Map attributes = new SVNHashMap();
View Full Code Here

Examples of org.tmatesoft.svn.core.wc.SVNTreeConflictDescription

            if ((entry.isScheduledForAddition() || entry.isScheduledForReplacement()) && !entry.isCopied()) {
                info.isAddExisted = true;
            } else {
                SVNLog log = parent.getLog();
                SVNURL theirURL = SVNURL.parseURIEncoded(info.URL);
                SVNTreeConflictDescription treeConflict = checkTreeConflict(fullPath, entry, adminArea, log, SVNConflictAction.ADD, SVNNodeKind.FILE, theirURL);
                if (treeConflict != null) {
                    addSkippedTree(fullPath);
                    info.isSkipped = true;
                    SVNEvent event = SVNEventFactory.createSVNEvent(fullPath, SVNNodeKind.FILE, null, myTargetRevision, SVNEventAction.TREE_CONFLICT, SVNEventAction.UPDATE_ADD, null, null);
                    event.setPreviousRevision(entry.getRevision());
View Full Code Here

Examples of org.tmatesoft.svn.core.wc.SVNTreeConflictDescription

        if (inSkippedTree(fullPath) && !isLocallyDeleted) {
            info.isSkipped = true;
            return info;
        }
        File victim = alreadyInTreeConflict(fullPath);
        SVNTreeConflictDescription treeConflict = null;
        if (victim == null) {
            SVNLog log = parent.getLog();
            SVNURL theirURL = SVNURL.parseURIEncoded(info.URL);
            treeConflict = checkTreeConflict(fullPath, entry, adminArea, log, SVNConflictAction.EDIT, SVNNodeKind.FILE, theirURL);
        }
        String name = SVNPathUtil.tail(path);
        boolean hasTextConflicts = adminArea.hasTextConflict(name);
        boolean hasPropConflicts = adminArea.hasPropConflict(name);
        if (treeConflict != null && treeConflict.getConflictReason() == SVNConflictReason.DELETED && !isLocallyDeleted) {
            addDeletedTree(fullPath);
            isLocallyDeleted = true;
        }
        info.isDeleted = isLocallyDeleted;
        if (victim != null || treeConflict != null || hasTextConflicts || hasPropConflicts) {
View Full Code Here

Examples of org.tmatesoft.svn.core.wc.SVNTreeConflictDescription

            try {
                entry = baseAccess.getVersionedEntry(targetFile, false);
            } catch (SVNException e) {
                if (e.getErrorMessage() != null &&
                        e.getErrorMessage().getErrorCode() == SVNErrorCode.ENTRY_NOT_FOUND) {
                    SVNTreeConflictDescription tc = baseAccess.getTreeConflict(targetFile);
                    if (tc != null) {
                        SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.WC_FOUND_CONFLICT, "Aborting commit: ''{0}'' remains in conflict", targetFile);
                        SVNErrorManager.error(err, SVNLogType.WC);
                    }                   
                }
View Full Code Here

Examples of org.tmatesoft.svn.core.wc.SVNTreeConflictDescription

            propConflicts = dir.hasPropConflict(entry.getName());

            Map tcs = entry.getTreeConflicts();
            for (Iterator keys = tcs.keySet().iterator(); keys.hasNext();) {
                File entryPath = (File) keys.next();
                SVNTreeConflictDescription tc = (SVNTreeConflictDescription) tcs.get(entryPath);
                if (tc.getNodeKind() == SVNNodeKind.DIR && depth == SVNDepth.FILES) {
                    continue;
                }
                SVNEntry conflictingEntry = null;
                if (tc.getNodeKind() == SVNNodeKind.DIR) {
                    // get dir admin area and root entry
                    SVNAdminArea childConflictingDir = dir.getWCAccess().getAdminArea(entryPath);
                    if (childConflictingDir != null) {
                        conflictingEntry = childConflictingDir.getEntry("", true);
                    }
View Full Code Here

Examples of org.tmatesoft.svn.core.wc.SVNTreeConflictDescription

            }
            if (e != null) {
                throw e;
            }
        }
        SVNTreeConflictDescription treeConflict = parentArea.getTreeConflict(path.getName());
        if (closeParentArea) {
            closeAdminArea(parent);
        }
        return treeConflict;
    }
View Full Code Here

Examples of org.tmatesoft.svn.core.wc.SVNTreeConflictDescription

        }
        return treeConflict;
    }

    public boolean hasTreeConflict(File path) throws SVNException {
        SVNTreeConflictDescription treeConflict = getTreeConflict(path);
        return treeConflict != null;
    }
View Full Code Here

Examples of org.tmatesoft.svn.core.wc.SVNTreeConflictDescription

            handler = new TCEntryHandler(path, this, handler, depth);
        }
        SVNEntry entry = getEntry(path, showHidden);
        if (entry == null) {
            if (includeTC) {
                SVNTreeConflictDescription tc = getTreeConflict(path);
                if (tc != null) {
                    handler.handleEntry(path, null);
                    return;
                }
            }
View Full Code Here

Examples of org.tmatesoft.svn.core.wc.SVNTreeConflictDescription

                return;
            }
            Map tcs = entry.getTreeConflicts();
            for(Iterator paths = tcs.keySet().iterator(); paths.hasNext();) {
                File p = (File) paths.next();
                SVNTreeConflictDescription tc = (SVNTreeConflictDescription) tcs.get(p);
                if (tc.getNodeKind() == SVNNodeKind.DIR && myDepth == SVNDepth.FILES) {
                    continue;
                }
                SVNEntry conflictEntry = myWCAccess.getEntry(p, true);
                if (conflictEntry == null || conflictEntry.isDeleted()) {
                    myDelegate.handleEntry(p, null);
View Full Code Here

Examples of org.tmatesoft.svn.core.wc.SVNTreeConflictDescription

            }
        }

        public void handleError(File path, SVNErrorMessage error) throws SVNException {
            if (error != null && error.getErrorCode() == SVNErrorCode.UNVERSIONED_RESOURCE) {
                SVNTreeConflictDescription tc = myWCAccess.getTreeConflict(path);
                if (tc != null) {
                    myDelegate.handleEntry(path, null);
                    return;
                }
            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.