equal
deleted
inserted
replaced
1 $ "$TESTDIR/hghave" unix-permissions || exit 80 |
|
2 |
|
3 No local source |
|
4 |
|
5 $ hg clone a b |
|
6 abort: repository a not found! |
|
7 [255] |
|
8 |
|
9 No remote source |
|
10 |
|
11 $ hg clone http://127.0.0.1:3121/a b |
|
12 abort: error: Connection refused |
|
13 [255] |
|
14 $ rm -rf b # work around bug with http clone |
|
15 |
|
16 Inaccessible source |
|
17 |
|
18 $ mkdir a |
|
19 $ chmod 000 a |
|
20 $ hg clone a b |
|
21 abort: repository a not found! |
|
22 [255] |
|
23 |
|
24 Inaccessible destination |
|
25 |
|
26 $ hg init b |
|
27 $ cd b |
|
28 $ hg clone . ../a |
|
29 abort: Permission denied: ../a |
|
30 [255] |
|
31 $ cd .. |
|
32 $ chmod 700 a |
|
33 $ rm -r a b |
|
34 |
|
35 Source of wrong type |
|
36 |
|
37 $ if "$TESTDIR/hghave" -q fifo; then |
|
38 > mkfifo a |
|
39 > hg clone a b |
|
40 > rm a |
|
41 > else |
|
42 > echo "abort: repository a not found!" |
|
43 > fi |
|
44 abort: repository a not found! |
|
45 |
|
46 Default destination, same directory |
|
47 |
|
48 $ hg init q |
|
49 $ hg clone q |
|
50 destination directory: q |
|
51 abort: destination 'q' is not empty |
|
52 [255] |
|
53 |
|
54 destination directory not empty |
|
55 |
|
56 $ mkdir a |
|
57 $ echo stuff > a/a |
|
58 $ hg clone q a |
|
59 abort: destination 'a' is not empty |
|
60 [255] |
|
61 |
|
62 leave existing directory in place after clone failure |
|
63 |
|
64 $ hg init c |
|
65 $ cd c |
|
66 $ echo c > c |
|
67 $ hg commit -A -m test |
|
68 adding c |
|
69 $ chmod -rx .hg/store/data |
|
70 $ cd .. |
|
71 $ mkdir d |
|
72 $ hg clone c d 2> err |
|
73 [255] |
|
74 $ test -d d |
|
75 $ test -d d/.hg |
|
76 [1] |
|
77 |
|
78 reenable perm to allow deletion |
|
79 |
|
80 $ chmod +rx c/.hg/store/data |
|