stream-clone: filter possible missing requirements using all supported one
The `supportedformat` requirements is missing some important requirements and it
seems better to filter out with all requirements we know, not just an
"arbitrary" subset.
The `supportedformat` set is lacking some important requirements (for example
`revlog-compression-zstd`). This is getting fixed on default (for Mercurial 6.1)
However, fixing that in 6.1 means the stream requirements sent over the wire
will contains more items. And if we don't apply this fix on older version, they
might end up complaining about lacking support for feature they actually support
for years.
This patch does not fix the deeper problem (advertised stream requirement
lacking some of them), but focus on the trivial part : Lets use the full set of
supported requirement for looking for unsupported ones.
This patch should be simple to backport to older version of Mercurial and
packager should be encouraged to do so.
This is a graft of
d9017df70135 from default.
Differential Revision: https://phab.mercurial-scm.org/D12091
share-safe: enable by default (BC)
The feature have been around for a year (4 version) and is quite important.
Lets make it enabled by default.
Differential Revision: https://phab.mercurial-scm.org/D11997
share-safe: add support for static-http repository
We need to read the second requirements file in the static-http case too. Otherwise, static-http would miss most of the requirements and misbehave.
Differential Revision: https://phab.mercurial-scm.org/D11996
legacy-revlog: fix requirement computation when cloning legacy repo
The oldest format of repository does not have requirements so we need to treat
them differently when cloning such repository.
The previous code had issue whenever we start using a working-copy-only
requirements. The "legacy" format is signaled using an empty requirements list.
If we add working-copy-only requirements to it, this is no longer empty, and
no longer legacy.
The new code fix this, and will get fully tested in a couple of changeset, once the
share-safe become the default.
Differential Revision: https://phab.mercurial-scm.org/D11995
requirements: do not warn about dropping share-safe, unless explicitly set
If we are just altering the default value, this is "fine". This will get tested
once share-safe become the default.
Differential Revision: https://phab.mercurial-scm.org/D11994
sparse: take lock before writing requirements
with `share-safe`, we will also write file in the store. So we take the `lock`
before altering the requirements.
Differential Revision: https://phab.mercurial-scm.org/D11993
largefiles: take lock before writing requirements
With `share-safe`, we will also write file in the store. We now take the `lock`
as needed.
Differential Revision: https://phab.mercurial-scm.org/D11992
lfs: take lock before writing requirements
With `share-safe`, we will also write file in the store, so we take the store
lock before writing requirements.
Differential Revision: https://phab.mercurial-scm.org/D11991