Examples of SVNTreeConflictDescription


Examples of org.exist.versioning.svn.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.exist.versioning.svn.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.exist.versioning.svn.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.exist.versioning.svn.wc.SVNTreeConflictDescription

            SVNErrorMessage error = SVNErrorMessage.create(SVNErrorCode.WC_CORRUPT, "Error parsing tree conflict skel");
            SVNErrorManager.error(error, SVNLogType.WC);
        }
        for (Iterator iterator = skel.getList().iterator(); iterator.hasNext();) {
            SVNSkel conflictSkel = (SVNSkel) iterator.next();
            SVNTreeConflictDescription conflict = readSingleTreeConflict(conflictSkel, dirPath);
            if (conflict != null) {
                conflicts.put(conflict.getPath(), conflict);
            }
        }
        return conflicts;
    }
View Full Code Here

Examples of org.exist.versioning.svn.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 Resource(dirPath, victimBasename), kind, action, reason, operation, srcLeftVersion, srcRightVersion);
    }
View Full Code Here

Examples of org.exist.versioning.svn.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

        int reposKind = getNodeKind(status.getRemoteKind());
        if (status.getRemoteKind() == null) {
            reposKind = NodeKind.none;
        }
       
        SVNTreeConflictDescription tc = status.getTreeConflict();
        Status st = new Status(path, url, nodeKind, revision, lastChangedRevision, lastChangedDate, lastCommitAuthor, textStatus, propStatus,
                repositoryTextStatus, repositoryPropStatus, locked, copied, tc != null, createConflictDescription(tc), conflictOld, conflictNew, conflictWorking, urlCopiedFrom, revisionCopiedFrom,
                switched, false, lockToken, lockOwner, lockComment, lockCreationDate, reposLock,
                /* remote: rev, date, kind, author */
                reposRev, reposDate, reposKind, reposAuthor, status.getChangelistName());
View Full Code Here

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

        }
        ConflictVersion left = null;
        ConflictVersion right = null;
        int op = 0;
        if (conflictDescription.isTreeConflict()) {
          SVNTreeConflictDescription tc = (SVNTreeConflictDescription) conflictDescription;
          left = createConflictVersion(tc.getSourceLeftVersion());
          right = createConflictVersion(tc.getSourceRightVersion());
          op = getConflictOperation(tc.getOperation());
        }

        return new ConflictDescriptor(mergeFiles.getLocalPath(),
                getConflictKind(conflictDescription.isPropertyConflict()),
                getNodeKind(conflictDescription.getNodeKind()),
View Full Code Here

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

            SVNFileType fileType = SVNFileType.getType(file);
            fileKind = SVNFileType.getNodeKind(fileType);
            special = !SVNFileUtil.symlinksSupported() ? false : fileType == SVNFileType.SYMLINK;
        }
       
        SVNTreeConflictDescription treeConflict = wcAccess.getTreeConflict(file);
        if (entry == null) {
            SVNStatus status = new SVNStatus(null, file, SVNNodeKind.UNKNOWN,
                    SVNRevision.UNDEFINED, SVNRevision.UNDEFINED, null, null, SVNStatusType.STATUS_NONE,
                    SVNStatusType.STATUS_NONE, SVNStatusType.STATUS_NONE, SVNStatusType.STATUS_NONE, false,
                    false, false, false, null, null, null, null, null, SVNRevision.UNDEFINED, repositoryLock, null,
View Full Code Here

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

            SVNErrorMessage error = SVNErrorMessage.create(SVNErrorCode.WC_CORRUPT, "Error parsing tree conflict skel");
            SVNErrorManager.error(error, SVNLogType.WC);
        }
        for (Iterator iterator = skel.getList().iterator(); iterator.hasNext();) {
            SVNSkel conflictSkel = (SVNSkel) iterator.next();
            SVNTreeConflictDescription conflict = readSingleTreeConflict(conflictSkel, dirPath);
            if (conflict != null) {
                conflicts.put(conflict.getPath(), conflict);
            }
        }
        return conflicts;
    }
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.