phases: provide a test and accessor for non-public phase roots
This decouples users from the implementation details of the phasecache.
Also document a historic artifact about the stored phaseroots.
Differential Revision: https://phab.mercurial-scm.org/D8694
hg-core: define a `dirstate_status` `Operation`
This is 3/3 in a series of patches to improve dirstate status' code.
Following in the footsteps of
a46e36b82461, we move the main status
functionality to an `Operation`. This will most likely be subject to change in
the future (what function signature, what parameters, etc., but we will see
when `rhg` gets `hg status` support.
Differential Revision: https://phab.mercurial-scm.org/D8663
rust-status: improve documentation and readability
This patch is 2/3 in the series to improve the dirstate status code. It adds a
number of common type aliases to add more obvious semantics to function
signatures, improves/adds documentation where necessary and improves one or two
patterns to be more idiomatic.
Differential Revision: https://phab.mercurial-scm.org/D8662
rust-status: refactor status into a struct
The code for `dirstate/status` has grown too large for comfort, this is the
first of three patches that try to improve maintainability.
In this patch, refactoring dirstate's status into a struct allows for slimming
down function signatures drastically, keeping the mental (and maintenance)
burden lower, since pretty much all of them shared a few common arguments.
This had the pleasant side-effect of simplifying lifetimes a little. This has
no observable impact on performance.
The next patch will add/improve documentation and refactor some types. I tried
to keep new code down to a minimum in this patch because it's already pretty
big.
Differential Revision: https://phab.mercurial-scm.org/D8661
tests: avoid "magic" nodeids in test-rebase-legacy.t
This helps with readability.
Differential Revision: https://phab.mercurial-scm.org/D8735
tests: avoid a "magic" nodeid in test-wireproto-command-lookup.t
This helps with readability.
Differential Revision: https://phab.mercurial-scm.org/D8734
run-tests: replace '#' with '-' in temp path of repos created for tests
If we have multiple cases in a test, that leads us to a temp path of
format "<temp-path>-<case1>#<case2>".
This leads to hg.parseurl() parsing the path and take part
after `#` as a branch name.
I encountered this bug while adding support for share-safe case in next patch.
Differential Revision: https://phab.mercurial-scm.org/D8647