changegroup: don't try to build changelog chunks if not required
When we extend a narrow clone without ellipsis, we don't download changelog
information because that's already present with the client. However we still try
to build that chunk stream. Building that chunk stream involves calling a lookup
function and store.emitrevisions() API. The lookup function is called len(cl)
number of times.
On large repositories, where len(cl) is in millions, calling that lookup
function is not a good idea. Also it's not required to use the
store.emitrevisons() API because we already have nodes present which we can use.
This patch short-circuits state building logic if we are processing a
non-ellipsis case and changelog is not required.
This saves up ~20 seconds on our internal repo for a single extend call.
Differential Revision: https://phab.mercurial-scm.org/D5733
revlog: make sure we never use sparserevlog without general delta (
issue6056)
We are getting user report where the delta code tries to use `sparse-revlog`
logic on repository where `generaldelta` is disabled. This can't work so we
ensure the two booleans have a consistent value.
Creating this kind of repository is not expected to be possible the current bug
report point at a clonebundle related bug that is still to be properly isolated
(Yuya Nishihara seems to a have done it).
Corrupting a repository to reproduce the issue is possible. A test using this
method is included in this fix.
sparserevlog: document the config option
This was overlooked when this graduated from experimental.