Wed, 07 Jul 2021 19:36:14 +0200 dirstate: add a `update_file` function
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 07 Jul 2021 19:36:14 +0200] rev 47611
dirstate: add a `update_file` function This function is the other side of the `set_tracked`/`set_untracked` API revamp. It is to be used when the dirstate is changing its parents during and update or a merge. It states all the information we know about the file so that the dirstate can update its internal data. Unlike the `set_tracked`/`set_untracked` it has not regards for the information previously tracked in the tristate. Differential Revision: https://phab.mercurial-scm.org/D11075
Thu, 08 Jul 2021 04:29:36 +0200 resolve: use the `parentchange` context manager to apply merge action
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 08 Jul 2021 04:29:36 +0200] rev 47610
resolve: use the `parentchange` context manager to apply merge action In an ideal world, we would not have to do that. However, we are miles away from being ready to not have to do it. So we add this context manager alongside a long comment. This will help use to get to the point were have two distinct API with strict rules about when to call them. Differential Revision: https://phab.mercurial-scm.org/D11074
Thu, 08 Jul 2021 22:08:32 +0200 sparse: adjust the temporary includes within a `parentchange` context
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 08 Jul 2021 22:08:32 +0200] rev 47609
sparse: adjust the temporary includes within a `parentchange` context This is related to dirstate adjustment. Differential Revision: https://phab.mercurial-scm.org/D11033
Thu, 08 Jul 2021 21:26:21 +0200 amend: adjust the dirstate within a `parentchange` context
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 08 Jul 2021 21:26:21 +0200] rev 47608
amend: adjust the dirstate within a `parentchange` context The adjustment in the direct consequence of the amend and the associated parents change. Differential Revision: https://phab.mercurial-scm.org/D11032
Thu, 08 Jul 2021 21:20:37 +0200 dirstate: use the right internal API in a test script
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 08 Jul 2021 21:20:37 +0200] rev 47607
dirstate: use the right internal API in a test script The goal of the script it to perform arbitrary internal operation to create incorrect state, so lets make it clear. Differential Revision: https://phab.mercurial-scm.org/D11031
Thu, 08 Jul 2021 19:06:32 +0200 sparse: clear rules in the context of a `parentchanges` context
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 08 Jul 2021 19:06:32 +0200] rev 47606
sparse: clear rules in the context of a `parentchanges` context This is the same logic as the change we did for narrow. Differential Revision: https://phab.mercurial-scm.org/D11029
Thu, 08 Jul 2021 18:59:55 +0200 sparse: make sure we adjust the dirstate at the same time as the parent
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 08 Jul 2021 18:59:55 +0200] rev 47605
sparse: make sure we adjust the dirstate at the same time as the parent This is more correct and help our API split. Differential Revision: https://phab.mercurial-scm.org/D11028
Thu, 08 Jul 2021 18:51:45 +0200 narrow: update narrow spec within a dirstate.parentchange context
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 08 Jul 2021 18:51:45 +0200] rev 47604
narrow: update narrow spec within a dirstate.parentchange context Even if the parents does not changes, the parents' content we consider is changed. So this seems legitimate. Differential Revision: https://phab.mercurial-scm.org/D11027
Thu, 08 Jul 2021 18:30:24 +0200 revert: use `set_untracked` instead of `drop` when applicable
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 08 Jul 2021 18:30:24 +0200] rev 47603
revert: use `set_untracked` instead of `drop` when applicable This is the new shiny API. Differential Revision: https://phab.mercurial-scm.org/D11026
Thu, 08 Jul 2021 04:47:36 +0200 revert: use `set_untracked` when performing a revert
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 08 Jul 2021 04:47:36 +0200] rev 47602
revert: use `set_untracked` when performing a revert This is the new shiny API. Differential Revision: https://phab.mercurial-scm.org/D11022
Thu, 08 Jul 2021 04:26:30 +0200 mq: use `set_untracked` in `qrename`
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 08 Jul 2021 04:26:30 +0200] rev 47601
mq: use `set_untracked` in `qrename` This is the new shiny API. Differential Revision: https://phab.mercurial-scm.org/D11021
Thu, 08 Jul 2021 01:06:46 +0200 context: use `dirstate.set_untracked` in `context.forget`
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 08 Jul 2021 01:06:46 +0200] rev 47600
context: use `dirstate.set_untracked` in `context.forget` This is the new shiny API. Differential Revision: https://phab.mercurial-scm.org/D11020
Thu, 08 Jul 2021 00:54:40 +0200 dirstate: add a `set_untracked` method for "hg remove"-like usage
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 08 Jul 2021 00:54:40 +0200] rev 47599
dirstate: add a `set_untracked` method for "hg remove"-like usage This is a step further toward clarifying the semantic of various dirstate call. See the justification for adding `set_tracked` for details. Differential Revision: https://phab.mercurial-scm.org/D11019
Thu, 08 Jul 2021 04:32:31 +0200 mq: use `set_tracked` in `qrename`
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 08 Jul 2021 04:32:31 +0200] rev 47598
mq: use `set_tracked` in `qrename` This is the new shiny API. Differential Revision: https://phab.mercurial-scm.org/D11018
Thu, 08 Jul 2021 03:42:14 +0200 mq: update the dirstate and its parent within a `parentchange` context
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 08 Jul 2021 03:42:14 +0200] rev 47597
mq: update the dirstate and its parent within a `parentchange` context This is more correct, and move our plan of separated API for different dirstate usage forward. note: maybe the `parentchange` context manager should replace the dirstateguard entirely ? (in this case we should probably deprecated dirstateguard). Differential Revision: https://phab.mercurial-scm.org/D11017
Thu, 08 Jul 2021 01:20:46 +0200 context: use `dirstate.set_tracked` for `revert`
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 08 Jul 2021 01:20:46 +0200] rev 47596
context: use `dirstate.set_tracked` for `revert` This is the new shiny API. Differential Revision: https://phab.mercurial-scm.org/D11016
Thu, 08 Jul 2021 00:57:25 +0200 context: use `dirstate.set_tracked` in context.copy
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 08 Jul 2021 00:57:25 +0200] rev 47595
context: use `dirstate.set_tracked` in context.copy This is the new shiny API. Differential Revision: https://phab.mercurial-scm.org/D11015
Thu, 08 Jul 2021 00:58:44 +0200 context: use `dirstate.set_tracked` in `context.add`
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 08 Jul 2021 00:58:44 +0200] rev 47594
context: use `dirstate.set_tracked` in `context.add` This is the new shiny API. Differential Revision: https://phab.mercurial-scm.org/D11014
Thu, 08 Jul 2021 03:03:34 +0200 dirstate: add a `set_tracked` method for "hg add"-like usage
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 08 Jul 2021 03:03:34 +0200] rev 47593
dirstate: add a `set_tracked` method for "hg add"-like usage This is a step further toward clarifying the semantic of various dirstate call. Having a dedicated function comes with a couple of benefits: 1) we can move duplicated logic about how to handle the previous state within the dirstate. Since we are sure this is always called in the same situation, we can implement that logic once in the dirstate. 2) having a dedicated method for this case unlock also having a dedicated method for the other case and recording more information at that time. All this leading having more code within the dirstate and higher level API that are less error prone. Differential Revision: https://phab.mercurial-scm.org/D11013
Sat, 10 Jul 2021 23:31:51 +0200 dirstate: add a function to update tracking status while "moving" parents
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 10 Jul 2021 23:31:51 +0200] rev 47592
dirstate: add a function to update tracking status while "moving" parents The `scmutil.dirstateparent` is moving the dirstate parent without touching the working copy. It is used by history-rewriting operations like amending of folding. The function was directly doing the "low level" computation and dirstate change. All that logic belong to the dirstate and should be moved there. For this purpose we introduce a new function that does just that and use it. Differential Revision: https://phab.mercurial-scm.org/D11012
Thu, 08 Jul 2021 10:05:23 +0200 dirstate: introduce an internal `_drop` method
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 08 Jul 2021 10:05:23 +0200] rev 47591
dirstate: introduce an internal `_drop` method We want to split current user of `dirstate.drop` between `hg rm`-like cases and update of the dirstate coming from update/merge. To do this we will introduce new API. The first step is to introduces an internal function that these new API migh use (or not use) to distinct between the migrated users and the others. Differential Revision: https://phab.mercurial-scm.org/D11023
Wed, 07 Jul 2021 19:32:22 +0200 dirstate: introduce an internal `_remove` method
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 07 Jul 2021 19:32:22 +0200] rev 47590
dirstate: introduce an internal `_remove` method We want to split current user of `dirstate.remove` between `hg rm`-like cases and update of the dirstate coming from update/merge. To do this we will introduce new API. The first step is to introduces an internal function that these new API migh use (or not use) to distinct between the migrated users and the others. Differential Revision: https://phab.mercurial-scm.org/D11011
Wed, 07 Jul 2021 19:31:52 +0200 dirstate: introduce an internal `_add` method
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 07 Jul 2021 19:31:52 +0200] rev 47589
dirstate: introduce an internal `_add` method We want to split current user of `dirstate.add` between `hg add`-like cases and update of the dirstate coming from update/merge. To do this we will introduce new API. The first step is to introduces an internal function that these new API migh use (or not use) to distinct between the migrated users and the others. Differential Revision: https://phab.mercurial-scm.org/D11010
Fri, 09 Jul 2021 22:37:24 +0200 run-tests: rely on an actual executable in PATH instead of alias for `hg`
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 09 Jul 2021 22:37:24 +0200] rev 47588
run-tests: rely on an actual executable in PATH instead of alias for `hg` The alias approach is poorly inherited by other process that the test might spawn. To solve this we use the same approach as for `python`/`python3` we write an executable file explicitly. Doing this fixes `which hg` invocation that now returns the same location as `hg`. Using chg server side has some minor effect on some stdout/stderr ordering when using `chg` as the server too. Differential Revision: https://phab.mercurial-scm.org/D11053
Fri, 09 Jul 2021 20:42:26 +0200 tests: blacklist a handful of test with `rhg` or `chg`
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 09 Jul 2021 20:42:26 +0200] rev 47587
tests: blacklist a handful of test with `rhg` or `chg` The use of `alias` to enforce `chg` and `rhg` means we are actually using a mix of `rhg`/`chg` and `hg` when calling `hg` in the test. Fixing this breaks various tests. This would be a large detour to fix that. I am disabling them for now with an appropriate comment. We would hopefully get back to them by the 5.8 release. Differential Revision: https://phab.mercurial-scm.org/D11052
Sat, 10 Jul 2021 01:58:34 +0200 run-tests: use more explicit signaling for `chg`
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 10 Jul 2021 01:58:34 +0200] rev 47586
run-tests: use more explicit signaling for `chg` Using a dedicated variable is clearer and less fragile. It cannot hurt. Differential Revision: https://phab.mercurial-scm.org/D11051
Sat, 10 Jul 2021 01:57:35 +0200 run-tests: drop the `rhg` flag for `hghave.py` if unset
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 10 Jul 2021 01:57:35 +0200] rev 47585
run-tests: drop the `rhg` flag for `hghave.py` if unset This seems cleaner. Differential Revision: https://phab.mercurial-scm.org/D11050
Fri, 09 Jul 2021 20:03:46 +0200 run-tests: introduce a `HGTEST_REAL_HG` variable for test
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 09 Jul 2021 20:03:46 +0200] rev 47584
run-tests: introduce a `HGTEST_REAL_HG` variable for test It turns out that currently, `hg` and `which hg` can point to different things because `hg` is an alias… This is annoying because script and pieces of test are unknowingly using the wrong `hg`. We will fix it in another changeset. However some test actually need to use a real `hg` binary and not some `chg` or `rhg` equivalent. So we introduce a new variable with the right value and we put it to us in the appropriate location. Differential Revision: https://phab.mercurial-scm.org/D11049
Fri, 09 Jul 2021 17:06:53 +0200 run-test: clarify the error with a bad --with-hg is passed
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 09 Jul 2021 17:06:53 +0200] rev 47583
run-test: clarify the error with a bad --with-hg is passed This helped me to understand what was going on when I got into trouble. Differential Revision: https://phab.mercurial-scm.org/D11046
Sat, 10 Jul 2021 17:19:07 +0200 windows: make sure we fully read and cleanly close the connection
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 10 Jul 2021 17:19:07 +0200] rev 47582
windows: make sure we fully read and cleanly close the connection Maybe this will prevent server on Windows to sometimes complains about the client closing the connection too soon. So we make sure we read everything and we officially close the connection. Hopefully Windows will be happier and the test will stop being flaky. Differential Revision: https://phab.mercurial-scm.org/D11073
(0) -30000 -10000 -3000 -1000 -300 -100 -50 -30 +30 +50 +100 +300 +1000 +3000 tip