mercurial/wireproto.py
branchstable
changeset 30874 3d4afc2fdcd7
parent 30872 accaa04f951c
child 30876 f3807a135e43
--- a/mercurial/wireproto.py	Fri Feb 10 18:06:12 2017 +0100
+++ b/mercurial/wireproto.py	Fri Feb 10 18:06:08 2017 +0100
@@ -834,7 +834,10 @@
 
     if not bundle1allowed(repo, 'pull'):
         if not exchange.bundle2requested(opts.get('bundlecaps')):
-            return ooberror(bundle2required)
+            if proto.name == 'http':
+                return ooberror(bundle2required)
+            raise error.Abort(bundle2requiredmain,
+                              hint=bundle2requiredhint)
 
     chunks = exchange.getbundlechunks(repo, 'serve', **opts)
     return streamres(gen=chunks, v1compressible=True)