private void recordMergeInfoOnMergedChildren(SVNDepth depth) throws SVNException { if (depth != SVNDepth.INFINITY && myMergedPaths != null) { boolean[] isIndirectChildMergeInfo = { false }; Map childTargetMergeInfo = null; for (Iterator paths = myMergedPaths.iterator(); paths.hasNext();) { File mergedPath = (File) paths.next(); SVNEntry childEntry = myWCAccess.getVersionedEntry(mergedPath, false); if ((childEntry.isDirectory() && myTarget.equals(mergedPath) && depth == SVNDepth.IMMEDIATES) || (childEntry.isFile() && depth == SVNDepth.FILES)) { childTargetMergeInfo = getWCOrRepositoryMergeInfo(mergedPath, childEntry, SVNMergeInfoInheritance.INHERITED, isIndirectChildMergeInfo, false, myRepository1); if (isIndirectChildMergeInfo[0]) { SVNPropertiesManager.recordWCMergeInfo(mergedPath, childTargetMergeInfo, myWCAccess); } } } } }
if (pathExplicitMergeInfo != null) { oldURL = ensureSessionURL(myRepository2, pathEntry.getSVNURL()); Map pathInheritedMergeInfo = getWCOrRepositoryMergeInfo(pathWithNewMergeInfo, pathEntry, SVNMergeInfoInheritance.NEAREST_ANCESTOR, indirect, false, myRepository2);
if (pathExplicitMergeInfo != null) { oldURL = ensureSessionURL(myRepository2, pathEntry.getSVNURL()); Map pathInheritedMergeInfo = getWCOrRepositoryMergeInfo(pathWithNewMergeInfo, pathEntry, SVNMergeInfoInheritance.NEAREST_ANCESTOR, indirect, false, myRepository2);
if (pathExplicitMergeInfo != null) { oldURL = ensureSessionURL(myRepository2, pathEntry.getSVNURL()); Map pathInheritedMergeInfo = getWCOrRepositoryMergeInfo(pathWithNewMergeInfo, pathEntry, SVNMergeInfoInheritance.NEAREST_ANCESTOR, indirect, false, myRepository2);
protected Map[] getFullMergeInfo(SVNEntry entry, boolean getRecorded, boolean getImplicit, boolean[] indirect, SVNMergeInfoInheritance inherit, SVNRepository repos, File target, long start, long end) throws SVNException { Map[] result = new Map[2]; SVNErrorManager.assertionFailure(SVNRevision.isValidRevisionNumber(start) && SVNRevision.isValidRevisionNumber(end) && start > end, null, SVNLogType.WC); //get recorded merge info if (getRecorded) { result[0] = getWCOrRepositoryMergeInfo(target, entry, inherit, indirect, false, repos); } if (getImplicit) { long[] targetRev = new long[1]; targetRev[0] = SVNRepository.INVALID_REVISION; SVNURL url = deriveLocation(target, null, targetRev, SVNRevision.WORKING, repos, myWCAccess); if (targetRev[0] <= end) { result[1] = new TreeMap(); return result; } Map implicitMergeInfo = calculateImplicitMergeInfo(repos, url, targetRev, start, end); if (implicitMergeInfo != null) { result[1] = implicitMergeInfo; } } return result; }
protected Map[] getFullMergeInfo(SVNEntry entry, boolean[] indirect, SVNMergeInfoInheritance inherit, SVNRepository repos, File target, long start, long end) throws SVNException { Map[] result = new Map[2]; if (!SVNRevision.isValidRevisionNumber(start) || !SVNRevision.isValidRevisionNumber(end) || start <= end) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.UNKNOWN, "ASSERTION FAILED in SVNMergeDriver.getFullMergeInfo()"); SVNErrorManager.error(err, SVNLogType.DEFAULT); } //get recorded merge info result[0] = getWCOrRepositoryMergeInfo(target, entry, inherit, indirect, false, repos); long[] targetRev = new long[1]; targetRev[0] = SVNRepository.INVALID_REVISION; SVNURL url = deriveLocation(target, null, targetRev, SVNRevision.WORKING, repos, myWCAccess); if (targetRev[0] <= end) { result[1] = new TreeMap();//implicit merge info return result; } Map implicitMergeInfo = calculateImplicitMergeInfo(repos, url, targetRev, start, end); if (implicitMergeInfo != null) { result[1] = implicitMergeInfo; } return result; }
protected Map getMergeInfo(File path, SVNRevision pegRevision, SVNURL repositoryRoot[]) throws SVNException { SVNWCAccess wcAccess = createWCAccess(); try { SVNAdminArea adminArea = wcAccess.probeOpen(path, false, 0); SVNEntry entry = wcAccess.getVersionedEntry(path, false); long revNum[] = { SVNRepository.INVALID_REVISION }; SVNURL url = getEntryLocation(path, entry, revNum, SVNRevision.WORKING); SVNRepository repository = null; try { repository = createRepository(url, null, null, false); repository.assertServerIsMergeInfoCapable(path.toString()); } finally { repository.closeSession(); } SVNURL reposRoot = getReposRoot(path, null, pegRevision, adminArea, wcAccess); if (repositoryRoot != null && repositoryRoot.length > 0) { repositoryRoot[0] = reposRoot; } boolean[] indirect = { false }; return getWCOrRepositoryMergeInfo(path, entry, SVNMergeInfoInheritance.INHERITED, indirect, false, null); } finally { wcAccess.close(); } }
protected Map getMergeInfo(File path, SVNRevision pegRevision, SVNURL repositoryRoot[]) throws SVNException { SVNWCAccess wcAccess = createWCAccess(); try { SVNAdminArea adminArea = wcAccess.probeOpen(path, false, 0); SVNEntry entry = wcAccess.getVersionedEntry(path, false); long revNum[] = { SVNRepository.INVALID_REVISION }; SVNURL url = getEntryLocation(path, entry, revNum, SVNRevision.WORKING); SVNRepository repository = null; try { repository = createRepository(url, null, null, false); repository.assertServerIsMergeInfoCapable(path.toString()); } finally { repository.closeSession(); } SVNURL reposRoot = getReposRoot(path, null, pegRevision, adminArea, wcAccess); if (repositoryRoot != null && repositoryRoot.length > 0) { repositoryRoot[0] = reposRoot; } boolean[] indirect = { false }; return getWCOrRepositoryMergeInfo(path, entry, SVNMergeInfoInheritance.INHERITED, indirect, false, null); } finally { wcAccess.close(); } }
protected Map getMergeInfo(File path, SVNRevision pegRevision, SVNURL repositoryRoot[]) throws SVNException { SVNWCAccess wcAccess = createWCAccess(); try { SVNAdminArea adminArea = wcAccess.probeOpen(path, false, 0); SVNEntry entry = wcAccess.getVersionedEntry(path, false); long revNum[] = { SVNRepository.INVALID_REVISION }; SVNURL url = getEntryLocation(path, entry, revNum, SVNRevision.WORKING); SVNRepository repository = null; try { repository = createRepository(url, null, null, false); repository.assertServerIsMergeInfoCapable(path.toString()); } finally { repository.closeSession(); } SVNURL reposRoot = getReposRoot(path, null, pegRevision, adminArea, wcAccess); if (repositoryRoot != null && repositoryRoot.length > 0) { repositoryRoot[0] = reposRoot; } boolean[] indirect = { false }; return getWCOrRepositoryMergeInfo(path, entry, SVNMergeInfoInheritance.INHERITED, indirect, false, null); } finally { wcAccess.close(); } }
result[0] = getWCOrRepositoryMergeInfo(target, entry, inherit, indirect, false, repos); long[] targetRev = new long[1]; targetRev[0] = SVNRepository.INVALID_REVISION;