Examples of SVNTreeConflictDescription


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

        SVNConflictAction action = getAction(skel.getChild(4).getValue());
        SVNConflictReason reason = getConflictReason(skel.getChild(5).getValue());
        SVNConflictVersion srcLeftVersion = readConflictVersion(skel.getChild(6));
        SVNConflictVersion srcRightVersion = readConflictVersion(skel.getChild(7));

        return new SVNTreeConflictDescription(new File(dirPath, victimBasename), kind, action, reason, operation, srcLeftVersion, srcRightVersion);
    }
View Full Code Here

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

            return null;
        }
        SVNConflictVersion nullVersion = new SVNConflictVersion(null, null, SVNRepository.INVALID_REVISION, SVNNodeKind.UNKNOWN);
        SVNSkel skel = SVNSkel.createEmptyList();
        for (Iterator iterator = conflicts.values().iterator(); iterator.hasNext();) {
            SVNTreeConflictDescription conflict = (SVNTreeConflictDescription) iterator.next();
            SVNSkel conflictSkel = SVNSkel.createEmptyList();

            SVNConflictVersion sourceRightVersion = conflict.getSourceRightVersion();
            sourceRightVersion = sourceRightVersion == null ? nullVersion : sourceRightVersion;
            prependVersionInfo(conflictSkel, sourceRightVersion);

            SVNConflictVersion sourceLeftVersion = conflict.getSourceLeftVersion();
            sourceLeftVersion = sourceLeftVersion == null ? nullVersion : sourceLeftVersion;
            prependVersionInfo(conflictSkel, sourceLeftVersion);

            conflictSkel.addChild(SVNSkel.createAtom(conflict.getConflictReason().toString()));
            conflictSkel.addChild(SVNSkel.createAtom(conflict.getConflictAction().toString()));
            conflictSkel.addChild(SVNSkel.createAtom(conflict.getOperation().toString()));

            if (conflict.getNodeKind() != SVNNodeKind.DIR && conflict.getNodeKind() != SVNNodeKind.FILE) {
                SVNErrorMessage error = SVNErrorMessage.create(SVNErrorCode.WC_CORRUPT,
                        "Invalid \'node_kind\' field in tree conflict description");
                SVNErrorManager.error(error, SVNLogType.WC);
            }
            conflictSkel.addChild(SVNSkel.createAtom(getNodeKindString(conflict.getNodeKind())));

            String path = conflict.getPath().getName();
            if (path.length() == 0) {
                SVNErrorMessage error = SVNErrorMessage.create(SVNErrorCode.WC_CORRUPT,
                        "Empty path basename in tree conflict description");
                SVNErrorManager.error(error, SVNLogType.WC);
            }
View Full Code Here

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

                SVNFileType fileType = SVNFileType.getType(file);
                boolean special = fileType == SVNFileType.SYMLINK;
                SVNNodeKind fileKind = SVNFileType.getNodeKind(fileType);
                sendUnversionedStatus(file, entryName, fileKind, special, dir, ignorePatterns, noIgnore, handler);
            } else {
                SVNTreeConflictDescription treeConflict = myWCAccess.getTreeConflict(dir.getFile(entryName));
                if (treeConflict != null) {
                    if (ignorePatterns == null) {
                        ignorePatterns = getIgnorePatterns(dir, myGlobalIgnores);
                    }
                    sendUnversionedStatus(dir.getFile(entryName), entryName, SVNNodeKind.NONE, false, dir, ignorePatterns, true, handler);
View Full Code Here

Examples of org.tmatesoft.svn.core.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");
            SVNErrorManager.error(error, SVNLogType.WC);
        }
        Map conflicts = new SVNHashMap();
View Full Code Here

Examples of org.tmatesoft.svn.core.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.tmatesoft.svn.core.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.tmatesoft.svn.core.wc.SVNTreeConflictDescription

            myWCAccess.handleEvent(event);
            return;
        }

        SVNLog log = parent == null ? parentArea.getLog() : parent.getLog();
        SVNTreeConflictDescription 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);
                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.tmatesoft.svn.core.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.tmatesoft.svn.core.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.tmatesoft.svn.core.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.