docket: move the uid logic in the `revlogutils.docket` module
We want to use it for revlog-v2 (& Co), it seems more logical to have the logic
lives inside the `docket` file than the `nodemap` file.
Differential Revision: https://phab.mercurial-scm.org/D10755
persistent-nodemap: use the intended uuid size
I overlooked this in the initial implementation. The format already supporting
any uuid size so, nothing horrible should happens.
Differential Revision: https://phab.mercurial-scm.org/D10754
persistent-nodemap: add a way to make the picked uid predictable
This will make the test less volatile and therefore easier to maintain. I am
setting this is for the persistent nodemap docket first, but my target is to use
similar logic for the revlogv2 (and co) test.
For persisent nodemap, they are too many different in how each test variants (with rust, without rust, etc) needs new uid for this be really useful (right now). However it will be directly useful for the revlogv2 logic.
Differential Revision: https://phab.mercurial-scm.org/D10753
run-tests: disable color in 'auto' mode on Windows if stdout is redirected
Differential Revision: https://phab.mercurial-scm.org/D10761
run-tests: enable color on Windows
In setting up the CI for Windows on heptapod, I noticed it was complaining about
color not being enabled because pygments wasn't installed- even though it was.
I had initially disabled color on Windows when using Windows 7, because that
didn't understand ANSI color codes and made a mess of the output. But now that
it's been unsupported for over a year, I don't think we should care about it
either.
It's admittedly a hack to depend on Mercurial proper to enable color support in
the terminal, but I didn't feel like duplicating that code. I'm under the
impression that 3rd party stuff is supposed to use this runner in the Mercurial
repo instead of using their own copy, so I think it's safe to assume the
Mercurial code is available. If it's not, it won't break anything.
Differential Revision: https://phab.mercurial-scm.org/D10760
transaction: trivial refactoring
Differential Revision: https://phab.mercurial-scm.org/D10714
test: remove some unnecessary dependency on repo format
Differential Revision: https://phab.mercurial-scm.org/D10757
hg-cpython: fix new occuring TypeError
dd339191f2dc introduced a minor refactoring of error types that highlighted
a fragile error creation mechanism that was in place in the Rust `MixedIndex`.
`PyErr::from_instance` also accepts a Python class, as long as it's an
`Exception` class. Before the aforementioned commit, we never ran into a case
where this duck-typing mechanism failed. We rectify this behavior by doing the
instantiation ourselves.
Differential Revision: https://phab.mercurial-scm.org/D10764