Examples of SVNLocationEntry


Examples of org.tmatesoft.svn.core.io.SVNLocationEntry

     * @since                1.2, SVN 1.5
     */
    public Collection doSuggestMergeSources(File path, SVNRevision pegRevision) throws SVNException {
        LinkedList suggestions = new LinkedList();
        SVNURL reposRoot = getReposRoot(path, null, pegRevision, null, null);
        SVNLocationEntry copyFromInfo = getCopySource(path, null, pegRevision);
        String copyFromPath = copyFromInfo.getPath();
        SVNURL copyFromURL = null;
        if (copyFromPath != null) {
            String relCopyFromPath = copyFromPath.startsWith("/") ? copyFromPath.substring(1) : copyFromPath;
            copyFromURL = reposRoot.appendPath(relCopyFromPath, false);
            suggestions.add(copyFromURL);
View Full Code Here

Examples of org.tmatesoft.svn.core.io.SVNLocationEntry

     * @since                1.2, SVN 1.5
     */
    public Collection doSuggestMergeSources(SVNURL url, SVNRevision pegRevision) throws SVNException {
        LinkedList suggestions = new LinkedList();
        SVNURL reposRoot = getReposRoot(null, url, pegRevision, null, null);
        SVNLocationEntry copyFromInfo = getCopySource(null, url, pegRevision);
        String copyFromPath = copyFromInfo.getPath();

        SVNURL copyFromURL = null;
        if (copyFromPath != null) {
            String relCopyFromPath = copyFromPath.startsWith("/") ? copyFromPath.substring(1) : copyFromPath;
            copyFromURL = reposRoot.appendPath(relCopyFromPath, false);
View Full Code Here

Examples of org.tmatesoft.svn.core.io.SVNLocationEntry

                    if (handler != null) {
                        long revision = SVNReader.getLong(values, 0);
                        String locationPath = SVNReader.getString(values, 1);
                        if (locationPath != null) {
                            locationPath = ensureAbsolutePath(locationPath);
                            handler.handleLocationEntry(new SVNLocationEntry(revision, locationPath));
                        }
                    }
                }
            }
View Full Code Here

Examples of org.tmatesoft.svn.core.io.SVNLocationEntry

                myCurrentNode.myChildren.add(node);
            }
        }

        node.myAction = SVNChangeEntry.TYPE_DELETED;
        SVNLocationEntry baseLocation = findRealBaseLocation(node);
        FSRoot baseRoot = null;
        if (!SVNRevision.isValidRevisionNumber(baseLocation.getRevision())) {
            baseRoot = myBaseRoot;
        } else {
            baseRoot = myFSFS.createRevisionRoot(baseLocation.getRevision());
        }
       
        SVNNodeKind kind = baseRoot.checkNodeKind(baseLocation.getPath());
        if (kind == SVNNodeKind.NONE) {
            SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.FS_NOT_FOUND, "''{0}'' not found in filesystem", path);
            SVNErrorManager.error(err, SVNLogType.FSFS);
        }
       
View Full Code Here

Examples of org.tmatesoft.svn.core.io.SVNLocationEntry

        }
    }
   
    private SVNLocationEntry findRealBaseLocation(Node node) throws SVNException {
        if (node.myAction == SVNChangeEntry.TYPE_ADDED && node.myCopyFromPath != null && SVNRevision.isValidRevisionNumber(node.myCopyFromRevision)) {
            return new SVNLocationEntry(node.myCopyFromRevision, node.myCopyFromPath);
        }
       
        if (node.myParent != null) {
            SVNLocationEntry location = findRealBaseLocation(node.myParent);
            return new SVNLocationEntry(location.getRevision(), SVNPathUtil.getAbsolutePath(SVNPathUtil.append(location.getPath(), node.myName)));
        }

        return new SVNLocationEntry(-1, "/");
    }
View Full Code Here

Examples of org.tmatesoft.svn.core.io.SVNLocationEntry

    }

    protected SVNLocationEntry getCopySource(File path, SVNURL url, SVNRevision revision) throws SVNException {
        long[] pegRev = { SVNRepository.INVALID_REVISION };
        SVNRepository repos = createRepository(url, path, null, revision, revision, pegRev);
        SVNLocationEntry copyFromEntry = null;
        String targetPath = getPathRelativeToRoot(path, url, null, null, repos);
        CopyFromReceiver receiver = new CopyFromReceiver(targetPath);
            try {
                repos.log(new String[] { "" }, pegRev[0], 1, true, true, 0, false, new String[0], receiver);
                copyFromEntry = receiver.getCopyFromLocation();
            } catch (SVNException e) {
                SVNErrorCode errCode = e.getErrorMessage().getErrorCode();
                if (errCode == SVNErrorCode.FS_NOT_FOUND || errCode == SVNErrorCode.RA_DAV_REQUEST_FAILED) {
                    return new SVNLocationEntry(SVNRepository.INVALID_REVISION, null);
                }
                throw e;
            }

        return copyFromEntry == null ? new SVNLocationEntry(SVNRepository.INVALID_REVISION, null)
                                     : copyFromEntry;
    }
View Full Code Here

Examples of org.tmatesoft.svn.core.io.SVNLocationEntry

           
            boolean sameRepos = sourceReposRoot.equals(wcReposRoot);
            String youngestCommonPath = null;
            long youngestCommonRevision = SVNRepository.INVALID_REVISION;
            if (!ignoreAncestry) {
              SVNLocationEntry youngestLocation = getYoungestCommonAncestor(null, url1, rev1, null, url2,
                  rev2);
              youngestCommonPath = youngestLocation.getPath();
              youngestCommonRevision = youngestLocation.getRevision();
            }

            boolean related = false;
            boolean ancestral = false;
            List mergeSources = null;
View Full Code Here

Examples of org.tmatesoft.svn.core.io.SVNLocationEntry

                SVNURL[] url1 = { null };
               
                Map unmergedToSourceMergeInfoCatalog = calculateLeftHandSide(url1, rev1, targetReposRelPath,
                        handler.getSubTreesWithMergeInfoPaths(), rev1[0], sourceReposRelPath, sourceReposRoot, rev2, repository);
               
                SVNLocationEntry youngestCommonAncestor = getYoungestCommonAncestor(null, url2, rev2, null, url1[0],
                        rev1[0]);
               
                String youngestAncestorPath = youngestCommonAncestor.getPath();
                long youngestAncestorRevision = youngestCommonAncestor.getRevision();
                if (!(youngestAncestorPath != null && SVNRevision.isValidRevisionNumber(youngestAncestorRevision))) {
                    SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.CLIENT_NOT_READY_TO_MERGE,
                            "''{0}@{1}'' must be ancestrally related to ''{2}@{3}''",
                            new Object[] { url1[0], new Long(rev1[0]), url2, new Long(rev2)});
                    SVNErrorManager.error(err, SVNLogType.WC);
View Full Code Here

Examples of org.tmatesoft.svn.core.io.SVNLocationEntry

        if (neverSynched[0]) {
            SVNURL sourceURL = sourceReposRoot.appendPath(sourceReposRelPath.startsWith("/") ?
                    sourceReposRelPath.substring(1) : sourceReposRelPath, false);
            SVNURL targetURL = sourceReposRoot.appendPath(targetReposRelPath.startsWith("/") ?
                    targetReposRelPath.substring(1) : targetReposRelPath, false);
            SVNLocationEntry youngestLocation = getYoungestCommonAncestor(null, sourceURL, sourceRev, null,
                    targetURL, targetRev);
            String youngestCommonAncestorPath = youngestLocation.getPath();
            leftRev[0] = youngestLocation.getRevision();
            if (!(youngestCommonAncestorPath != null && SVNRevision.isValidRevisionNumber(leftRev[0]))) {
                SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.CLIENT_NOT_READY_TO_MERGE,
                        "''{0}@{1}'' must be ancestrally related to ''{2}@{3}''",
                        new Object[] { sourceURL, new Long(sourceRev), targetURL, new Long(targetRev) });
                SVNErrorManager.error(err, SVNLogType.DEFAULT);
View Full Code Here

Examples of org.tmatesoft.svn.core.io.SVNLocationEntry

            trimRevision = segment.getStartRevision();
        } else if (segment.getPath() == null) {
            if (segments.size() > 1) {
                SVNLocationSegment segment2 = (SVNLocationSegment) segments.get(1);
                SVNURL segmentURL = sourceRootURL.appendPath(segment2.getPath(), false);
                SVNLocationEntry copyFromLocation = getCopySource(null, segmentURL,
                        SVNRevision.create(segment2.getStartRevision()));
                String copyFromPath = copyFromLocation.getPath();
                long copyFromRevision = copyFromLocation.getRevision();
                if (copyFromPath != null && SVNRevision.isValidRevisionNumber(copyFromRevision)) {
                    SVNLocationSegment newSegment = new SVNLocationSegment(copyFromRevision,
                            copyFromRevision, copyFromPath);
                    segment.setStartRevision(copyFromRevision + 1);
                    segments.addFirst(newSegment);
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.