mercurial/bundle2.py
changeset 50519 3c0da0fa0eed
parent 50518 f2bcb56a1d39
child 50524 58adcabc295f
--- a/mercurial/bundle2.py	Sun May 21 01:03:19 2023 +0200
+++ b/mercurial/bundle2.py	Sun May 21 00:00:57 2023 +0200
@@ -1886,6 +1886,14 @@
         msg = _(b'stream data requested but server does not allow this feature')
         hint = _(b'the client seems buggy')
         raise error.Abort(msg, hint=hint)
+    if not (b'stream' in bundler.capabilities):
+        msg = _(
+            b'stream data requested but supported streaming clone versions were not specified'
+        )
+        hint = _(b'the client seems buggy')
+        raise error.Abort(msg, hint=hint)
+    if not (b'v2' in bundler.capabilities[b'stream']):
+        raise error.Abort(_(b'the client does not support streamclone v2'))
 
     # Stream clones don't compress well. And compression undermines a
     # goal of stream clones, which is to be fast. Communicate the desire