Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 25 May 2023 00:23:05 +0200] rev 50672
rewrite: simplify the `retained_extras` extra logic
First, we move the definition of value outside of the rebase extensions, as this
apply to all rebase-like operation and some live in other place (like evolve).
Second we make it a simple set, so that it is easy for an extension to add a new
value in it.
Third, we move the associated logic in core too. That make it easily available
to other extensions.
Fourth we simplify it usage, as the verbose version of the filtering is just a
handful on line long, we are just going to test all the value for updates, so
the Projection overlay is not bringing much here.
Note that, we make it a module level set, is a key is worth preserving it is
probably worth preserving in all cases. This was already the behavior prior to
this change.
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 29 May 2023 18:41:58 +0200] rev 50671
stream-clone: smoothly detect and handle a case were a revlog is split
This detect and handle the most common case for a race condition around stream
and revlog splitting. The one were the revlog is split between the initial
collection of data and the time were we start considering stream that data.
In such case, we repatch an inlined version of that revlog together when this
happens. This is necessary as stream-v2 promised a specific number of bytes and
a specific number of files to the client. In stream-v3, we will have the
opportunity to just send a split revlog instead.
Getting a better version of the protocol for stream-v3 is still useful, but it
is no longer a blocket to fix that race condition.
Note that another, rarer race condition exist, were the revlog is split while
we creating the revlog and extracing content from it. This can be dealt with
later.
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 29 May 2023 14:07:58 +0200] rev 50670
stream-clone: implement decidated `get_streams` method for revlog
For revlog, we can do better using the maximum linkrev expected. This approach
open the way to dealing with a much larger set of non-trivial changes, like
splitting of inline revlogs.
We will actually tackle this issue in the next changesets (thanks to this one).