Bug 126616 IStorageMerger is not called in three-way merge with no common ancestor
I20060131-1200 IMergeContext.merge(IDiff[], boolean, IProgressMonitor) does not attempt to automerge two revisions if no common ancestor is available. Depending on the file content, no common ancestor is needed for automerging (e.g refactoring history files, where merging is simple the union operation). I suggest to call the corresponding IStorageMerger with an empty stream in this case, or have a predicate which tells whether the merger supports three-way merging with no common ancestor.
org.eclipse.ltk.ui.refactoring/src/org/eclipse/ltk/internal/ui/refactoring/model/RefactoringHistoryMerger.java
import org.eclipse.ltk.core.refactoring.RefactoringDescriptor;
import org.eclipse.ltk.internal.core.refactoring.history.RefactoringHistoryManager;
import org.eclipse.ltk.internal.ui.refactoring.RefactoringUIMessages;
import org.eclipse.ltk.internal.ui.refactoring.RefactoringUIPlugin;
import org.eclipse.compare.IStreamMerger;
/**
 * Stream merger for refactoring history files.
 * 
 * @since 3.2
 */
public final class RefactoringHistoryMerger implements IStreamMerger, IStorageMerger {
	/**
	 * Creates a new refactoring history merger.
	 */
	public RefactoringHistoryMerger() {
		
	}
	/**
	 * {@inheritDoc}
	 */
	public IStatus merge(final OutputStream output, final String outputEncoding, final InputStream ancestor, final String ancestorEncoding, final InputStream target, final String targetEncoding, final InputStream source, final String sourceEncoding, final IProgressMonitor monitor) {
		try {
			performMerge(output, target, source);
		} catch (CoreException exception) {
			return new Status(IStatus.ERROR, RefactoringUIPlugin.getPluginId(), 1, RefactoringUIMessages.RefactoringHistoryMerger_error_auto_merge, exception);
		}
		return Status.OK_STATUS;
	}
	/**
	 * {@inheritDoc}