aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobin Stocker2011-05-21 08:55:33 (EDT)
committerRobin Stocker2011-05-21 08:55:33 (EDT)
commit166d2f07ddb17fc54cb9ca054ba1ae7606a592df (patch)
tree63a82dc48601987b9d7593cd5cf96d331d3e4bd8
parent40738aa39ec3c6d0eda3de12e89ddc5f31f891ac (diff)
downloadegit-166d2f07ddb17fc54cb9ca054ba1ae7606a592df.zip
egit-166d2f07ddb17fc54cb9ca054ba1ae7606a592df.tar.gz
egit-166d2f07ddb17fc54cb9ca054ba1ae7606a592df.tar.bz2
CompareWithCommitAction: Fix encoding of commit elementrefs/changes/91/3491/1
Together with Ie26b68355d53456c1000afb51f15f12f5098e6be, this fixes Compare With -> Commit to also use the encoding of the file for the right side. Bug: 345160 Change-Id: I3a54a971e1ff438d6700514a6b63973cc2acec14 Signed-off-by: Robin Stocker <robin@nibor.org>
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/actions/CompareWithCommitActionHandler.java10
1 files changed, 2 insertions, 8 deletions
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/actions/CompareWithCommitActionHandler.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/actions/CompareWithCommitActionHandler.java
index 84dd711..be7e017 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/actions/CompareWithCommitActionHandler.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/actions/CompareWithCommitActionHandler.java
@@ -17,10 +17,10 @@ import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IResource;
-import org.eclipse.egit.core.internal.storage.GitFileRevision;
import org.eclipse.egit.core.project.RepositoryMapping;
import org.eclipse.egit.ui.Activator;
import org.eclipse.egit.ui.UIText;
+import org.eclipse.egit.ui.internal.CompareUtils;
import org.eclipse.egit.ui.internal.FileRevisionTypedElement;
import org.eclipse.egit.ui.internal.GitCompareFileRevisionEditorInput;
import org.eclipse.egit.ui.internal.LocalFileRevision;
@@ -31,7 +31,6 @@ import org.eclipse.jgit.lib.ObjectId;
import org.eclipse.jgit.lib.Repository;
import org.eclipse.jgit.revwalk.RevCommit;
import org.eclipse.jgit.revwalk.RevWalk;
-import org.eclipse.team.core.history.IFileRevision;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.PlatformUI;
@@ -97,12 +96,7 @@ public class CompareWithCommitActionHandler extends RepositoryActionHandler {
RevCommit commit = rw.parseCommit(commitId);
rw.release();
- IFileRevision nextFile = GitFileRevision.inCommit(repository, commit,
- gitPath, null);
-
- FileRevisionTypedElement element = new FileRevisionTypedElement(
- nextFile);
- return element;
+ return CompareUtils.getFileRevisionTypedElement(gitPath, commit, repository);
}
@Override