summaryrefslogtreecommitdiffstatsabout
diff options
context:
space:
mode:
authorRobin Stocker2011-05-21 09:02:32 (EDT)
committer Robin Stocker2011-05-21 09:02:32 (EDT)
commit92921833b2ed469a52acf9eb99b33904f3ecb74c (patch)
tree57106cad258561d086983eeb2e0ef55ff59c11a6
parent40738aa39ec3c6d0eda3de12e89ddc5f31f891ac (diff)
downloadegit-92921833b2ed469a52acf9eb99b33904f3ecb74c.zip
egit-92921833b2ed469a52acf9eb99b33904f3ecb74c.tar.gz
egit-92921833b2ed469a52acf9eb99b33904f3ecb74c.tar.bz2
CompareWithRefAction: Fix encoding of ref elementrefs/changes/92/3492/1
Together with Ie26b68355d53456c1000afb51f15f12f5098e6be, this fixes Compare With -> Branch, Tag, or Reference. Bug: 345160 Change-Id: I2582765ee1be1f6ca1212a302318da0d878721b5 Signed-off-by: Robin Stocker <robin@nibor.org>
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/actions/CompareWithRefActionHandler.java10
1 files changed, 2 insertions, 8 deletions
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/actions/CompareWithRefActionHandler.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/actions/CompareWithRefActionHandler.java
index cf5993a..3cebad4 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/actions/CompareWithRefActionHandler.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/actions/CompareWithRefActionHandler.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 CompareWithRefActionHandler 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