private SVNLocationEntry getYoungestCommonAncestor(File path1, SVNURL url1, long revision1, File path2, SVNURL url2, long revision2) throws SVNException { Map history1 = getHistoryAsMergeInfo(url1, path1, SVNRevision.create(revision1), SVNRepository.INVALID_REVISION, SVNRepository.INVALID_REVISION, null, null); Map history2 = getHistoryAsMergeInfo(url2, path2, SVNRevision.create(revision2), SVNRepository.INVALID_REVISION, SVNRepository.INVALID_REVISION, null, null); long youngestCommonRevision = SVNRepository.INVALID_REVISION; String youngestCommonPath = null; for (Iterator historyIter = history1.entrySet().iterator(); historyIter.hasNext();) { Map.Entry historyEntry = (Map.Entry) historyIter.next(); String path = (String) historyEntry.getKey(); SVNMergeRangeList ranges1 = (SVNMergeRangeList) historyEntry.getValue(); SVNMergeRangeList ranges2 = (SVNMergeRangeList) history2.get(path); if (ranges2 != null) { SVNMergeRangeList commonList = ranges2.intersect(ranges1, true); if (!commonList.isEmpty()) { SVNMergeRange commonRanges[] = commonList.getRanges(); SVNMergeRange youngestCommonRange = commonRanges[commonRanges.length - 1]; if (!SVNRevision.isValidRevisionNumber(youngestCommonRevision) || youngestCommonRange.getEndRevision() > youngestCommonRevision) { youngestCommonRevision = youngestCommonRange.getEndRevision(); youngestCommonPath = path; } } } } return new SVNLocationEntry(youngestCommonRevision, youngestCommonPath); }
private SVNLocationEntry getYoungestCommonAncestor(File path1, SVNURL url1, long revision1, File path2, SVNURL url2, long revision2) throws SVNException { Map history1 = getHistoryAsMergeInfo(url1, path1, SVNRevision.create(revision1), SVNRepository.INVALID_REVISION, SVNRepository.INVALID_REVISION, null, null); Map history2 = getHistoryAsMergeInfo(url2, path2, SVNRevision.create(revision2), SVNRepository.INVALID_REVISION, SVNRepository.INVALID_REVISION, null, null); long youngestCommonRevision = SVNRepository.INVALID_REVISION; String youngestCommonPath = null; for (Iterator historyIter = history1.entrySet().iterator(); historyIter.hasNext();) { Map.Entry historyEntry = (Map.Entry) historyIter.next(); String path = (String) historyEntry.getKey(); SVNMergeRangeList ranges1 = (SVNMergeRangeList) historyEntry.getValue(); SVNMergeRangeList ranges2 = (SVNMergeRangeList) history2.get(path); if (ranges2 != null) { SVNMergeRangeList commonList = ranges2.intersect(ranges1, true); if (!commonList.isEmpty()) { SVNMergeRange commonRanges[] = commonList.getRanges(); SVNMergeRange youngestCommonRange = commonRanges[commonRanges.length - 1]; if (!SVNRevision.isValidRevisionNumber(youngestCommonRevision) || youngestCommonRange.getEndRevision() > youngestCommonRevision) { youngestCommonRevision = youngestCommonRange.getEndRevision(); youngestCommonPath = path; } } } } return new SVNLocationEntry(youngestCommonRevision, youngestCommonPath); }
private SVNLocationEntry getYoungestCommonAncestor(File path1, SVNURL url1, long revision1, File path2, SVNURL url2, long revision2) throws SVNException { Map history1 = getHistoryAsMergeInfo(url1, path1, SVNRevision.create(revision1), SVNRepository.INVALID_REVISION, SVNRepository.INVALID_REVISION, null, null); Map history2 = getHistoryAsMergeInfo(url2, path2, SVNRevision.create(revision2), SVNRepository.INVALID_REVISION, SVNRepository.INVALID_REVISION, null, null); long youngestCommonRevision = SVNRepository.INVALID_REVISION; String youngestCommonPath = null; for (Iterator historyIter = history1.entrySet().iterator(); historyIter.hasNext();) { Map.Entry historyEntry = (Map.Entry) historyIter.next(); String path = (String) historyEntry.getKey(); SVNMergeRangeList ranges1 = (SVNMergeRangeList) historyEntry.getValue(); SVNMergeRangeList ranges2 = (SVNMergeRangeList) history2.get(path); if (ranges2 != null) { SVNMergeRangeList commonList = ranges2.intersect(ranges1, true); if (!commonList.isEmpty()) { SVNMergeRange commonRanges[] = commonList.getRanges(); SVNMergeRange youngestCommonRange = commonRanges[commonRanges.length - 1]; if (!SVNRevision.isValidRevisionNumber(youngestCommonRevision) || youngestCommonRange.getEndRevision() > youngestCommonRevision) { youngestCommonRevision = youngestCommonRange.getEndRevision(); youngestCommonPath = path; } } } } return new SVNLocationEntry(youngestCommonRevision, youngestCommonPath); }
implicitSrcMergeInfo = getHistoryAsMergeInfo(url, null, pegRevision, youngRev, oldRev, repos, null); } finally { if (repos != null && oldURL != null) {
implicitSrcMergeInfo = getHistoryAsMergeInfo(url, null, pegRevision, youngRev, oldRev, repos, null); } finally { if (repos != null && oldURL != null) {
Map implicitMergeInfo = getHistoryAsMergeInfo(null, path, SVNRevision.create(targetEntry.getRevision()), targetEntry.getRevision(), SVNRepository.INVALID_REVISION, myRepository2, myWCAccess);
Map implicitMergeInfo = getHistoryAsMergeInfo(null, path, SVNRevision.create(targetEntry.getRevision()), targetEntry.getRevision(), SVNRepository.INVALID_REVISION, myRepository2, myWCAccess);
Map implicitMergeInfo = getHistoryAsMergeInfo(null, path, SVNRevision.create(targetEntry.getRevision()), targetEntry.getRevision(), SVNRepository.INVALID_REVISION, myRepository2, myWCAccess);
public Map calculateImplicitMergeInfo(SVNRepository repos, SVNURL url, long[] targetRev, long start, long end) throws SVNException { Map implicitMergeInfo = null; boolean closeSession = false; SVNURL sessionURL = null; try { if (repos != null) { sessionURL = ensureSessionURL(repos, url); } else { repos = createRepository(url, null, null, false); closeSession = true; } if (targetRev[0] < start) { getLocations(url, null, repos, SVNRevision.create(targetRev[0]), SVNRevision.create(start), SVNRevision.UNDEFINED); targetRev[0] = start; } implicitMergeInfo = getHistoryAsMergeInfo(url, null, SVNRevision.create(targetRev[0]), start, end, repos, null); if (sessionURL != null) { repos.setLocation(sessionURL, false); } } finally { if (closeSession) { repos.closeSession(); } } return implicitMergeInfo; }
public Map calculateImplicitMergeInfo(SVNRepository repos, SVNURL url, long[] targetRev, long start, long end) throws SVNException { Map implicitMergeInfo = null; boolean closeSession = false; SVNURL sessionURL = null; try { if (repos != null) { sessionURL = ensureSessionURL(repos, url); } else { repos = createRepository(url, null, null, false); closeSession = true; } if (targetRev[0] < start) { getLocations(url, null, repos, SVNRevision.create(targetRev[0]), SVNRevision.create(start), SVNRevision.UNDEFINED); targetRev[0] = start; } implicitMergeInfo = getHistoryAsMergeInfo(url, null, SVNRevision.create(targetRev[0]), start, end, repos, null); if (sessionURL != null) { repos.setLocation(sessionURL, false); } } finally { if (closeSession) { repos.closeSession(); } } return implicitMergeInfo; }
targetRev[0] = start; result[1] = getHistoryAsMergeInfo(url, null, SVNRevision.create(targetRev[0]), start, end, repos, null); if (sessionURL != null) {