Debian Codegraph @

tests/test-ssh-repoerror.t

raw
1 #require unix-permissions no-root no-windows no-rhg
2
3 XXX-RHG this test hangs if `hg` is really `rhg`. This was hidden by the use of
4 `alias hg=rhg` by run-tests.py. With such alias removed, this test is revealed
5 buggy. This need to be resolved sooner than later.
6
7 repository itself is non-readable
8 ---------------------------------
9
10 $ hg init no-read
11 $ hg id ssh://user@dummy/no-read
12 000000000000
13 $ chmod a-rx no-read
14
15 $ hg id ssh://user@dummy/no-read
16 remote: abort: $EACCES$: *$TESTTMP/no-read/.hg* (glob)
17 abort: no suitable response from remote hg
18 [255]
19
20 special case files are visible, but unreadable
21 ----------------------------------------------
22
23 This is "similar" to the test above, but the directory is "traversable". This
24 seems an unexpected case in real life, but we test it anyway.
25
26 $ hg init other
27 $ hg id ssh://user@dummy/other
28 000000000000
29 $ for item in `find other | sort -r` ; do
30 > chmod a-r $item
31 > done
32
33 $ hg id ssh://user@dummy/other
34 remote: abort: $EACCES$: '$TESTTMP/other/.hg/requires'
35 abort: no suitable response from remote hg
36 [255]
37
38 directory toward the repository is read only
39 --------------------------------------------
40
41 $ mkdir deep
42 $ hg init deep/nested
43
44 $ hg id ssh://user@dummy/deep/nested
45 000000000000
46
47 $ chmod a-rx deep
48
49 $ hg id ssh://user@dummy/deep/nested
50 remote: abort: $EACCES$: *$TESTTMP/deep/nested/.hg* (glob)
51 abort: no suitable response from remote hg
52 [255]
53
54 repository has wrong requirement
55 --------------------------------
56
57 $ hg init repo-future
58 $ hg id ssh://user@dummy/repo-future
59 000000000000
60 $ echo flying-car >> repo-future/.hg/requires
61 $ hg id ssh://user@dummy/repo-future
62 remote: abort: repository requires features unknown to this Mercurial: flying-car
63 remote: (see https://mercurial-scm.org/wiki/MissingRequirement for more information)
64 abort: no suitable response from remote hg
65 [255]