dirstate: fix parse_dirstate() to error out if NULL entry created
Since
83f0e93ec34b "dirstate-item: move the C implementation to the same
logic", dirstate_item_from_v1_data() gets more likely to return NULL, and
the fuzzer crashes because of that.
rust: Remove EntryState::Unknown
This enum variant represented the `state == '?'` case, which was used
to represent the absence of a dirstate entry/item (and therefore of that
entry’s state).
Now that previous refactors have removed this use in the Python/Rust
FFI APIs, the remaining uses can be removed by replacing `EntryState`
by `Option<EntryState>` where appropriate, using `None` to represent
the absence of an entry.
Differential Revision: https://phab.mercurial-scm.org/D11465
dirstate: Remove the `state == ' '` special case
Previously this was used to create a `DirstateItem` representing dirstate tree
nodes that semantically don’t have an associated `DirtateItem`.
This isn’t used anymore now that `dirstatemap.debug_iter` yields plain tuples.
Differential Revision: https://phab.mercurial-scm.org/D11464
debugsate: Change debug_iter() to yield tuples instead of DirstateItem
This removes the need for `DirstateItem` to support the `state == ' '`
special case which represents dirstate tree nodes without an item.
Differential Revision: https://phab.mercurial-scm.org/D11463
debugstate: Always call dirstatemap.debug_iter()
… passing it a new `all` argument for the `--all` CLI option,
instead of conditionally calling `.debug_iter()` or `.items()`
This prepares for the next commit.
Differential Revision: https://phab.mercurial-scm.org/D11462
rust: Make the fields of DirstateEntry private
This is a first step toward making its internal structure equivalent to
Python’s DirstateItem.
Differential Revision: https://phab.mercurial-scm.org/D11461
rust: Remove support for passing a dict to the Rust pathutil.dirs()
That is only used by the Python dirstatemap, which not used when Rust
is enabled.
This allows removing the private `extract_dirstate` function which
creates `DirstateEntry` values. This in turn will make easier upcoming
changes to `DirstateEntry`.
Differential Revision: https://phab.mercurial-scm.org/D11460
rust: Remove the `rustext.parsers` module
It only exported Rust implementations of the parse_dirstate and pack_dirtate
functions, which are only used (anymore) when Rust is not enabled.
fakedirstatewritetime.py was detecting the presence of `rustext.parsers`
but what it really wants to know is whether the Rust implementation of
`dirstatemap` is used. This changes it to detect `rustext.dirstate` instead.
Differential Revision: https://phab.mercurial-scm.org/D11459