Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 17 Jun 2018 00:15:18 +0200] rev 3861
rewind: obsolete latest successors unless instructed otherwise
To prevent the creations of divergence, we automatically mark the successors set
of the rewinded changeset as obsoleted by the rewind result. A new flag
`--as-divergence` is added to disable this behavior.
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 16 Jun 2018 23:32:22 +0200] rev 3860
rewind: test rewinding an amended changesets
We are now able to rewind a simple amended changeset. For now, its current
successors has not been obsoleted and we created divergence.
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 17 Jun 2018 00:57:09 +0200] rev 3859
rewind: add a message about the rewinded changesets
This helps to understand what happened.
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 16 Jun 2018 23:11:52 +0200] rev 3858
rewind: add a proto version of the command
This first version focus on rewinding a single revision without care for the
consequence.
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 29 Jun 2018 16:51:56 +0200] rev 3857
stablesort: make sure heads are processed in sorted order
changeset 72621094505f will fix some ordering issue in the `heads` revset so we
stabilise the output in advance.
Pulkit Goyal <7895pulkit@gmail.com> [Tue, 19 Jun 2018 23:21:54 +0530] rev 3856
evolve: move the bookmarks also when updating to successor (issue5923)
When we are on an obsolete node and does `hg evolve`, it updates to it's
sucessor, however it does not move the bookmark to the successor.
This patch adds logic to make sure we move the bookmark too.
Test change demonstrates the fix.
Pulkit Goyal <7895pulkit@gmail.com> [Tue, 19 Jun 2018 23:21:44 +0530] rev 3855
tests: add test to demonstrate issue5923
This will be fixed in upcoming patch.
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 28 Jun 2018 17:26:16 +0200] rev 3854
changelog: add an entry about the new `evolve.interrupted` section
Pulkit Goyal <7895pulkit@gmail.com> [Fri, 15 Jun 2018 00:50:17 +0530] rev 3853
evolve: make one missed error to align other error messages
Previous patches missed this error to change it to the new format. Let's align
this with all other messages raised by `hg evolve` command.
Pulkit Goyal <7895pulkit@gmail.com> [Fri, 15 Jun 2018 00:16:29 +0530] rev 3852
evolve: raise error.InterventionRequired instead of Abort when conflicts
error.InterventionRequired is a better error to raise in such cases.
Thanks to marmoute for noticing this.
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 14 Jun 2018 02:58:30 +0200] rev 3851
changelog: add a changelog entry about divergence resolution
We made a lots of progress there.
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 14 Jun 2018 01:39:33 +0530] rev 3850
evolve: create resolved cset on successors of current parents
While resolving content-divergence, sometimes, the parent can be obsolete and
have a successor. We should consider the successors of the parents instead of
obsolete parents as that will do something like orphan+content-divergence
resolution both at the same time which is powerful and results in a single stack
while resolving content-divergence of stacks.
The test changes demonstrates that we can now successfully evolve a content
divergent stack.
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 14 Jun 2018 01:39:11 +0530] rev 3849
tests: fix a test case to not create conflicts
This is the test case where we are testing about divergence resolution of stack
of patches. If the stack is as follows:
C1 C2
| |
B1 B2
| |
A1 A2
\/
base
And A1-A2, B1-B2 and C1-C2 are content-divergent, and merging A1-A2 results in
conflicts.
Now if you resolve conflicts and continue resoling B1-B2, the conflicts of A1-A2
will still be there. We need somehow to understand the work we has done and not
create conflicts again.
To test the evolution functionality for now, we make sure conflicts does not
occur.
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 14 Jun 2018 01:06:12 +0530] rev 3848
evolve: introduce a resolutionparent variable and store it in evolvestate
This patch introduces a resolutionparent variable which will be the parent of
final changeset after resolving content-divergent changesets.
Till now, the parent is always the parent of one of the divergent node, but now
in upcoming cases, it can be a successor of both the parents of divergent nodes.
Pulkit Goyal <7895pulkit@gmail.com> [Wed, 13 Jun 2018 18:08:57 +0530] rev 3847
evolve: introduce a dirstatedance() fn to fix dirstate after parent change
This patch introduces a dirstatedance() function which will be used after fixing
the dirstate when we change parents using repo.dirstate.setparents().
Look at docs added for more details.
Pulkit Goyal <7895pulkit@gmail.com> [Wed, 13 Jun 2018 17:15:10 +0530] rev 3846
evolve: create a new commit instead of amending one of the divergents
This patch changes the behavior of evolve command while resolving
content-divergence to create a new commit instead of amending one of the
divergent ones.
In past, I have made this change, backed out this change and now today again I
am doing this change, so let's dive in some history.
Using cmdrewrite.amend() was never a good option as that requires hack to delete
the evolvestate and also gives us less control over things. We can't make the
commit on top of different parents as that of content-divergent ones. Due to all
these, I first made this change to create a new commit instead of amending one.
But, after few days, there was flakiness observed in the tests and turned out
that we need to do some dirstate dance as repo.dirstate.setparents() does not
always fix the dirstate. That flakiness was a blocker for progress at that time
and we decided to switch to amend back so that we can have things working with
some hacks and we can later fix the implementation part.
Now, yesterday while tackling resolving content-divergence of a stack which is
as follows:
C1 C2
| |
B1 B2
| |
A1 A2
\/
base
where, A1-A2, B1-B2, C1-C2 are content-divergent with each other. Now we can
resolve A1-A2 very well because they have the same parent and let's say that
resolution leads to A3.
Now, we want to resolve B1-B2 and make the new resolution commit on top of A3 so
that we can end up something like:
C3
|
B3
|
A3
|
base
however, amending one of the divergent changesets, it's not possible to create a
commit on a different parent like A3 here without some relocation. We should
prevent relocation as that may leads to some conflicts and should change the
parent before committing.
So, looking ahead, we can't move with using amend as still using that we will
need some relocation hacks making code ugly and prone to bad behaviors, bugs.
Let's change back to creating a new commit so that we can move forward in a good
way.
About repo.dirstate.setparents() not setting the dirstate, I have researched
yesterday night about how we can do that and found out that we can use
cmdrewrite._uncommitdirstate() here. Expect upcoming patches to improve the
documentation of that function.
There are lot of test changes because of change in hash but there is no behavior
change. The only behavior change is in test-evolve-abort-contentdiv.t which is
nice because creating a new commit helps us in stripping that while aborting.
We have a lot of testing of content-divergence and no behavior change gives
enough confidence for making this change.
I reviewed the patch carefully to make sure there is no behavior change and I
suggest reviewer to do the same.
Pulkit Goyal <7895pulkit@gmail.com> [Tue, 12 Jun 2018 23:20:54 +0530] rev 3845
evolve: always order the revs to be evolved
The current code only order the revs if we are resolving orphans and not in
other case. The ordering is important when we pass --all and tackle multiple
occurence of the same instability.
Let's order the revs for each instability. There are enough test coverage of
phase-divergence and content-divergence that I feel confident doing it because
none of the test changed.
The change in test-evolve-content-divergent.t demonstrates the indeed ordering
helped.
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.