Pulkit Goyal <7895pulkit@gmail.com> [Fri, 16 Mar 2018 13:13:21 +0530] rev 3551
prev: prompt user to choose parent in case of multiple parents
This patch adds functionality to `hg prev` to prompt user to choose one parent
to update when multiple parents exist.
Surprisingly there were no tests for this case before this patch, I added one
with this patch.
Pulkit Goyal <7895pulkit@gmail.com> [Fri, 16 Mar 2018 12:48:03 +0530] rev 3550
next: cleanup logic around return by returning early
In the cmdnext function, there are some conditionals which returns early and
some which sets a result value to be returned later. Let's return from all the
conditionals early.
There are if, elif and else involved, so it's sure we will end up in one of the
conditional, each conditional will return, so it's guranteed that we are
returning the correct value and returning everytime.
Pulkit Goyal <7895pulkit@gmail.com> [Fri, 16 Mar 2018 12:14:39 +0530] rev 3549
next: prompt user to choose child in ambiguity in `hg next --evolve`
This patch makes `hg next --evolve` prompt user to choose a child to evolve and
update when multiple of them exists. This is improvement over previous behavior
where we used to error out saying ambiguous next unstable changeset and told
user to manually use `hg evolve -r rev`. While writing this patch, I am
personally very happy to have this feature as I have encountered this stage many
times and I wanted `next --evolve` to take care of that.
It uses the revselectionprompt thing added in earlier patches.
Pulkit Goyal <7895pulkit@gmail.com> [Fri, 16 Mar 2018 11:56:50 +0530] rev 3548
next: move logic to evolve the children to it's own function
This patch moves the logic which evolves the children and updates to it in `hg
next --evolve` to it's own function as we want to use that again.
Pulkit Goyal <7895pulkit@gmail.com> [Fri, 16 Mar 2018 11:46:47 +0530] rev 3547
next: prompt user to choose a children in case of ambiguity
This patch adds functionality to prompt user and ask the children to which next
should move to incase of multiple childrens. This is a very nice UI because
otherwise user has to lookup changeset hash, and then manually do `hg update` to
that. In this case we show hash and description so user can choose which one to
update easily.
It is using the interactive revision choosing functionality added in a previous
patch.
Pulkit Goyal <7895pulkit@gmail.com> [Fri, 16 Mar 2018 11:31:13 +0530] rev 3546
next: show changeset hash in `--dry-run` instead of rev numbers
Rev numbers can change, hence we should show rev hash instead of rev numbers in
dry-run.
Pulkit Goyal <7895pulkit@gmail.com> [Sun, 18 Mar 2018 01:27:02 +0530] rev 3545
evolve: make sure we consider all cases in if-else
The part of code which is touched decides on evolution of merge changeset. We
need proper handling of each case there, so before adding logic, let's add
conditional for each case so that upcoming patches are easy to understand.
Pulkit Goyal <7895pulkit@gmail.com> [Mon, 19 Mar 2018 14:03:41 +0100] rev 3544
tests: add more cases about stabilization of an orphaned merge commit
This patch adds three more cases related to stabilization of orphaned merge
commits.
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 19 Mar 2018 13:47:07 +0100] rev 3543
evolve: fix missing negation
Spotted by Pulkit Goyal.
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 19 Mar 2018 12:01:07 +0100] rev 3542
evolve: clarify message for ambiguous destination from split
Message is a bit long, but should be less scary.
Pulkit Goyal <7895pulkit@gmail.com> [Wed, 14 Mar 2018 18:24:22 +0530] rev 3541
evolve: prompt user to select destination for stabilization in case of split
This patch adds functionality to prompt user to select a revision when there
exists multiple stabilization destination because of split on multiple branches.
Test are also added for the feature.
I am not sure whether this is the best message which we can show, if people have
suggestions I will like to improve the messages shown in prompt.
Pulkit Goyal <7895pulkit@gmail.com> [Wed, 14 Mar 2018 18:36:35 +0530] rev 3540
tests: remove some tests which are moved to dedicated files
The tests in test-unstable.t files are now moved to their dedicated file with
all the cases to that in that file. Let's delete them from here.
Pulkit Goyal <7895pulkit@gmail.com> [Fri, 16 Mar 2018 11:24:35 +0530] rev 3539
next: factor out the logic to update to changeset in another function
This patch moves the logic to update to children changeset during `hg next` in a
separate function because we want to re-use the logic when we will prompt user
to choose a changeset in case of multiple childrens.
Pulkit Goyal <7895pulkit@gmail.com> [Wed, 14 Mar 2018 17:59:53 +0530] rev 3538
utility: add a function to prompt user to choose a revision
This patch adds a utility function to interactively prompt user to choose a
revision to proceed in cases when there are multiple revisions which are
candidates.
The function will be used in `hg evolve`, `hg next`, `hg prev` etc. If user
feedback will be good, I plan to move it to core and use it at more possible
places.
Pulkit Goyal <7895pulkit@gmail.com> [Wed, 14 Mar 2018 17:20:20 +0530] rev 3537
tests: add a test about evolve stabilizing orphan caused by splits
There are some similar tests lying around in the test suite but they are not
well arranged. I wanted the test suite to be a goto reference for all the
behaviors till the time we get all of them documented.