[historyView] Rebase: Pass a better Ref as upstream
commit03513ef305f3d4f8414ab7ac2624b6d2ca75b3ee
authorRobin Stocker <robin@nibor.org>
Sun, 2 Sep 2012 21:37:25 +0000 (2 23:37 +0200)
committerMatthias Sohn <matthias.sohn@sap.com>
Sun, 2 Sep 2012 21:37:25 +0000 (2 23:37 +0200)
tree81abe7c1c899ebd935350eafb5791fbf5a156c3a
parentfa2f9bf5afb9e111f496acd42dcca2696b0120fc
[historyView] Rebase: Pass a better Ref as upstream

JGit change I1333a8dd170bb0077f491962013485efb6f2a926 is about improving
the ours/theirs conflict markers during rebase. The way the rebase
action worked before, it would always pass the commit ID to rebase,
which is not very helpful during a rebase conflict.

This change makes it use a Ref if there is one. If there are multiple
refs pointing to the selected commit:

- and if the branch being rebased tracks another one, this tracked
  branch should be the one to pick if it's in the list
- otherwise pick a remote tracking branch if it's in the list

Also adds a "does it work at all?" test for rebase in History view.

Bug: 336819
Change-Id: Ib78c3e8965e2f57e2c844a065629511ab1158160
Signed-off-by: Robin Stocker <robin@nibor.org>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/history/HistoryViewTest.java
org.eclipse.egit.ui/src/org/eclipse/egit/ui/UIText.java
org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/command/RebaseCurrentHandler.java
org.eclipse.egit.ui/src/org/eclipse/egit/ui/uitext.properties