Sun, 11 Jul 2021 16:11:58 +0200 run-test: rework the redirection script for python on windows
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 11 Jul 2021 16:11:58 +0200] rev 47639
run-test: rework the redirection script for python on windows This should get use something something overall simpler and clearer. Especially, we now have a `python.exe` script (even if by default Windows has `C:\Python27\python.exe` hardcoded in the register to open .py file) Differential Revision: https://phab.mercurial-scm.org/D11081
Sun, 11 Jul 2021 16:09:38 +0200 run-test: act that we requires MSYS to run the test on Windows
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 11 Jul 2021 16:09:38 +0200] rev 47638
run-test: act that we requires MSYS to run the test on Windows If this ever change we can drop that constrains, however for now it seems clear to be clear about this limitation. Differential Revision: https://phab.mercurial-scm.org/D11080
Sun, 11 Jul 2021 15:41:18 +0200 sigpipe-remote: display more information about the non-py3 python
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 11 Jul 2021 15:41:18 +0200] rev 47637
sigpipe-remote: display more information about the non-py3 python If we are running the wrong things, it is useful to know which wrong thing we are running. Differential Revision: https://phab.mercurial-scm.org/D11079
Sun, 11 Jul 2021 15:40:06 +0200 sigpipe-remote: check for python version earlier in the script
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 11 Jul 2021 15:40:06 +0200] rev 47636
sigpipe-remote: check for python version earlier in the script The should abort early, using the wrong python is a pretty bad sign. Differential Revision: https://phab.mercurial-scm.org/D11078
Sat, 10 Jul 2021 13:46:35 +0200 check-code: add a rules to catch os.path.abspath
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 10 Jul 2021 13:46:35 +0200] rev 47635
check-code: add a rules to catch os.path.abspath All previous usages have been migrated. So let us add a check-code rules to catch future usages. We restrict it to mercurial/ and hgext/ because multiple other script never depends on Mercurial modules. Differential Revision: https://phab.mercurial-scm.org/D11072
Sat, 10 Jul 2021 14:07:33 +0200 windows: use abspath in convert.subversion
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 10 Jul 2021 14:07:33 +0200] rev 47634
windows: use abspath in convert.subversion We replace `os.path.abspath` with `util.abspath`. This should solve more "drive capitalization" issue on Windows. Differential Revision: https://phab.mercurial-scm.org/D11071
Sat, 10 Jul 2021 14:07:25 +0200 windows: use abspath in convert.git
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 10 Jul 2021 14:07:25 +0200] rev 47633
windows: use abspath in convert.git We replace `os.path.abspath` with `util.abspath`. This should solve more "drive capitalization" issue on Windows. Differential Revision: https://phab.mercurial-scm.org/D11070
Sat, 10 Jul 2021 14:07:14 +0200 windows: use abspath in convert.bzr
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 10 Jul 2021 14:07:14 +0200] rev 47632
windows: use abspath in convert.bzr We replace `os.path.abspath` with `util.abspath`. This should solve more "drive capitalization" issue on Windows. Differential Revision: https://phab.mercurial-scm.org/D11069
Sat, 10 Jul 2021 14:07:02 +0200 windows: use abspath in the git extension
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 10 Jul 2021 14:07:02 +0200] rev 47631
windows: use abspath in the git extension We replace `os.path.abspath` with `util.abspath`. This should solve more "drive capitalization" issue on Windows. Differential Revision: https://phab.mercurial-scm.org/D11068
Sat, 10 Jul 2021 14:06:46 +0200 windows: use abspath in url
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 10 Jul 2021 14:06:46 +0200] rev 47630
windows: use abspath in url We replace `os.path.abspath` with `util.abspath`. This should solve more "drive capitalization" issue on Windows. Differential Revision: https://phab.mercurial-scm.org/D11067
Sat, 10 Jul 2021 14:06:39 +0200 windows: use abspath in subrepoutil
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 10 Jul 2021 14:06:39 +0200] rev 47629
windows: use abspath in subrepoutil We replace `os.path.abspath` with `util.abspath`. This should solve more "drive capitalization" issue on Windows. Differential Revision: https://phab.mercurial-scm.org/D11066
Sat, 10 Jul 2021 14:06:29 +0200 windows: use abspath in subrepo
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 10 Jul 2021 14:06:29 +0200] rev 47628
windows: use abspath in subrepo We replace `os.path.abspath` with `util.abspath`. This should solve more "drive capitalization" issue on Windows. Differential Revision: https://phab.mercurial-scm.org/D11065
Sat, 10 Jul 2021 14:06:19 +0200 windows: use abspath in hgwebdir
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 10 Jul 2021 14:06:19 +0200] rev 47627
windows: use abspath in hgwebdir We replace `os.path.abspath` with `util.abspath`. This should solve more "drive capitalization" issue on Windows. Differential Revision: https://phab.mercurial-scm.org/D11064
Sat, 10 Jul 2021 14:06:06 +0200 windows: use abspath in mercurial/hg.py
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 10 Jul 2021 14:06:06 +0200] rev 47626
windows: use abspath in mercurial/hg.py We replace `os.path.abspath` with `util.abspath`. This should solve more "drive capitalization" issue on Windows. Differential Revision: https://phab.mercurial-scm.org/D11063
Sat, 10 Jul 2021 14:05:59 +0200 windows: use abspath in extensions
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 10 Jul 2021 14:05:59 +0200] rev 47625
windows: use abspath in extensions We replace `os.path.abspath` with `util.abspath`. This should solve more "drive capitalization" issue on Windows. Differential Revision: https://phab.mercurial-scm.org/D11062
Sat, 10 Jul 2021 14:05:49 +0200 windows: use abspath in commandserver
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 10 Jul 2021 14:05:49 +0200] rev 47624
windows: use abspath in commandserver We replace `os.path.abspath` with `util.abspath`. This should solve more "drive capitalization" issue on Windows. Differential Revision: https://phab.mercurial-scm.org/D11061
Sat, 10 Jul 2021 14:05:38 +0200 windows: use abspath in chgserver
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 10 Jul 2021 14:05:38 +0200] rev 47623
windows: use abspath in chgserver We replace `os.path.abspath` with `util.abspath`. This should solve more "drive capitalization" issue on Windows. Differential Revision: https://phab.mercurial-scm.org/D11060
Sat, 10 Jul 2021 13:46:24 +0200 windows: introduce a `util.abspath` to replace os.path.abspath
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 10 Jul 2021 13:46:24 +0200] rev 47622
windows: introduce a `util.abspath` to replace os.path.abspath This will let us mitigate the drive letter capitalization hell. See inline comment for details. Differential Revision: https://phab.mercurial-scm.org/D11059
Sat, 10 Jul 2021 13:10:18 +0200 windows: enforce upper case drive letter for getcwd in mercurial too
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 10 Jul 2021 13:10:18 +0200] rev 47621
windows: enforce upper case drive letter for getcwd in mercurial too This is affecting code that checks if a pull/push destination is the same as a configured one. For example the one creating divergent bookmark. Doing this fixes will help fixing `test-bookmarks.t` and `test-bookflow.t` on Windows. However, we also need to fix `abspath` invocation. Differential Revision: https://phab.mercurial-scm.org/D11058
Fri, 09 Jul 2021 23:38:24 +0200 hg-ssh: normalize the drive of the current working directory on windows
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 09 Jul 2021 23:38:24 +0200] rev 47620
hg-ssh: normalize the drive of the current working directory on windows For some reason os.getcwd() can return either `c:` or `C:`. We normalize this to `C:` and the like. This fix `test-ssh-bundle1.t` on windows. Differential Revision: https://phab.mercurial-scm.org/D11042
Sat, 10 Jul 2021 01:15:03 +0200 run-tests: enforce the drive letter from `getcwd` to upper case
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 10 Jul 2021 01:15:03 +0200] rev 47619
run-tests: enforce the drive letter from `getcwd` to upper case For some reason os.getcwd() can return either `c:` or `C:` depending of which binary you used on Windows. We normalize this to `C:` and the like. This fix `test-run-tests.t` on windows as the drive letter in "$TESTTMP" was "wrongly" set to 'c:/' if the test path wasn't explicitly specified. Differential Revision: https://phab.mercurial-scm.org/D11035
Mon, 12 Jul 2021 03:30:04 +0200 sigpipe-remote: simply delegate pipe forwarding to subprocess we can kill
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 12 Jul 2021 03:30:04 +0200] rev 47618
sigpipe-remote: simply delegate pipe forwarding to subprocess we can kill Instead of using sophisticated logics with thread a non blocking pipes, we simply spawn two new process in charge of reading the pipe and sending the result to the client. When it is time to cut the pipe we violently kill them without any remorse. This close the pipe regardless of any in progress `os.read` call. Ironically this is the very same things as what the initial shell setup was doing, but in Python. This makes the test pass run properly on Windows. This also reveal that the Windows behavior is broken as the transaction is not properly rollback. However this is an adventure for another time. Making the test behave properly was enough effort. Differential Revision: https://phab.mercurial-scm.org/D11087
Mon, 12 Jul 2021 03:29:21 +0200 sigpipe-remote: verify the script is IO are unbuffered
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 12 Jul 2021 03:29:21 +0200] rev 47617
sigpipe-remote: verify the script is IO are unbuffered We don't want to get stuck anywhere by buffers. Differential Revision: https://phab.mercurial-scm.org/D11086
Sun, 11 Jul 2021 23:08:00 +0200 sigpipe-remote: check environment variable sooner
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 11 Jul 2021 23:08:00 +0200] rev 47616
sigpipe-remote: check environment variable sooner Lets make sure we have everything before doing anything. Differential Revision: https://phab.mercurial-scm.org/D11085
Mon, 12 Jul 2021 00:14:11 +0200 test-sigpipe: run the hook using `sh`
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 12 Jul 2021 00:14:11 +0200] rev 47615
test-sigpipe: run the hook using `sh` This make the hook properly run on Windows. Differential Revision: https://phab.mercurial-scm.org/D11084
Thu, 10 Jun 2021 17:58:03 +0200 windows: add windows behavior on broken pager
Raphaël Gomès <rgomes@octobus.net> [Thu, 10 Jun 2021 17:58:03 +0200] rev 47614
windows: add windows behavior on broken pager Apparently, Windows has "better" behavior than Unix in this case. This is an edge case that led me down a rabbit hole, only to find a bug in the Python documentation... I am not planning on trying to reproduce the same behavior on Unix systems since it's not really useful, but other people are welcome to! Differential Revision: https://phab.mercurial-scm.org/D11000
Wed, 07 Jul 2021 23:04:19 +0530 mergestate: use dirstate.update_file API in recordupdates()
Pulkit Goyal <7895pulkit@gmail.com> [Wed, 07 Jul 2021 23:04:19 +0530] rev 47613
mergestate: use dirstate.update_file API in recordupdates() Let's use the new single function to replace multiple different functions. This is part of dirstate API refactor to make it more clearer and generic so that it can be replicated in Rust. Differential Revision: https://phab.mercurial-scm.org/D11077
Fri, 09 Jul 2021 15:27:38 +0530 dirstate: add dedicated function for updating data of a file
Pulkit Goyal <7895pulkit@gmail.com> [Fri, 09 Jul 2021 15:27:38 +0530] rev 47612
dirstate: add dedicated function for updating data of a file `dirstate.normal()` is too generic to be a user facing function for that. This is a part of effort to refactor dirstate APIs and make them clearer. Differential Revision: https://phab.mercurial-scm.org/D11076
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
Sat, 10 Jul 2021 02:42:09 +0200 test-bookmark: clarify the path involved in a pull creating divergence
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 10 Jul 2021 02:42:09 +0200] rev 47581
test-bookmark: clarify the path involved in a pull creating divergence This make the test easier to follow. Especially because this part is currently failing on windows. Differential Revision: https://phab.mercurial-scm.org/D11056
Sat, 10 Jul 2021 02:25:06 +0200 test-removeemptydirs: adjust to Windows behavior for the `histedit` case
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 10 Jul 2021 02:25:06 +0200] rev 47580
test-removeemptydirs: adjust to Windows behavior for the `histedit` case Windows stay in the "same" directory and the warning message is not applicable. This make `tests/test-removeemptydirs.t` pass on Windows. Differential Revision: https://phab.mercurial-scm.org/D11055
Sat, 10 Jul 2021 02:18:56 +0200 test-removeemptydirs: clarify the state of things in the `histedit` case
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 10 Jul 2021 02:18:56 +0200] rev 47579
test-removeemptydirs: clarify the state of things in the `histedit` case This make the test easier to follow and will help to compare with the behavior on windows. Differential Revision: https://phab.mercurial-scm.org/D11054
Fri, 09 Jul 2021 20:09:46 +0200 test-infinitepush: drop unused helper
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 09 Jul 2021 20:09:46 +0200] rev 47578
test-infinitepush: drop unused helper They are unused since de4c2f3af97f. We drop them for clarity. Differential Revision: https://phab.mercurial-scm.org/D11048
Fri, 09 Jul 2021 17:02:01 +0200 run-tests: setup "correct" python earlier
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 09 Jul 2021 17:02:01 +0200] rev 47577
run-tests: setup "correct" python earlier I don't see any good reason to wait. This result in slightly simpler code. Differential Revision: https://phab.mercurial-scm.org/D11047
Fri, 09 Jul 2021 16:28:45 +0200 run-tests: cleanup windows generation of the python / python3 pointeur
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 09 Jul 2021 16:28:45 +0200] rev 47576
run-tests: cleanup windows generation of the python / python3 pointeur They are no need to generate then in RUNTESTDIR and we don't need a python2 executable. (because not test ever use `python2` explicitly). This is probably still not perfect, but at least it is better. Differential Revision: https://phab.mercurial-scm.org/D11045
Fri, 09 Jul 2021 15:29:58 +0200 run-tests: always define a custom-bin directory
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 09 Jul 2021 15:29:58 +0200] rev 47575
run-tests: always define a custom-bin directory We are always generating `python` / `python3` executable and we will soon often generate a `hg` executable. So let's always make it a thing. This will help us to make sure we have the appropriate binary available to all script. On both linux and Windows. Differential Revision: https://phab.mercurial-scm.org/D11044
Fri, 09 Jul 2021 16:18:41 +0200 run-tests: explicitly track that `pythondir` was inferred
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 09 Jul 2021 16:18:41 +0200] rev 47574
run-tests: explicitly track that `pythondir` was inferred If we want to know that something happened, we should simply track that this things happened. This will be useful to start using `tmpbindir` more in a different form. Differential Revision: https://phab.mercurial-scm.org/D11043
Fri, 09 Jul 2021 15:39:43 +0200 run-tests: use a global WINDOWS constant instead of multiple tests
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 09 Jul 2021 15:39:43 +0200] rev 47573
run-tests: use a global WINDOWS constant instead of multiple tests This should make the code clearer. This required the adjustement of a hack in the code testing this code. Differential Revision: https://phab.mercurial-scm.org/D11041
Fri, 09 Jul 2021 13:36:39 +0200 test-run-test: use explicit variables to clarify paths
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 09 Jul 2021 13:36:39 +0200] rev 47572
test-run-test: use explicit variables to clarify paths Since $TESTTMP and $TESTDIR are defined for both the main scope and the test run during the test, the situation get confusing. To work around that, we define some new, explicit, variables with the values we needs to keep track of. Differential Revision: https://phab.mercurial-scm.org/D11034
Wed, 23 Jun 2021 14:34:55 +0200 run-tests: also catch double-escapes for $TESTTMP
Raphaël Gomès <rgomes@octobus.net> [Wed, 23 Jun 2021 14:34:55 +0200] rev 47571
run-tests: also catch double-escapes for $TESTTMP On Windows the `$TESTTMP` string "repr" is different than its value, because `\` become `\\`. We introduce a new `$STR_REPR_TESTTMP` substitution to match that too. Differential Revision: https://phab.mercurial-scm.org/D11001
Thu, 08 Jul 2021 17:13:18 +0200 ci-windows: introduce manual windows CI
Raphaël Gomès <rgomes@octobus.net> [Thu, 08 Jul 2021 17:13:18 +0200] rev 47570
ci-windows: introduce manual windows CI Note: most of the foundational work of this commit was done by Matt Harbison, but enough has changed that I don't feel comfortable sending this patch as his. In our quest to remove Python 2 from Mercurial, we need to get Windows CI going to check that Python 3 support is up to an acceptable standard. This is the first step: adding a manual step to run a full Windows CI, with a certain definition of "full" since some things are not installed yet, like SVN. Differential Revision: https://phab.mercurial-scm.org/D11025
Sun, 04 Jul 2021 23:41:54 +0200 dirstate-item: deprecate tuple access on the class
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 04 Jul 2021 23:41:54 +0200] rev 47569
dirstate-item: deprecate tuple access on the class This should help us to catch and update the last user of this, especially in extensions. People will need to run the test with --pure to actually catch it, but this is better than nothing. Differential Revision: https://phab.mercurial-scm.org/D10992
Mon, 05 Jul 2021 06:44:49 +0200 dirstate-item: use the v1_serialization method in debugstate
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 05 Jul 2021 06:44:49 +0200] rev 47568
dirstate-item: use the v1_serialization method in debugstate I am assuming the debug command are looking into the serialized format so I am using the `v1_` variants. This assumption might be wrong. Differential Revision: https://phab.mercurial-scm.org/D10988
Mon, 05 Jul 2021 10:32:49 +0200 dirstate-item: also build DistateItem in dirstate.directories()
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 05 Jul 2021 10:32:49 +0200] rev 47567
dirstate-item: also build DistateItem in dirstate.directories() The rust code was building tuple. Differential Revision: https://phab.mercurial-scm.org/D10983
Thu, 08 Jul 2021 17:09:57 -0400 parsers: move DirstateItem to attr.s
Augie Fackler <augie@google.com> [Thu, 08 Jul 2021 17:09:57 -0400] rev 47566
parsers: move DirstateItem to attr.s This is the followup I requested on D10949 - it was easy, so I just did it. Differential Revision: https://phab.mercurial-scm.org/D11030
Fri, 02 Jul 2021 11:44:13 -0700 cmdutil: fix newandmodified file accounting for --interactive commits
Daniel Ploch <dploch@google.com> [Fri, 02 Jul 2021 11:44:13 -0700] rev 47565
cmdutil: fix newandmodified file accounting for --interactive commits `originalchunks` is a misleading name, because it only contains header objects, which are flattened to selected hunks by the filter function. As such, `chunks not in originalchunks` is always True and misleading, because hunk objects never compare equal to header objects. This change fixes the internal naming and removes the useless parameter from the method. This change also fixes issue6533, by considering the filtered headers, rather than the hunks, when determining new and modified files. If a file is renamed + edited, and the edited hunks are deselected (but the file is not), the filtered chunks will contain a header for the file (because it's .special()) but but no hunks. Differential Revision: https://phab.mercurial-scm.org/D10936
Wed, 07 Jul 2021 15:09:26 +0200 test-run-tests: add missing backslash for Windows
Raphaël Gomès <rgomes@octobus.net> [Wed, 07 Jul 2021 15:09:26 +0200] rev 47564
test-run-tests: add missing backslash for Windows Differential Revision: https://phab.mercurial-scm.org/D11004
Thu, 24 Jun 2021 12:54:55 +0200 windows: use cpu-intensive task instead of real time in test
Raphaël Gomès <rgomes@octobus.net> [Thu, 24 Jun 2021 12:54:55 +0200] rev 47563
windows: use cpu-intensive task instead of real time in test Windows profiling breaks when using real time instead of cpu, but we need the extension function to show up, so make it do something instead of waiting. I've also duplicated the test cases so that explicit real and CPU times are tested (on platforms other than Windows) Differential Revision: https://phab.mercurial-scm.org/D11003
Thu, 24 Jun 2021 12:51:53 +0200 windows: use shell function instead of variable substitution
Raphaël Gomès <rgomes@octobus.net> [Thu, 24 Jun 2021 12:51:53 +0200] rev 47562
windows: use shell function instead of variable substitution This makes it compatible with Windows Differential Revision: https://phab.mercurial-scm.org/D11002
Tue, 06 Jul 2021 10:51:41 +0200 compat: normalise path before comparison in revlog splitting test
Raphaël Gomès <rgomes@octobus.net> [Tue, 06 Jul 2021 10:51:41 +0200] rev 47561
compat: normalise path before comparison in revlog splitting test This fixes the test on Window. Differential Revision: https://phab.mercurial-scm.org/D10999
Thu, 08 Jul 2021 15:55:15 +0200 windows: replicate the normalizing behavior of os.environ
Raphaël Gomès <rgomes@octobus.net> [Thu, 08 Jul 2021 15:55:15 +0200] rev 47560
windows: replicate the normalizing behavior of os.environ On Windows, `os.environ` normalizes environment variables to uppercase. Our current bytes-based environ substitution object is a simple dict, so we add the normalization behavior. This fixes test-http-peer.t on Windows. Differential Revision: https://phab.mercurial-scm.org/D10998
Thu, 08 Jul 2021 15:55:04 +0200 encoding: move case-related utils up
Raphaël Gomès <rgomes@octobus.net> [Thu, 08 Jul 2021 15:55:04 +0200] rev 47559
encoding: move case-related utils up This will be useful for the next commit that needs this code earlier. Differential Revision: https://phab.mercurial-scm.org/D11024
Sun, 04 Jul 2021 02:24:15 +0200 dirstate: drop the last explicit `state` usage in the module
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 04 Jul 2021 02:24:15 +0200] rev 47558
dirstate: drop the last explicit `state` usage in the module The internal detail of the `state` bytes is not longer exposed to the dirstate layer. Differential Revision: https://phab.mercurial-scm.org/D10977
Fri, 02 Jul 2021 20:20:37 +0200 test: use a python script in `test-transaction-rollback-on-sigpipe.t`
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 02 Jul 2021 20:20:37 +0200] rev 47557
test: use a python script in `test-transaction-rollback-on-sigpipe.t` This still does not work on Windows, but at least this is a python script now. Differential Revision: https://phab.mercurial-scm.org/D10947
Fri, 02 Jul 2021 20:53:23 +0200 test: make sure we hit the SIGPIPE in test-transaction-rollback-on-sigpipe
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 02 Jul 2021 20:53:23 +0200] rev 47556
test: make sure we hit the SIGPIPE in test-transaction-rollback-on-sigpipe With a coming change, we might not hit the sig pipe without issue and extra line of output. We do this early to make the next change clearer. Differential Revision: https://phab.mercurial-scm.org/D10946
Fri, 02 Jul 2021 20:22:56 +0200 test: clarify some output in `test-transaction-rollback-on-sigpipe`
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 02 Jul 2021 20:22:56 +0200] rev 47555
test: clarify some output in `test-transaction-rollback-on-sigpipe` We don't want a dirty transaction to remain, but need to check the transaction was aborted. Otherwise it is easy to have no abandoned transaction if the transaction succeed. Differential Revision: https://phab.mercurial-scm.org/D10945
Tue, 29 Jun 2021 13:58:18 -0700 tests: add test case for issue 6262
Martin von Zweigbergk <martinvonz@google.com> [Tue, 29 Jun 2021 13:58:18 -0700] rev 47554
tests: add test case for issue 6262 If you split a commit, prune one of the sides, and then try to revive that commit by adding a successor, it will incorrectly be considered divergence. Differential Revision: https://phab.mercurial-scm.org/D10916
Tue, 29 Jun 2021 14:02:34 -0700 rewriteutil: look up common predecessor on unfiltered repo
Martin von Zweigbergk <martinvonz@google.com> [Tue, 29 Jun 2021 14:02:34 -0700] rev 47553
rewriteutil: look up common predecessor on unfiltered repo Before this patch, the code looking for divergence could crash when tried to look up a common predecessor in the filtered repo. This patch fixes that by looking up the common predecessor in an unfiltered repo. Differential Revision: https://phab.mercurial-scm.org/D10917
Wed, 07 Jul 2021 10:07:28 -0700 tests: demonstrate crash when common predecessor of divergence is hidden
Martin von Zweigbergk <martinvonz@google.com> [Wed, 07 Jul 2021 10:07:28 -0700] rev 47552
tests: demonstrate crash when common predecessor of divergence is hidden Differential Revision: https://phab.mercurial-scm.org/D11009
Wed, 07 Jul 2021 11:48:08 -0400 shallowutil: dedent code after the previous change
Augie Fackler <augie@google.com> [Wed, 07 Jul 2021 11:48:08 -0400] rev 47551
shallowutil: dedent code after the previous change Differential Revision: https://phab.mercurial-scm.org/D11008
Wed, 07 Jul 2021 11:47:02 -0400 shallowutil: narrow scope of try/except block
Augie Fackler <augie@google.com> [Wed, 07 Jul 2021 11:47:02 -0400] rev 47550
shallowutil: narrow scope of try/except block This will make this code easier to understand in the future. Differential Revision: https://phab.mercurial-scm.org/D11007
Wed, 07 Jul 2021 11:45:17 -0400 remotefilelog: stop using RuntimeError for control flow
Augie Fackler <augie@google.com> [Wed, 07 Jul 2021 11:45:17 -0400] rev 47549
remotefilelog: stop using RuntimeError for control flow We introduce a new exception to handle the various failure categories, rather than relying on RuntimeError. Differential Revision: https://phab.mercurial-scm.org/D11006
Wed, 07 Jul 2021 13:20:47 -0400 remotefilelog: tweak corrupt cache test to grep more flexibly
Augie Fackler <augie@google.com> [Wed, 07 Jul 2021 13:20:47 -0400] rev 47548
remotefilelog: tweak corrupt cache test to grep more flexibly I'm about to fix the abuse of RuntimeError here, which breaks the test if I don't do this. Differential Revision: https://phab.mercurial-scm.org/D11005
Mon, 05 Jul 2021 06:39:29 +0200 dirstatenonnormalcheck: fix some bytes formating on python3
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 05 Jul 2021 06:39:29 +0200] rev 47547
dirstatenonnormalcheck: fix some bytes formating on python3 Passing any object to `%s` no longer works, we need to explicitely convert the representation to bytes. Differential Revision: https://phab.mercurial-scm.org/D10993
Mon, 05 Jul 2021 06:38:58 +0200 dirstate-item: use the properties in `contrib/dirstatenonnormalcheck.py`
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 05 Jul 2021 06:38:58 +0200] rev 47546
dirstate-item: use the properties in `contrib/dirstatenonnormalcheck.py` Differential Revision: https://phab.mercurial-scm.org/D10991
Mon, 05 Jul 2021 06:27:26 +0200 dirstate-item: use the properties in largefiles
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 05 Jul 2021 06:27:26 +0200] rev 47545
dirstate-item: use the properties in largefiles I am now sure what large file is doing with then, but at least it is no longer using the tuple API to access data. Differential Revision: https://phab.mercurial-scm.org/D10990
Mon, 05 Jul 2021 06:45:32 +0200 dirstate-item: use the `state` property in debugpathcomplete
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 05 Jul 2021 06:45:32 +0200] rev 47544
dirstate-item: use the `state` property in debugpathcomplete Ideally we would use narrower property, but this is a good start. Differential Revision: https://phab.mercurial-scm.org/D10989
Mon, 05 Jul 2021 06:24:51 +0200 dirstate-item: use the properties in fakedirstatewritetime
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 05 Jul 2021 06:24:51 +0200] rev 47543
dirstate-item: use the properties in fakedirstatewritetime Differential Revision: https://phab.mercurial-scm.org/D10987
Mon, 05 Jul 2021 03:58:38 +0200 dirstate-item: use the properties in dirstatemap
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 05 Jul 2021 03:58:38 +0200] rev 47542
dirstate-item: use the properties in dirstatemap Differential Revision: https://phab.mercurial-scm.org/D10986
Mon, 05 Jul 2021 03:57:40 +0200 dirstate-item: use the properties in pathutil
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 05 Jul 2021 03:57:40 +0200] rev 47541
dirstate-item: use the properties in pathutil Differential Revision: https://phab.mercurial-scm.org/D10985
Mon, 05 Jul 2021 03:57:11 +0200 dirstate-item: use need_delay when packing dirstate
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 05 Jul 2021 03:57:11 +0200] rev 47540
dirstate-item: use need_delay when packing dirstate Differential Revision: https://phab.mercurial-scm.org/D10984
Sun, 04 Jul 2021 22:27:29 +0200 dirstate-item: rename the class to DirstateItem
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 04 Jul 2021 22:27:29 +0200] rev 47539
dirstate-item: rename the class to DirstateItem The object is no longer a tuple, so it seems clearer to rename it (and its associated method) Differential Revision: https://phab.mercurial-scm.org/D10982
Sun, 04 Jul 2021 02:37:38 +0200 dirstate-entry: add a `mtime` property
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 04 Jul 2021 02:37:38 +0200] rev 47538
dirstate-entry: add a `mtime` property This is clearer than "tuple" indexing. Differential Revision: https://phab.mercurial-scm.org/D10981
Sun, 04 Jul 2021 02:34:24 +0200 dirstate-entry: add a `size` property
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 04 Jul 2021 02:34:24 +0200] rev 47537
dirstate-entry: add a `size` property This is clearer than "tuple" indexing. Differential Revision: https://phab.mercurial-scm.org/D10980
Sun, 04 Jul 2021 02:33:21 +0200 dirstate-entry: add a `mode` property
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 04 Jul 2021 02:33:21 +0200] rev 47536
dirstate-entry: add a `mode` property This is clearer than "tuple" indexing. Differential Revision: https://phab.mercurial-scm.org/D10979
Sun, 04 Jul 2021 02:28:08 +0200 dirstate: no longer pass `oldstate` to the `dropfile`
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 04 Jul 2021 02:28:08 +0200] rev 47535
dirstate: no longer pass `oldstate` to the `dropfile` The `oldstate` value come literally from `_map` so we don't need to pass tha information along. Differential Revision: https://phab.mercurial-scm.org/D10978
Sun, 04 Jul 2021 02:21:59 +0200 dirstate: drop last explicite `state` usage in status
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 04 Jul 2021 02:21:59 +0200] rev 47534
dirstate: drop last explicite `state` usage in status Given that the previous conditional we can safely use `tracked` here. Differential Revision: https://phab.mercurial-scm.org/D10976
Sun, 04 Jul 2021 02:15:41 +0200 dirstate: reorder "state" checking conditional
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 04 Jul 2021 02:15:41 +0200] rev 47533
dirstate: reorder "state" checking conditional This is easier to read and will make this simpler to update in the next changeset. Differential Revision: https://phab.mercurial-scm.org/D10975
Sun, 04 Jul 2021 02:13:53 +0200 dirstate-entry: add a `need_delay` method
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 04 Jul 2021 02:13:53 +0200] rev 47532
dirstate-entry: add a `need_delay` method This abstract the internal processing need for entry that would have an ambiguous mtime (If I understand things correctly). Differential Revision: https://phab.mercurial-scm.org/D10974
Sun, 04 Jul 2021 02:12:54 +0200 dirstate-entry: add a `tracked` property
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 04 Jul 2021 02:12:54 +0200] rev 47531
dirstate-entry: add a `tracked` property This abstract the individual `state` value and has a clear semantic. Differential Revision: https://phab.mercurial-scm.org/D10973
Sun, 04 Jul 2021 01:59:41 +0200 dirstate: drop `state` to `_addpath`
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 04 Jul 2021 01:59:41 +0200] rev 47530
dirstate: drop `state` to `_addpath` All its value are inferred within the dirstatemap now. Differential Revision: https://phab.mercurial-scm.org/D10972
Sun, 04 Jul 2021 01:58:03 +0200 dirstate: infer the 'n' state from `from_p2`
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 04 Jul 2021 01:58:03 +0200] rev 47529
dirstate: infer the 'n' state from `from_p2` This flag is only used with 'n' so lets set the state based on that parameter in this case. Differential Revision: https://phab.mercurial-scm.org/D10971
Sun, 04 Jul 2021 01:57:28 +0200 dirstate: infer the 'n' state from `possibly_dirty`
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 04 Jul 2021 01:57:28 +0200] rev 47528
dirstate: infer the 'n' state from `possibly_dirty` This flag is only used with 'n' so lets set the state based on that parameter in this case. Differential Revision: https://phab.mercurial-scm.org/D10970
Sun, 04 Jul 2021 01:48:11 +0200 dirstate: use a `merged` parameter to _addpath
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 04 Jul 2021 01:48:11 +0200] rev 47527
dirstate: use a `merged` parameter to _addpath Differential Revision: https://phab.mercurial-scm.org/D10969
Sun, 04 Jul 2021 01:44:43 +0200 dirstate-entry: add a `added` property
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 04 Jul 2021 01:44:43 +0200] rev 47526
dirstate-entry: add a `added` property Lets use more semantic property instead of the `state` implementation details. Differential Revision: https://phab.mercurial-scm.org/D10968
Sun, 04 Jul 2021 01:42:10 +0200 dirstate: use a `added` parameter to _addpath
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 04 Jul 2021 01:42:10 +0200] rev 47525
dirstate: use a `added` parameter to _addpath My next target are the explicit `state` byte, so let start with abstracting their initial storage. Differential Revision: https://phab.mercurial-scm.org/D10967
Sat, 03 Jul 2021 20:59:26 +0200 dirstate: no longer pass the `oldstate` value to the dirstatemap
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 03 Jul 2021 20:59:26 +0200] rev 47524
dirstate: no longer pass the `oldstate` value to the dirstatemap The dirstatemap already have this information. Differential Revision: https://phab.mercurial-scm.org/D10966
Sat, 03 Jul 2021 20:57:44 +0200 dirstate: stop using `oldstate` in `dirstate._addpath`
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 03 Jul 2021 20:57:44 +0200] rev 47523
dirstate: stop using `oldstate` in `dirstate._addpath` We don't need to pass the oldstate around, so lets use the new property instead. Differential Revision: https://phab.mercurial-scm.org/D10965
Sat, 03 Jul 2021 20:53:52 +0200 dirstate: drop the now unused magic constants for the dirstate module
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 03 Jul 2021 20:53:52 +0200] rev 47522
dirstate: drop the now unused magic constants for the dirstate module We no longer need them for the dirstate logic. We only need them in the dirstate map (and parsers) logic. This smell like progress. Differential Revision: https://phab.mercurial-scm.org/D10964
Sun, 04 Jul 2021 20:23:19 +0200 dirstate: move the handling of special case within the dirstatemap
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 04 Jul 2021 20:23:19 +0200] rev 47521
dirstate: move the handling of special case within the dirstatemap The dirstatemap is as well, if not better, suited to decided how to encode the various case. So we move the associated code in the dirstatemap `addfile` method. This means the dirstate no longer need to know about the various magic value used in the dirstate V1 format. The pain of the messy API start to be quite palpable in Rust, we should clean this up once the current large refactoring is dealt with. Differential Revision: https://phab.mercurial-scm.org/D10963
Sun, 04 Jul 2021 20:41:27 +0200 rust: bump rust-cpython version for 0.6.0
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 04 Jul 2021 20:41:27 +0200] rev 47520
rust: bump rust-cpython version for 0.6.0 That function as a nice `is_none` method on `PyObject` that we will put to use. Differential Revision: https://phab.mercurial-scm.org/D10962
(0) -30000 -10000 -3000 -1000 -120 +120 +1000 +3000 tip