Rework the rebase dialog
Created originally on Bitbucket by mjacob (Manuel Jacob)
The help page for the hg rebase
command lists four different ways to select changesets:
- Explicitly select them using "--rev".
- Use "--source" to select a root changeset and include all of its descendants.
- Use "--base" to select a changeset; rebase will find ancestors and their descendants which are not also ancestors of the destination.
- If you do not specify any of "--rev", "source", or "--base", rebase will use "--base ." as above.
TortoiseHG doesn’t support the first way currently. With evolve, it makes more sense because it enables to rebase a single changeset and leave its descendants orphan.
The second way is the default in TortoiseHG. Currently, there’s no way to preview the set of all changesets that will be rebased.
The third way is supported by enabling the corresponding --base
checkbox. However in this case the label "Rebase changeset and descendants" isn’t accurate.
The fourth option is mainly of interest to CLI users.
I propose the following behavior:
- as a first step, the user selects whether they want the first, second or third way of selecting changesets
- then, the user selects the changeset(s) that will be passed to the
--rev
,--source
or--base
option - a preview shows the set of all changesets that will be rebased
If there’s consensus, I’ll create two pull requests for implementing the proposed behavior:
- the first will add a dropdown for enabling the desired way of selecting changesets and a preview box
- the second will add the possibility to rebase an explicit set of changesets (to be passed to the
--rev
option