Comments
Patch
@@ -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)
@@ -1039,6 +1039,16 @@
[255]
$ killdaemons.py
+ $ hg --config devel.legacy.exchange=bundle1 clone ssh://user@dummy/bundle2onlyserver not-bundle2-ssh
+ requesting all changes
+ adding changesets
+ remote: abort: incompatible Mercurial client; bundle2 required
+ remote: (see https://www.mercurial-scm.org/wiki/IncompatibleClient)
+ transaction abort!
+ rollback completed
+ abort: stream ended unexpectedly (got 0 bytes, expected 4)
+ [255]
+
$ cat > bundle2onlyserver/.hg/hgrc << EOF
> [server]
> bundle1gd = false