Mercurial > hg
comparison tests/test-clone.t @ 45906:95c4cca641f6
errors: remove trailing "!" from some error messages for consistency
Some types of exceptions had a trailing "!" printed after the message
from the exception itself. I guess some of these errors seem a little
more severe (?), but it seems more likely that the inconsistency was
just an oversight.
Differential Revision: https://phab.mercurial-scm.org/D9378
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Mon, 23 Nov 2020 11:18:48 -0800 |
parents | d68618954ade |
children | 8dfcebd084b6 |
comparison
equal
deleted
inserted
replaced
45905:e131dbf6ee15 | 45906:95c4cca641f6 |
---|---|
609 $ cd fail | 609 $ cd fail |
610 | 610 |
611 No local source | 611 No local source |
612 | 612 |
613 $ hg clone a b | 613 $ hg clone a b |
614 abort: repository a not found! | 614 abort: repository a not found |
615 [255] | 615 [255] |
616 | 616 |
617 Invalid URL | 617 Invalid URL |
618 | 618 |
619 $ hg clone http://invalid:url/a b | 619 $ hg clone http://invalid:url/a b |
1104 | 1104 |
1105 $ cd $TESTTMP | 1105 $ cd $TESTTMP |
1106 $ hg -R a id -r 0 | 1106 $ hg -R a id -r 0 |
1107 acb14030fe0a | 1107 acb14030fe0a |
1108 $ hg id -R remote -r 0 | 1108 $ hg id -R remote -r 0 |
1109 abort: repository remote not found! | 1109 abort: repository remote not found |
1110 [255] | 1110 [255] |
1111 $ hg --config share.pool=share -q clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" a ssh://user@dummy/remote | 1111 $ hg --config share.pool=share -q clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" a ssh://user@dummy/remote |
1112 $ hg -R remote id -r 0 | 1112 $ hg -R remote id -r 0 |
1113 acb14030fe0a | 1113 acb14030fe0a |
1114 | 1114 |
1174 [255] | 1174 [255] |
1175 $ hg clone 'ssh://%2DoProxyCommand=touch${IFS}owned/path' | 1175 $ hg clone 'ssh://%2DoProxyCommand=touch${IFS}owned/path' |
1176 abort: potentially unsafe url: 'ssh://-oProxyCommand=touch${IFS}owned/path' | 1176 abort: potentially unsafe url: 'ssh://-oProxyCommand=touch${IFS}owned/path' |
1177 [255] | 1177 [255] |
1178 $ hg clone 'ssh://fakehost|touch%20owned/path' | 1178 $ hg clone 'ssh://fakehost|touch%20owned/path' |
1179 abort: no suitable response from remote hg! | 1179 abort: no suitable response from remote hg |
1180 [255] | 1180 [255] |
1181 $ hg clone 'ssh://fakehost%7Ctouch%20owned/path' | 1181 $ hg clone 'ssh://fakehost%7Ctouch%20owned/path' |
1182 abort: no suitable response from remote hg! | 1182 abort: no suitable response from remote hg |
1183 [255] | 1183 [255] |
1184 | 1184 |
1185 $ hg clone 'ssh://-oProxyCommand=touch owned%20foo@example.com/nonexistent/path' | 1185 $ hg clone 'ssh://-oProxyCommand=touch owned%20foo@example.com/nonexistent/path' |
1186 abort: potentially unsafe url: 'ssh://-oProxyCommand=touch owned foo@example.com/nonexistent/path' | 1186 abort: potentially unsafe url: 'ssh://-oProxyCommand=touch owned foo@example.com/nonexistent/path' |
1187 [255] | 1187 [255] |
1205 $ hg clone "ssh://%3btouch%20owned%20/" --debug | 1205 $ hg clone "ssh://%3btouch%20owned%20/" --debug |
1206 running sh -c "read l; read l; read l" ';touch owned ' 'hg -R . serve --stdio' | 1206 running sh -c "read l; read l; read l" ';touch owned ' 'hg -R . serve --stdio' |
1207 sending upgrade request: * proto=exp-ssh-v2-0003 (glob) (sshv2 !) | 1207 sending upgrade request: * proto=exp-ssh-v2-0003 (glob) (sshv2 !) |
1208 sending hello command | 1208 sending hello command |
1209 sending between command | 1209 sending between command |
1210 abort: no suitable response from remote hg! | 1210 abort: no suitable response from remote hg |
1211 [255] | 1211 [255] |
1212 $ hg clone "ssh://example.com:%3btouch%20owned%20/" --debug | 1212 $ hg clone "ssh://example.com:%3btouch%20owned%20/" --debug |
1213 running sh -c "read l; read l; read l" -p ';touch owned ' example.com 'hg -R . serve --stdio' | 1213 running sh -c "read l; read l; read l" -p ';touch owned ' example.com 'hg -R . serve --stdio' |
1214 sending upgrade request: * proto=exp-ssh-v2-0003 (glob) (sshv2 !) | 1214 sending upgrade request: * proto=exp-ssh-v2-0003 (glob) (sshv2 !) |
1215 sending hello command | 1215 sending hello command |
1216 sending between command | 1216 sending between command |
1217 abort: no suitable response from remote hg! | 1217 abort: no suitable response from remote hg |
1218 [255] | 1218 [255] |
1219 #endif | 1219 #endif |
1220 | 1220 |
1221 $ hg clone "ssh://v-alid.example.com/" --debug | 1221 $ hg clone "ssh://v-alid.example.com/" --debug |
1222 running sh -c "read l; read l; read l" v-alid\.example\.com ['"]hg -R \. serve --stdio['"] (re) | 1222 running sh -c "read l; read l; read l" v-alid\.example\.com ['"]hg -R \. serve --stdio['"] (re) |
1223 sending upgrade request: * proto=exp-ssh-v2-0003 (glob) (sshv2 !) | 1223 sending upgrade request: * proto=exp-ssh-v2-0003 (glob) (sshv2 !) |
1224 sending hello command | 1224 sending hello command |
1225 sending between command | 1225 sending between command |
1226 abort: no suitable response from remote hg! | 1226 abort: no suitable response from remote hg |
1227 [255] | 1227 [255] |
1228 | 1228 |
1229 We should not have created a file named owned - if it exists, the | 1229 We should not have created a file named owned - if it exists, the |
1230 attack succeeded. | 1230 attack succeeded. |
1231 $ if test -f owned; then echo 'you got owned'; fi | 1231 $ if test -f owned; then echo 'you got owned'; fi |