head-revs: merge the two inner_headrevs… variants
Now that there is only one method, it does not make sense to have two different
"inner" method. This is especially true as we are about to add another parameter
to the method. So we clean up before that.
head-revs: move hg-cpython's inner_headrevsfiltered closer to inner_headrevs
This is pure code movement, it make a coming changesets significantly clearer.
head-revs: teach the pure indexes about the `headrevs` method
Having this computation done at the index level unify the API and remove revlog
side complexity. It might also be a front runner of handing more responsability
to the index.
head-revs: remove the `headrevsfiltered` method on the index
This method is no longer called and can be removed.
head-revs: stop calling headrevsfiltered
The `headrevs` method have been accepting filter since Mercurial 3.2¹. I guess
we can rely on it for now.
(except the Rust extension that just gained this capability, but it has it now)
rust-cpython: also accept the `filteredrevs` argument in index.headrevs
The C version have been accepting this argument since Mercurial 3.2, lets align the Rust index here. This will make it possible to simplify the code in later changesets.
branchmap: use the proper experimental name in cacheutil
Otherwise they are not properly copied around.
interfaces: introduce and use a protocol class for the `mpatch` module
See
f2832de2a46c for details when this was done for the `bdiff` module.
Two things worth pointing out-
1) The `cffi` module "inherits" the `pure` implementation of `patchedsize()`
because of its wildcard import.
2) It's odd that the `mpatchError` lives in both `pure` and `cext` modules.
I initially thought to move the exception into the new class, and make the
existing class name an alias to the class in the new location, but the exception
is created in C code by the `cext` module, so that won't work. I don't think a
protocol class is approriate, because there's nothing special about the class to
distinguish from any other `Exception`. Fortunately, nobody is catching this
exception in core, so we can kick the can down the road.
doctest: use the system hg to find the list of file to tests
Same as what we do for the `.t` tests, but more manually.