undo-files: use the cleanup function in narrow
Lets use the same code, so that we can fix things only once.
undo-files: extract the cleanup code from strip in a function
This logic is duplicated in multiple places and it missing some important parts.
So lets start dealing with the duplication first.
run-tests: fix a crash when using the coverage options
35bf7f23b84c attempted to transition away from `distutils`, but the `packaging`
code lacks `StrictVersion`. I have no idea when `packaging.version` became
available, but I have it in python 3.6, so that should be good enough. For some
reason, the import checker thinks this is a local import, and needs help to
decide otherwise.
Alternately we could ditch the version check entirely, because `coverage` is
currently at 7.2.1, and the original check was added back in 2010.
rust: fix building on macOS (
issue6801)
The VFS change is copied over from Cargo, and likely to apply to other
platforms as well.
The dirstate change is essentially a replay of
440972d2175d, which was
reverted in
e98fd81bb151, part of !383, to silence some clippy
warnings.
tests: fix timeout adjustement in delaypush.py
Doing integer arithmetic with string is bound to fail.