Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 15 Jul 2021 04:55:57 +0200] rev 47694
dirstate: use `reset_state` in `update_file_p1`
Going through the same API is more consistent and allow us to push
implementation lower down the call stack.
Differential Revision: https://phab.mercurial-scm.org/D11136
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 15 Jul 2021 04:34:51 +0200] rev 47693
dirstate: rename `update_file_reference` to `update_file_p1`
This is a bit clearer on the intended usage of the function. (but still not great)
Differential Revision: https://phab.mercurial-scm.org/D11135
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 19 Jul 2021 07:23:55 +0200] rev 47692
dirstate-map: move most of `dirstate.update_file` logic in the dsmap
A new `reset_state` method is introduced to deal with most of that logic. This
move things one layer lower, but the ultimate goal is to deal with most of this
at the DirstateItem level.
This reveal various imperfection with the data passed to update_file by
`mergestate.recordupdates`, however this is orthogonal to this patch and should
be dealt with at a higher level.
Differential Revision: https://phab.mercurial-scm.org/D11134
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 16 Jul 2021 22:30:11 +0200] rev 47691
dirstate: replace `update_parent_file_data` with simpler `update_parent` call
This make the dirstate API simpler.
Differential Revision: https://phab.mercurial-scm.org/D11133
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 16 Jul 2021 15:07:16 +0200] rev 47690
dirstate: factor out the part retrieve "filedata" out of `normal`
We will need them elsewhere.
Differential Revision: https://phab.mercurial-scm.org/D11132
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 15 Jul 2021 02:19:41 +0200] rev 47689
dirstate-map: factor out the change to _dirs and _alldirs on removing
This logic is complicated enough to deserves its own function. So it now does.
This will make it easier to reuse that logic in later changeset.
Differential Revision: https://phab.mercurial-scm.org/D11131
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 15 Jul 2021 01:58:50 +0200] rev 47688
dirstate-map: factor out the change to _dirs and _alldirs on dropping
This logic is complicated enough to deserves its own function. So it now does.
This will make it easier to reuse that logic in later changeset.
Differential Revision: https://phab.mercurial-scm.org/D11130
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 15 Jul 2021 01:58:31 +0200] rev 47687
dirstate-map: factor out the change to _dirs and _alldirs on adding
This logic is complicated enough to deserves its own function. So it now does.
This will make it easier to reuse that logic in later changeset.
Differential Revision: https://phab.mercurial-scm.org/D11129
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 14 Jul 2021 22:06:13 +0200] rev 47686
dirstate-item: introduce a `dm_otherparent` property
See inline documentation for details.
Differential Revision: https://phab.mercurial-scm.org/D11124
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 14 Jul 2021 21:59:18 +0200] rev 47685
dirstate-item: introduce a `dm_nonnormal` property
See inline documentation for details.
Differential Revision: https://phab.mercurial-scm.org/D11123
Simon Sapin <simon.sapin@octobus.net> [Fri, 16 Jul 2021 16:19:31 +0200] rev 47684
dirstate-v2: Reserve a few bytes of space for future extensions
See doc-comment
Differential Revision: https://phab.mercurial-scm.org/D11101
Simon Sapin <simon.sapin@octobus.net> [Fri, 16 Jul 2021 14:08:26 +0200] rev 47683
dirstate-v2: Separate iterators for dirfoldmap and debugdirstate
`dirstatemap.dirfoldmap` was recently changed to re-use a Rust iterator
that was added for the `hg debugdirstate` command.
That iterator was based on all nodes in the tree dirstate without an entry
only existing to hold child nodes, and therefore being directories.
However to optimize status further we may want to store additional nodes
for unknown or ignored files and directories. At that point the two users
of this iterator will want different things, so let’s make two iterators
instead.
See doc-comments in `dispatch.rs`.
Differential Revision: https://phab.mercurial-scm.org/D11099