Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 20 May 2023 01:17:27 +0200] rev 50520
stream-clone: bail-out earlier if destination repo is not empty
The `canperformstreamclone` function is bit messy. However it seems clearer to
me to process the very generic condition about "can we consider a stream-clone
at all", before checking if a stream-clone is requested and if a compatible
protocol can be negotiated with the server.
So I am doing some gratuitous movement so reorder conditional.
Arseniy Alekseyev <aalekseyev@janestreet.com> [Sun, 21 May 2023 00:00:57 +0200] rev 50519
stream-clone: check the version of streaming clone supported by the client
Make the server refuse to produce streaming clone bundle, if the client
doesn't specify the stream=v2 capability.
This is in preparation to introduce stream=v3.
As far as I can tell, this capability was added at the same time as
support for bundle2-based streaming pulls was added, so I don't expect
clients to break. (the modern client doesn't break, at any rate)
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 21 May 2023 01:03:19 +0200] rev 50518
stream-clone: make sure the `stream` capability is set when bundling
This is important to start narrowing protocol option in the next changesets.
Arseniy Alekseyev <aalekseyev@janestreet.com> [Sun, 21 May 2023 00:00:29 +0200] rev 50517
stream-clone: upgrade the error message for bad stream request
The new version if more compact and more consistent with the general Mercurial
usage.
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 21 May 2023 03:21:00 +0200] rev 50516
stream-clone: yield cache entry in `_entries_walk` too
The new function now cover the same ground as _v2_walk.
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 21 May 2023 03:10:59 +0200] rev 50515
stream-clone: introduce a _entries_walk
That function insert itself between the store and `_v2_walk`. It only deals with
StoreEntry unlike `_v2_walk` that deal with actual file.
A share of the `_v2_walk` logic will be moved in this new `_entry_walk`
function. Having this function will help us to implement a new "v3" version of
the protocol that will be more entry centric.