Historically, the revision to branch mapping cache was updated on demand
and shared via bundle2 to avoid the cost of rebuilding on first use.
Introduce an extension point register_changeset in the repository to
register new changesets. Extend commit, unbundling and exchange to invoke
this for each new changelog.
Ensure that the rev-branch-cache is updated using this extension
point. This makes the whole bundle part redundant. The change exposed
a performance issue in the cache implementation since repeated
extending of a bytearray has quadratic runtime complexity. Avoid this by
using the normal amortized constant time method for resizing dynamic
arrays.
The additional processing slows "hg unbundle" of the whole hg repository
down by around 1.8% and less for larger repositories.
The bundle capability is still advertised and will be unset separately
to avoid the tests churn.
That signature change is weird.
I don't understand why we need to shift responsability here and have the branch cache care about this.