Examples of SVNTreeConflictDescription


Examples of org.exist.versioning.svn.wc.SVNTreeConflictDescription

        Map conflicts = dirEntry.getTreeConflicts();
        return (SVNTreeConflictDescription) conflicts.get(getFile(victimName));
    }

    public void addTreeConflict(SVNTreeConflictDescription conflict) throws SVNException {
        SVNTreeConflictDescription existingDescription = getTreeConflict(conflict.getPath().getName());
        if (existingDescription != null) {
            SVNErrorMessage error = SVNErrorMessage.create(SVNErrorCode.WC_CORRUPT, "Attempt to add tree conflict that already exists at ''{0}''",
                    conflict.getPath());
            SVNErrorManager.error(error, SVNLogType.WC);
        }
View Full Code Here

Examples of org.exist.versioning.svn.wc.SVNTreeConflictDescription

    public SVNTreeConflictDescription deleteTreeConflict(String victimName) throws SVNException {
        SVNEntry dirEntry = getEntry(getThisDirName(), false);
        Map conflicts = dirEntry.getTreeConflicts();
        File victimPath = getFile(victimName);
        if (conflicts.containsKey(victimPath)) {
            SVNTreeConflictDescription conflict = (SVNTreeConflictDescription) conflicts.remove(victimPath);
            String conflictData = SVNTreeConflictUtil.getTreeConflictData(conflicts);
            Map attributes = new SVNHashMap();
            attributes.put(SVNProperty.TREE_CONFLICT_DATA, conflictData);
            modifyEntry(getThisDirName(), attributes, true, false);
            return conflict;
View Full Code Here

Examples of org.exist.versioning.svn.wc.SVNTreeConflictDescription

            SVNConflictReason reason) throws SVNException {
        if (myIsRecordOnly || myIsDryRun) {
            return;
        }
       
        SVNTreeConflictDescription conflict = makeTreeConflict(victim, kind, action, reason);
        adminArea.addTreeConflict(conflict);
    }
View Full Code Here

Examples of org.exist.versioning.svn.wc.SVNTreeConflictDescription

            SVNConflictReason reason) throws SVNException {
        if (myIsRecordOnly || myIsDryRun) {
            return;
        }
       
        SVNTreeConflictDescription conflict = makeTreeConflict(victim, kind, action, reason);
        SVNTreeConflictDescription existingConflict = myWCAccess.getTreeConflict(conflict.getPath());
       
        if (existingConflict != null && existingConflict.getConflictAction() == SVNConflictAction.DELETE && conflict.getConflictAction() == SVNConflictAction.ADD) {
            adminArea.deleteTreeConflict(conflict.getPath().getName());
            conflict = new SVNTreeConflictDescription(conflict.getPath(), conflict.getNodeKind(), SVNConflictAction.DELETE, existingConflict.getConflictReason(),
                    conflict.getOperation(), existingConflict.getSourceLeftVersion(), conflict.getSourceRightVersion());
        }
        adminArea.addTreeConflict(conflict);
    }
View Full Code Here

Examples of org.exist.versioning.svn.wc.SVNTreeConflictDescription

       
        SVNConflictVersion leftConflictVersion = new SVNConflictVersion(srcReposRoot, SVNURLUtil.getRelativeURL(srcReposRoot, leftURL),
                myCurrentMergeSource.myRevision1, kind);
        SVNConflictVersion rightConflictVersion = new SVNConflictVersion(srcReposRoot, SVNURLUtil.getRelativeURL(srcReposRoot, rightURL),
                myCurrentMergeSource.myRevision2, kind);
        SVNTreeConflictDescription conflictDescription  = new SVNTreeConflictDescription(victim, kind, action, reason, SVNOperation.MERGE,
                leftConflictVersion, rightConflictVersion);
        return conflictDescription;
       
    }
View Full Code Here

Examples of org.exist.versioning.svn.wc.SVNTreeConflictDescription

        } else if (SVNLog.ADD_TREE_CONFLICT.equals(name)) {
            File dirPath = adminArea.getRoot();
            String conflictData = attributes.getStringValue(SVNLog.DATA_ATTR);
            Map newConflicts = SVNTreeConflictUtil.readTreeConflicts(dirPath, conflictData);
            Object[] conflictArray = newConflicts.values().toArray();
            SVNTreeConflictDescription newConflict = (SVNTreeConflictDescription) conflictArray[0];
            if (!getTreeConflicts().containsKey(newConflict.getPath())) {
                getTreeConflicts().put(newConflict.getPath(), newConflict);
                setTreeConflictsAdded(true);
            }
        } else if (SVNLog.MERGE.equals(name)) {
            File target = adminArea.getFile(fileName);
            try {
View Full Code Here

Examples of org.exist.versioning.svn.wc.SVNTreeConflictDescription

            return;
        }

        SVNLog log = parent == null ? parentArea.getLog() : parent.getLog();
       
        SVNTreeConflictDescription treeConflict;
        if (kind == SVNNodeKind.DIR && myWCAccess.isMissing(fullPath)
                && (entry.isScheduledForDeletion() || entry.isScheduledForReplacement())) {           
            treeConflict = null;
        } else {
            treeConflict = checkTreeConflict(fullPath, entry, parentArea, log, SVNConflictAction.DELETE, SVNNodeKind.NONE, theirURL);
        }
       
        if (treeConflict != null) {
            addSkippedTree(fullPath);
           
            SVNEvent event = SVNEventFactory.createSVNEvent(fullPath, entry.getKind(), null, myTargetRevision, SVNEventAction.TREE_CONFLICT, SVNEventAction.UPDATE_DELETE, null, null);
            event.setPreviousRevision(entry.getRevision());
            event.setPreviousURL(entry.getSVNURL());
            myWCAccess.handleEvent(event);
           
            if (treeConflict.getConflictReason() == SVNConflictReason.EDITED) {
                if (parent != null) {
                    parent.flushLog();
                    parent.runLogs();
                } else {
                    if (log != null) {
                        log.save();
                        parentArea.runLogs();
                    }
                }
                scheduleExistingEntryForReAdd(entry, fullPath, theirURL, true);
                return;
            } else if (treeConflict.getConflictReason() == SVNConflictReason.DELETED) {
//          The item does not exist locally (except perhaps as a skeleton
//          directory tree) because it was already scheduled for delete.
//          We must complete the deletion, leaving the tree conflict info
//          as the only difference from a normal deletion.
//
View Full Code Here

Examples of org.exist.versioning.svn.wc.SVNTreeConflictDescription

        } finally {
            access.close();
        }
        for (int i = ancestors.size() - 1; i >= 0; i--) {
            ancestor = (File) ancestors.get(i);
            SVNTreeConflictDescription treeConflict = access.getTreeConflict(ancestor);
            if (treeConflict != null) {
                return ancestor;
            }
        }
        return null;
View Full Code Here

Examples of org.exist.versioning.svn.wc.SVNTreeConflictDescription

                    SVNURL switchURL = SVNURL.parseURIEncoded(mySwitchURL);
                    repoPath = SVNPathUtil.getPathAsChild(repoRoot.getPath(), switchURL.getPath());
                }
            }
            SVNConflictVersion srcRightVersion = new SVNConflictVersion(repoRoot, repoPath, myTargetRevision, theirKind);
            SVNTreeConflictDescription treeConflict = new SVNTreeConflictDescription(path, entry.getKind(), action, reason,
                    mySwitchURL != null ? SVNOperation.SWITCH : SVNOperation.UPDATE, srcLeftVersion, srcRightVersion);

            Map conflicts = new SVNHashMap();
            conflicts.put(treeConflict.getPath(), treeConflict);
            String conflictData = SVNTreeConflictUtil.getTreeConflictData(conflicts);
            SVNProperties command = new SVNProperties();
            command.put(SVNLog.NAME_ATTR, parentArea.getThisDirName());
            command.put(SVNLog.DATA_ATTR, conflictData);
            log.addCommand(SVNLog.ADD_TREE_CONFLICT, command, false);
View Full Code Here

Examples of org.exist.versioning.svn.wc.SVNTreeConflictDescription

                    if (entry != null && (entry.isScheduledForAddition() || entry.isScheduledForReplacement()) && !entry.isCopied()) {
                        myCurrentDirectory.isAddExisted = true;
                    } else {
                        SVNURL theirURL = SVNURL.parseURIEncoded(myCurrentDirectory.URL);
                        SVNTreeConflictDescription treeConflict = checkTreeConflict(fullPath, entry, parentArea, parentDirectory.getLog(), SVNConflictAction.ADD, SVNNodeKind.DIR, theirURL);

                        try {
                            parentDirectory.flushLog();
                        } catch (SVNException svne) {
                            SVNErrorMessage err = svne.getErrorMessage().wrap("Error writing log file for ''{0}''", parentDirectory.getPath());
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.