Show More
@@ -33,9 +33,10 b' from . import (' | |||
|
33 | 33 | urlerr = util.urlerr |
|
34 | 34 | urlreq = util.urlreq |
|
35 | 35 | |
|
36 | bundle2required = _( | |
|
37 | 'incompatible Mercurial client; bundle2 required\n' | |
|
38 | '(see https://www.mercurial-scm.org/wiki/IncompatibleClient)\n') | |
|
36 | bundle2requiredmain = _('incompatible Mercurial client; bundle2 required') | |
|
37 | bundle2requiredhint = _('see https://www.mercurial-scm.org/wiki/' | |
|
38 | 'IncompatibleClient') | |
|
39 | bundle2required = '%s\n(%s)\n' % (bundle2requiredmain, bundle2requiredhint) | |
|
39 | 40 | |
|
40 | 41 | class abstractserverproto(object): |
|
41 | 42 | """abstract class that summarizes the protocol API |
@@ -948,7 +949,14 b' def unbundle(repo, proto, heads):' | |||
|
948 | 949 | gen = exchange.readbundle(repo.ui, fp, None) |
|
949 | 950 | if (isinstance(gen, changegroupmod.cg1unpacker) |
|
950 | 951 | and not bundle1allowed(repo, 'push')): |
|
951 | return ooberror(bundle2required) | |
|
952 | if proto.name == 'http': | |
|
953 | # need to special case http because stderr do not get to | |
|
954 | # the http client on failed push so we need to abuse some | |
|
955 | # other error type to make sure the message get to the | |
|
956 | # user. | |
|
957 | return ooberror(bundle2required) | |
|
958 | raise error.Abort(bundle2requiredmain, | |
|
959 | hint=bundle2requiredhint) | |
|
952 | 960 | |
|
953 | 961 | r = exchange.unbundle(repo, gen, their_heads, 'serve', |
|
954 | 962 | proto._client()) |
@@ -1107,6 +1107,14 b' Verify bundle1 pushes can be disabled' | |||
|
1107 | 1107 | (see https://www.mercurial-scm.org/wiki/IncompatibleClient) |
|
1108 | 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 | 1118 | $ hg push |
|
1111 | 1119 | pushing to http://localhost:$HGPORT/ |
|
1112 | 1120 | searching for changes |
General Comments 0
You need to be logged in to leave comments.
Login now