comparison tests/test-clone-failure.t @ 16846:e38ed2ceabe7

test-clone-failure: enable for Windows using #if
author Adrian Buehlmann <adrian@cadifra.com>
date Fri, 01 Jun 2012 13:38:18 +0200
parents a1914d214579
children
comparison
equal deleted inserted replaced
16845:4594729c61ee 16846:e38ed2ceabe7
1 $ "$TESTDIR/hghave" unix-permissions || exit 80
2
3 No local source 1 No local source
4 2
5 $ hg clone a b 3 $ hg clone a b
6 abort: repository a not found! 4 abort: repository a not found!
7 [255] 5 [255]
8 6
9 No remote source 7 No remote source
10 8
11 $ hg clone http://127.0.0.1:3121/a b 9 $ hg clone http://127.0.0.1:3121/a b
12 abort: error: Connection refused 10 abort: error: *refused* (glob)
13 [255] 11 [255]
14 $ rm -rf b # work around bug with http clone 12 $ rm -rf b # work around bug with http clone
13
14
15 #if unix-permissions
15 16
16 Inaccessible source 17 Inaccessible source
17 18
18 $ mkdir a 19 $ mkdir a
19 $ chmod 000 a 20 $ chmod 000 a
29 abort: Permission denied: ../a 30 abort: Permission denied: ../a
30 [255] 31 [255]
31 $ cd .. 32 $ cd ..
32 $ chmod 700 a 33 $ chmod 700 a
33 $ rm -r a b 34 $ rm -r a b
35
36 #endif
37
34 38
35 Source of wrong type 39 Source of wrong type
36 40
37 $ if "$TESTDIR/hghave" -q fifo; then 41 $ if "$TESTDIR/hghave" -q fifo; then
38 > mkfifo a 42 > mkfifo a
57 $ echo stuff > a/a 61 $ echo stuff > a/a
58 $ hg clone q a 62 $ hg clone q a
59 abort: destination 'a' is not empty 63 abort: destination 'a' is not empty
60 [255] 64 [255]
61 65
66
67 #if unix-permissions
68
62 leave existing directory in place after clone failure 69 leave existing directory in place after clone failure
63 70
64 $ hg init c 71 $ hg init c
65 $ cd c 72 $ cd c
66 $ echo c > c 73 $ echo c > c
76 [1] 83 [1]
77 84
78 reenable perm to allow deletion 85 reenable perm to allow deletion
79 86
80 $ chmod +rx c/.hg/store/data 87 $ chmod +rx c/.hg/store/data
88
89 #endif