diff options
author | Tomasz Zarna | 2013-04-17 16:46:27 +0000 |
---|---|---|
committer | Matthias Sohn | 2013-04-23 07:19:26 +0000 |
commit | e1e22290685746b7582eb5682b13bad87432a62c (patch) | |
tree | 19016cef983e344c435e168fb44989aa4b02d16b /org.eclipse.egit.ui | |
parent | 14952cff7dfb9183e12d981b1882a49c138de17d (diff) | |
download | egit-e1e22290685746b7582eb5682b13bad87432a62c.tar.gz egit-e1e22290685746b7582eb5682b13bad87432a62c.tar.xz egit-e1e22290685746b7582eb5682b13bad87432a62c.zip |
Improve misleading message in progress view when rebasing
Bug: 399924
Change-Id: I0bf18bcca269acad0437c5a1e89935904c93d43d
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Diffstat (limited to 'org.eclipse.egit.ui')
3 files changed, 18 insertions, 10 deletions
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/commands/shared/RebaseCurrentRefCommand.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/commands/shared/RebaseCurrentRefCommand.java index cd984e2d6e..83694bd13e 100644 --- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/commands/shared/RebaseCurrentRefCommand.java +++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/commands/shared/RebaseCurrentRefCommand.java @@ -57,12 +57,9 @@ public class RebaseCurrentRefCommand extends AbstractRebaseCommandHandler { BasicConfigurationDialog.show(repository); - try { - if (ref != null && ref.getName().equals(repository.getFullBranch())) - ref = null; - } catch (IOException ignored) { - // Ignored - } + String currentFullBranch = getFullBranch(repository); + if (ref != null && ref.getName().equals(currentFullBranch)) + ref = null; if (ref == null) { RebaseTargetSelectionDialog rebaseTargetSelectionDialog = new RebaseTargetSelectionDialog( @@ -79,8 +76,8 @@ public class RebaseCurrentRefCommand extends AbstractRebaseCommandHandler { } String jobname = NLS.bind( - UIText.RebaseCurrentRefCommand_RebasingCurrentJobName, ref - .getName()); + UIText.RebaseCurrentRefCommand_RebasingCurrentJobName, + Repository.shortenRefName(currentFullBranch), ref.getName()); RebaseHelper.runRebaseJob(repository, jobname, ref); return null; } @@ -123,4 +120,14 @@ public class RebaseCurrentRefCommand extends AbstractRebaseCommandHandler { } } + private String getFullBranch(Repository repository) + throws ExecutionException { + try { + return repository.getFullBranch(); + } catch (IOException e) { + throw new ExecutionException( + UIText.RebaseCurrentRefCommand_ErrorGettingCurrentBranchMessage, + e); + } + } } diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/command/RebaseCurrentHandler.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/command/RebaseCurrentHandler.java index 464c6dc77a..68995c867d 100644 --- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/command/RebaseCurrentHandler.java +++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/command/RebaseCurrentHandler.java @@ -44,7 +44,8 @@ public class RebaseCurrentHandler extends AbstractHistoryCommandHandler { Ref ref = getRef(commit, repository, currentBranch); String jobname = NLS.bind( - UIText.RebaseCurrentRefCommand_RebasingCurrentJobName, currentBranch); + UIText.RebaseCurrentRefCommand_RebasingCurrentJobName, + currentBranch, ref.getName()); RebaseHelper.runRebaseJob(repository, jobname, ref); return null; } diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/uitext.properties b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/uitext.properties index e18976bee7..90628fe821 100644 --- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/uitext.properties +++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/uitext.properties @@ -291,7 +291,7 @@ CompareWithIndexAction_FileNotInIndex={0} not in index RebaseCurrentRefCommand_RebaseCanceledMessage=The rebase operation was canceled RebaseCurrentRefCommand_RebaseCanceledTitle=Rebase Canceled -RebaseCurrentRefCommand_RebasingCurrentJobName=Rebasing Branch {0} +RebaseCurrentRefCommand_RebasingCurrentJobName=Rebasing Branch {0} on {1} RebaseCurrentRefCommand_ErrorGettingCurrentBranchMessage=Error getting the branch to rebase RebaseResultDialog_Aborted=Rebase was aborted RebaseResultDialog_AbortRebaseRadioText=&Abort rebase |