public void maybeCropAndSendSegment(String path, long startRevision, long rangeStart, long rangeEnd, ISVNLocationSegmentHandler handler) throws SVNException { long segmentRangeStart = rangeStart; long segmentRangeEnd = rangeEnd; if (segmentRangeStart <= startRevision) { if (segmentRangeEnd > startRevision) { segmentRangeEnd = startRevision; } if (handler != null) { handler.handleLocationSegment(new SVNLocationSegment(segmentRangeStart, segmentRangeEnd, path)); myCount += segmentRangeEnd - segmentRangeStart + 1; } } }
public void maybeCropAndSendSegment(String path, long startRevision, long rangeStart, long rangeEnd, ISVNLocationSegmentHandler handler) throws SVNException { long segmentRangeStart = rangeStart; long segmentRangeEnd = rangeEnd; if (segmentRangeStart <= startRevision) { if (segmentRangeEnd > startRevision) { segmentRangeEnd = startRevision; } if (handler != null) { handler.handleLocationSegment(new SVNLocationSegment(segmentRangeStart, segmentRangeEnd, path)); myCount += segmentRangeEnd - segmentRangeStart + 1; } } }
public void maybeCropAndSendSegment(String path, long startRevision, long rangeStart, long rangeEnd, ISVNLocationSegmentHandler handler) throws SVNException { long segmentRangeStart = rangeStart; long segmentRangeEnd = rangeEnd; if (segmentRangeStart <= startRevision) { if (segmentRangeEnd > startRevision) { segmentRangeEnd = startRevision; } if (handler != null) { handler.handleLocationSegment(new SVNLocationSegment(segmentRangeStart, segmentRangeEnd, path)); myCount += segmentRangeEnd - segmentRangeStart + 1; } } }
private long maybeCropAndSendSegment(long segmentStartRevision, long segmentEndRevision, long startRevision, long endRevision, String segmentPath, ISVNLocationSegmentHandler handler) throws SVNException { if (!(segmentStartRevision > startRevision || segmentEndRevision < endRevision)) { if (segmentStartRevision < endRevision) { segmentStartRevision = endRevision; } if (segmentEndRevision > startRevision) { segmentEndRevision = startRevision; } if (handler != null) { handler.handleLocationSegment(new SVNLocationSegment(segmentStartRevision, segmentEndRevision, segmentPath)); } return segmentEndRevision - segmentStartRevision + 1; } return 0; } }
private long maybeCropAndSendSegment(long segmentStartRevision, long segmentEndRevision, long startRevision, long endRevision, String segmentPath, ISVNLocationSegmentHandler handler) throws SVNException { if (!(segmentStartRevision > startRevision || segmentEndRevision < endRevision)) { if (segmentStartRevision < endRevision) { segmentStartRevision = endRevision; } if (segmentEndRevision > startRevision) { segmentEndRevision = startRevision; } if (handler != null) { handler.handleLocationSegment(new SVNLocationSegment(segmentStartRevision, segmentEndRevision, segmentPath)); } return segmentEndRevision - segmentStartRevision + 1; } return 0; } }
private long maybeCropAndSendSegment(long segmentStartRevision, long segmentEndRevision, long startRevision, long endRevision, String segmentPath, ISVNLocationSegmentHandler handler) throws SVNException { if (!(segmentStartRevision > startRevision || segmentEndRevision < endRevision)) { if (segmentStartRevision < endRevision) { segmentStartRevision = endRevision; } if (segmentEndRevision > startRevision) { segmentEndRevision = startRevision; } if (handler != null) { handler.handleLocationSegment(new SVNLocationSegment(segmentStartRevision, segmentEndRevision, segmentPath)); } return segmentEndRevision - segmentStartRevision + 1; } return 0; } }
public SVNLocationSegment getYoungestCommonAncestor(SVNURL url1, long rev1, SVNURL url2, long rev2) throws SVNException { boolean[] hasZero1 = new boolean[1]; boolean[] hasZero2 = new boolean[1]; Map<String, SVNMergeRangeList> history1 = getHistoryAsMergeInfo(url1, SVNRevision.create(rev1), -1, -1, hasZero1, null); Map<String, SVNMergeRangeList> history2 = getHistoryAsMergeInfo(url2, SVNRevision.create(rev2), -1, -1, hasZero2, null); long ycRevision = -1; String ycPath = null; for (Iterator<String> paths = history1.keySet().iterator(); paths.hasNext();) { String path = paths.next(); SVNMergeRangeList ranges1 = history1.get(path); SVNMergeRangeList ranges2 = history2.get(path); if (ranges2 != null) { SVNMergeRangeList intersection = ranges1.intersect(ranges2, true); if (intersection != null && !intersection.isEmpty()) { SVNMergeRange ycRange = intersection.getRanges()[intersection.getSize() - 1]; if (ycRevision < 0 || ycRange.getEndRevision() > ycRevision) { ycRevision = ycRange.getEndRevision(); ycPath = path.substring(1); } } } } if (ycPath == null && hasZero1[0] && hasZero2[0]) { ycPath = "/"; ycRevision = 0; } return new SVNLocationSegment(ycRevision, ycRevision, ycPath); }
myLocationSegmentHandler.handleLocationSegment(new SVNLocationSegment(rangeStart, rangeEnd, path)); myCount += rangeEnd - rangeStart + 1;
myLocationSegmentHandler.handleLocationSegment(new SVNLocationSegment(rangeStart, rangeEnd, path)); myCount += rangeEnd - rangeStart + 1;
myLocationSegmentHandler.handleLocationSegment(new SVNLocationSegment(rangeStart, rangeEnd, path)); myCount += rangeEnd - rangeStart + 1;
long copyFromRevision = copyFromLocation.getRevision(); if (copyFromPath != null && SVNRevision.isValidRevisionNumber(copyFromRevision)) { SVNLocationSegment newSegment = new SVNLocationSegment(copyFromRevision, copyFromRevision, copyFromPath); segment.setStartRevision(copyFromRevision + 1);
long copyFromRevision = copyFromLocation.getRevision(); if (copyFromPath != null && SVNRevision.isValidRevisionNumber(copyFromRevision)) { SVNLocationSegment newSegment = new SVNLocationSegment(copyFromRevision, copyFromRevision, copyFromPath); segment.setStartRevision(copyFromRevision + 1);
long copyFromRevision = copyFromLocation.getRevision(); if (copyFromPath != null && SVNRevision.isValidRevisionNumber(copyFromRevision)) { SVNLocationSegment newSegment = new SVNLocationSegment(copyFromRevision, copyFromRevision, copyFromPath); segment.setStartRevision(copyFromRevision + 1);
long copyFromRevision = copyFromLocation.getRevision(); if (copyFromPath != null && SVNRevision.isValidRevisionNumber(copyFromRevision)) { SVNLocationSegment newSegment = new SVNLocationSegment(copyFromRevision, copyFromRevision, copyFromPath); segment.setStartRevision(copyFromRevision + 1);
handler.handleLocationSegment(new SVNLocationSegment(rangeStartRevision, rangeEndRevision, rangePath));
handler.handleLocationSegment(new SVNLocationSegment(rangeStartRevision, rangeEndRevision, rangePath));
handler.handleLocationSegment(new SVNLocationSegment(rangeStartRevision, rangeEndRevision, rangePath));