Mercurial > hg-stable
comparison tests/test-bundle2-exchange.t @ 30874:3d4afc2fdcd7 stable
bundle1: fix bundle1-denied reporting for pull over ssh
Changeset b288fb2724bf introduced a config option to have the server deny pull
using bundle1. The original protocol has not really been design to allow that
kind of error reporting so some hack was used. It turned the hack only works on
HTTP and that ssh server hangs forever when this is used. After further
digging, there is no way to report the error in a unified way. Using `ooberror`
freeze ssh and raising 'Abort' makes HTTP return a HTTP-500 without further
details. So with sadness we implement a version that dispatch according to the
protocol used.
Now the error is properly reported, but we still have ungraceful abort after
that. The protocol do not allow anything better to happen using bundle1.
author | Pierre-Yves David <pierre-yves.david@ens-lyon.org> |
---|---|
date | Fri, 10 Feb 2017 18:06:08 +0100 |
parents | f3c5a8a4dfd0 |
children | 636cf3f7620d |
comparison
equal
deleted
inserted
replaced
30873:f3c5a8a4dfd0 | 30874:3d4afc2fdcd7 |
---|---|
1037 incompatible Mercurial client; bundle2 required | 1037 incompatible Mercurial client; bundle2 required |
1038 (see https://www.mercurial-scm.org/wiki/IncompatibleClient) | 1038 (see https://www.mercurial-scm.org/wiki/IncompatibleClient) |
1039 [255] | 1039 [255] |
1040 $ killdaemons.py | 1040 $ killdaemons.py |
1041 | 1041 |
1042 $ hg --config devel.legacy.exchange=bundle1 clone ssh://user@dummy/bundle2onlyserver not-bundle2-ssh | |
1043 requesting all changes | |
1044 adding changesets | |
1045 remote: abort: incompatible Mercurial client; bundle2 required | |
1046 remote: (see https://www.mercurial-scm.org/wiki/IncompatibleClient) | |
1047 transaction abort! | |
1048 rollback completed | |
1049 abort: stream ended unexpectedly (got 0 bytes, expected 4) | |
1050 [255] | |
1051 | |
1042 $ cat > bundle2onlyserver/.hg/hgrc << EOF | 1052 $ cat > bundle2onlyserver/.hg/hgrc << EOF |
1043 > [server] | 1053 > [server] |
1044 > bundle1gd = false | 1054 > bundle1gd = false |
1045 > EOF | 1055 > EOF |
1046 $ hg -R bundle2onlyserver serve -p $HGPORT -d --pid-file=hg.pid | 1056 $ hg -R bundle2onlyserver serve -p $HGPORT -d --pid-file=hg.pid |