Examples of SVNLocationEntry


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

        long rev;
        if (srcEntry.getCopyFromURL() != null) {
            url = srcEntry.getCopyFromURL();
            rev = srcEntry.getCopyFromRevision();
        } else {
            SVNLocationEntry info = getCopyFromInfoFromParent(src, srcAccess);
            url = info.getPath();
            rev = info.getRevision();
        }
        if (dstEntry != null && rev == dstEntry.getRevision() && url.equals(dstEntry.getCopyFromURL())) {
            url = null;
            rev = -1;
        }
        return new SVNLocationEntry(rev, url);
    }
View Full Code Here

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

            } else {
                rest = SVNPathUtil.append(parent.getName(), rest);
                parent = parent.getParentFile();
            }
        }
        return new SVNLocationEntry(rev, url);
    }
View Full Code Here

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

            if (revStr != null) {
                String path = attrs.getValue("path");
                if (path != null && myLocationEntryHandler != null) {
                    path = "/" + path;
                    try {
                        myLocationEntryHandler.handleLocationEntry(new SVNLocationEntry(Long.parseLong(revStr), path));
                    } catch (NumberFormatException nfe) {
                        SVNErrorManager.error(SVNErrorMessage.create(SVNErrorCode.RA_DAV_MALFORMED_DATA, nfe), SVNLogType.NETWORK);
                    }
                    myCount++;
                }
View Full Code Here

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

            String path = paths[i];
            if (deletedMergeInfoCatalog.containsKey(path)) {
                continue;
            }
            long[] appearedRevision = new long[] {-1};
            SVNLocationEntry prevLocation = null;
            try {
                prevLocation = myFSFS.getPreviousLocation(path, revision, appearedRevision);               
            } catch (SVNException e) {
                if (e.getErrorMessage().getErrorCode() == SVNErrorCode.FS_NOT_FOUND) {
                    continue;
                }
                throw e;
            }
            String prevPath = null;
            long prevRevision = -1;
            if (!(prevLocation != null && prevLocation.getPath() != null && prevLocation.getRevision() >=0 && appearedRevision[0] == revision)) {
                prevPath = path;
                prevRevision = revision - 1;
            } else if (prevLocation != null) {
                prevPath = prevLocation.getPath();
                prevRevision = prevLocation.getRevision();
            }
           
            FSRevisionRoot prevRoot = myFSFS.createRevisionRoot(prevRevision);
            String[] queryPaths = new String[] {prevPath};
            Map catalog = null;
View Full Code Here

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

                    basePath = copyFromPath;
                    baseRevision = copyFromRev;
                }
            } else if (changeKind == FSPathChangeKind.FS_PATH_CHANGE_MODIFY) {
                long[] appearedRevision = new long[] {-1};
                SVNLocationEntry prevLocation = myFSFS.getPreviousLocation(changedPath, revision, appearedRevision);
                if (!(prevLocation != null &&
                        prevLocation.getPath() != null && prevLocation.getRevision() >= 0 && appearedRevision[0] == prevLocation.getRevision())) {
                    basePath = changedPath;
                    baseRevision = revision - 1;
                } else {
                    basePath = prevLocation.getPath();
                    baseRevision = prevLocation.getRevision();
                }
            } else {
                continue;
            }
           
View Full Code Here

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

        FSRevisionRoot root = null;
        while (count < revisions.length) {
            long[] appearedRevision = new long[1];
            root = myFSFS.createRevisionRoot(revision);
            SVNLocationEntry previousLocation = root.getPreviousLocation(path, appearedRevision);
            if (previousLocation == null) {
                break;
            }
            String previousPath = previousLocation.getPath();
            long previousRevision = previousLocation.getRevision();
            while ((count < revisions.length) && (locationRevs[count] >= appearedRevision[0])) {
                locationEntries.add(new SVNLocationEntry(locationRevs[count], path));
                ++count;
            }

            while ((count < revisions.length) && locationRevs[count] > previousRevision) {
                ++count;
            }
           
            path = previousPath;
            revision = previousRevision;
        }
       
        if (root != null && revision != root.getRevision()) {
            root = myFSFS.createRevisionRoot(revision);
        }
        FSRevisionNode curNode = root.getRevisionNode(path);

        while (count < revisions.length) {
            root = myFSFS.createRevisionRoot(locationRevs[count]);
            if (root.checkNodeKind(path) == SVNNodeKind.NONE) {
                break;
            }
            FSRevisionNode currentNode = root.getRevisionNode(path);
            if (!curNode.getId().isRelated(currentNode.getId())) {
                break;
            }
            locationEntries.add(new SVNLocationEntry(locationRevs[count], path));
            ++count;
        }
       
        for (count = 0; count < locationEntries.size(); count++) {
            if (handler != null) {
View Full Code Here

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

        while (currentRevision >= endRevision) {
            long segmentStartRevision = endRevision;
            long segmentEndRevision = currentRevision;
            String segmentPath = currentPath;
            FSRevisionRoot root = myFSFS.createRevisionRoot(currentRevision);
            SVNLocationEntry previousLocation = root.getPreviousLocation(currentPath, appearedRevision);
            if (previousLocation == null) {
                segmentStartRevision = root.getNodeOriginRevision(currentPath);
                if (segmentStartRevision < endRevision) {
                    segmentStartRevision = endRevision;
                }
                currentRevision = SVNRepository.INVALID_REVISION;
            } else {
                segmentStartRevision = appearedRevision[0];
                currentPath = previousLocation.getPath();
                currentRevision = previousLocation.getRevision();
            }
           
            count += maybeCropAndSendSegment(segmentStartRevision, segmentEndRevision, startRevision, endRevision,
                    segmentPath, handler);
        
View Full Code Here

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

        sb.myLastProps = new SVNProperties();
        int mainLinePos = mainLinePathRevisions.size() - 1;
        int mergedPos = mergedPathRevisions.size() - 1;
        int i = 0;
        while (mainLinePos >= 0 && mergedPos >= 0) {
            SVNLocationEntry mainPathRev = (SVNLocationEntry) mainLinePathRevisions.get(mainLinePos);
            SVNLocationEntry mergedPathRev = (SVNLocationEntry) mergedPathRevisions.get(mergedPos);
            if (mainPathRev.getRevision() <= mergedPathRev.getRevision()) {
                sendPathRevision(mainPathRev, sb, handler);
                mainLinePos--;
            } else {
                sendPathRevision(mergedPathRev, sb, handler);
                mergedPos--;
            }
            i++;
        }
       
        for (; mainLinePos >= 0; mainLinePos--) {
            SVNLocationEntry mainPathRev = (SVNLocationEntry) mainLinePathRevisions.get(mainLinePos);
            sendPathRevision(mainPathRev, sb, handler);
            i++;
        }
       
        return i;
View Full Code Here

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

        LinkedList oldPathRevisions = mainLinePathRevisions;
        LinkedList newPathRevisions = null;
        do {
            newPathRevisions = new LinkedList();
            for (Iterator oldPathRevsIter = oldPathRevisions.iterator(); oldPathRevsIter.hasNext();) {
                SVNLocationEntry oldPathRevision = (SVNLocationEntry) oldPathRevsIter.next();
                Map mergedMergeInfo = oldPathRevision.getMergedMergeInfo();
                if (mergedMergeInfo == null) {
                    continue;
                }
                for (Iterator mergeInfoIter = mergedMergeInfo.keySet().iterator(); mergeInfoIter.hasNext();) {
                    String path = (String) mergeInfoIter.next();
                    SVNMergeRangeList rangeList = (SVNMergeRangeList) mergedMergeInfo.get(path);
                    SVNMergeRange[] ranges = rangeList.getRanges();
                    for (int j = 0; j < ranges.length; j++) {
                        SVNMergeRange range = ranges[j];
                        FSRevisionRoot root = myFSFS.createRevisionRoot(range.getEndRevision());
                        SVNNodeKind kind = root.checkNodeKind(path);
                        if (kind != SVNNodeKind.FILE) {
                            continue;
                        }
                       
                        newPathRevisions = findInterestingRevisions(newPathRevisions, path,
                                range.getStartRevision(), range.getEndRevision(), true, true, duplicatePathRevs);
                    }
                }
            }
            mergedPathRevisions.addAll(newPathRevisions);
            oldPathRevisions = newPathRevisions;
        } while (!newPathRevisions.isEmpty());
       
        Collections.sort(mergedPathRevisions, new Comparator() {
            public int compare(Object arg0, Object arg1) {
                SVNLocationEntry pathRevision1 = (SVNLocationEntry) arg0;
                SVNLocationEntry pathRevision2 = (SVNLocationEntry) arg1;
                if (pathRevision1.getRevision() == pathRevision2.getRevision()) {
                    return 0;
                }
                return pathRevision1.getRevision() < pathRevision2.getRevision() ? 1 : -1;
            }
        });
        return mergedPathRevisions;
    }
View Full Code Here

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

           
            if (includeMergedRevisions && duplicatePathRevs.containsKey(histPath + ":" + histRev)) {
                break;
            }
           
            SVNLocationEntry pathRev = null;
            Map mergedMergeInfo = null;
            if (includeMergedRevisions) {
                mergedMergeInfo = getMergedMergeInfo(histPath, histRev);
                pathRev = new SVNLocationEntry(histRev, histPath, markAsMerged, mergedMergeInfo);
                duplicatePathRevs.put(histPath + ":" + histRev, pathRev);
            } else {
                pathRev = new SVNLocationEntry(histRev, histPath, markAsMerged, null);
            }
             
            pathRevisions.addLast(pathRev);

            if (histRev <= startRevision) {
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.