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.
Pulkit Goyal <7895pulkit@gmail.com> [Tue, 05 Jun 2018 03:49:49 +0530] rev 3788
evolve: store the base of content-divergents in evolvestate
We need the base changeset for merging commit messages, branches. Let's store it
in evolvestate.
Pulkit Goyal <7895pulkit@gmail.com> [Tue, 05 Jun 2018 00:53:21 +0530] rev 3787
evolve: use cmdrewrite.amend() instead of creating a new commit
This patch backs out changeset 88601e1cd5d8.
We replaced cmdrewrite.amend() with creating new commit because using amend(), a
high level function was not good and creating a new commit gave us more control
over things.
**HOWEVER** to get more control, you need to get arrange all the pieces together
perfectly. Creating a new commit, the existing logic has some bugs around
dirstate handling, the `repo.dirstate.setparents()` call especially. Sometimes
this fixes the dirstate correctly sometimes not.
As Pierre-Yves David said, "Having a "clumsy" implementation with the right
behavior is usually a good first step. So having an amend based implementation
seems like a good first step.", let's take a step back and get back using amend
so that we can have a correct basic implementation which is bug free.
Pulkit Goyal <7895pulkit@gmail.com> [Sun, 03 Jun 2018 01:59:41 +0530] rev 3786
corecompat: update the tests output to show phase update summary
eb9835014d20 in core added support to transactions to show a summary on the
phase changed during that transaction. Due to this, couple of tests output needs
to be updated. This patch does that.
While realeasing evolve, this patch should be backed out on branches where
hg<=4.6.
CORE-TEST-OUTPUT-UPDATE: eb9835014d20
Pulkit Goyal <7895pulkit@gmail.com> [Sun, 03 Jun 2018 03:24:43 +0530] rev 3785
CHANGELOG: add an entry about issue 5808 being fixed
Pulkit Goyal <7895pulkit@gmail.com> [Sun, 03 Jun 2018 03:21:25 +0530] rev 3784
next-prev: replace the error hint to mention about `--merge` flag
Pulkit Goyal <7895pulkit@gmail.com> [Sun, 03 Jun 2018 03:13:47 +0530] rev 3783
tests: add tests for conflicts while respecting commands.update.check
This patch adds tests to check that we don't run into conflicts while respecting
commands.update.check.
The error message now does not show the hint about --merge option which we
should fix.
Pulkit Goyal <7895pulkit@gmail.com> [Sun, 03 Jun 2018 02:37:13 +0530] rev 3782
next: respect `commands.update.check` config option in `hg next` (issue5808)
`commands.update.check` config option determines what level of checking should
be done when we update to another revision. When we set this config option to
`noconflict`, it updates your working directory to a specified revision only
when there will be no conflicts which is a very nice behavior.
This patch adds logic to respect the config option so that we can have that nice
behavior with `hg next` too.
It turns out, we just needed to use hg.updatetotally() and add some cases to
check config option.
Right now, we only respect the config if value is set to `noconflict`. Otherwise
we fallback to the default behavior.
This is a part of fixing issue5808. Test changes demonstrate the fix.
Pulkit Goyal <7895pulkit@gmail.com> [Sun, 03 Jun 2018 02:36:24 +0530] rev 3781
prev: respect `commands.update.check` config option in `hg prev` (issue5808)
`commands.update.check` config option determines what level of checking should
be done when we update to another revision. When we set this config option to
`noconflict`, it updates your working directory to a specified revision only
when there will be no conflicts which is a very nice behavior.
This patch adds logic to respect the config option so that we can have that nice
behavior with `hg prev` too.
It turns out, we just needed to use hg.updatetotally() and add some cases to
check config option.
Right now, we only respect the config if value is set to `noconflict`. Otherwise
we fallback to the default behavior.
This is a part of fixing issue5808. Test changes demonstrate the fix.
Pulkit Goyal <7895pulkit@gmail.com> [Sun, 03 Jun 2018 02:50:55 +0530] rev 3780
tests: add test demonstrating issue5808
This patch adds test showing that `next` and `prev` does not respect the
`commands.update.check` config option, particularly when set to `noconflict`.
Pulkit Goyal <7895pulkit@gmail.com> [Sun, 03 Jun 2018 02:26:19 +0530] rev 3779
next: bail out early in `hg next --evolve` if dirty wdir
This patch adds logic to bail out early when --evolve is passed with next
command and the working directory is dirty.
This will help us in preventing the message saying `do you want --merge` which
is useless and misleading when `--evolve` is passed.
Pulkit Goyal <7895pulkit@gmail.com> [Sun, 03 Jun 2018 02:24:28 +0530] rev 3778
tests: add test of `hg next --evolve` with dirty working directory
I was testing some output change to `hg next --evolve` in dirty working
directory and found that we don't have any test for that.
Pulkit Goyal <7895pulkit@gmail.com> [Sun, 03 Jun 2018 03:35:22 +0530] rev 3777
CHANGELOG: add an entry about fixing issue5897
Pulkit Goyal <7895pulkit@gmail.com> [Sun, 27 May 2018 02:32:58 +0530] rev 3776
evolve: fix `hg abort` when hg next --evolve leads to conflicts (issue5897)
Before this patch, if you do `hg next --evolve` and end up having conflicts and
then you try `hg abort`, it will throw a KeyError. This patch fixes that.
Pulkit Goyal <7895pulkit@gmail.com> [Wed, 30 May 2018 00:34:35 +0530] rev 3775
tests: add a test demonstrating issue5897
When conflicts are caused due to `hg next --evolve`, `hg evolve --abort` breaks!
This patch adds test to demonstrate that. This will be fixed in next patch.
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 24 May 2018 17:50:02 +0530] rev 3774
evolve: add an `--update` flag to `hg evolve` command
This patch adds a new `--update` flag which defaults to True. The update flag
updates the working directory to the head of evolved revisions after `hg evolve`
command.
This flag can be used to not update your working directory after `hg evolve`
which has been one of the biggest feature request from fig team at Google. To
not update your working directory, the user can do `hg evolve --no-update`.
If the working directory get obsoleted by evolve command, it will update to the
successor.
This patch also adds some basic tests for the flag introduced.
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 24 May 2018 02:02:11 +0530] rev 3773
tests: add tests for testing --abort while content-divergence resolution
This patch adds a new test file with a very basic test of `--abort` on an
interrupted evolve which was resolving content-divergence. Upcoming patches will
add more rigourous tests.
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 24 May 2018 00:58:50 +0530] rev 3772
evolve: fix storage of replacements and temprevs node in evolvestate
The _completephaseivergent() was not respecting rules on how to store the new
node ids created in evolvestate. The rules are:
* store the temporary relocated commits in temprevs
* store the final new commit in replacements
This patch make sure we follow the above rules and also use the return value
returned by _resolvephasedivergence().
The tests change demonstrates that we are all good now.
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 24 May 2018 00:58:35 +0530] rev 3771
tests: add more tests related to aborting while resolving phase-divergence
The tests shows the something is still broken related to abort while resolving
phase-divergence which will be fixed in upcoming patches.
Denis Laxalde <denis.laxalde@logilab.fr> [Wed, 23 May 2018 12:16:24 +0200] rev 3770
topic: suggest to clear a topic that becomes empty
We add a hint suggesting "hg topic --clear" when a topic becomes empty.
This usually happens when all its changesets get public, that is when
the user does a 'phase -p' or when they pull from a server. To
discriminate relevant cases for which we should display the hint (and
typically exclude explicit 'hg topic --clear' operation), we look for
the transaction "type" to only consider 'phase' or 'push' transaction.
In the latter case, the transaction name is not simply 'push-response'
but it also included the remote URL so we need to match on string
content.
Denis Laxalde <denis.laxalde@logilab.fr> [Wed, 23 May 2018 11:37:37 +0200] rev 3769
topic: display a hint pointing at help when a topic becomes non-empty
This is an attempt at avoiding "mistakes" by new users of topics when
they pull a topic and publish its changesets while being checked out. In
this case, the topic will become empty but still be active; however, if
this is a "foreign" topic, the user will not likely want to keep it
active for the next commit operation. So we add a hint message pointing
at general help of "topics" command so that they can eventually do
something and learn about "hg topics --clear".
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 24 May 2018 18:57:46 +0200] rev 3768
branching: merge with compat fix on default
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 24 May 2018 01:50:26 +0530] rev 3767
evolve: add compat for repair.stripbmrevset which is moved to scmutil
This patch adds compatibility logic for repair.stripbmrevset() which is moved to
scmutil as bookmarkrevs().
This fixes test-prune.t failure.
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 23 May 2018 11:18:14 +0200] rev 3766
evolve: update the readme with more information about contribution
Denis Laxalde <denis.laxalde@logilab.fr> [Wed, 23 May 2018 11:03:31 +0200] rev 3765
topic: dedent items about publishing behavior in docstring
Also change item bullets from '#' to '*'.
Denis Laxalde <denis.laxalde@logilab.fr> [Wed, 23 May 2018 11:00:11 +0200] rev 3764
topic: use preformatted block for config snippets documentation
We add :: markers, empty line and properly indent blocks where needed.
Denis Laxalde <denis.laxalde@logilab.fr> [Wed, 23 May 2018 11:09:37 +0200] rev 3763
tests: add a test for "hg help -e topic"
Currently, some configuration snippets do not render well; we'll fix
this in forthcoming changesets.
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 23 May 2018 01:24:02 +0200] rev 3762
branching: merge with stable
Pulkit Goyal <7895pulkit@gmail.com> [Tue, 22 May 2018 21:33:50 +0530] rev 3761
content-div: add test showing `--stop` works during interrupted resolution
This patch adds a test showing that the --stop flag of `hg evolve` works well
during interrupted content-divergence resolution.
The --stop flag now works with all the three different type of instability
resolution very well and we should advertise it more.
Pulkit Goyal <7895pulkit@gmail.com> [Mon, 23 Apr 2018 14:48:53 +0530] rev 3760
evolve: create new commit while resolving content-divergence
Before this patch, we used to amend one of the content-divergent changes with
the changes from the merge. Creating a new commit will certain advantages like
letting user enter a commit message, showing user the new merge diff before
commiting the content-divergent resolution and give us more control in the
implementation part.
The reason amend was used initially was just because it was easy. There are some
tests update due to change.
Pulkit Goyal <7895pulkit@gmail.com> [Tue, 22 May 2018 20:33:42 +0530] rev 3759
content-divergence: store the resolved revs in evolvestate['replacements']
The support for continuing a conflicted content-divergence resolution was added
some time ago. That support lacked storing of the resolved rev in the
evolvestate['replacements'] which marks the node as resolved and does not try to
resolve that node again.
Since we didn't store, the resolution, processes the same node again. This patch
makes sure we store the information in evolvestate that a certain
content-divergent node is resolved to prevent pre-processing it again.