mergeInfo = mergeInfoArr[0];
if (youngerMergeInfo != null) {
for (Iterator youngerMergeInfoIter = youngerMergeInfo.keySet().iterator(); youngerMergeInfoIter.hasNext();) {
String sourcePath = (String) youngerMergeInfoIter.next();
SVNMergeRangeList rangeList = (SVNMergeRangeList) youngerMergeInfo.get(sourcePath);
SVNMergeRange ranges[] = rangeList.getRanges();
LinkedList adjustedRanges = new LinkedList();
SVNURL mergeSourceURL = mergeSourceRootURL.appendPath(sourcePath, false);
for (int i = 0; i < ranges.length; i++) {
SVNMergeRange range = ranges[i];
SVNRepositoryLocation[] locations = null;
try {
locations = getLocations(targetURL, null, myRepository2,
SVNRevision.create(targetEntry.getRevision()),
SVNRevision.create(range.getStartRevision() + 1), SVNRevision.UNDEFINED);
SVNURL startURL = locations[0].getURL();
if (!mergeSourceURL.equals(startURL)) {
adjustedRanges.add(range);
}
} catch (SVNException svne) {
SVNErrorCode code = svne.getErrorMessage().getErrorCode();
if (code == SVNErrorCode.CLIENT_UNRELATED_RESOURCES ||
code == SVNErrorCode.RA_DAV_PATH_NOT_FOUND ||
code == SVNErrorCode.FS_NOT_FOUND ||
code == SVNErrorCode.FS_NO_SUCH_REVISION) {
adjustedRanges.add(range);
} else {
throw svne;
}
}
}
if (!adjustedRanges.isEmpty()) {
if (filteredYoungerMergeInfo == null) {
filteredYoungerMergeInfo = new TreeMap();
}
SVNMergeRangeList adjustedRangeList = SVNMergeRangeList.fromCollection(adjustedRanges);
filteredYoungerMergeInfo.put(sourcePath, adjustedRangeList);
}
}
}