Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaik Schreiber2014-09-03 11:19:07 +0000
committerMaik Schreiber2014-09-04 12:25:24 +0000
commit677e4b02ed6964a153fb380888019a1996fe562b (patch)
treed0e47664d35e6100dd5131153c7a17f86d4ca4b0 /org.eclipse.egit.core/src/org/eclipse/egit/core
parent00f06f8ab1724347afed7ed3384a1f423599466d (diff)
downloadegit-677e4b02ed6964a153fb380888019a1996fe562b.tar.gz
egit-677e4b02ed6964a153fb380888019a1996fe562b.tar.xz
egit-677e4b02ed6964a153fb380888019a1996fe562b.zip
Show a rebase result dialog if cherry-picking fails.
This will show a rebase result dialog if cherry-picking a commit fails. This is the same dialog used for regular rebasing. Bug: 443016 Change-Id: I0a88289f74913ccb47ace8ad9d59e9214ae2314a Signed-off-by: Maik Schreiber <blizzy@blizzy.de>
Diffstat (limited to 'org.eclipse.egit.core/src/org/eclipse/egit/core')
-rw-r--r--org.eclipse.egit.core/src/org/eclipse/egit/core/op/CherryPickOperation.java15
1 files changed, 14 insertions, 1 deletions
diff --git a/org.eclipse.egit.core/src/org/eclipse/egit/core/op/CherryPickOperation.java b/org.eclipse.egit.core/src/org/eclipse/egit/core/op/CherryPickOperation.java
index aa5d363f62..1fe17b63ee 100644
--- a/org.eclipse.egit.core/src/org/eclipse/egit/core/op/CherryPickOperation.java
+++ b/org.eclipse.egit.core/src/org/eclipse/egit/core/op/CherryPickOperation.java
@@ -32,6 +32,7 @@ import org.eclipse.egit.core.internal.util.ProjectUtil;
import org.eclipse.jgit.api.Git;
import org.eclipse.jgit.api.RebaseCommand;
import org.eclipse.jgit.api.RebaseCommand.InteractiveHandler;
+import org.eclipse.jgit.api.RebaseResult;
import org.eclipse.jgit.api.errors.GitAPIException;
import org.eclipse.jgit.errors.IllegalTodoFileModification;
import org.eclipse.jgit.lib.Constants;
@@ -50,6 +51,8 @@ public class CherryPickOperation implements IEGitOperation {
private List<RevCommit> commits;
+ private RebaseResult result;
+
/**
* Create cherry pick operation
*
@@ -106,7 +109,8 @@ public class CherryPickOperation implements IEGitOperation {
ObjectId headCommitId = repo.resolve(Constants.HEAD);
RevCommit headCommit = new RevWalk(repo)
.parseCommit(headCommitId);
- git.rebase().setUpstream(headCommit.getParent(0))
+ result = git.rebase()
+ .setUpstream(headCommit.getParent(0))
.runInteractively(handler)
.setOperation(RebaseCommand.Operation.BEGIN).call();
} catch (GitAPIException e) {
@@ -132,4 +136,13 @@ public class CherryPickOperation implements IEGitOperation {
public ISchedulingRule getSchedulingRule() {
return RuleUtil.getRule(repo);
}
+
+ /**
+ * Returns the result of the rebase operation.
+ *
+ * @return the rebase result
+ */
+ public RebaseResult getResult() {
+ return result;
+ }
}

Back to the top