boolean errorOccurred = false;
List<ObjectId> ids = new ArrayList<ObjectId>();
String gitPath = null;
if (input instanceof IFile) {
IFile resource = (IFile) input;
final RepositoryMapping map = RepositoryMapping
.getMapping(resource);
gitPath = map.getRepoRelativePath(resource);
Iterator<?> it = selection.iterator();
while (it.hasNext()) {
RevCommit commit = (RevCommit) it.next();
String commitPath = getRenamedPath(gitPath, commit);
IFileRevision rev = null;
try {
rev = CompareUtils.getFileRevision(commitPath, commit,
map.getRepository(), null);
} catch (IOException e) {
Activator.logError(NLS.bind(
UIText.GitHistoryPage_errorLookingUpPath, gitPath,
commit.getId()), e);
errorOccurred = true;
}
if (rev != null) {
if (compareMode) {
ITypedElement right = CompareUtils
.getFileRevisionTypedElement(commitPath,
commit, map.getRepository());
final GitCompareFileRevisionEditorInput in = new GitCompareFileRevisionEditorInput(
SaveableCompareEditorInput
.createFileElement(resource), right,
null);
try {