diff options
| author | Philipp Thun | 2011-03-24 13:02:32 +0000 |
|---|---|---|
| committer | Philipp Thun | 2011-03-24 13:02:32 +0000 |
| commit | dc5b37087f7f6c30ffc32c315add04a9df5e0be9 (patch) | |
| tree | 71968ccde47eb817dd4d59b9409a48aa74b9bfad | |
| parent | e998271eef964aa76b5e2836671b4ae6150d4699 (diff) | |
| download | egit-dc5b37087f7f6c30ffc32c315add04a9df5e0be9.tar.gz egit-dc5b37087f7f6c30ffc32c315add04a9df5e0be9.tar.xz egit-dc5b37087f7f6c30ffc32c315add04a9df5e0be9.zip | |
Show failures during rebase to the user
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>
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 ad23b63b6d..a0bfdefe55 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 dd404b376f..95f47d2f2e 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 08f7697530..ce8f2cb397 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 e747606b5d..e243cefdc7 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" |
