comparison tests/test-bundle2-exchange.t @ 30909:d554e624c5fe stable

bundle1: fix bundle1-denied reporting for push over ssh Changeset b288fb2724bf introduced a config option to have the server deny push using bundle1. The original protocol has not really be design to allow such kind of error reporting so some hack was used. It turned the hack only works on HTTP and that ssh wire peer hangs forever when the same hack 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 HTTP500 without further details. So with sadness we implement a version that dispatch according to the protocol used. We also add a test for pushing over ssh to make sure we won't regress in the future. That test show that the hint is missing, this is another bug fixed in the next changeset.
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
date Fri, 10 Feb 2017 17:56:59 +0100
parents 4c8dcb491974
children accaa04f951c
comparison
equal deleted inserted replaced
30908:4c8dcb491974 30909:d554e624c5fe
1105 abort: remote error: 1105 abort: remote error:
1106 incompatible Mercurial client; bundle2 required 1106 incompatible Mercurial client; bundle2 required
1107 (see https://www.mercurial-scm.org/wiki/IncompatibleClient) 1107 (see https://www.mercurial-scm.org/wiki/IncompatibleClient)
1108 [255] 1108 [255]
1109 1109
1110 (also check with ssh)
1111
1112 $ hg --config devel.legacy.exchange=bundle1 push ssh://user@dummy/bundle2onlyserver
1113 pushing to ssh://user@dummy/bundle2onlyserver
1114 searching for changes
1115 remote: abort: incompatible Mercurial client; bundle2 required
1116 [1]
1117
1110 $ hg push 1118 $ hg push
1111 pushing to http://localhost:$HGPORT/ 1119 pushing to http://localhost:$HGPORT/
1112 searching for changes 1120 searching for changes
1113 remote: adding changesets 1121 remote: adding changesets
1114 remote: adding manifests 1122 remote: adding manifests