aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilipp Thun2011-03-24 09:02:32 (EDT)
committerPhilipp Thun2011-03-24 09:02:32 (EDT)
commitdc5b37087f7f6c30ffc32c315add04a9df5e0be9 (patch)
tree71968ccde47eb817dd4d59b9409a48aa74b9bfad
parente998271eef964aa76b5e2836671b4ae6150d4699 (diff)
downloadegit-dc5b37087f7f6c30ffc32c315add04a9df5e0be9.zip
egit-dc5b37087f7f6c30ffc32c315add04a9df5e0be9.tar.gz
egit-dc5b37087f7f6c30ffc32c315add04a9df5e0be9.tar.bz2
Show failures during rebase to the userrefs/changes/48/2648/3
This change fixes a bug that happened when rebasing while there are uncommitted changes; this error situation was neither detected correctly nor presented to the user in an understandable manner. Change-Id: I08d16ce08e8373f0d17a1fdbe759888c99e1f251 Signed-off-by: Philipp Thun <philipp.thun@sap.com>
-rw-r--r--org.eclipse.egit.core/src/org/eclipse/egit/core/op/RebaseOperation.java2
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/UIText.java3
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/rebase/RebaseResultDialog.java6
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/uitext.properties1
4 files changed, 10 insertions, 2 deletions
diff --git a/org.eclipse.egit.core/src/org/eclipse/egit/core/op/RebaseOperation.java b/org.eclipse.egit.core/src/org/eclipse/egit/core/op/RebaseOperation.java
index ad23b63..a0bfdef 100644
--- a/org.eclipse.egit.core/src/org/eclipse/egit/core/op/RebaseOperation.java
+++ b/org.eclipse.egit.core/src/org/eclipse/egit/core/op/RebaseOperation.java
@@ -118,7 +118,7 @@ public class RebaseOperation implements IEGitOperation {
/**
* @return the result of calling {@link #execute(IProgressMonitor)}, or
- * <code>null</code> is this has not been executed yet
+ * <code>null</code> if this has not been executed yet
*/
public RebaseResult getResult() {
return result;
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/UIText.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/UIText.java
index dd404b3..95f47d2 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/UIText.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/UIText.java
@@ -538,6 +538,9 @@ public class UIText extends NLS {
public static String RebaseResultDialog_FastForward;
/** */
+ public static String RebaseResultDialog_Failed;
+
+ /** */
public static String RebaseResultDialog_NextSteps;
/** */
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/rebase/RebaseResultDialog.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/rebase/RebaseResultDialog.java
index 08f7697..ce8f2cb 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/rebase/RebaseResultDialog.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/rebase/RebaseResultDialog.java
@@ -122,6 +122,8 @@ public class RebaseResultDialog extends MessageDialog {
return UIText.RebaseResultDialog_Aborted;
case STOPPED:
return UIText.RebaseResultDialog_Stopped;
+ case FAILED:
+ return UIText.RebaseResultDialog_Failed;
case UP_TO_DATE:
return UIText.RebaseResultDialog_UpToDate;
case FAST_FORWARD:
@@ -139,7 +141,9 @@ public class RebaseResultDialog extends MessageDialog {
private RebaseResultDialog(Shell shell, Repository repository,
RebaseResult result) {
super(shell, UIText.RebaseResultDialog_DialogTitle, INFO,
- getTitle(result.getStatus()), MessageDialog.INFORMATION,
+ getTitle(result.getStatus()),
+ result.getStatus() == Status.FAILED ? MessageDialog.ERROR
+ : MessageDialog.INFORMATION,
new String[] { IDialogConstants.OK_LABEL }, 0);
setShellStyle(getShellStyle() | SWT.SHELL_TRIM);
this.repo = repository;
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/uitext.properties b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/uitext.properties
index e747606..e243cef 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/uitext.properties
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/uitext.properties
@@ -209,6 +209,7 @@ RebaseResultDialog_DialogTitle=Rebase Result
RebaseResultDialog_DiffDetailsLabel=&Files with rebase conflicts:
RebaseResultDialog_DoNothingRadioText=Do nothing (return to the &workbench)
RebaseResultDialog_FastForward=Rebase advanced HEAD fast-forward
+RebaseResultDialog_Failed=Rebase failed
RebaseResultDialog_NextSteps=Next steps
RebaseResultDialog_NextStepsAfterResolveConflicts=When you have resolved the conflicts run:\n- "Rebase > Continue"\n- or "Rebase > Abort"
RebaseResultDialog_NextStepsDoNothing=- resolve the conflicts\n- then run "Rebase > Continue"\n- or "Rebase > Abort"