Improve rebase handling after pull
Created originally on Bitbucket by colin-hurley (Colin Hurley)
Was already merged in Bitbucket before import, marked as merged by the import user
When the 'Rebase' checkbox in the Pull wizard is selected, MercurialEclipse will no longer attempt to automatically rebase when it knows the rebase will not succeed. This is currently determined by counting the number of heads in the current branch - if the current branch does not have exactly two heads, then automatic rebase is not possible, and one of the following alternative behaviors will be used:
- If the current branch has only one head after the pull, that means that the current changeset must be an ancestor of the new branch. That is, there is nothing that can be rebased onto the new tip. Therefore, it will simply update to the new tip instead. This has the same intended effect as a rebase (i.e. combine my current commit with the newly-pulled commits), without requiring the user to manually perform an update. Note that this automatic update is now what will happen (instead of an exception dialog being shown) when the scenario described in this bug ticket is encountered.
- If the current branch has more than two heads, the automatic rebase will not be able to determine which head to rebase onto. Therefore, the Rebase wizard is opened to allow the user to manually configure the rebase.
Fixes #551 (closed)