changegroup: add a option to create bundle with full snapshot only
This is easy to implement now and can be useful for benchmarking.
changegroup: allow to force delta to be against p1
This new developer option is useful to general more "generic" bundle. Without
this option, a bundle generated from the repository use deltas similar to the
one stored in the specific repository it was generated from. This makes
performance testing a bit tricky.
Using deltas similar to the final result means all delta stored in the bundle
can be applied to the target repository without any further processing (except
for the rare case of a full snapshot). The application of such bundles
(almost) never exercises the (slower) path of searching for a new valid delta.
This result in unrealistic and too favorable timing and profile.
Instead, we introduce an option to make sure all revisions are stored as a
delta against p1. It might not be the best generation option, but it
guarantees that the content will be "generic", not favoring a specific target.
fix: disable use of thread-based worker
getfixes() accesses to repo, changectx, filectx, etc., so I believe there
are code paths triggering data race. Mercurial API isn't thread safe in
general.
storage: also use `deltamode argument` for ifiledata
Now that lower level uses such argument, we can propagate the change to higher
layers.
configitems: rename the config to prevent adding an alias in future
Right now the config option looks like:
[experimental.server]
stream-narrow-clones=
which does not match how config options are generally defined in core. So let's
rename this to:
[experimental]
server.stream-narrow-clones=
before the new release so that we don't have to add an alias in future for this.
Differential Revision: https://phab.mercurial-scm.org/D5198
sparse-revlog: only refine delta candidates in the sparse case (
issue6006)
Starting with
5aef5afa8654, a valid delta parent might be "refined". This
allows repository using sparse-revlog to produce better delta chain by using
better intermediate snapshot base.
However, this refining step was performed in all cases, including for
repository not using sparse-revlog. This could produce a strange chain in the
general delta case and corrupted repository in the non-general delta case.
We now skip this step unless sparse-revlog is in use.
In issue 6006, Yuya Nishihara provided a test case using an external
repository, so we did not include it. Finding "laboratory" condition to
reproduce this case and implementing an efficient test reproducing it is a bit
tricky. We do not foresee to have the time to provide one by the release date.
Differential Revision: https://phab.mercurial-scm.org/D5197
changegroup: refactor emitrevision to use a `deltamode` argument
This new argument gathers the semantic of `sendfulltext` and `deltaprevious`
in a single value. We are about to introduce a new type of constraints.
Avoiding yet another argument sounds like a plus.
http: work around custom http client classes that refuse extra attrs
I have no idea what is going on with our custom http client code at Google,
but it chokes on these extra attributes we're tucking on http clients. Since
it feels more than a little wrong to just stuff extra data on a client, let's
degrade gracefully when the client class refuses the attributes.