* @return potential merge sources for <code>path</code>
* @since 1.2, SVN 1.5
*/
public Collection doSuggestMergeSources(File path, SVNRevision pegRevision) throws SVNException {
LinkedList suggestions = new LinkedList();
SVNURL reposRoot = getReposRoot(path, null, pegRevision, null, null);
SVNLocationEntry copyFromInfo = getCopySource(path, null, pegRevision);
String copyFromPath = copyFromInfo.getPath();
SVNURL copyFromURL = null;
if (copyFromPath != null) {
String relCopyFromPath = copyFromPath.startsWith("/") ? copyFromPath.substring(1) : copyFromPath;
copyFromURL = reposRoot.appendPath(relCopyFromPath, false);
suggestions.add(copyFromURL);
}
Map mergeInfo = doGetMergedMergeInfo(path, pegRevision);
if (mergeInfo != null) {
for (Iterator mergeSrcURLs = mergeInfo.keySet().iterator(); mergeSrcURLs.hasNext();) {
SVNURL mergeSrcURL = (SVNURL) mergeSrcURLs.next();
if (copyFromURL == null || !copyFromURL.equals(mergeSrcURL)) {
suggestions.add(mergeSrcURL);
}
}
}