Wed, 22 Sep 2021 17:46:29 +0200 dirstate: use a new `drop_merge_data` in `setparent`
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 22 Sep 2021 17:46:29 +0200] rev 48060
dirstate: use a new `drop_merge_data` in `setparent` What is happening in this `setparent` loop is that we remove all `merge` related information when the dirstate is moved out of a `merge` situation. So instead of shuffling state to get them where we want, we simply add a method on the DirstateItem to do drop the information we want dropped. Differential Revision: https://phab.mercurial-scm.org/D11506
Wed, 22 Sep 2021 15:17:12 +0200 dirstate: move parent state handling in the dirstatemap
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 22 Sep 2021 15:17:12 +0200] rev 48059
dirstate: move parent state handling in the dirstatemap This involves dirstatemap data mostly. Moving this one level down will remove the needs for the dirstatemap to expose some of its internals. This will help us to simplify more code further. Differential Revision: https://phab.mercurial-scm.org/D11505
Wed, 22 Sep 2021 09:46:37 +0200 dirstate: stop checking for path collision when adjusting parents
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 22 Sep 2021 09:46:37 +0200] rev 48058
dirstate: stop checking for path collision when adjusting parents This was already checked at a earlier point when adding the file. Differential Revision: https://phab.mercurial-scm.org/D11504
Wed, 22 Sep 2021 15:08:47 +0200 dirstate: drop the `_updatedfiles` set
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 22 Sep 2021 15:08:47 +0200] rev 48057
dirstate: drop the `_updatedfiles` set This is a lot of book keeping for something that was only used to clear ambiguous time. Since this is no no longer in use, we can drop it. Differential Revision: https://phab.mercurial-scm.org/D11503
Wed, 22 Sep 2021 15:23:03 +0200 dirstate: drop the `clearambiguoustimes` method for the map
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 22 Sep 2021 15:23:03 +0200] rev 48056
dirstate: drop the `clearambiguoustimes` method for the map This is no longer called anywhere. Differential Revision: https://phab.mercurial-scm.org/D11502
Wed, 22 Sep 2021 14:54:42 +0200 dirstate: simplify the ambiguity clearing at write time
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 22 Sep 2021 14:54:42 +0200] rev 48055
dirstate: simplify the ambiguity clearing at write time The serialization function is already doing this, so we don't need to do it manually. We just need to propagate the right definition of "now". Differential Revision: https://phab.mercurial-scm.org/D11501
Tue, 28 Sep 2021 09:32:24 -0700 histedit: use more specific exceptions for more detailed exit codes
Martin von Zweigbergk <martinvonz@google.com> [Tue, 28 Sep 2021 09:32:24 -0700] rev 48054
histedit: use more specific exceptions for more detailed exit codes Differential Revision: https://phab.mercurial-scm.org/D11509
Tue, 28 Sep 2021 09:25:05 -0700 histedit: remove redundant checks for unfinished histedit state
Martin von Zweigbergk <martinvonz@google.com> [Tue, 28 Sep 2021 09:25:05 -0700] rev 48053
histedit: remove redundant checks for unfinished histedit state Both text-based and curses-based histedit already check for unfinished operations (not just unfinished histedit), so there's no need to check specifically for unfinished histedit. Differential Revision: https://phab.mercurial-scm.org/D11508
Tue, 28 Sep 2021 13:43:14 +0200 dirstate: Appease pytype
Simon Sapin <simon.sapin@octobus.net> [Tue, 28 Sep 2021 13:43:14 +0200] rev 48052
dirstate: Appease pytype test-check-pytype.t was failing since 98c0408324e6: File "/home/simon/projects/hg/mercurial/dirstatemap.py", line 572, in addfile: unsupported operand type(s) for &: 'size: None' and 'rangemask: int' [unsupported-operands] No attribute '__and__' on 'size: None' or '__rand__' on 'rangemask: int' File "/home/simon/projects/hg/mercurial/dirstatemap.py", line 573, in addfile: unsupported operand type(s) for &: 'mtime: None' and 'rangemask: int' [unsupported-operands] No attribute '__and__' on 'mtime: None' or '__rand__' on 'rangemask: int' `None` is the default value of the `size` and `mtime` parameters of the `addfile` method. However, the relevant lines are only used in a code path where those defaults are never used. These `size` and `mtime` are passed to `DirstateItem.new_normal` which (in the C implementation) calls `dirstate_item_new_normal` which uses: PyArg_ParseTuple(args, "iii", &mode, &size, &mtime) So `None` values would cause an exception to be raised anyway. The new `assert`s only move that exception earlier, and informs pytype that we expect `None` to never happen in this code path. Differential Revision: https://phab.mercurial-scm.org/D11500
Thu, 23 Sep 2021 18:29:40 +0200 dirstate: Pass the final DirstateItem to _rustmap.addfile()
Simon Sapin <simon.sapin@octobus.net> [Thu, 23 Sep 2021 18:29:40 +0200] rev 48051
dirstate: Pass the final DirstateItem to _rustmap.addfile() Now that the Python DirstateItem class wraps a Rust DirstateEntry value, use that value directly instead of converting through v1 data + 5 booleans. Also remove propogating the return value. None of the callers look at it, and it is always None. Differential Revision: https://phab.mercurial-scm.org/D11494
(0) -30000 -10000 -3000 -1000 -300 -100 -10 +10 +100 +300 +1000 +3000 tip