public static Map getInheritableMergeInfo(Map mergeInfo, String path, long startRev, long endRev) {
Map inheritableMergeInfo = new TreeMap();
if (mergeInfo != null) {
for (Iterator paths = mergeInfo.keySet().iterator(); paths.hasNext();) {
String mergeSrcPath = (String) paths.next();
SVNMergeRangeList rangeList = (SVNMergeRangeList) mergeInfo.get(mergeSrcPath);
SVNMergeRangeList inheritableRangeList = null;
if (path == null || path.equals(mergeSrcPath)) {
inheritableRangeList = rangeList.getInheritableRangeList(startRev, endRev);
} else {
inheritableRangeList = rangeList.dup();
}
if (!inheritableRangeList.isEmpty()) {
inheritableMergeInfo.put(mergeSrcPath, inheritableRangeList);
}
}
}
return inheritableMergeInfo;