Pulkit Goyal <7895pulkit@gmail.com> [Tue, 12 Jun 2018 21:13:02 +0530] rev 3844
tests: add test of resolution of content-divergent stacks
This patch adds a test of resolution of content-divergence stacks where a series
of changesets get mutated as two different series resulting in whole
content-divergent stacks.
As the tests shows, we are not processing the changesets in right order which
needs to be fixed first.
Pulkit Goyal <7895pulkit@gmail.com> [Tue, 12 Jun 2018 19:00:12 +0530] rev 3843
evolve: improve error messages when conflicts occur
This patch improves the error messages when conflicts occur.
First, we drop the line 'evolution failed', that is not the best line we can
show and evolution didn't failed, it's just interrupted by the conflicts and
when user will run `hg evolve --continue`, things will be fine. I still remember
when I first saw 'evolution failed', I got a bit scare as am I in a recoverable
position or not. So let's drop this scary line.
Second, we replace the error messages to say `resolve conflicts and see
help-topic`. The help topic was added recently and documents all the three flags
very well. Addition of tests also showed that all the three flags works fine
with all the three instability type. So we should advertise them more.
Third, we now raise the error with our error message rather than raising
MergeFailure and having evolution related text in hint or stderr above. This
increase the focus on the error message we want to show.
After this patch, I think error messages by evolve in case of conflicts will be
same in every case.
Pulkit Goyal <7895pulkit@gmail.com> [Tue, 12 Jun 2018 04:01:19 +0530] rev 3842
evolve: point to `hg help evolve.interrupted` while resolving content-div
Recent test additions shows that --abort and --stop works well while resolving
content-divergence and we should advertise them. This patch does so by pointing
to evolve.interrupted help topic.
Pulkit Goyal <7895pulkit@gmail.com> [Tue, 12 Jun 2018 03:29:13 +0530] rev 3841
tests: add test about aborting content-divergence when multiple parents
This patch adds tests for --abort flag of hg evolve command when we are
resolving content-divergence which are on different parents and parent of one of
them is the gca of both of them.
The tests shows that we are doing good and we should advertise the flag during
conflicts.
Pulkit Goyal <7895pulkit@gmail.com> [Wed, 13 Jun 2018 15:47:19 +0530] rev 3840
CHANGELOG: add an entry about the --update flag
Since --update is still the default, we make the entry about --no-update.
Pulkit Goyal <7895pulkit@gmail.com> [Wed, 06 Jun 2018 04:29:05 +0530] rev 3839
evolve: show unfinished information in `hg status -v` (issue5886)
`hg status -v` shows information about unfinished states or `hg status` shows it
when `commands.status.verbose=True` is set.
Before this patch, information about interrupted evolve does not show up because
evolve does not resgiters in cmdutil.STATES. This patch make sure we register
evolve related information there.
There has been an idea to unify cmdutil.unfinishedstates and cmdutil.STATES
which needs some work and the resulting state does looks a bit complicated. So
till the time we unify them, let's fix this bug by registering in
cmdutil.STATES.
Denis Laxalde <denis.laxalde@logilab.fr> [Tue, 12 Jun 2018 13:58:14 +0200] rev 3838
style: drop a (commented) debug print
Left-over from 4dcf87849f9d.
Pulkit Goyal <7895pulkit@gmail.com> [Sun, 10 Jun 2018 20:58:55 +0530] rev 3837
tests: update tests output with changes in d0abd7949ea3 in core hg
CORE-TEST-OUTPUT-UPDATE: d0abd7949ea3
CORE-TEST-OUTPUT-UPDATE: 1e9c357d3ddf
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 12 Jun 2018 10:40:57 +0200] rev 3836
branching: merge with stable
Merging with the new 8.0.1 release.
Pulkit Goyal <7895pulkit@gmail.com> [Mon, 11 Jun 2018 23:31:44 +0530] rev 3835
Added tag 8.0.1 for changeset 0887c30255a1
Pulkit Goyal <7895pulkit@gmail.com> [Mon, 11 Jun 2018 23:30:24 +0530] rev 3834
packaging: prepare for 8.0.1 release
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 11 Jun 2018 20:24:45 +0200] rev 3833
changelog: add a couple of missing entry
Pulkit Goyal <7895pulkit@gmail.com> [Mon, 11 Jun 2018 20:17:56 +0530] rev 3832
evolve: strip the extra obsmarkers if any on `hg evolve --abort`
Previous patches started storing some obsmarkers which needs to stripped during
`evolve --abort` which can't be stripped by stripping the new evolved changesets
because they point to a node which existed before the evolution was performed.
This patch adds logic to strip those obsmarkers by finding their indices in the
obsstore and then stripping them.
Pulkit Goyal <7895pulkit@gmail.com> [Mon, 11 Jun 2018 20:13:36 +0530] rev 3831
evolve: store the obsmarkers to be deleted in evolvestate
Sometimes, we don't create a new node and obsolete one of the old node in favour
of an existing node. When user calls, `hg evolve --abort`, we need to strip that
obsmarker to go back in the same old state. The obsmarker created for new node
are stripped when the new nodes are stripped.
This patch start storing such obsmarkers in the evolvestate so that we can delete
them later if required. Right now we just store successsor and predecessor
information, we might need a better obsmarker serialization techinque in future
to make it more robust.
Pulkit Goyal <7895pulkit@gmail.com> [Mon, 11 Jun 2018 15:52:11 +0530] rev 3830
evolve: store obsmarkers to be deleted in evolvestate
There are operations which don't create a new node rather they just obsolete one
of the unstable node in favour of existing one. In such cases if a further
resolution leads to conflicts and user calls `evolve --abort` or `evolve
--stop`, we might need to delete that obsmarker. So let's store such obsmarkers
in the evolvestate.
Pulkit Goyal <7895pulkit@gmail.com> [Mon, 11 Jun 2018 15:38:43 +0530] rev 3829
evolve: factor out logic to merge branches in separate function
This patch moves the logic to merge branches while resolving content-divergence
to a separate function.
This makes code clear and better to understand.
Pulkit Goyal <7895pulkit@gmail.com> [Mon, 11 Jun 2018 01:00:57 +0530] rev 3828
tests: add more test of --stop while resolving content-divergence
This tests the --stop flag when conflicts occur while relocating one of the
divergent changesets.
Pulkit Goyal <7895pulkit@gmail.com> [Mon, 11 Jun 2018 00:47:28 +0530] rev 3827
evolve: strip the relocation commit on `hg evolve --stop`
While resolving content-divergence on multiple parents, we relocate one of the
commit on the parent of another one and then merge the divergent changesets.
Merging can leads to conflicts, and if user does `hg evolve --stop`, we need to
strip that relocated changeset too! This patch does that.
Test changes demonstrates the fix.
Pulkit Goyal <7895pulkit@gmail.com> [Mon, 11 Jun 2018 00:43:39 +0530] rev 3826
evolve: declare updated and pctx variables in stopevolve()
They will used in next patch.
Pulkit Goyal <7895pulkit@gmail.com> [Sun, 10 Jun 2018 22:52:11 +0530] rev 3825
evolve: store the old other divergent node after relocation in evolvestate
When the content-divergent changes are on different parents and we relocate of
the node to the parent of another one, we get a new other-divergent node. We
still need to store the older other-divergent in evolvestate so that we can use
that information.
Pulkit Goyal <7895pulkit@gmail.com> [Sun, 10 Jun 2018 22:42:57 +0530] rev 3824
evolve: factor out logic for --stop flag in separate function
This will make code clean
Pulkit Goyal <7895pulkit@gmail.com> [Sun, 10 Jun 2018 22:38:08 +0530] rev 3823
tests: add test for --stop flag when resolving multiparents content-div
This patch adds a test for --stop flag when we are in an interrupted
content-divergent resolution which have multiple parents. Conflicts happen we
merge the divergent changesets after relocation. The test shows that we
need to strip the relocated changeset.
Pulkit Goyal <7895pulkit@gmail.com> [Sun, 10 Jun 2018 20:35:48 +0530] rev 3822
evolve: move logic to continue interrupted content-div resolution to new fn
Each of the other type has defined their own function to continue/complete the
interrupted resolution. We take out the logic for content-div resolution too in
a separate function to make the top level function looks clean.
Pulkit Goyal <7895pulkit@gmail.com> [Mon, 11 Jun 2018 01:12:12 +0530] rev 3821
evolve: rename help topic evolve.interrupted-evolve to evolve.interrupted
`evolve.interrupted-evolve` has the word evolve twice. Now that this help topic
is a part of evolve command, evolve.interrupted will mean the interrupted evolve
command only.
Pulkit Goyal <7895pulkit@gmail.com> [Sat, 09 Jun 2018 00:15:27 +0530] rev 3820
packaging: update tested-with statements in evolve and topic
Pulkit Goyal <7895pulkit@gmail.com> [Sat, 09 Jun 2018 00:12:08 +0530] rev 3819
CHANGELOG: mention about 4.6.1 compatibility
Pulkit Goyal <7895pulkit@gmail.com> [Fri, 08 Jun 2018 22:52:53 +0530] rev 3818
test-compat: merge mercurial-4.4 into mercurial-4.3
Pulkit Goyal <7895pulkit@gmail.com> [Fri, 08 Jun 2018 22:52:52 +0530] rev 3817
test-compat: merge mercurial-4.5 into mercurial-4.4
Pulkit Goyal <7895pulkit@gmail.com> [Fri, 08 Jun 2018 22:52:51 +0530] rev 3816
test-compat: merge stable into mercurial-4.5
Pulkit Goyal <7895pulkit@gmail.com> [Tue, 22 May 2018 23:51:57 +0530] rev 3815
utility: use ui.interactive() instead of checking config value
Before this patch, the rev selection prompt which pops up in case of ambiguity
to ask user to select a rev used to check the config value of ui.interactive
which can is by default set to None.
We should use ui.interactive() instead which is more smart in such cases.
Thanks to martinvonz for suggesting this.
Pulkit Goyal <7895pulkit@gmail.com> [Fri, 08 Jun 2018 19:48:53 +0530] rev 3814
CHANGELOG: add couple of entries about things fixed
We are preparing for a release!
Pulkit Goyal <7895pulkit@gmail.com> [Fri, 08 Jun 2018 17:36:28 +0530] rev 3813
next-prev: always respect the --merge flag
An earlier bug fix series which started respecting commands.update.check
introduced a bug in which --merge was not respected sometimes. This patch fixes
that behavior by passing updatecheck as 'none' to hg.updatetotally() if --merge
is passed which is similar to what `hg update` does.
Pulkit Goyal <7895pulkit@gmail.com> [Fri, 08 Jun 2018 18:32:48 +0530] rev 3812
next-prev: add tests showing --merge not respected in some cases
This patch adds tests which show that --merge is not respected when you set
commands.update.check to any value.
This is a bug I wrote few days ago and will fix it in next changeset.
I like this process of writing bugs and fixing them.
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 07 Jun 2018 22:59:39 +0530] rev 3811
evolve: store the evolvestate if relocation results in conflicts
We missed storing the evolvestate on disk when relocation lead to conflicts. We
need to store it to grab information to continue or abort or stop the evolve.
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 07 Jun 2018 22:45:54 +0530] rev 3810
tests: add more test of resolution of content-divergent changesets
This patch adds test of resolution of content-divergent changesets when
relocation is required and it leads to conflicts. The test shows that we are not
doing the right thing. This will be fixed in upcoming patches.
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 07 Jun 2018 18:18:10 +0530] rev 3809
evolvestate: store info about relocation while resolving content-divergence
While resolving content-divergence when they are on different parents, we
relocate one of the node to parent of another one and this can lead to conflicts
sometimes. So we need to store information about that state in evolvestate so
that we can use that when user does `hg evolve --continue` or `--stop` or
`--abort`.
Now that we make sure, we store the new other node in evolvestate, we fix the
behavior of handling the relocated commit and merge the right changesets.
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 07 Jun 2018 18:13:54 +0530] rev 3808
evolve: factor out logic to merge content divergent csets in separate fn
This will help us in reusing the logic if we need to while doing evolve
--continue.
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 07 Jun 2018 20:27:03 +0530] rev 3807
evolve: commit the transaction if conflicts occur while merging content-div
Yes, let's commit the transaction in case conflicts occur. Yes, this is what
unshelve does and this is one of the reasons we don't like unshelve.
Previous patches added support for resolving content-divergence when they are on
different parents with parent of one being the gca. In such cases, we relocate
one of the divergent commit to the parent of another one.
All the relocation stuff and merging divergent changeset stuff happens in a
single transaction, so if there are conflicts while merging, we abort and the
transaction rollsback and our relocated commit is not applied after abort.
We don't want to process the relocation because that can lead to conflicts and
we will have dirty wdir because of resolving conflicts.
So, we commit the transaction when merging results in conflicts to make sure if
relocation happened, we commit that.
This fixes the absence of relocation commit found in previous patch and uncover
a new bug about handling of relocated commit. Upcoming patch will fix it.
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 07 Jun 2018 15:54:32 +0530] rev 3806
tests: add tests for resolving content-divergence when different parents
This patch adds more tests for cases when we try to resolve content-divergence
when they are on different parents.
The last test shows the we are somehow missing the relocated commit in
interrupted transaction. This will be fixed in next patch.
Pulkit Goyal <7895pulkit@gmail.com> [Fri, 01 Jun 2018 19:52:06 +0530] rev 3805
evolve: implement resolution of content-divergence when on differet parents
This patch implements the basic version of resolution of content-divergence
changesets when they are on different parents but one of the parent is gca of
both the different parents.
The functionality first relocates the divergent changeset which was left behind
and then resolves the content-divergence like it resolves in normal cases.
This is a very basic implementation because it still does not work on
interrupted evolution. Test changes in this patch shows the basic functionality
working. The output of dry-run is also required to be tweaked in such cased.
Upcoming patches will add more tests and will improve the implementation to work
during conflicts too.
Pulkit Goyal <7895pulkit@gmail.com> [Fri, 01 Jun 2018 19:57:19 +0530] rev 3804
tests: add tests for resolving content-divergence with parent change
This patch adds a new test file test-evolve-content-divergence.t which tests the
resolution of content divergence when the divergent changesets does not have the
same parents.
Pulkit Goyal <7895pulkit@gmail.com> [Wed, 06 Jun 2018 03:49:17 +0530] rev 3803
CHANGELOG: add an entry about fixing issue5877
Pulkit Goyal <7895pulkit@gmail.com> [Wed, 06 Jun 2018 03:26:47 +0530] rev 3802
evolve: pop up editor if conflicts occur while merging commit messages
Last patch added support for merging commit messages while resolving content
divergence. In case of conflicts we fallback to one of the divergent commit
messages.
After this patch, we will pop up an editor where user has to resolve the
conflicts in the commit messages and then continue.
Tests are added for this. We need to fix handling in test-sharing.t to use
HGEDITOR to fix conflicts and pass the new commit message.
Future improvement can be that we should respect HGMERGE while merging commit
descriptions too.
Pulkit Goyal <7895pulkit@gmail.com> [Mon, 04 Jun 2018 01:28:02 +0530] rev 3801
evolve: merge commit messages while resolving content-divergence (issue5877)
While resolving content-divergence, there can be divergence in commit messages
too which should be resolved.
This patch uses the hg's internal merge API's to merge commit messages of
divergent changesets with predecessor as the base.
In case of conflicts, we fallback to divergent's commit message which should be
changed in future. We should pop up the editor with the commit message and the
conflict markers and let user fix that.
Tests are added for the functionality added.
Pulkit Goyal <7895pulkit@gmail.com> [Wed, 06 Jun 2018 01:19:36 +0530] rev 3800
evolve: move if-else block under the right block
the index related if-else should be only executed when all three base, divergent
and other have different branch names.
I coded this last night and mistakenly mis-indented it. Caught when I was adding
more tests.
Pulkit Goyal <7895pulkit@gmail.com> [Tue, 05 Jun 2018 22:02:24 +0530] rev 3799
tests: make sure we don't result in commit messages conflict
Upcoming patches will introduce functionality of merging commit messages while
resolving content divergence which can lead to conflicts.
We don't want to test the conflicts scenario here, so let's make sure there are
no conflicts of commit messages in this test.
Pulkit Goyal <7895pulkit@gmail.com> [Tue, 05 Jun 2018 21:02:09 +0530] rev 3798
tests: don't use mkcommit shell function in test-divergent.t
Upcoming series will start merging commit descriptions while resolving
content-divergence. This tests are here to test the basics of content-divegrence
resolution and we should not be testing much of commit description merge here.
Replacing mkcommit function with normal hg calls will help us decide on the
commit messages ourselves and prevent conflicts while merging commit messages.
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 06 Jun 2018 14:35:36 +0200] rev 3797
evolve: remove duplicated documentation
File saving failureā¦
Pulkit Goyal <7895pulkit@gmail.com> [Wed, 06 Jun 2018 04:09:49 +0530] rev 3796
evolve: show `hg help evolve.interrupted-evolve` in error when conflicts
The help list various flags which you can use during interrupted evolve
resolution and description about what they do. This will be very helpful for
user on how to continue an interrupted evolve.
Pulkit Goyal <7895pulkit@gmail.com> [Wed, 23 May 2018 01:11:59 +0530] rev 3795
evolve: add a help topic `Interrupted-Evolve`
This help topic contains description on how the various flags work during
interrupted evolve. This help topic will be included in error message during
interrupted evolve in next patch.
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 05 Jun 2018 03:37:15 +0200] rev 3794
branching: merge with stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 05 Jun 2018 03:36:40 +0200] rev 3793
changelog: fix version number error
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 24 May 2018 02:12:14 +0530] rev 3792
evolve: return the new node formed only as the replacement
sometimes, the the other content divergent changeset is obsoleted in favour of
the local divergent changeset in which case we should not store that as a
replacement because `hg evolve --abort` will strip that changeset. Let's make
sure we return the newnode only if formed.
The test results shows that we are still not 100% accurate as we need to strip
an obsmarker.
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 24 May 2018 17:04:20 +0530] rev 3791
tests: add more test of --abort flag for content-divergence resolution
This patch adds test when we resolve multiple content-divergence changesets at
once and resolution fo first content-divergence does not form new commits,
resolution of second one leads to conflicts.
As the output shows, we are wrongly stripping a changeset here, which should be
fixed in next patch.
Pulkit Goyal <7895pulkit@gmail.com> [Mon, 04 Jun 2018 04:03:02 +0530] rev 3790
evolve: prompt user for branch selection while resolving content-divergence
When resolving content-divergence, there can be case when both the
content-divergent changesets are on different named branches. In that case, we
are not sure which branch should the resolution commit should be on.
This patch adds logic to prompt user to choose the branch which the resolution
commit should be on and then creates the new resolution commit on that branch.
This also adds a new test file which have tests for the branch selection feature
we have added.
Pulkit Goyal <7895pulkit@gmail.com> [Tue, 05 Jun 2018 03:51:01 +0530] rev 3789
evolve: pass the base revision in _completecontentdivergent()
We need the base revision to merge commit messages, branches and more stuff.
Let's make sure we have that by passing into the function which completes the
divergence resolution.