summaryrefslogtreecommitdiffstatsabout
diff options
context:
space:
mode:
authorPhilipp Thun2011-03-24 07:39:29 (EDT)
committer Philipp Thun2011-03-24 07:39:29 (EDT)
commite998271eef964aa76b5e2836671b4ae6150d4699 (patch)
treedb90d3781e6ff857b2b748c618672db2a4e1bdd5
parente1c0304f6985a48ba892fff4fe873d0dcdf01e3f (diff)
downloadegit-e998271eef964aa76b5e2836671b4ae6150d4699.zip
egit-e998271eef964aa76b5e2836671b4ae6150d4699.tar.gz
egit-e998271eef964aa76b5e2836671b4ae6150d4699.tar.bz2
Use CherryPickResult in CherryPickHandlerrefs/changes/37/2737/2
Change I5db57b9259e82ed118e4bf4ec94463efe68b8c1f ("Introduce CherryPickResult") breaks the current CherryPickCommand API. This change adapts to the new API (i.e. CherryPickResult instead of RevCommit returned by CherryPickCommand.call()). Change-Id: I119f3ed16d6e7aa85f2f1d610640844cef14cea1 Signed-off-by: Philipp Thun <philipp.thun@sap.com>
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/command/CherryPickHandler.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/command/CherryPickHandler.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/command/CherryPickHandler.java
index b9c9f87..5d8d41e 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/command/CherryPickHandler.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/command/CherryPickHandler.java
@@ -16,7 +16,7 @@ import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.egit.ui.UIText;
import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jgit.api.CherryPickCommand;
+import org.eclipse.jgit.api.CherryPickResult;
import org.eclipse.jgit.api.Git;
import org.eclipse.jgit.lib.Repository;
import org.eclipse.jgit.revwalk.RevCommit;
@@ -30,12 +30,12 @@ public class CherryPickHandler extends AbstractHistoryCommandHandler {
RevCommit newHead;
Repository repo = getRepository(event);
- CherryPickCommand cherryPick;
+ CherryPickResult cherryPickResult;
Git git = new Git(repo);
try {
- cherryPick = git.cherryPick().include(commit.getId());
- newHead = cherryPick.call();
- if (newHead != null && cherryPick.getCherryPickedRefs().isEmpty())
+ cherryPickResult = git.cherryPick().include(commit.getId()).call();
+ newHead = cherryPickResult.getNewHead();
+ if (newHead != null && cherryPickResult.getCherryPickedRefs().isEmpty())
MessageDialog.openWarning(getPart(event).getSite().getShell(),
UIText.CherryPickHandler_NoCherryPickPerformedTitle,
UIText.CherryPickHandler_NoCherryPickPerformedMessage);