dirstate-map: add a missing debug wait point when accessing the v2 docket
fc8e37c380d3 added synchronization points to the dirstate to allow for race
condition testing without actually requiring a time-based race condition
to happen.
This changes adds the `pre-read-file` wait point before we read the docket,
since callers might ask for the parents before anything else is
read, leading to the first read being done before the wait point.
This removes some differences in test output which were presumed to be
speed related, but weren't.
rust-parsers: use the same error message as with the higher-level code
This can happen at two places, but it's not really enough time to justify it
being refactored. Let's ensure we have the same error message, the newer one
being slightly more helpful.
rust-pathauditor: make sure we actually test the nested repo case
This covers the *on-disk* case, where the path itself does not have a `.hg`
component.
rust-pathauditor: match more of Python's behavior and display messages
We will make use of the path auditor when running our update fast-path,
and we want to output of it to be close enough.
rust-dirstate: pass dirstate tracked key from the requirements
We will make use of this with the `hg update` fastpath
rust-repo: don't use on-disk dirstate parents in v1
This mistake was not causing any problems yet since we were never updating
parents from Rust code. This is about to change, so let's fix it.
rust-cpython: add a util to get a `Repo` from a python path
I suspect this will not be the last time we need to do something like this.
rust: improve `InvalidRevision` error message
I encountered this when debugging earlier and felt like we were losing some
information along the way, which we were!
rust-dirstate: use a struct as arguments for the high-level `reset_state`
This makes the interface a lot clearer at the call site and prevents silly
mistakes, as an API with a bunch of booleans is prone to errors.
This refactor adds a `from_empty` parameter for a fast-path when resetting
and entry we're sure does not exist. It will be used in the upcoming update
Rust fastpath, and was not split to prevent more churn.