diff -r c814101560d9 -r 60f9602b413e mercurial/wireprotov1peer.py --- a/mercurial/wireprotov1peer.py Wed May 31 18:08:56 2023 +0100 +++ b/mercurial/wireprotov1peer.py Wed Mar 08 14:23:43 2023 +0100 @@ -341,6 +341,19 @@ self.requirecap(b'clonebundles', _(b'clone bundles')) return self._call(b'clonebundles') + def _finish_inline_clone_bundle(self, stream): + pass # allow override for httppeer + + def get_inline_clone_bundle(self, path): + stream = self._callstream(b"get_inline_clone_bundle", path=path) + length = util.uvarintdecodestream(stream) + + # SSH streams will block if reading more than length + for chunk in util.filechunkiter(stream, limit=length): + yield chunk + + self._finish_inline_clone_bundle(stream) + @batchable def lookup(self, key): self.requirecap(b'lookup', _(b'look up remote revision'))