Martin von Zweigbergk <martinvonz@google.com> [Wed, 25 Jul 2018 15:30:37 -0700] rev 3901
builddependencies: don't remove found deps when divergence found (issue5946)
It seems obviously wrong to not keep any dependencies for a revision
that we had already found (for p1) if we run into divergence (from
p2). It also happens to fix issue5946 :)
Martin von Zweigbergk <martinvonz@google.com> [Wed, 25 Jul 2018 14:47:16 -0700] rev 3900
builddependencies: don't add dependency on revision outside input set
This was already handled in the single-successor case, but had been
missed in the multiple-successors case.
Note that there seems to be a copy of builddependencies() in the
topics extension. I don't use topics more than I have to, so I'll let
someone else fix that code.
Martin von Zweigbergk <martinvonz@google.com> [Wed, 25 Jul 2018 15:16:25 -0700] rev 3899
builddependencies: consider all divergent successors
We were only considering one. In test-evolve-abort-conentdiv.t:165,
the input revs were {5, 8} and dependency dict was {8: set([]), 5:
set([10])}, which is a little weird (10 is not in the input set). It
still worked because the callers used it (they seemed to only care if
there were *any* dependencies).
This patch fixes the issue by considering all successors. That means
the dependency dict will be {8: set([]), 5: set([8, 10])} after this
patch. The next patch will remove the 10 from that set.
Martin von Zweigbergk <martinvonz@google.com> [Wed, 25 Jul 2018 14:00:49 -0700] rev 3898
tests: add test for issue5946
The test case is a copy of the one for 5833. The only difference is
that the merge parents are recorded in the opposite order (and that
the test is truncated because it fails).
Boris Feld <boris.feld@octobus.net> [Fri, 25 May 2018 17:17:56 +0200] rev 3897
obslog: check filtered output with folded changesets
Boris Feld <boris.feld@octobus.net> [Fri, 25 May 2018 16:50:04 +0200] rev 3896
obslog: check filtered output with splitted changesets
Boris Feld <boris.feld@octobus.net> [Fri, 25 May 2018 11:52:48 +0200] rev 3895
obslog: check filtered output with pruned changesets
Boris Feld <boris.feld@octobus.net> [Tue, 22 May 2018 16:48:35 +0200] rev 3894
obslog: check filtered output with amended changesets
Boris Feld <boris.feld@octobus.net> [Fri, 25 May 2018 11:48:19 +0200] rev 3893
tests: add a content-divergent obshistory test
Boris Feld <boris.feld@octobus.net> [Tue, 22 May 2018 17:44:05 +0200] rev 3892
tests: extract the obshistory amend then fold test case into a separate file
Boris Feld <boris.feld@octobus.net> [Tue, 22 May 2018 17:42:56 +0200] rev 3891
tests: extract the content-divergence test case into a separate file
Boris Feld <boris.feld@octobus.net> [Tue, 22 May 2018 17:41:57 +0200] rev 3890
tests: extract the obshistory fold test case into a separate file
Boris Feld <boris.feld@octobus.net> [Tue, 22 May 2018 17:40:56 +0200] rev 3889
tests: extract the obshistory lots of split test case into a separate file
Boris Feld <boris.feld@octobus.net> [Tue, 22 May 2018 17:37:51 +0200] rev 3888
tests: extract the obshistory split test case into a separate file
Boris Feld <boris.feld@octobus.net> [Tue, 22 May 2018 17:37:40 +0200] rev 3887
tests: extract the obshistory prune test case into a separate file
Boris Feld <boris.feld@octobus.net> [Tue, 22 May 2018 15:40:29 +0200] rev 3886
tests: extract the obshistory amend test case into a separate file
Boris Feld <boris.feld@octobus.net> [Tue, 22 May 2018 15:35:54 +0200] rev 3885
tests: extract obshistory setup in a separate file
We are gonna soon explode the obshistory test file into several, extract the
setup to reuse it as much as possible.
Boris Feld <boris.feld@octobus.net> [Tue, 22 May 2018 12:07:24 +0200] rev 3884
obslog: add a new flag to filter out non-local nodes
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 26 Jul 2018 18:28:44 +0200] rev 3883
compat: drop compatibility hack for mercurial <4.3
We no longer support version prior 4.3.
Pulkit Goyal <7895pulkit@gmail.com> [Sat, 21 Jul 2018 02:42:29 +0530] rev 3882
compat: temporarily move copies fix to compat.py
This patch moves a fixed version of copies._fullcopytracing() to compat.py as
this was not fixed in core before release and also we need to do this anyway for
the older versions of mercurial.
This fix is that when base changeset is not ancestor of any of the merging
commits, we don't throw an error.
The phabricator differential which will fix this in core is
https://phab.mercurial-scm.org/D3896.
This fixes the traceback we get in previous changeset while relocating one of
the content-divergent changeset.
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 07 Jun 2018 18:18:30 +0530] rev 3881
evolve: continue conflicted relocation content-divergence
This patch adds logic to continue an conflicted content-divergence resolution
which was interrupted while relocating one of the divergent commits.
The tests shows the there is some mishandling of copies internally which will be
fixed in next patch.
Anton Shestakov <av6@dwimlabs.net> [Wed, 18 Jul 2018 18:17:16 +0800] rev 3880
topic: use self instead of repo in topicrepo methods
Referring to repo here was somehow preventing it from being garbage-collected
(important in hgweb, where currently every request gets a new repo).
Pulkit Goyal <7895pulkit@gmail.com> [Sun, 08 Jul 2018 22:16:17 +0530] rev 3879
evolvecmd: introduce fn to be wrapped by extensions resolving content-div
The function added will be used by extension by wrapping it and adding logic to
merge data introduced by them. For example: topic extension can wrap this
function and add logic to merge topic names.
Pulkit Goyal <7895pulkit@gmail.com> [Sun, 08 Jul 2018 21:18:33 +0530] rev 3878
evolvecmd: move remaining logic to merge commit desc to existing utility fn
This was a bit awful because we had a utility function and still we did some of
merging outside of that fn. So let's move the remaining parts there.
Pulkit Goyal <7895pulkit@gmail.com> [Sun, 08 Jul 2018 22:52:33 +0530] rev 3877
amend: allow aborting an `amend --patch` by saving an empty file (issue5925)
This patch fixes issue5925 by allow aborting a `hg amend --patch` call by saving
an empty patch file. This is similar to aborting of `hg amend` when commit
message is empty.
Test changes demonstrate the fix.
Pulkit Goyal <7895pulkit@gmail.com> [Sun, 08 Jul 2018 22:50:16 +0530] rev 3876
tests: add a test to demonstrate issue5925
The issue will be fixed in next patch.
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 09 Jul 2018 01:18:40 +0200] rev 3875
test: fix possible output change from 4.7
Change in debug timing can display these extra messages.
Martin von Zweigbergk <martinvonz@google.com> [Fri, 06 Jul 2018 11:36:24 -0700] rev 3874
state: add the get() method that evolvecmd:1836 expects
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 17 Jun 2018 03:56:54 +0200] rev 3873
rewing: prevent rewind in case of uncommitted changes
rewind can update, which means merge and troubles. We might relax this
limitation in the future.
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 17 Jun 2018 03:46:46 +0200] rev 3872
rewind: default to rewinding the current stack
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 17 Jun 2018 03:10:19 +0200] rev 3871
rewing: add the ability to rewind "from" revisions
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 17 Jun 2018 03:29:34 +0200] rev 3870
evolve: exclude "identical" precursors from the precursors set
I'm not sure it is the right thing to do, but it simply thing a lot for now.
Otherwise, using 'precursors' to find rewind direction become too complex.
This is going to give problematic result in case of prune. Since there are no
other precursors to follow.
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 17 Jun 2018 03:07:53 +0200] rev 3869
rewind: move revision selection into its own function
This will help making the logic more advanced.
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 17 Jun 2018 02:32:29 +0200] rev 3868
rewind: automatically rewind entire stack
We now rewind the full stack, avoiding creating orphans. A `--exact` flag is
added to force rewinding only the explicitly specified changesets.
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 17 Jun 2018 02:22:28 +0200] rev 3867
rewind: add a test about rewinding top of stack
For now this rewind is creating an orphan. We add the test to check the behavior
in that case.
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 17 Jun 2018 02:03:03 +0200] rev 3866
rewind: use rewinded parent when creating multiple changesets
Use use the rewinded parent instead of creating orphans based on identical, but
obsolete, changesets.
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 17 Jun 2018 00:22:31 +0200] rev 3865
rewind: add a test for rewinding a fold
The code already have basic support for case. However the result create orphan
that will need to be improved. However, we keep this changeset simple.
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 17 Jun 2018 01:36:30 +0200] rev 3864
rewind: add a test for rewinding a split
There are no code change needed but it is worth testing on its own.
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 17 Jun 2018 00:33:43 +0200] rev 3863
rewind: update the working copy if it gets obsoleted
If the working copy parent is rewinded, follow the rewind.
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 17 Jun 2018 01:04:20 +0200] rev 3862
rewind: add a message about obsolete changeset
Not the best output, but useful to have the data. We can improve that later.
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.