Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobin Rosenberg2012-12-18 07:52:29 +0000
committerMatthias Sohn2012-12-19 07:56:50 +0000
commit07447864f383271bf710d3054257fc388c9b19a5 (patch)
treea8d47b29c5b8dfee88aace25f686d6e391708481 /org.eclipse.egit.ui/src/org
parent560daa441e43571c670d5f393e4c17dc55761241 (diff)
downloadegit-07447864f383271bf710d3054257fc388c9b19a5.tar.gz
egit-07447864f383271bf710d3054257fc388c9b19a5.tar.xz
egit-07447864f383271bf710d3054257fc388c9b19a5.zip
Alert user when Apply Stash fails
Just logging is not enough. Change-Id: I9704c372ef000ce2c244e35f69be44a42138206e
Diffstat (limited to 'org.eclipse.egit.ui/src/org')
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/tree/command/StashApplyCommand.java5
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/uitext.properties2
2 files changed, 4 insertions, 3 deletions
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/tree/command/StashApplyCommand.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/tree/command/StashApplyCommand.java
index 6e8b688d71..f2bb82e4b4 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/tree/command/StashApplyCommand.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/tree/command/StashApplyCommand.java
@@ -53,10 +53,11 @@ public class StashApplyCommand extends
try {
op.execute(monitor);
} catch (CoreException e) {
- Activator.logError(
+ return new Status(IStatus.ERROR, Activator.getPluginId(),
MessageFormat.format(
UIText.StashApplyCommand_applyFailed,
- commit.name()), e);
+ commit.abbreviate(7).name(),
+ e.getLocalizedMessage()), e);
}
return Status.OK_STATUS;
}
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 285d37f72d..90bd892388 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
@@ -1586,7 +1586,7 @@ StagingView_StageItemMenuLabel=Add to Git Index
StagingView_IgnoreItemMenuLabel=Ignore
StagingView_DeleteItemMenuLabel=Delete
StagingViewContentProvider_SubmoduleError=Unhandled exception while analyzing submodules
-StashApplyCommand_applyFailed=Applying stashed commit ''{0}'' failed
+StashApplyCommand_applyFailed=Applying stashed commit ''{0}'' failed due to ''{1}''
StashApplyCommand_jobTitle=Apply changes from stashed commit ''{0}''
StashCreateCommand_jobTitle=Stashing local changes
StashCreateCommand_messageEnterCommitMessage=Enter stash commit message (optional):

Back to the top